griffnode 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +17 -0
- data/README.md +24 -0
- data/Rakefile +10 -0
- data/docs/Account.md +22 -0
- data/docs/AccountApi.md +339 -0
- data/docs/AccountLimits.md +22 -0
- data/docs/AccountPlan.md +24 -0
- data/docs/AccountUsage.md +22 -0
- data/docs/Balance.md +24 -0
- data/docs/BillingApi.md +75 -0
- data/docs/CreateBillingCheckoutRequest.md +22 -0
- data/docs/CreateDetailedTransactionRequest.md +32 -0
- data/docs/CreateTransactionRequest.md +30 -0
- data/docs/CryptoSymbol.md +15 -0
- data/docs/Cryptocurrency.md +26 -0
- data/docs/DefaultApi.md +78 -0
- data/docs/Error.md +22 -0
- data/docs/FiatCurrency.md +15 -0
- data/docs/GetAccount200Response.md +20 -0
- data/docs/GetHealth200Response.md +22 -0
- data/docs/GetPrices200Response.md +20 -0
- data/docs/GetPrices200ResponseData.md +22 -0
- data/docs/GetStats200Response.md +20 -0
- data/docs/GetStats200ResponseData.md +24 -0
- data/docs/InlineObject.md +24 -0
- data/docs/InlineObjectAllOfExistingTransaction.md +22 -0
- data/docs/Invoice.md +34 -0
- data/docs/LineItem.md +22 -0
- data/docs/ListBalances200Response.md +20 -0
- data/docs/ListBalances200ResponseData.md +18 -0
- data/docs/ListCryptocurrencies200Response.md +20 -0
- data/docs/ListCryptocurrencies200ResponseData.md +20 -0
- data/docs/ListInvoices200Response.md +20 -0
- data/docs/ListInvoices200ResponseData.md +20 -0
- data/docs/ListPlans200Response.md +20 -0
- data/docs/ListPlans200ResponseData.md +20 -0
- data/docs/ListTransactions200Response.md +20 -0
- data/docs/ListTransactions200ResponseData.md +20 -0
- data/docs/MarketDataApi.md +202 -0
- data/docs/Pagination.md +22 -0
- data/docs/PaymentSplit.md +28 -0
- data/docs/Plan.md +38 -0
- data/docs/PlanTier.md +15 -0
- data/docs/SystemApi.md +139 -0
- data/docs/Transaction.md +66 -0
- data/docs/TransactionEnvelope.md +20 -0
- data/docs/TransactionStatus.md +15 -0
- data/docs/TransactionsApi.md +295 -0
- data/docs/WebhookPayload.md +40 -0
- data/git_push.sh +57 -0
- data/griffnode.gemspec +43 -0
- data/lib/griffnode/api/account_api.rb +315 -0
- data/lib/griffnode/api/billing_api.rb +88 -0
- data/lib/griffnode/api/default_api.rb +84 -0
- data/lib/griffnode/api/market_data_api.rb +187 -0
- data/lib/griffnode/api/system_api.rb +158 -0
- data/lib/griffnode/api/transactions_api.rb +300 -0
- data/lib/griffnode/api_client.rb +394 -0
- data/lib/griffnode/api_error.rb +58 -0
- data/lib/griffnode/configuration.rb +308 -0
- data/lib/griffnode/models/account.rb +232 -0
- data/lib/griffnode/models/account_limits.rb +232 -0
- data/lib/griffnode/models/account_plan.rb +264 -0
- data/lib/griffnode/models/account_usage.rb +234 -0
- data/lib/griffnode/models/balance.rb +241 -0
- data/lib/griffnode/models/create_billing_checkout_request.rb +284 -0
- data/lib/griffnode/models/create_detailed_transaction_request.rb +349 -0
- data/lib/griffnode/models/create_transaction_request.rb +313 -0
- data/lib/griffnode/models/crypto_symbol.rb +53 -0
- data/lib/griffnode/models/cryptocurrency.rb +284 -0
- data/lib/griffnode/models/error.rb +251 -0
- data/lib/griffnode/models/fiat_currency.rb +42 -0
- data/lib/griffnode/models/get_account200_response.rb +233 -0
- data/lib/griffnode/models/get_health200_response.rb +232 -0
- data/lib/griffnode/models/get_prices200_response.rb +233 -0
- data/lib/griffnode/models/get_prices200_response_data.rb +238 -0
- data/lib/griffnode/models/get_stats200_response.rb +233 -0
- data/lib/griffnode/models/get_stats200_response_data.rb +241 -0
- data/lib/griffnode/models/inline_object.rb +267 -0
- data/lib/griffnode/models/inline_object_all_of_existing_transaction.rb +254 -0
- data/lib/griffnode/models/invoice.rb +311 -0
- data/lib/griffnode/models/line_item.rb +267 -0
- data/lib/griffnode/models/list_balances200_response.rb +233 -0
- data/lib/griffnode/models/list_balances200_response_data.rb +216 -0
- data/lib/griffnode/models/list_cryptocurrencies200_response.rb +233 -0
- data/lib/griffnode/models/list_cryptocurrencies200_response_data.rb +225 -0
- data/lib/griffnode/models/list_invoices200_response.rb +233 -0
- data/lib/griffnode/models/list_invoices200_response_data.rb +225 -0
- data/lib/griffnode/models/list_plans200_response.rb +233 -0
- data/lib/griffnode/models/list_plans200_response_data.rb +227 -0
- data/lib/griffnode/models/list_transactions200_response.rb +233 -0
- data/lib/griffnode/models/list_transactions200_response_data.rb +239 -0
- data/lib/griffnode/models/pagination.rb +253 -0
- data/lib/griffnode/models/payment_split.rb +262 -0
- data/lib/griffnode/models/plan.rb +330 -0
- data/lib/griffnode/models/plan_tier.rb +42 -0
- data/lib/griffnode/models/transaction.rb +535 -0
- data/lib/griffnode/models/transaction_envelope.rb +233 -0
- data/lib/griffnode/models/transaction_status.rb +44 -0
- data/lib/griffnode/models/webhook_payload.rb +387 -0
- data/lib/griffnode/version.rb +15 -0
- data/lib/griffnode.rb +84 -0
- data/openapi.yaml +791 -0
- data/openapitools.json +15 -0
- data/spec/api/account_api_spec.rb +87 -0
- data/spec/api/billing_api_spec.rb +46 -0
- data/spec/api/default_api_spec.rb +47 -0
- data/spec/api/market_data_api_spec.rb +65 -0
- data/spec/api/system_api_spec.rb +60 -0
- data/spec/api/transactions_api_spec.rb +84 -0
- data/spec/models/account_limits_spec.rb +48 -0
- data/spec/models/account_plan_spec.rb +54 -0
- data/spec/models/account_spec.rb +48 -0
- data/spec/models/account_usage_spec.rb +48 -0
- data/spec/models/balance_spec.rb +54 -0
- data/spec/models/create_billing_checkout_request_spec.rb +48 -0
- data/spec/models/create_detailed_transaction_request_spec.rb +78 -0
- data/spec/models/create_transaction_request_spec.rb +72 -0
- data/spec/models/crypto_symbol_spec.rb +30 -0
- data/spec/models/cryptocurrency_spec.rb +64 -0
- data/spec/models/error_spec.rb +48 -0
- data/spec/models/fiat_currency_spec.rb +30 -0
- data/spec/models/get_account200_response_spec.rb +42 -0
- data/spec/models/get_health200_response_spec.rb +48 -0
- data/spec/models/get_prices200_response_data_spec.rb +48 -0
- data/spec/models/get_prices200_response_spec.rb +42 -0
- data/spec/models/get_stats200_response_data_spec.rb +54 -0
- data/spec/models/get_stats200_response_spec.rb +42 -0
- data/spec/models/inline_object_all_of_existing_transaction_spec.rb +48 -0
- data/spec/models/inline_object_spec.rb +54 -0
- data/spec/models/invoice_spec.rb +84 -0
- data/spec/models/line_item_spec.rb +48 -0
- data/spec/models/list_balances200_response_data_spec.rb +36 -0
- data/spec/models/list_balances200_response_spec.rb +42 -0
- data/spec/models/list_cryptocurrencies200_response_data_spec.rb +42 -0
- data/spec/models/list_cryptocurrencies200_response_spec.rb +42 -0
- data/spec/models/list_invoices200_response_data_spec.rb +42 -0
- data/spec/models/list_invoices200_response_spec.rb +42 -0
- data/spec/models/list_plans200_response_data_spec.rb +42 -0
- data/spec/models/list_plans200_response_spec.rb +42 -0
- data/spec/models/list_transactions200_response_data_spec.rb +42 -0
- data/spec/models/list_transactions200_response_spec.rb +42 -0
- data/spec/models/pagination_spec.rb +48 -0
- data/spec/models/payment_split_spec.rb +66 -0
- data/spec/models/plan_spec.rb +96 -0
- data/spec/models/plan_tier_spec.rb +30 -0
- data/spec/models/transaction_envelope_spec.rb +42 -0
- data/spec/models/transaction_spec.rb +184 -0
- data/spec/models/transaction_status_spec.rb +30 -0
- data/spec/models/webhook_payload_spec.rb +106 -0
- data/spec/spec_helper.rb +111 -0
- metadata +286 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 5a2effc4f3788be304b922f78fb95a402d6beea4dca45bf900b5fce06724eb9e
|
|
4
|
+
data.tar.gz: 0c8181ef4923951c437627ce545406fa0313916dd03f76ddc01587efedc3bbf5
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 32a18f31bddb8c042fdecf4aacd19e86d09dca770880b81dadaa31b077af3a20a63a208a190141a4064135dd116f2c0cec78b223a7a428d640e307fe1040d6b5
|
|
7
|
+
data.tar.gz: 34fcc6a8db1251af36c3d0e61a3dda1418ed0c55d0e7a45ad1279fee16626f892785b43ec32e87ee927db1a21a37d7ad1113fc30445687d46de8ad217d08857e
|
data/Gemfile
ADDED
data/LICENSE
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
Copyright 2026 GriffNode
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|
data/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# GriffNode SDK (ruby-sdk)
|
|
2
|
+
|
|
3
|
+
Official SDK for the [GriffNode](https://griffnode.com) crypto-payments API —
|
|
4
|
+
accept Bitcoin, Ethereum, Litecoin, Dogecoin, Dash and ERC-20 tokens straight to your
|
|
5
|
+
own wallet.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
gem install griffnode
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
- **API reference:** https://docs.griffnode.com/reference
|
|
12
|
+
- **OpenAPI spec:** https://docs.griffnode.com/openapi.yaml
|
|
13
|
+
- **Generated from** `openapi.yaml` with [OpenAPI Generator](https://openapi-generator.tech)
|
|
14
|
+
(`ruby`) — see `.github/workflows/generate.yml`. Do not hand-edit generated files.
|
|
15
|
+
|
|
16
|
+
## Quick start
|
|
17
|
+
|
|
18
|
+
Authenticate with a secret key (`Authorization: Bearer sk_live_…`, or `sk_test_…` for
|
|
19
|
+
sandbox), then create a payment. Send an `X-Idempotency-Key` on every create so a retried
|
|
20
|
+
request can't double-charge. Full, language-specific examples are generated below by CI.
|
|
21
|
+
|
|
22
|
+
## License
|
|
23
|
+
|
|
24
|
+
Apache-2.0 — see [LICENSE](LICENSE).
|
data/Rakefile
ADDED
data/docs/Account.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# GriffNode::Account
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **plan** | [**AccountPlan**](AccountPlan.md) | | [optional] |
|
|
8
|
+
| **usage** | [**AccountUsage**](AccountUsage.md) | | [optional] |
|
|
9
|
+
| **limits** | [**AccountLimits**](AccountLimits.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'griffnode'
|
|
15
|
+
|
|
16
|
+
instance = GriffNode::Account.new(
|
|
17
|
+
plan: null,
|
|
18
|
+
usage: null,
|
|
19
|
+
limits: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
data/docs/AccountApi.md
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
# GriffNode::AccountApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.griffnode.com/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_account**](AccountApi.md#get_account) | **GET** /account | Merchant plan, usage and limits |
|
|
8
|
+
| [**get_stats**](AccountApi.md#get_stats) | **GET** /stats | Merchant transaction analytics |
|
|
9
|
+
| [**list_balances**](AccountApi.md#list_balances) | **GET** /balances | On-platform balances (for overage/top-up; NOT crypto settlement) |
|
|
10
|
+
| [**list_invoices**](AccountApi.md#list_invoices) | **GET** /invoices | GriffNode billing invoices (platform ↔ merchant) |
|
|
11
|
+
| [**list_plans**](AccountApi.md#list_plans) | **GET** /plans | Plan catalogue and pricing |
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## get_account
|
|
15
|
+
|
|
16
|
+
> <GetAccount200Response> get_account
|
|
17
|
+
|
|
18
|
+
Merchant plan, usage and limits
|
|
19
|
+
|
|
20
|
+
### Examples
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'time'
|
|
24
|
+
require 'griffnode'
|
|
25
|
+
# setup authorization
|
|
26
|
+
GriffNode.configure do |config|
|
|
27
|
+
# Configure Bearer authorization: SecretKey
|
|
28
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
api_instance = GriffNode::AccountApi.new
|
|
32
|
+
|
|
33
|
+
begin
|
|
34
|
+
# Merchant plan, usage and limits
|
|
35
|
+
result = api_instance.get_account
|
|
36
|
+
p result
|
|
37
|
+
rescue GriffNode::ApiError => e
|
|
38
|
+
puts "Error when calling AccountApi->get_account: #{e}"
|
|
39
|
+
end
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
#### Using the get_account_with_http_info variant
|
|
43
|
+
|
|
44
|
+
This returns an Array which contains the response data, status code and headers.
|
|
45
|
+
|
|
46
|
+
> <Array(<GetAccount200Response>, Integer, Hash)> get_account_with_http_info
|
|
47
|
+
|
|
48
|
+
```ruby
|
|
49
|
+
begin
|
|
50
|
+
# Merchant plan, usage and limits
|
|
51
|
+
data, status_code, headers = api_instance.get_account_with_http_info
|
|
52
|
+
p status_code # => 2xx
|
|
53
|
+
p headers # => { ... }
|
|
54
|
+
p data # => <GetAccount200Response>
|
|
55
|
+
rescue GriffNode::ApiError => e
|
|
56
|
+
puts "Error when calling AccountApi->get_account_with_http_info: #{e}"
|
|
57
|
+
end
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Parameters
|
|
61
|
+
|
|
62
|
+
This endpoint does not need any parameter.
|
|
63
|
+
|
|
64
|
+
### Return type
|
|
65
|
+
|
|
66
|
+
[**GetAccount200Response**](GetAccount200Response.md)
|
|
67
|
+
|
|
68
|
+
### Authorization
|
|
69
|
+
|
|
70
|
+
[SecretKey](../README.md#SecretKey)
|
|
71
|
+
|
|
72
|
+
### HTTP request headers
|
|
73
|
+
|
|
74
|
+
- **Content-Type**: Not defined
|
|
75
|
+
- **Accept**: application/json
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## get_stats
|
|
79
|
+
|
|
80
|
+
> <GetStats200Response> get_stats
|
|
81
|
+
|
|
82
|
+
Merchant transaction analytics
|
|
83
|
+
|
|
84
|
+
### Examples
|
|
85
|
+
|
|
86
|
+
```ruby
|
|
87
|
+
require 'time'
|
|
88
|
+
require 'griffnode'
|
|
89
|
+
# setup authorization
|
|
90
|
+
GriffNode.configure do |config|
|
|
91
|
+
# Configure Bearer authorization: SecretKey
|
|
92
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
api_instance = GriffNode::AccountApi.new
|
|
96
|
+
|
|
97
|
+
begin
|
|
98
|
+
# Merchant transaction analytics
|
|
99
|
+
result = api_instance.get_stats
|
|
100
|
+
p result
|
|
101
|
+
rescue GriffNode::ApiError => e
|
|
102
|
+
puts "Error when calling AccountApi->get_stats: #{e}"
|
|
103
|
+
end
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
#### Using the get_stats_with_http_info variant
|
|
107
|
+
|
|
108
|
+
This returns an Array which contains the response data, status code and headers.
|
|
109
|
+
|
|
110
|
+
> <Array(<GetStats200Response>, Integer, Hash)> get_stats_with_http_info
|
|
111
|
+
|
|
112
|
+
```ruby
|
|
113
|
+
begin
|
|
114
|
+
# Merchant transaction analytics
|
|
115
|
+
data, status_code, headers = api_instance.get_stats_with_http_info
|
|
116
|
+
p status_code # => 2xx
|
|
117
|
+
p headers # => { ... }
|
|
118
|
+
p data # => <GetStats200Response>
|
|
119
|
+
rescue GriffNode::ApiError => e
|
|
120
|
+
puts "Error when calling AccountApi->get_stats_with_http_info: #{e}"
|
|
121
|
+
end
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Parameters
|
|
125
|
+
|
|
126
|
+
This endpoint does not need any parameter.
|
|
127
|
+
|
|
128
|
+
### Return type
|
|
129
|
+
|
|
130
|
+
[**GetStats200Response**](GetStats200Response.md)
|
|
131
|
+
|
|
132
|
+
### Authorization
|
|
133
|
+
|
|
134
|
+
[SecretKey](../README.md#SecretKey)
|
|
135
|
+
|
|
136
|
+
### HTTP request headers
|
|
137
|
+
|
|
138
|
+
- **Content-Type**: Not defined
|
|
139
|
+
- **Accept**: application/json
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
## list_balances
|
|
143
|
+
|
|
144
|
+
> <ListBalances200Response> list_balances
|
|
145
|
+
|
|
146
|
+
On-platform balances (for overage/top-up; NOT crypto settlement)
|
|
147
|
+
|
|
148
|
+
### Examples
|
|
149
|
+
|
|
150
|
+
```ruby
|
|
151
|
+
require 'time'
|
|
152
|
+
require 'griffnode'
|
|
153
|
+
# setup authorization
|
|
154
|
+
GriffNode.configure do |config|
|
|
155
|
+
# Configure Bearer authorization: SecretKey
|
|
156
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
api_instance = GriffNode::AccountApi.new
|
|
160
|
+
|
|
161
|
+
begin
|
|
162
|
+
# On-platform balances (for overage/top-up; NOT crypto settlement)
|
|
163
|
+
result = api_instance.list_balances
|
|
164
|
+
p result
|
|
165
|
+
rescue GriffNode::ApiError => e
|
|
166
|
+
puts "Error when calling AccountApi->list_balances: #{e}"
|
|
167
|
+
end
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
#### Using the list_balances_with_http_info variant
|
|
171
|
+
|
|
172
|
+
This returns an Array which contains the response data, status code and headers.
|
|
173
|
+
|
|
174
|
+
> <Array(<ListBalances200Response>, Integer, Hash)> list_balances_with_http_info
|
|
175
|
+
|
|
176
|
+
```ruby
|
|
177
|
+
begin
|
|
178
|
+
# On-platform balances (for overage/top-up; NOT crypto settlement)
|
|
179
|
+
data, status_code, headers = api_instance.list_balances_with_http_info
|
|
180
|
+
p status_code # => 2xx
|
|
181
|
+
p headers # => { ... }
|
|
182
|
+
p data # => <ListBalances200Response>
|
|
183
|
+
rescue GriffNode::ApiError => e
|
|
184
|
+
puts "Error when calling AccountApi->list_balances_with_http_info: #{e}"
|
|
185
|
+
end
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Parameters
|
|
189
|
+
|
|
190
|
+
This endpoint does not need any parameter.
|
|
191
|
+
|
|
192
|
+
### Return type
|
|
193
|
+
|
|
194
|
+
[**ListBalances200Response**](ListBalances200Response.md)
|
|
195
|
+
|
|
196
|
+
### Authorization
|
|
197
|
+
|
|
198
|
+
[SecretKey](../README.md#SecretKey)
|
|
199
|
+
|
|
200
|
+
### HTTP request headers
|
|
201
|
+
|
|
202
|
+
- **Content-Type**: Not defined
|
|
203
|
+
- **Accept**: application/json
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
## list_invoices
|
|
207
|
+
|
|
208
|
+
> <ListInvoices200Response> list_invoices(opts)
|
|
209
|
+
|
|
210
|
+
GriffNode billing invoices (platform ↔ merchant)
|
|
211
|
+
|
|
212
|
+
### Examples
|
|
213
|
+
|
|
214
|
+
```ruby
|
|
215
|
+
require 'time'
|
|
216
|
+
require 'griffnode'
|
|
217
|
+
# setup authorization
|
|
218
|
+
GriffNode.configure do |config|
|
|
219
|
+
# Configure Bearer authorization: SecretKey
|
|
220
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
api_instance = GriffNode::AccountApi.new
|
|
224
|
+
opts = {
|
|
225
|
+
limit: 56, # Integer |
|
|
226
|
+
offset: 56 # Integer |
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
begin
|
|
230
|
+
# GriffNode billing invoices (platform ↔ merchant)
|
|
231
|
+
result = api_instance.list_invoices(opts)
|
|
232
|
+
p result
|
|
233
|
+
rescue GriffNode::ApiError => e
|
|
234
|
+
puts "Error when calling AccountApi->list_invoices: #{e}"
|
|
235
|
+
end
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
#### Using the list_invoices_with_http_info variant
|
|
239
|
+
|
|
240
|
+
This returns an Array which contains the response data, status code and headers.
|
|
241
|
+
|
|
242
|
+
> <Array(<ListInvoices200Response>, Integer, Hash)> list_invoices_with_http_info(opts)
|
|
243
|
+
|
|
244
|
+
```ruby
|
|
245
|
+
begin
|
|
246
|
+
# GriffNode billing invoices (platform ↔ merchant)
|
|
247
|
+
data, status_code, headers = api_instance.list_invoices_with_http_info(opts)
|
|
248
|
+
p status_code # => 2xx
|
|
249
|
+
p headers # => { ... }
|
|
250
|
+
p data # => <ListInvoices200Response>
|
|
251
|
+
rescue GriffNode::ApiError => e
|
|
252
|
+
puts "Error when calling AccountApi->list_invoices_with_http_info: #{e}"
|
|
253
|
+
end
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Parameters
|
|
257
|
+
|
|
258
|
+
| Name | Type | Description | Notes |
|
|
259
|
+
| ---- | ---- | ----------- | ----- |
|
|
260
|
+
| **limit** | **Integer** | | [optional][default to 20] |
|
|
261
|
+
| **offset** | **Integer** | | [optional][default to 0] |
|
|
262
|
+
|
|
263
|
+
### Return type
|
|
264
|
+
|
|
265
|
+
[**ListInvoices200Response**](ListInvoices200Response.md)
|
|
266
|
+
|
|
267
|
+
### Authorization
|
|
268
|
+
|
|
269
|
+
[SecretKey](../README.md#SecretKey)
|
|
270
|
+
|
|
271
|
+
### HTTP request headers
|
|
272
|
+
|
|
273
|
+
- **Content-Type**: Not defined
|
|
274
|
+
- **Accept**: application/json
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
## list_plans
|
|
278
|
+
|
|
279
|
+
> <ListPlans200Response> list_plans
|
|
280
|
+
|
|
281
|
+
Plan catalogue and pricing
|
|
282
|
+
|
|
283
|
+
### Examples
|
|
284
|
+
|
|
285
|
+
```ruby
|
|
286
|
+
require 'time'
|
|
287
|
+
require 'griffnode'
|
|
288
|
+
# setup authorization
|
|
289
|
+
GriffNode.configure do |config|
|
|
290
|
+
# Configure Bearer authorization: SecretKey
|
|
291
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
api_instance = GriffNode::AccountApi.new
|
|
295
|
+
|
|
296
|
+
begin
|
|
297
|
+
# Plan catalogue and pricing
|
|
298
|
+
result = api_instance.list_plans
|
|
299
|
+
p result
|
|
300
|
+
rescue GriffNode::ApiError => e
|
|
301
|
+
puts "Error when calling AccountApi->list_plans: #{e}"
|
|
302
|
+
end
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
#### Using the list_plans_with_http_info variant
|
|
306
|
+
|
|
307
|
+
This returns an Array which contains the response data, status code and headers.
|
|
308
|
+
|
|
309
|
+
> <Array(<ListPlans200Response>, Integer, Hash)> list_plans_with_http_info
|
|
310
|
+
|
|
311
|
+
```ruby
|
|
312
|
+
begin
|
|
313
|
+
# Plan catalogue and pricing
|
|
314
|
+
data, status_code, headers = api_instance.list_plans_with_http_info
|
|
315
|
+
p status_code # => 2xx
|
|
316
|
+
p headers # => { ... }
|
|
317
|
+
p data # => <ListPlans200Response>
|
|
318
|
+
rescue GriffNode::ApiError => e
|
|
319
|
+
puts "Error when calling AccountApi->list_plans_with_http_info: #{e}"
|
|
320
|
+
end
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### Parameters
|
|
324
|
+
|
|
325
|
+
This endpoint does not need any parameter.
|
|
326
|
+
|
|
327
|
+
### Return type
|
|
328
|
+
|
|
329
|
+
[**ListPlans200Response**](ListPlans200Response.md)
|
|
330
|
+
|
|
331
|
+
### Authorization
|
|
332
|
+
|
|
333
|
+
[SecretKey](../README.md#SecretKey)
|
|
334
|
+
|
|
335
|
+
### HTTP request headers
|
|
336
|
+
|
|
337
|
+
- **Content-Type**: Not defined
|
|
338
|
+
- **Accept**: application/json
|
|
339
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# GriffNode::AccountLimits
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **api_rate_limit_per_minute** | **Integer** | | [optional] |
|
|
8
|
+
| **api_rate_limit_per_hour** | **Integer** | | [optional] |
|
|
9
|
+
| **webhook_support** | **Boolean** | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'griffnode'
|
|
15
|
+
|
|
16
|
+
instance = GriffNode::AccountLimits.new(
|
|
17
|
+
api_rate_limit_per_minute: null,
|
|
18
|
+
api_rate_limit_per_hour: null,
|
|
19
|
+
webhook_support: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
data/docs/AccountPlan.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# GriffNode::AccountPlan
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **tier** | [**PlanTier**](PlanTier.md) | | [optional] |
|
|
8
|
+
| **billing_cycle** | **String** | | [optional] |
|
|
9
|
+
| **auto_renewal** | **Boolean** | | [optional] |
|
|
10
|
+
| **expires_at** | **Time** | | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'griffnode'
|
|
16
|
+
|
|
17
|
+
instance = GriffNode::AccountPlan.new(
|
|
18
|
+
tier: null,
|
|
19
|
+
billing_cycle: null,
|
|
20
|
+
auto_renewal: null,
|
|
21
|
+
expires_at: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# GriffNode::AccountUsage
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **monthly_transactions_used** | **Integer** | | [optional] |
|
|
8
|
+
| **monthly_transaction_limit** | **Integer** | null = unlimited. | [optional] |
|
|
9
|
+
| **overage_cost_per_tx** | **Float** | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'griffnode'
|
|
15
|
+
|
|
16
|
+
instance = GriffNode::AccountUsage.new(
|
|
17
|
+
monthly_transactions_used: null,
|
|
18
|
+
monthly_transaction_limit: null,
|
|
19
|
+
overage_cost_per_tx: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
data/docs/Balance.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# GriffNode::Balance
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **currency** | **String** | | [optional] |
|
|
8
|
+
| **available_balance** | **Float** | | [optional] |
|
|
9
|
+
| **pending_balance** | **Float** | | [optional] |
|
|
10
|
+
| **updated_at** | **Time** | | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'griffnode'
|
|
16
|
+
|
|
17
|
+
instance = GriffNode::Balance.new(
|
|
18
|
+
currency: null,
|
|
19
|
+
available_balance: null,
|
|
20
|
+
pending_balance: null,
|
|
21
|
+
updated_at: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
data/docs/BillingApi.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# GriffNode::BillingApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.griffnode.com/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**create_billing_checkout**](BillingApi.md#create_billing_checkout) | **POST** /billing/checkout | Start a plan upgrade or account top-up |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## create_billing_checkout
|
|
11
|
+
|
|
12
|
+
> <TransactionEnvelope> create_billing_checkout(create_billing_checkout_request)
|
|
13
|
+
|
|
14
|
+
Start a plan upgrade or account top-up
|
|
15
|
+
|
|
16
|
+
### Examples
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'time'
|
|
20
|
+
require 'griffnode'
|
|
21
|
+
# setup authorization
|
|
22
|
+
GriffNode.configure do |config|
|
|
23
|
+
# Configure Bearer authorization: SecretKey
|
|
24
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
api_instance = GriffNode::BillingApi.new
|
|
28
|
+
create_billing_checkout_request = GriffNode::CreateBillingCheckoutRequest.new({tier: GriffNode::PlanTier::STARTER}) # CreateBillingCheckoutRequest |
|
|
29
|
+
|
|
30
|
+
begin
|
|
31
|
+
# Start a plan upgrade or account top-up
|
|
32
|
+
result = api_instance.create_billing_checkout(create_billing_checkout_request)
|
|
33
|
+
p result
|
|
34
|
+
rescue GriffNode::ApiError => e
|
|
35
|
+
puts "Error when calling BillingApi->create_billing_checkout: #{e}"
|
|
36
|
+
end
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
#### Using the create_billing_checkout_with_http_info variant
|
|
40
|
+
|
|
41
|
+
This returns an Array which contains the response data, status code and headers.
|
|
42
|
+
|
|
43
|
+
> <Array(<TransactionEnvelope>, Integer, Hash)> create_billing_checkout_with_http_info(create_billing_checkout_request)
|
|
44
|
+
|
|
45
|
+
```ruby
|
|
46
|
+
begin
|
|
47
|
+
# Start a plan upgrade or account top-up
|
|
48
|
+
data, status_code, headers = api_instance.create_billing_checkout_with_http_info(create_billing_checkout_request)
|
|
49
|
+
p status_code # => 2xx
|
|
50
|
+
p headers # => { ... }
|
|
51
|
+
p data # => <TransactionEnvelope>
|
|
52
|
+
rescue GriffNode::ApiError => e
|
|
53
|
+
puts "Error when calling BillingApi->create_billing_checkout_with_http_info: #{e}"
|
|
54
|
+
end
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Parameters
|
|
58
|
+
|
|
59
|
+
| Name | Type | Description | Notes |
|
|
60
|
+
| ---- | ---- | ----------- | ----- |
|
|
61
|
+
| **create_billing_checkout_request** | [**CreateBillingCheckoutRequest**](CreateBillingCheckoutRequest.md) | | |
|
|
62
|
+
|
|
63
|
+
### Return type
|
|
64
|
+
|
|
65
|
+
[**TransactionEnvelope**](TransactionEnvelope.md)
|
|
66
|
+
|
|
67
|
+
### Authorization
|
|
68
|
+
|
|
69
|
+
[SecretKey](../README.md#SecretKey)
|
|
70
|
+
|
|
71
|
+
### HTTP request headers
|
|
72
|
+
|
|
73
|
+
- **Content-Type**: application/json
|
|
74
|
+
- **Accept**: application/json
|
|
75
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# GriffNode::CreateBillingCheckoutRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **tier** | [**PlanTier**](PlanTier.md) | | |
|
|
8
|
+
| **billing_months** | **Integer** | | [optional][default to 1] |
|
|
9
|
+
| **payment_method** | **String** | | [optional][default to 'crypto'] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'griffnode'
|
|
15
|
+
|
|
16
|
+
instance = GriffNode::CreateBillingCheckoutRequest.new(
|
|
17
|
+
tier: null,
|
|
18
|
+
billing_months: null,
|
|
19
|
+
payment_method: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# GriffNode::CreateDetailedTransactionRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **crypto** | [**CryptoSymbol**](CryptoSymbol.md) | | |
|
|
8
|
+
| **currency_fiat** | [**FiatCurrency**](FiatCurrency.md) | | [optional][default to 'USD'] |
|
|
9
|
+
| **items** | [**Array<LineItem>**](LineItem.md) | | |
|
|
10
|
+
| **order_id** | **String** | | |
|
|
11
|
+
| **metadata** | **Hash<String, String>** | Free-form key/value (≤20 keys, string values ≤500 chars, ≤4 KB total). | [optional] |
|
|
12
|
+
| **customer_email** | **String** | | [optional] |
|
|
13
|
+
| **success_url** | **String** | | [optional] |
|
|
14
|
+
| **cancel_url** | **String** | | [optional] |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'griffnode'
|
|
20
|
+
|
|
21
|
+
instance = GriffNode::CreateDetailedTransactionRequest.new(
|
|
22
|
+
crypto: null,
|
|
23
|
+
currency_fiat: null,
|
|
24
|
+
items: null,
|
|
25
|
+
order_id: null,
|
|
26
|
+
metadata: null,
|
|
27
|
+
customer_email: null,
|
|
28
|
+
success_url: null,
|
|
29
|
+
cancel_url: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# GriffNode::CreateTransactionRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **crypto** | [**CryptoSymbol**](CryptoSymbol.md) | | |
|
|
8
|
+
| **amount** | **Float** | Fiat amount (≥ 1.00 USD equivalent). | |
|
|
9
|
+
| **currency_fiat** | [**FiatCurrency**](FiatCurrency.md) | | [optional][default to 'USD'] |
|
|
10
|
+
| **metadata** | **Hash<String, String>** | Free-form key/value (≤20 keys, string values ≤500 chars, ≤4 KB total). | [optional] |
|
|
11
|
+
| **customer_email** | **String** | | [optional] |
|
|
12
|
+
| **success_url** | **String** | | [optional] |
|
|
13
|
+
| **cancel_url** | **String** | | [optional] |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'griffnode'
|
|
19
|
+
|
|
20
|
+
instance = GriffNode::CreateTransactionRequest.new(
|
|
21
|
+
crypto: null,
|
|
22
|
+
amount: null,
|
|
23
|
+
currency_fiat: null,
|
|
24
|
+
metadata: null,
|
|
25
|
+
customer_email: null,
|
|
26
|
+
success_url: null,
|
|
27
|
+
cancel_url: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|