Skip to content

Commit

Permalink
misc: Change Id to ID for naming
Browse files Browse the repository at this point in the history
  • Loading branch information
rsempe committed Apr 24, 2023
1 parent 7e22092 commit 96d34e7
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ type Charge struct {
}

type GroupProperties struct {
GroupId uuid.UUID `json:"group_id"`
GroupID uuid.UUID `json:"group_id"`
Values map[string]interface{} `json:"values"`
}
6 changes: 3 additions & 3 deletions coupon.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ type AppliedCouponListInput struct {
PerPage int `json:"per_page,omitempty,string"`
Page int `json:"page,omitempty,string"`
Status AppliedCouponStatus `json:"status,omitempty,string"`
ExternalCustomerId string `json:"external_customer_id,omitempty,string"`
ExternalCustomerID string `json:"external_customer_id,omitempty,string"`
}

type ApplyCouponParams struct {
Expand Down Expand Up @@ -337,8 +337,8 @@ func (cr *CouponRequest) ApplyToCustomer(ctx context.Context, applyCouponInput *
return appliedCouponResult.AppliedCoupon, nil
}

func (acr *AppliedCouponRequest) AppliedCouponDelete(ctx context.Context, externalCustomerId string, appliedCouponId string) (*AppliedCoupon, *Error) {
subPath := fmt.Sprintf("%s/%s/%s/%s", "customers", externalCustomerId, "applied_coupons", appliedCouponId)
func (acr *AppliedCouponRequest) AppliedCouponDelete(ctx context.Context, externalCustomerID string, appliedCouponID string) (*AppliedCoupon, *Error) {
subPath := fmt.Sprintf("%s/%s/%s/%s", "customers", externalCustomerID, "applied_coupons", appliedCouponID)
clientRequest := &ClientRequest{
Path: subPath,
Result: &AppliedCouponResult{},
Expand Down
4 changes: 2 additions & 2 deletions fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ type FeeListInput struct {
FeeType FeeType `json:"fee_type,omitempty"`
PaymentStatus FeePaymentStatus `json:"payment_status,omitempty"`

ExternalSubscriptionId string `json:"external_subscription_id,omitempty"`
ExternalCustomerId string `json:"external_customer_id,omitempty"`
ExternalSubscriptionID string `json:"external_subscription_id,omitempty"`
ExternalCustomerID string `json:"external_customer_id,omitempty"`

BillableMetricCode string `json:"billable_metric_code,omitempty"`

Expand Down
2 changes: 1 addition & 1 deletion invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ type InvoiceListInput struct {
IssuingDateFrom string `json:"issuing_date_from,omitempty"`
IssuingDateTo string `json:"issuing_date_to,omitempty"`

ExternalCustomerId string `json:"external_customer_id,omitempty"`
ExternalCustomerID string `json:"external_customer_id,omitempty"`
Status InvoiceStatus `json:"status,omitempty"`
PaymentStatus InvoicePaymentStatus `json:"payment_status,omitempty"`
}
Expand Down
14 changes: 7 additions & 7 deletions wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type WalletInput struct {
PaidCredits string `json:"paid_credits,omitempty"`
GrantedCredits string `json:"granted_credits,omitempty"`
ExpirationAt *time.Time `json:"expiration_at,omitempty"`
ExternalCustomerId string `json:"external_customer_id,omitempty"`
ExternalCustomerID string `json:"external_customer_id,omitempty"`
}

type WalletListInput struct {
Expand Down Expand Up @@ -71,8 +71,8 @@ func (c *Client) Wallet() *WalletRequest {
}
}

func (bmr *WalletRequest) Get(ctx context.Context, walletId string) (*Wallet, *Error) {
subPath := fmt.Sprintf("%s/%s", "wallets", walletId)
func (bmr *WalletRequest) Get(ctx context.Context, walletID string) (*Wallet, *Error) {
subPath := fmt.Sprintf("%s/%s", "wallets", walletID)
clientRequest := &ClientRequest{
Path: subPath,
Result: &WalletResult{},
Expand Down Expand Up @@ -145,8 +145,8 @@ func (bmr *WalletRequest) Create(ctx context.Context, walletInput *WalletInput)
return walletResult.Wallet, nil
}

func (bmr *WalletRequest) Update(ctx context.Context, walletInput *WalletInput, walletId string) (*Wallet, *Error) {
subPath := fmt.Sprintf("%s/%s", "wallets", walletId)
func (bmr *WalletRequest) Update(ctx context.Context, walletInput *WalletInput, walletID string) (*Wallet, *Error) {
subPath := fmt.Sprintf("%s/%s", "wallets", walletID)
clientRequest := &ClientRequest{
Path: subPath,
Result: &WalletResult{},
Expand All @@ -166,8 +166,8 @@ func (bmr *WalletRequest) Update(ctx context.Context, walletInput *WalletInput,
return walletResult.Wallet, nil
}

func (bmr *WalletRequest) Delete(ctx context.Context, walletId string) (*Wallet, *Error) {
subPath := fmt.Sprintf("%s/%s", "wallets", walletId)
func (bmr *WalletRequest) Delete(ctx context.Context, walletID string) (*Wallet, *Error) {
subPath := fmt.Sprintf("%s/%s", "wallets", walletID)
clientRequest := &ClientRequest{
Path: subPath,
Result: &WalletResult{},
Expand Down
6 changes: 3 additions & 3 deletions wallet_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type WalletTransactionRequest struct {
type WalletTransactionListInput struct {
PerPage int `json:"per_page,omitempty,string"`
Page int `json:"page,omitempty,string"`
WalletId string `json:"wallet_id,omitempty"`
WalletID string `json:"wallet_id,omitempty"`
Status WalletTransactionStatus `json:"status,omitempty"`
TransactionType TransactionType `json:"transaction_type,omitempty"`
}
Expand All @@ -40,7 +40,7 @@ type WalletTransactionParams struct {
}

type WalletTransactionInput struct {
WalletId string `json:"wallet_id,omitempty"`
WalletID string `json:"wallet_id,omitempty"`
PaidCredits string `json:"paid_credits,omitempty"`
GrantedCredits string `json:"granted_credits,omitempty"`
}
Expand Down Expand Up @@ -101,7 +101,7 @@ func (wtr *WalletTransactionRequest) GetList(ctx context.Context, walletTransact
return nil, &Error{Err: err}
}

subPath := fmt.Sprintf("%s/%s/%s", "wallets", walletTransactionListInput.WalletId, "wallet_transactions")
subPath := fmt.Sprintf("%s/%s/%s", "wallets", walletTransactionListInput.WalletID, "wallet_transactions")
clientRequest := &ClientRequest{
Path: subPath,
QueryParams: queryParams,
Expand Down

0 comments on commit 96d34e7

Please sign in to comment.