Skip to content

Commit

Permalink
[SDKJ-73] Refactor the namespaces to replace "stripe" with "seamlesspay"
Browse files Browse the repository at this point in the history
1. renamed package from stripe to seamlesspay
2. replaced all Stripe with SeamlessPay where applicable
3. replaced Stripe global class with SPAPI where for every reference
4. replaced stripe with seamlesspay in build configuration files
5. reset library version from 20.98.0 to 0.0.1
  • Loading branch information
n-semikin committed Feb 18, 2022
1 parent 32e5043 commit e788b1e
Show file tree
Hide file tree
Showing 83 changed files with 307 additions and 372 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ implementation "com.stripe:stripe-java:20.98.0"
Add this dependency to your project's POM:

```xml

<dependency>
<groupId>com.stripe</groupId>
<artifactId>stripe-java</artifactId>
<version>20.98.0</version>
<groupId>com.seamlesspay</groupId>
<artifactId>stripe-java</artifactId>
<version>20.98.0</version>
</dependency>
```

Expand Down Expand Up @@ -66,10 +67,10 @@ StripeExample.java
import java.util.HashMap;
import java.util.Map;

import com.stripe.Stripe;
import com.stripe.exception.SPException;
import com.stripe.model.Customer;
import com.stripe.net.RequestOptions;
import com.seamlesspay.Stripe;
import com.seamlesspay.exception.SPException;
import com.seamlesspay.model.Customer;
import com.seamlesspay.net.RequestOptions;

public class StripeExample {

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.98.0
0.0.9
10 changes: 2 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ tasks.withType(JavaCompile) {
// // to fix by adding the missing summaries.
// check("MissingSummary", net.ltgt.gradle.errorprone.CheckSeverity.OFF)
//
// // This check is disabled because multiple nested classes may have the same name in a given
// // file. E.g. in `main/java/com/stripe/param/AccountUpdateParams.java`:
// // The name `Address` refers to [com.stripe.param.AccountUpdateParams.Company.Address,
// // com.stripe.param.AccountUpdateParams.Individual.Address] within this file.)
// // We should fix this by having autogen use the fully-qualified class to eliminate ambiguity.
// check("SameNameButDifferent", net.ltgt.gradle.errorprone.CheckSeverity.OFF)
// }
}

Expand Down Expand Up @@ -81,7 +75,7 @@ jar {
"Implementation-Version": VERSION_NAME,
"Implementation-Vendor": VENDOR_NAME,
"Bundle-SymbolicName": POM_ARTIFACT_ID,
"Export-Package": "com.stripe.*")
"Export-Package": "com.seamlesspay.*")

