/
h2h.go
60 lines (52 loc) · 1.46 KB
/
h2h.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package model
import (
"database/sql"
"github.com/shopspring/decimal"
)
type (
H2HProvider struct {
Id int64 `json:"id" db:"id"`
Provider sql.NullString `json:"provider" db:"provider"`
Code sql.NullString `json:"code" db:"code"`
Status int
BaseEntity
}
H2HProviderFee struct {
Id int64 `json:"id" db:"id"`
H2HProviderId int64 `json:"h2h_provider_id" db:"h2h_provider_id"`
WalletCode sql.NullString `json:"wallet_code" db:"wallet_code"`
Fee decimal.NullDecimal `json:"fee" db:"fee"`
BaseEntity
}
H2HPricingProjection struct {
Code string `json:"code" db:"code"`
Provider string `json:"provider" db:"provider"`
WalletCode string `json:"wallet_code" db:"wallet_code"`
Fee decimal.Decimal `json:"fee" db:"fee"`
}
H2HPricingsProjection struct {
WalletCode string `json:"wallet_code,omitempty"`
Prices []H2HPricingProjection
}
)
type (
H2HSendCashbackRequest struct {
HostCode string `json:"host_code,omitempty"`
Amount decimal.Decimal
Destination string
Notes string
KezbekRefNo string
WalletCode string
}
)
type (
H2HProviderResponse struct {
Id int64 `json:"id,omitempty"`
Code string `json:"code,omitempty"`
Provider string `json:"provider,omitempty"`
}
H2HTransactionResponse struct {
HostCode string `json:"host_code" example:"LSAJAH2H"`
TransactionResponse
}
)