Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/speakeasy-sdks/bridge-go
A go SDK for accessing the bridge-go API.
https://github.com/speakeasy-sdks/bridge-go
Last synced: 2 days ago
JSON representation
A go SDK for accessing the bridge-go API.
- Host: GitHub
- URL: https://github.com/speakeasy-sdks/bridge-go
- Owner: speakeasy-sdks
- License: mit
- Created: 2023-04-14T11:18:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-02T21:20:09.000Z (7 months ago)
- Last Synced: 2024-04-28T05:14:38.260Z (6 months ago)
- Size: 62.5 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## SDK Installation
```bash
go get github.com/speakeasy-sdks/bridge-go
```## SDK Example Usage
```go
package mainimport(
"context"
"log"
"github.com/speakeasy-sdks/bridge-go"
"github.com/speakeasy-sdks/bridge-go/pkg/models/shared"
"github.com/speakeasy-sdks/bridge-go/pkg/types"
)func main() {
s := bride.New(
bride.WithSecurity(shared.Security{
ClientID: bride.String("YOUR_API_KEY_HERE"),
}),
)ctx := context.Background()
req := shared.PaymentLinkRequest{
BankID: bride.Int64(548814),
CallbackURL: bride.String("provident"),
ClientReference: bride.String("ABCDE_FG-HI_12345"),
Country: shared.PaymentLinkRequestCountryEnumDe.ToPointer(),
ExpiredDate: types.MustTimeFromString("2021-07-24T22:00:00.000Z"),
Transactions: []shared.Transaction{
shared.Transaction{
Amount: 120.98,
Beneficiary: &shared.Beneficiary{
CompanyName: bride.String("Acme Inc."),
FirstName: bride.String("John"),
Iban: "GB29 NWBK 6016 1331 9268 19",
LastName: bride.String("Doe"),
},
Currency: "EUR",
EndToEndID: bride.String("E2E_ID-1234"),
ExecutionDate: types.MustTimeFromString("2021-07-24T22:00:00.000Z"),
Label: "Refund 123456",
},
shared.Transaction{
Amount: 120.98,
Beneficiary: &shared.Beneficiary{
CompanyName: bride.String("Acme Inc."),
FirstName: bride.String("John"),
Iban: "GB29 NWBK 6016 1331 9268 19",
LastName: bride.String("Doe"),
},
Currency: "EUR",
EndToEndID: bride.String("E2E_ID-1234"),
ExecutionDate: types.MustTimeFromString("2021-07-24T22:00:00.000Z"),
Label: "Refund 123456",
},
shared.Transaction{
Amount: 120.98,
Beneficiary: &shared.Beneficiary{
CompanyName: bride.String("Acme Inc."),
FirstName: bride.String("John"),
Iban: "GB29 NWBK 6016 1331 9268 19",
LastName: bride.String("Doe"),
},
Currency: "EUR",
EndToEndID: bride.String("E2E_ID-1234"),
ExecutionDate: types.MustTimeFromString("2021-07-24T22:00:00.000Z"),
Label: "Refund 123456",
},
shared.Transaction{
Amount: 120.98,
Beneficiary: &shared.Beneficiary{
CompanyName: bride.String("Acme Inc."),
FirstName: bride.String("John"),
Iban: "GB29 NWBK 6016 1331 9268 19",
LastName: bride.String("Doe"),
},
Currency: "EUR",
EndToEndID: bride.String("E2E_ID-1234"),
ExecutionDate: types.MustTimeFromString("2021-07-24T22:00:00.000Z"),
Label: "Refund 123456",
},
},
User: shared.User{
ExternalReference: bride.String("REF-USER-1234_AZ"),
FirstName: "Thomas",
LastName: "Pichet",
},
}res, err := s.PaymentLinks.Create(ctx, req)
if err != nil {
log.Fatal(err)
}if res.CreatePaymentLink200ApplicationJSONObject != nil {
// handle response
}
}
```## Available Resources and Operations
### [PaymentLinks](docs/paymentlinks/README.md)
* [Create](docs/paymentlinks/README.md#create) - Create a payment link
* [Get](docs/paymentlinks/README.md#get) - Retrieve payment link information by ID
* [List](docs/paymentlinks/README.md#list) - Retrieve a list of payment links
* [Revoke](docs/paymentlinks/README.md#revoke) - Revoke a payment link### Maturity
This SDK is in beta and therefore, we recommend pinning usage to a specific package version.
This way, you can install the same version each time without breaking changes unless you are intentionally
looking for the latest version.### Contributions
While we value open-source contributions to this SDK, this library is generated and maintained programmatically.
Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release !### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)