archiveVersion = VERSION_NAME
}
Expand Down Expand Up @@ -137,7 +131,7 @@ coveralls {
//}

gitPublish {
repoUri = '[email protected]:stripe/stripe-java.git'
repoUri = '[email protected]:seamlesspay/seamlesspay-java.git'
branch = 'gh-pages'
sign = false // disable commit signing

Expand Down
31 changes: 16 additions & 15 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
GROUP=com.stripe
VERSION_NAME=20.98.0
GROUP=com.seamlesspay
VERSION_NAME=0.0.1
NAME=seamlesspay-java

POM_URL=https://github.com/stripe/stripe-java
POM_SCM_URL=[email protected]:stripe/stripe-java.git
POM_SCM_CONNECTION=scm:git:[email protected]:stripe/stripe-java.git
POM_SCM_DEV_CONNECTION=scm:git:[email protected]:stripe/stripe-java.git
POM_URL=https://github.com/seamlesspay/seamlesspay-java
POM_SCM_URL=[email protected]:seamlesspay/seamlesspay-java.git
POM_SCM_CONNECTION=scm:git:[email protected]:seamlesspay/seamlesspay-java.git
POM_SCM_DEV_CONNECTION=scm:git:[email protected]:seamlesspay/seamlesspay-java.git
POM_LICENCE_NAME=The MIT License
POM_LICENCE_URL=https://opensource.org/licenses/MIT
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=stripe
POM_DEVELOPER_NAME=Stripe
POM_DEVELOPER_EMAIL=support+java@stripe.com
POM_LICENCE_DIST=seamlesspay
POM_DEVELOPER_ID=seamlesspay
POM_DEVELOPER_NAME=SeamlessPay
POM_DEVELOPER_EMAIL=support+java@seamlesspay.com

POM_DESCRIPTION=Stripe Java Bindings
POM_NAME=stripe-java
POM_ARTIFACT_ID=stripe-java
POM_DESCRIPTION=SeamlessPay Java Bindings
POM_NAME=seamlesspay-java
POM_ARTIFACT_ID=seamlesspay-java
POM_PACKAGING=jar
POM_ORGANIZATION_URL=https://stripe.com
POM_ORGANIZATION_URL=https://seamlesspay.com

VENDOR_NAME=Stripe, Inc. (https://stripe.com)
VENDOR_NAME=Seamless Payments (https://seamlesspay.com)

# Workaround to prevent Java 12 to try and use TLSv1.3 when uploading coverage
# reports to coveralls.io.
Expand Down
1 change: 0 additions & 1 deletion init

This file was deleted.

1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = NAME
34 changes: 5 additions & 29 deletions src/main/java/com/seamlesspay/SPAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,31 +49,7 @@ public static String getApiBase() {
}

/**
* (FOR TESTING ONLY) If you'd like your OAuth requests to hit your own (mocked) server, you can
* set this up here by overriding the base Connect URL.
*/
// public static void overrideConnectBase(final String overriddenConnectBase) {
// connectBase = overriddenConnectBase;
// }
//
// public static String getConnectBase() {
// return connectBase;
// }

/**
* (FOR TESTING ONLY) If you'd like your upload requests to hit your own (mocked) server, you can
* set this up here by overriding the base api URL.
*/
// public static void overrideUploadBase(final String overriddenUploadBase) {
// uploadBase = overriddenUploadBase;
// }
//
// public static String getUploadBase() {
// return uploadBase;
// }

/**
* Set proxy to tunnel all Stripe connections.
* Set proxy to tunnel all SeamlessPay connections.
*
* @param proxy proxy host and port setting
*/
Expand All @@ -98,7 +74,7 @@ public static int getConnectTimeout() {
}

/**
* Sets the timeout value that will be used for making new connections to the Stripe API (in
* Sets the timeout value that will be used for making new connections to the SeamlessPay API (in
* milliseconds).
*
* @param timeout timeout value in milliseconds
Expand All @@ -121,7 +97,7 @@ public static int getReadTimeout() {

/**
* Sets the timeout value that will be used when reading data from an established connection to
* the Stripe API (in milliseconds).
* the SeamlessPay API (in milliseconds).
*
* <p>Note that this value should be set conservatively because some API requests can take time
* and a short timeout increases the likelihood of causing a problem in the backend.
Expand Down Expand Up @@ -176,12 +152,12 @@ public static void setAppInfo(String name, String version, String url) {
}

/**
* Sets information about your application. The information is passed along to Stripe.
* Sets information about your application. The information is passed along to SeamlessPay.
*
* @param name Name of your application (e.g. "MyAwesomeApp")
* @param version Version of your application (e.g. "1.2.34")
* @param url Website for your application (e.g. "https://myawesomeapp.info")
* @param partnerId Your Stripe Partner ID (e.g. "pp_partner_1234")
* @param partnerId Your SeamlessPay Partner ID (e.g. "pp_partner_1234")
*/
public static void setAppInfo(String name, String version, String url, String partnerId) {
if (appInfo == null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.stripe.exception;
package com.seamlesspay.exception;

public class ApiConnectionException extends SPException {
private static final long serialVersionUID = 2L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.stripe.exception;
package com.seamlesspay.exception;

import com.stripe.model.error.SPError;
import com.seamlesspay.model.error.SPError;

public class ApiException extends SPException {
private static final long serialVersionUID = 2L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.stripe.exception;
package com.seamlesspay.exception;

import com.stripe.model.error.SPError;
import com.seamlesspay.model.error.SPError;

public class AuthenticationException extends SPException {
private static final long serialVersionUID = 2L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.stripe.exception;
package com.seamlesspay.exception;

public class IdempotencyException extends SPException {
private static final long serialVersionUID = 2L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.stripe.exception;
package com.seamlesspay.exception;

public class InvalidRequestException extends SPException {
private static final long serialVersionUID = 2L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.stripe.exception;
package com.seamlesspay.exception;

import com.stripe.model.error.SPError;
import com.seamlesspay.model.error.SPError;
import lombok.Getter;
import lombok.Setter;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.stripe.model;
package com.seamlesspay.model;

import com.seamlesspay.SPAPI;
import com.stripe.exception.SPException;
import com.stripe.net.ApiResource;
import com.stripe.net.RequestOptions;
import com.seamlesspay.exception.SPException;
import com.seamlesspay.net.ApiResource;
import com.seamlesspay.net.RequestOptions;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.stripe.model;
package com.seamlesspay.model;

import com.google.gson.annotations.SerializedName;
import com.stripe.net.ApiResource;
import com.seamlesspay.net.ApiResource;
import lombok.Data;
import lombok.EqualsAndHashCode;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.stripe.model;
package com.seamlesspay.model;

import com.google.gson.annotations.SerializedName;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.stripe.model;
package com.seamlesspay.model;

import com.google.gson.annotations.SerializedName;
import com.seamlesspay.SPAPI;
import com.stripe.exception.SPException;
import com.stripe.net.ApiRequestParams;
import com.stripe.net.ApiResource;
import com.stripe.net.RequestOptions;
import com.stripe.param.ChargeCreateParams;
import com.stripe.param.ChargeUpdateParams;
import com.stripe.param.ChargeVoidParams;
import com.seamlesspay.exception.SPException;
import com.seamlesspay.net.ApiRequestParams;
import com.seamlesspay.net.ApiResource;
import com.seamlesspay.net.RequestOptions;
import com.seamlesspay.param.ChargeCreateParams;
import com.seamlesspay.param.ChargeUpdateParams;
import com.seamlesspay.param.ChargeVoidParams;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
Expand Down Expand Up @@ -155,7 +155,7 @@ public static ChargeCollection list(RequestOptions options)
/**
* To charge a credit card or other payment source, you create a <code>Charge</code> object. If
* your API key is in test mode, the supplied payment source (e.g., card) won’t actually be
* charged, although everything else will occur as if in live mode. (Stripe assumes that the
* charged, although everything else will occur as if in live mode. (SeamlessPay assumes that the
* charge would have completed successfully).
*/
public static Charge create(Map<String, Object> params) throws SPException {
Expand All @@ -165,7 +165,7 @@ public static Charge create(Map<String, Object> params) throws SPException {
/**
* To charge a credit card or other payment source, you create a <code>Charge</code> object. If
* your API key is in test mode, the supplied payment source (e.g., card) won’t actually be
* charged, although everything else will occur as if in live mode. (Stripe assumes that the
* charged, although everything else will occur as if in live mode. (SeamlessPay assumes that the
* charge would have completed successfully).
*/
public static Charge create(Map<String, Object> params, RequestOptions options)
Expand All @@ -177,7 +177,7 @@ public static Charge create(Map<String, Object> params, RequestOptions options)
/**
* To charge a credit card or other payment source, you create a <code>Charge</code> object. If
* your API key is in test mode, the supplied payment source (e.g., card) won’t actually be
* charged, although everything else will occur as if in live mode. (Stripe assumes that the
* charged, although everything else will occur as if in live mode. (SeamlessPay assumes that the
* charge would have completed successfully).
*/
public static Charge create(ChargeCreateParams params) throws SPException {
Expand All @@ -187,7 +187,7 @@ public static Charge create(ChargeCreateParams params) throws SPException {
/**
* To charge a credit card or other payment source, you create a <code>Charge</code> object. If
* your API key is in test mode, the supplied payment source (e.g., card) won’t actually be
* charged, although everything else will occur as if in live mode. (Stripe assumes that the
* charged, although everything else will occur as if in live mode. (SeamlessPay assumes that the
* charge would have completed successfully).
*/
public static Charge create(ChargeCreateParams params, RequestOptions options) throws SPException {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.stripe.model;
package com.seamlesspay.model;

public class ChargeCollection extends SPCollection<Charge> {}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.stripe.model;
package com.seamlesspay.model;

import com.google.gson.annotations.SerializedName;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.stripe.model;
package com.seamlesspay.model;

import com.google.gson.annotations.SerializedName;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.stripe.model;
package com.seamlesspay.model;

public enum Currency {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.stripe.model;
package com.seamlesspay.model;

public enum DigitalWalletProgramType {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.stripe.model;
package com.seamlesspay.model;

import com.google.gson.annotations.SerializedName;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.stripe.model;
package com.seamlesspay.model;

import com.google.gson.annotations.SerializedName;
import com.stripe.net.ApiResource;
import com.seamlesspay.net.ApiResource;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.stripe.model;
package com.seamlesspay.model;

public interface HasId {
String getId();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.stripe.model;
package com.seamlesspay.model;

import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.stripe.model;
package com.seamlesspay.model;

import lombok.ToString;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.stripe.model;
package com.seamlesspay.model;

import com.google.gson.annotations.SerializedName;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.stripe.model;
package com.seamlesspay.model;

import com.google.gson.JsonObject;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.stripe.model;
package com.seamlesspay.model;

import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
Expand Down
Loading

0 comments on commit e788b1e

Please sign in to comment.