Skip to content

Commit

Permalink
update: generated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mhrynenko committed Jun 12, 2024
1 parent 54c4c21 commit f0c4955
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
43 changes: 43 additions & 0 deletions resources/model_balance.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* GENERATED. Do not modify. Your changes might be overwritten!
*/

package resources

import "encoding/json"

type Balance struct {
Key
Attributes BalanceAttributes `json:"attributes"`
}
type BalanceResponse struct {
Data Balance `json:"data"`
Included Included `json:"included"`
}

type BalanceListResponse struct {
Data []Balance `json:"data"`
Included Included `json:"included"`
Links *Links `json:"links"`
Meta json.RawMessage `json:"meta,omitempty"`
}

func (r *BalanceListResponse) PutMeta(v interface{}) (err error) {
r.Meta, err = json.Marshal(v)
return err
}

func (r *BalanceListResponse) GetMeta(out interface{}) error {
return json.Unmarshal(r.Meta, out)
}

// MustBalance - returns Balance from include collection.
// if entry with specified key does not exist - returns nil
// if entry with specified key exists but type or ID mismatches - panics
func (c *Included) MustBalance(key Key) *Balance {
var balance Balance
if c.tryFindEntry(key, &balance) {
return &balance
}
return nil
}
12 changes: 12 additions & 0 deletions resources/model_balance_attributes.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* GENERATED. Do not modify. Your changes might be overwritten!
*/

package resources

import "math/big"

type BalanceAttributes struct {
// Amount of the tokens on the user address
Amount *big.Int `json:"amount"`
}
1 change: 1 addition & 0 deletions resources/model_resource_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ type ResourceType string
const (
AIRDROP ResourceType = "airdrop"
CREATE_AIRDROP ResourceType = "create_airdrop"
TOKEN ResourceType = "token"
TRANSFER_ERC20 ResourceType = "transfer_erc20"
)

0 comments on commit f0c4955

Please sign in to comment.