Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cjavilla-stripe committed Jul 10, 2019
1 parent 3c92581 commit 556fd8d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
23 changes: 11 additions & 12 deletions oauth.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package stripe

// Type of OAuth scope.
// OAuthScopeType is the type of OAuth scope.
type OAuthScopeType string

// List of possible values for OAuth scopes.
Expand All @@ -9,15 +9,15 @@ const (
OAuthScopeTypeReadWrite OAuthScopeType = "read_write"
)

// Type of token. This will always be "bearer."
// OAuthTokenType is the type of token. This will always be "bearer."
type OAuthTokenType string

// List of possible OAuthTokenType values.
const (
OAuthTokenTypeBearer OAuthTokenType = "bearer"
)

// Type of the business for the Stripe oauth user.
// OAuthStripeUserBusinessType is the business type for the Stripe oauth user.
type OAuthStripeUserBusinessType string

// List of supported values for business type.
Expand All @@ -29,8 +29,8 @@ const (
OAuthStripeUserBusinessTypeSoleProp OAuthStripeUserBusinessType = "sole_prop"
)

// The gender of the person who will be filling out a Stripe application.
// (International regulations require either male or female.)
// OAuthStripeUserGender of the person who will be filling out a Stripe
// application. (International regulations require either male or female.)
type OAuthStripeUserGender string

// The gender of the person who will be filling out a Stripe application.
Expand All @@ -40,7 +40,7 @@ const (
OAuthStripeUserGenderMale OAuthStripeUserGender = "male"
)

// Type of Errors raised when failing authorization.
// OAuthError is the type of errors raised when failing authorization.
type OAuthError string

// List of supported OAuthError values.
Expand All @@ -52,8 +52,7 @@ const (
OAuthErrorUnsupportedResponseType OAuthError = "unsupported_response_type"
)


// Type of Errors raised when failing authorization.
// DeauthorizationError the type of errors raised when failing authorization.
type DeauthorizationError string

// List of supported DeauthorizationError values.
Expand All @@ -62,7 +61,7 @@ const (
DeauthorizationErrorInvalidRequest DeauthorizationError = "invalid_request"
)

// Params for the stripe_user OAuth Authorize params.
// OAuthStripeUserParams for the stripe_user OAuth Authorize params.
type OAuthStripeUserParams struct {
BlockKana *string `form:"block_kana"`
BlockKanji *string `form:"block_kanji"`
Expand All @@ -89,11 +88,11 @@ type OAuthStripeUserParams struct {
ProductDescription *string `form:"product_description"`
State *string `form:"state"`
StreetAddress *string `form:"street_address"`
Url *string `form:"url"`
URL *string `form:"url"`
Zip *string `form:"zip"`
}

// Params for creating OAuth AuthorizeURL's.
// AuthorizeURLParams for creating OAuth AuthorizeURL's.
type AuthorizeURLParams struct {
Params `form:"*"`
AlwaysPrompt *bool `form:"always_prompt"`
Expand All @@ -107,7 +106,7 @@ type AuthorizeURLParams struct {
StripeUser *OAuthStripeUserParams `form:"stripe_user"`
}

// Params for deauthorizing an account.
// DeauthorizeParams for deauthorizing an account.
type DeauthorizeParams struct {
Params `form:"*"`
ClientID *string `form:"client_id"`
Expand Down
2 changes: 1 addition & 1 deletion oauth/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func TestAuthorizeURLWithStripeUser(t *testing.T) {
ProductDescription: stripe.String("product-description"),
State: stripe.String("NV"),
StreetAddress: stripe.String("123 main"),
Url: stripe.String("http://example.com"),
URL: stripe.String("http://example.com"),
Zip: stripe.String("12345"),
},
})
Expand Down
3 changes: 2 additions & 1 deletion stripe.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ const (
// CONNECTURL is the URL for OAuth.
CONNECTURL string = "https://connect.stripe.com"

// APIBackend is a constant representing the API service backend.
// ConnectBackend is a constant representing the connect service backend for
// OAuth.
ConnectBackend SupportedBackend = "connect"

// UnknownPlatform is the string returned as the system name if we couldn't get
Expand Down

0 comments on commit 556fd8d

Please sign in to comment.