Hunterlong/AuthorizeCIM

View on GitHub
customer_profile.go

Summary

Maintainability
A
2 hrs
Test Coverage

File customer_profile.go has 533 lines of code (exceeds 500 allowed). Consider refactoring.
Open

package AuthorizeCIM

import (
    "encoding/json"
)
Severity: Minor
Found in customer_profile.go - About 2 hrs to fix

    exported method GetCustomerProfileResponse.Subscriptions should have comment or be unexported
    Open

    func (response GetCustomerProfileResponse) Subscriptions() []string {
    Severity: Minor
    Found in customer_profile.go by golint

    exported function UpdateProfile should have comment or be unexported
    Open

    func UpdateProfile(profile Profile) (*MessagesResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type DeleteCustomerProfileRequest should have comment or be unexported
    Open

    type DeleteCustomerProfileRequest struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type MessagesResponse should have comment or be unexported
    Open

    type MessagesResponse struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported function GetProfile should have comment or be unexported
    Open

    func GetProfile(customer Customer) (*GetCustomerProfileResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    struct field PaymentProfileId should be PaymentProfileID
    Open

        PaymentProfileId   string           `json:"customerPaymentProfileId,omitempty"`
    Severity: Minor
    Found in customer_profile.go by golint

    exported type DeleteCustomerShippingProfile should have comment or be unexported
    Open

    type DeleteCustomerShippingProfile struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type CustomerPaymentProfile should have comment or be unexported
    Open

    type CustomerPaymentProfile struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported function UpdatePaymentProfile should have comment or be unexported
    Open

    func UpdatePaymentProfile(profile Profile) (*MessagesResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type PaymentProfiles should have comment or be unexported
    Open

    type PaymentProfiles struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type CreateCustomerShippingAddress should have comment or be unexported
    Open

    type CreateCustomerShippingAddress struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type CreateCustomerShippingAddressResponse should have comment or be unexported
    Open

    type CreateCustomerShippingAddressResponse struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported method GetCustomerProfileResponse.PaymentProfiles should have comment or be unexported
    Open

    func (response GetCustomerProfileResponse) PaymentProfiles() []GetPaymentProfiles {
    Severity: Minor
    Found in customer_profile.go by golint

    exported function ValidatePaymentProfile should have comment or be unexported
    Open

    func ValidatePaymentProfile(customer Customer) (*ValidateCustomerPaymentProfileResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported method CustomerPaymentProfile.Add should have comment or be unexported
    Open

    func (payment CustomerPaymentProfile) Add() (*CustomerPaymentProfileResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type Profile should have comment or be unexported
    Open

    type Profile struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type GetCustomerProfileResponse should have comment or be unexported
    Open

    type GetCustomerProfileResponse struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type DeleteCustomerShippingProfileRequest should have comment or be unexported
    Open

    type DeleteCustomerShippingProfileRequest struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type GetCustomerProfileIdsRequest should have comment or be unexported
    Open

    type GetCustomerProfileIdsRequest struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported method Customer.Validate should have comment or be unexported
    Open

    func (customer Customer) Validate() (*ValidateCustomerPaymentProfileResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type ValidateCustomerPaymentProfile should have comment or be unexported
    Open

    type ValidateCustomerPaymentProfile struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type UpdateCustomerPaymentProfileRequest should have comment or be unexported
    Open

    type UpdateCustomerPaymentProfileRequest struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported function CreateShipping should have comment or be unexported
    Open

    func CreateShipping(profile Profile) (*CreateCustomerShippingAddressResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type CreateCustomerProfileRequest should have comment or be unexported
    Open

    type CreateCustomerProfileRequest struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type CreateCustomerProfile should have comment or be unexported
    Open

    type CreateCustomerProfile struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type CustomerProfiler should have comment or be unexported
    Open

    type CustomerProfiler struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type UpdateCustomerProfileRequest should have comment or be unexported
    Open

    type UpdateCustomerProfileRequest struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type UpPaymentProfile should have comment or be unexported
    Open

    type UpPaymentProfile struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported method Profile.UpdateProfile should have comment or be unexported
    Open

    func (profile Profile) UpdateProfile() (*MessagesResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported function CreateProfile should have comment or be unexported
    Open

    func CreateProfile(profile Profile) (*CustomProfileResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type CustomProfileResponse should have comment or be unexported
    Open

    type CustomProfileResponse struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type GetShippingProfiles should have comment or be unexported
    Open

    type GetShippingProfiles struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type GetCustomerPaymentProfileList should have comment or be unexported
    Open

    type GetCustomerPaymentProfileList struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported function GetProfileIds should have comment or be unexported
    Open

    func GetProfileIds() ([]string, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type CustomerProfileIdsResponse should have comment or be unexported
    Open

    type CustomerProfileIdsResponse struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported method Profile.CreateShipping should have comment or be unexported
    Open

    func (profile Profile) CreateShipping() (*CreateCustomerShippingAddressResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type ValidateCustomerPaymentProfileRequest should have comment or be unexported
    Open

    type ValidateCustomerPaymentProfileRequest struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported method Customer.Info should have comment or be unexported
    Open

    func (customer Customer) Info() (*GetCustomerProfileResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type ValidateCustomerPaymentProfileResponse should have comment or be unexported
    Open

    type ValidateCustomerPaymentProfileResponse struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported method Customer.DeleteProfile should have comment or be unexported
    Open

    func (customer Customer) DeleteProfile() (*MessagesResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported method Profile.UpdatePaymentProfile should have comment or be unexported
    Open

    func (profile Profile) UpdatePaymentProfile() (*MessagesResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported function MessageResponder should have comment or be unexported
    Open

    func MessageResponder(d interface{}) (*MessagesResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    struct field CustomerAddressId should be CustomerAddressID
    Open

        CustomerAddressId  string           `json:"customerAddressId,omitempty"`
    Severity: Minor
    Found in customer_profile.go by golint

    exported type DeleteCustomerProfile should have comment or be unexported
    Open

    type DeleteCustomerProfile struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type UpdateCustomerPaymentProfile should have comment or be unexported
    Open

    type UpdateCustomerPaymentProfile struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type UpdateCustomerShippingAddress should have comment or be unexported
    Open

    type UpdateCustomerShippingAddress struct {
    Severity: Minor
    Found in customer_profile.go by golint

    don't use MixedCaps in package name; AuthorizeCIM should be authorizecim
    Open

    package AuthorizeCIM
    Severity: Minor
    Found in customer_profile.go by golint

    exported method Profile.CreateProfile should have comment or be unexported
    Open

    func (profile Profile) CreateProfile() (*CustomProfileResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported function CreatePaymentProfile should have comment or be unexported
    Open

    func CreatePaymentProfile(profile CustomerPaymentProfile) (*CustomerPaymentProfileResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type CreateCustomerPaymentProfileRequest should have comment or be unexported
    Open

    type CreateCustomerPaymentProfileRequest struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type CustomerPaymentProfileResponse should have comment or be unexported
    Open

    type CustomerPaymentProfileResponse struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type GetCustomerPaymentProfileListRequest should have comment or be unexported
    Open

    type GetCustomerPaymentProfileListRequest struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported method Customer.DeleteShippingProfile should have comment or be unexported
    Open

    func (customer Customer) DeleteShippingProfile() (*MessagesResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported function UpdateShippingProfile should have comment or be unexported
    Open

    func UpdateShippingProfile(profile Profile) (*MessagesResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported function DeleteProfile should have comment or be unexported
    Open

    func DeleteProfile(customer Customer) (*MessagesResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported function DeleteShippingProfile should have comment or be unexported
    Open

    func DeleteShippingProfile(customer Customer) (*MessagesResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    struct field CustomerProfileId should be CustomerProfileID
    Open

        CustomerProfileId  string           `json:"customerProfileId,omitempty"`
    Severity: Minor
    Found in customer_profile.go by golint

    struct field PaymentProfileId should be PaymentProfileID
    Open

        PaymentProfileId      string   `json:"paymentProfileId,omitempty"`
    Severity: Minor
    Found in customer_profile.go by golint

    exported method Customer.DeletePaymentProfile should have comment or be unexported
    Open

    func (customer Customer) DeletePaymentProfile() (*MessagesResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported function DeletePaymentProfile should have comment or be unexported
    Open

    func DeletePaymentProfile(customer Customer) (*MessagesResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type DeleteCustomerPaymentProfileRequest should have comment or be unexported
    Open

    type DeleteCustomerPaymentProfileRequest struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type DeleteCustomerPaymentProfile should have comment or be unexported
    Open

    type DeleteCustomerPaymentProfile struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type CustomerProfileIdsRequest should have comment or be unexported
    Open

    type CustomerProfileIdsRequest struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type GetCustomerPaymentProfileListResponse should have comment or be unexported
    Open

    type GetCustomerPaymentProfileListResponse struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported function GetPaymentProfileIds should have comment or be unexported
    Open

    func GetPaymentProfileIds(month string, method string) (*GetCustomerPaymentProfileListResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type GetPaymentProfiles should have comment or be unexported
    Open

    type GetPaymentProfiles struct {
    Severity: Minor
    Found in customer_profile.go by golint

    struct field CustomerProfileId should be CustomerProfileID
    Open

        CustomerProfileId        string `json:"customerProfileId"`
    Severity: Minor
    Found in customer_profile.go by golint

    exported method GetCustomerProfileResponse.ShippingProfiles should have comment or be unexported
    Open

    func (response GetCustomerProfileResponse) ShippingProfiles() []GetShippingProfiles {
    Severity: Minor
    Found in customer_profile.go by golint

    exported method Profile.UpdateShippingProfile should have comment or be unexported
    Open

    func (profile Profile) UpdateShippingProfile() (*MessagesResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    struct field PaymentId should be PaymentID
    Open

        PaymentId    string  `json:"paymentProfileId,omitempty"`
    Severity: Minor
    Found in customer_profile.go by golint

    exported type CustomerProfileRequest should have comment or be unexported
    Open

    type CustomerProfileRequest struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type GetCustomerProfile should have comment or be unexported
    Open

    type GetCustomerProfile struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type MessageResponse should have comment or be unexported
    Open

    type MessageResponse struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type UpdateCustomerShippingAddressRequest should have comment or be unexported
    Open

    type UpdateCustomerShippingAddressRequest struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type UpdateCustomerProfile should have comment or be unexported
    Open

    type UpdateCustomerProfile struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type CreateCustomerPaymentProfile should have comment or be unexported
    Open

    type CreateCustomerPaymentProfile struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type PaymentProfile should have comment or be unexported
    Open

    type PaymentProfile struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type CreateCustomerShippingAddressRequest should have comment or be unexported
    Open

    type CreateCustomerShippingAddressRequest struct {
    Severity: Minor
    Found in customer_profile.go by golint

    There are no issues that match your filters.

    Category
    Status