Documentation
¶
Overview ¶
Copyright 2024 Blnk Finance Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 Blnk Finance Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 Blnk Finance Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 Blnk Finance Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 Blnk Finance Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 Blnk Finance Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrPrecisionMustBeInteger = errors.New("precision must be an integer value")
Functions ¶
This section is empty.
Types ¶
type CreateAPIKeyRequest ¶
type CreateAccount ¶
type CreateAccount struct {
BankName string `json:"bank_name"`
Number string `json:"number"`
Currency string `json:"currency"`
IdentityId string `json:"identity_id"`
LedgerId string `json:"ledger_id"`
BalanceId string `json:"balance_id"`
MetaData map[string]interface{} `json:"meta_data"`
}
func (*CreateAccount) ToAccount ¶
func (a *CreateAccount) ToAccount() model.Account
func (*CreateAccount) ValidateCreateAccount ¶
func (a *CreateAccount) ValidateCreateAccount() error
type CreateBalance ¶
type CreateBalance struct {
LedgerId string `json:"ledger_id"`
IdentityId string `json:"identity_id"`
Currency string `json:"currency"`
Precision float64 `json:"precision"`
MetaData map[string]interface{} `json:"meta_data"`
TrackFundLineage bool `json:"track_fund_lineage"`
AllocationStrategy string `json:"allocation_strategy"`
}
func (*CreateBalance) ToBalance ¶
func (b *CreateBalance) ToBalance() model.Balance
func (*CreateBalance) ValidateCreateBalance ¶
func (b *CreateBalance) ValidateCreateBalance() error
type CreateBalanceMonitor ¶
type CreateBalanceMonitor struct {
BalanceId string `json:"balance_id"`
Condition MonitorCondition `json:"condition"`
CallBackURL string `json:"call_back_url"`
MetaData map[string]interface{} `json:"meta_data"`
}
func (*CreateBalanceMonitor) ToBalanceMonitor ¶
func (b *CreateBalanceMonitor) ToBalanceMonitor() model.BalanceMonitor
func (*CreateBalanceMonitor) ValidateCreateBalanceMonitor ¶
func (b *CreateBalanceMonitor) ValidateCreateBalanceMonitor() error
type CreateIdentity ¶
type CreateIdentity struct {
IdentityType string `json:"identity_type"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
OtherNames string `json:"other_names"`
Gender string `json:"gender"`
Dob time.Time `json:"dob"`
EmailAddress string `json:"email_address"`
PhoneNumber string `json:"phone_number"`
Nationality string `json:"nationality"`
OrganizationName string `json:"organization_name"`
Category string `json:"category"`
Street string `json:"street"`
Country string `json:"country"`
State string `json:"state"`
PostCode string `json:"post_code"`
City string `json:"city"`
CreatedAt time.Time `json:"created_at"`
MetaData map[string]interface{} `json:"meta_data"`
}
type CreateLedger ¶
type CreateLedger struct {
Name string `json:"name"`
MetaData map[string]interface{} `json:"meta_data"`
}
func (*CreateLedger) ToLedger ¶
func (l *CreateLedger) ToLedger() model.Ledger
func (*CreateLedger) ValidateCreateLedger ¶
func (l *CreateLedger) ValidateCreateLedger() error
type DetokenizeRequest ¶
type DetokenizeRequest struct {
Fields []string `json:"fields" binding:"required"`
}
type InflightUpdate ¶
type MonitorCondition ¶
type MonitorCondition struct {
Precision float64 `json:"precision"`
Field string `json:"field"`
Operator string `json:"operator"`
Value float64 `json:"value"`
}
func (*MonitorCondition) ValidateMonitorCondition ¶
func (c *MonitorCondition) ValidateMonitorCondition() error
type RecordTransaction ¶
type RecordTransaction struct {
Amount float64 `json:"amount"`
Rate float64 `json:"rate"`
Precision float64 `json:"precision"`
OverdraftLimit float64 `json:"overdraft_limit"`
PreciseAmount *big.Int `json:"precise_amount"`
AllowOverDraft bool `json:"allow_overdraft"`
Inflight bool `json:"inflight"`
SkipQueue bool `json:"skip_queue"`
Atomic bool `json:"atomic"`
Source string `json:"source"`
Reference string `json:"reference"`
Destination string `json:"destination"`
Description string `json:"description"`
Currency string `json:"currency"`
BalanceId string `json:"balance_id"`
ScheduledFor string `json:"scheduled_for"`
InflightExpiryDate string `json:"inflight_expiry_date,omitempty"`
Sources []model.Distribution `json:"sources"`
Destinations []model.Distribution `json:"destinations"`
MetaData map[string]interface{} `json:"meta_data"`
EffectiveDate *time.Time `json:"effective_date,omitempty"`
}
func (*RecordTransaction) ToTransaction ¶
func (t *RecordTransaction) ToTransaction() *model.Transaction
func (*RecordTransaction) ValidateRecordTransaction ¶
func (t *RecordTransaction) ValidateRecordTransaction() error
type TokenizeRequest ¶
type TokenizeRequest struct {
Fields []string `json:"fields" binding:"required"`
}
type UpdateBalanceIdentity ¶
type UpdateBalanceIdentity struct {
IdentityId string `json:"identity_id" binding:"required"`
}
UpdateBalanceIdentity represents the payload required to update a balance's identity. Only the identity_id field is accepted.
type UpdateLedger ¶
type UpdateLedger struct {
Name string `json:"name"`
}
func (*UpdateLedger) ValidateUpdateLedger ¶
func (l *UpdateLedger) ValidateUpdateLedger() error