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
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# GriffNode::MarketDataApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.griffnode.com/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_prices**](MarketDataApi.md#get_prices) | **GET** /prices | Current crypto and fiat exchange rates (USD-denominated) |
|
|
8
|
+
| [**list_cryptocurrencies**](MarketDataApi.md#list_cryptocurrencies) | **GET** /cryptos/list | All supported cryptocurrencies and tokens |
|
|
9
|
+
| [**list_merchant_cryptocurrencies**](MarketDataApi.md#list_merchant_cryptocurrencies) | **GET** /merchant/cryptos | Cryptocurrencies this merchant has wallets configured for |
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## get_prices
|
|
13
|
+
|
|
14
|
+
> <GetPrices200Response> get_prices
|
|
15
|
+
|
|
16
|
+
Current crypto and fiat exchange rates (USD-denominated)
|
|
17
|
+
|
|
18
|
+
### Examples
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'time'
|
|
22
|
+
require 'griffnode'
|
|
23
|
+
# setup authorization
|
|
24
|
+
GriffNode.configure do |config|
|
|
25
|
+
# Configure Bearer authorization: SecretKey
|
|
26
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
api_instance = GriffNode::MarketDataApi.new
|
|
30
|
+
|
|
31
|
+
begin
|
|
32
|
+
# Current crypto and fiat exchange rates (USD-denominated)
|
|
33
|
+
result = api_instance.get_prices
|
|
34
|
+
p result
|
|
35
|
+
rescue GriffNode::ApiError => e
|
|
36
|
+
puts "Error when calling MarketDataApi->get_prices: #{e}"
|
|
37
|
+
end
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### Using the get_prices_with_http_info variant
|
|
41
|
+
|
|
42
|
+
This returns an Array which contains the response data, status code and headers.
|
|
43
|
+
|
|
44
|
+
> <Array(<GetPrices200Response>, Integer, Hash)> get_prices_with_http_info
|
|
45
|
+
|
|
46
|
+
```ruby
|
|
47
|
+
begin
|
|
48
|
+
# Current crypto and fiat exchange rates (USD-denominated)
|
|
49
|
+
data, status_code, headers = api_instance.get_prices_with_http_info
|
|
50
|
+
p status_code # => 2xx
|
|
51
|
+
p headers # => { ... }
|
|
52
|
+
p data # => <GetPrices200Response>
|
|
53
|
+
rescue GriffNode::ApiError => e
|
|
54
|
+
puts "Error when calling MarketDataApi->get_prices_with_http_info: #{e}"
|
|
55
|
+
end
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Parameters
|
|
59
|
+
|
|
60
|
+
This endpoint does not need any parameter.
|
|
61
|
+
|
|
62
|
+
### Return type
|
|
63
|
+
|
|
64
|
+
[**GetPrices200Response**](GetPrices200Response.md)
|
|
65
|
+
|
|
66
|
+
### Authorization
|
|
67
|
+
|
|
68
|
+
[SecretKey](../README.md#SecretKey)
|
|
69
|
+
|
|
70
|
+
### HTTP request headers
|
|
71
|
+
|
|
72
|
+
- **Content-Type**: Not defined
|
|
73
|
+
- **Accept**: application/json
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## list_cryptocurrencies
|
|
77
|
+
|
|
78
|
+
> <ListCryptocurrencies200Response> list_cryptocurrencies
|
|
79
|
+
|
|
80
|
+
All supported cryptocurrencies and tokens
|
|
81
|
+
|
|
82
|
+
### Examples
|
|
83
|
+
|
|
84
|
+
```ruby
|
|
85
|
+
require 'time'
|
|
86
|
+
require 'griffnode'
|
|
87
|
+
# setup authorization
|
|
88
|
+
GriffNode.configure do |config|
|
|
89
|
+
# Configure Bearer authorization: SecretKey
|
|
90
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
api_instance = GriffNode::MarketDataApi.new
|
|
94
|
+
|
|
95
|
+
begin
|
|
96
|
+
# All supported cryptocurrencies and tokens
|
|
97
|
+
result = api_instance.list_cryptocurrencies
|
|
98
|
+
p result
|
|
99
|
+
rescue GriffNode::ApiError => e
|
|
100
|
+
puts "Error when calling MarketDataApi->list_cryptocurrencies: #{e}"
|
|
101
|
+
end
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
#### Using the list_cryptocurrencies_with_http_info variant
|
|
105
|
+
|
|
106
|
+
This returns an Array which contains the response data, status code and headers.
|
|
107
|
+
|
|
108
|
+
> <Array(<ListCryptocurrencies200Response>, Integer, Hash)> list_cryptocurrencies_with_http_info
|
|
109
|
+
|
|
110
|
+
```ruby
|
|
111
|
+
begin
|
|
112
|
+
# All supported cryptocurrencies and tokens
|
|
113
|
+
data, status_code, headers = api_instance.list_cryptocurrencies_with_http_info
|
|
114
|
+
p status_code # => 2xx
|
|
115
|
+
p headers # => { ... }
|
|
116
|
+
p data # => <ListCryptocurrencies200Response>
|
|
117
|
+
rescue GriffNode::ApiError => e
|
|
118
|
+
puts "Error when calling MarketDataApi->list_cryptocurrencies_with_http_info: #{e}"
|
|
119
|
+
end
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Parameters
|
|
123
|
+
|
|
124
|
+
This endpoint does not need any parameter.
|
|
125
|
+
|
|
126
|
+
### Return type
|
|
127
|
+
|
|
128
|
+
[**ListCryptocurrencies200Response**](ListCryptocurrencies200Response.md)
|
|
129
|
+
|
|
130
|
+
### Authorization
|
|
131
|
+
|
|
132
|
+
[SecretKey](../README.md#SecretKey)
|
|
133
|
+
|
|
134
|
+
### HTTP request headers
|
|
135
|
+
|
|
136
|
+
- **Content-Type**: Not defined
|
|
137
|
+
- **Accept**: application/json
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
## list_merchant_cryptocurrencies
|
|
141
|
+
|
|
142
|
+
> <ListCryptocurrencies200Response> list_merchant_cryptocurrencies
|
|
143
|
+
|
|
144
|
+
Cryptocurrencies this merchant has wallets configured for
|
|
145
|
+
|
|
146
|
+
### Examples
|
|
147
|
+
|
|
148
|
+
```ruby
|
|
149
|
+
require 'time'
|
|
150
|
+
require 'griffnode'
|
|
151
|
+
# setup authorization
|
|
152
|
+
GriffNode.configure do |config|
|
|
153
|
+
# Configure Bearer authorization: SecretKey
|
|
154
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
api_instance = GriffNode::MarketDataApi.new
|
|
158
|
+
|
|
159
|
+
begin
|
|
160
|
+
# Cryptocurrencies this merchant has wallets configured for
|
|
161
|
+
result = api_instance.list_merchant_cryptocurrencies
|
|
162
|
+
p result
|
|
163
|
+
rescue GriffNode::ApiError => e
|
|
164
|
+
puts "Error when calling MarketDataApi->list_merchant_cryptocurrencies: #{e}"
|
|
165
|
+
end
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
#### Using the list_merchant_cryptocurrencies_with_http_info variant
|
|
169
|
+
|
|
170
|
+
This returns an Array which contains the response data, status code and headers.
|
|
171
|
+
|
|
172
|
+
> <Array(<ListCryptocurrencies200Response>, Integer, Hash)> list_merchant_cryptocurrencies_with_http_info
|
|
173
|
+
|
|
174
|
+
```ruby
|
|
175
|
+
begin
|
|
176
|
+
# Cryptocurrencies this merchant has wallets configured for
|
|
177
|
+
data, status_code, headers = api_instance.list_merchant_cryptocurrencies_with_http_info
|
|
178
|
+
p status_code # => 2xx
|
|
179
|
+
p headers # => { ... }
|
|
180
|
+
p data # => <ListCryptocurrencies200Response>
|
|
181
|
+
rescue GriffNode::ApiError => e
|
|
182
|
+
puts "Error when calling MarketDataApi->list_merchant_cryptocurrencies_with_http_info: #{e}"
|
|
183
|
+
end
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Parameters
|
|
187
|
+
|
|
188
|
+
This endpoint does not need any parameter.
|
|
189
|
+
|
|
190
|
+
### Return type
|
|
191
|
+
|
|
192
|
+
[**ListCryptocurrencies200Response**](ListCryptocurrencies200Response.md)
|
|
193
|
+
|
|
194
|
+
### Authorization
|
|
195
|
+
|
|
196
|
+
[SecretKey](../README.md#SecretKey)
|
|
197
|
+
|
|
198
|
+
### HTTP request headers
|
|
199
|
+
|
|
200
|
+
- **Content-Type**: Not defined
|
|
201
|
+
- **Accept**: application/json
|
|
202
|
+
|
data/docs/Pagination.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# GriffNode::Pagination
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **limit** | **Integer** | | |
|
|
8
|
+
| **offset** | **Integer** | | |
|
|
9
|
+
| **total** | **Integer** | | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'griffnode'
|
|
15
|
+
|
|
16
|
+
instance = GriffNode::Pagination.new(
|
|
17
|
+
limit: null,
|
|
18
|
+
offset: null,
|
|
19
|
+
total: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# GriffNode::PaymentSplit
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **txid** | **String** | On-chain transaction hash (blockchain id, NOT the GriffNode transaction_id). | [optional] |
|
|
8
|
+
| **amount_crypto** | **Float** | | [optional] |
|
|
9
|
+
| **confirmations** | **Integer** | | [optional] |
|
|
10
|
+
| **status** | **String** | | [optional] |
|
|
11
|
+
| **detected_at** | **Time** | | [optional] |
|
|
12
|
+
| **confirmed_at** | **Time** | | [optional] |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'griffnode'
|
|
18
|
+
|
|
19
|
+
instance = GriffNode::PaymentSplit.new(
|
|
20
|
+
txid: null,
|
|
21
|
+
amount_crypto: null,
|
|
22
|
+
confirmations: null,
|
|
23
|
+
status: null,
|
|
24
|
+
detected_at: null,
|
|
25
|
+
confirmed_at: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
data/docs/Plan.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# GriffNode::Plan
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **tier** | [**PlanTier**](PlanTier.md) | | [optional] |
|
|
8
|
+
| **monthly_price_usd** | **Float** | | [optional] |
|
|
9
|
+
| **yearly_price_usd** | **Float** | | [optional] |
|
|
10
|
+
| **monthly_transaction_limit** | **Integer** | | [optional] |
|
|
11
|
+
| **overage_cost_per_tx** | **Float** | | [optional] |
|
|
12
|
+
| **webhook_support** | **Boolean** | | [optional] |
|
|
13
|
+
| **webhook_limit** | **Integer** | | [optional] |
|
|
14
|
+
| **ip_whitelist** | **Boolean** | | [optional] |
|
|
15
|
+
| **api_rate_limit_per_minute** | **Integer** | | [optional] |
|
|
16
|
+
| **api_rate_limit_per_hour** | **Integer** | | [optional] |
|
|
17
|
+
| **custom_pricing** | **Boolean** | | [optional] |
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require 'griffnode'
|
|
23
|
+
|
|
24
|
+
instance = GriffNode::Plan.new(
|
|
25
|
+
tier: null,
|
|
26
|
+
monthly_price_usd: null,
|
|
27
|
+
yearly_price_usd: null,
|
|
28
|
+
monthly_transaction_limit: null,
|
|
29
|
+
overage_cost_per_tx: null,
|
|
30
|
+
webhook_support: null,
|
|
31
|
+
webhook_limit: null,
|
|
32
|
+
ip_whitelist: null,
|
|
33
|
+
api_rate_limit_per_minute: null,
|
|
34
|
+
api_rate_limit_per_hour: null,
|
|
35
|
+
custom_pricing: null
|
|
36
|
+
)
|
|
37
|
+
```
|
|
38
|
+
|
data/docs/PlanTier.md
ADDED
data/docs/SystemApi.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# GriffNode::SystemApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.griffnode.com/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_health**](SystemApi.md#get_health) | **GET** /health | API health check |
|
|
8
|
+
| [**hosted_checkout_redirect**](SystemApi.md#hosted_checkout_redirect) | **GET** /pay | Hosted-checkout redirect (browser flow, publishable key) |
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## get_health
|
|
12
|
+
|
|
13
|
+
> <GetHealth200Response> get_health
|
|
14
|
+
|
|
15
|
+
API health check
|
|
16
|
+
|
|
17
|
+
### Examples
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'time'
|
|
21
|
+
require 'griffnode'
|
|
22
|
+
|
|
23
|
+
api_instance = GriffNode::SystemApi.new
|
|
24
|
+
|
|
25
|
+
begin
|
|
26
|
+
# API health check
|
|
27
|
+
result = api_instance.get_health
|
|
28
|
+
p result
|
|
29
|
+
rescue GriffNode::ApiError => e
|
|
30
|
+
puts "Error when calling SystemApi->get_health: #{e}"
|
|
31
|
+
end
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
#### Using the get_health_with_http_info variant
|
|
35
|
+
|
|
36
|
+
This returns an Array which contains the response data, status code and headers.
|
|
37
|
+
|
|
38
|
+
> <Array(<GetHealth200Response>, Integer, Hash)> get_health_with_http_info
|
|
39
|
+
|
|
40
|
+
```ruby
|
|
41
|
+
begin
|
|
42
|
+
# API health check
|
|
43
|
+
data, status_code, headers = api_instance.get_health_with_http_info
|
|
44
|
+
p status_code # => 2xx
|
|
45
|
+
p headers # => { ... }
|
|
46
|
+
p data # => <GetHealth200Response>
|
|
47
|
+
rescue GriffNode::ApiError => e
|
|
48
|
+
puts "Error when calling SystemApi->get_health_with_http_info: #{e}"
|
|
49
|
+
end
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Parameters
|
|
53
|
+
|
|
54
|
+
This endpoint does not need any parameter.
|
|
55
|
+
|
|
56
|
+
### Return type
|
|
57
|
+
|
|
58
|
+
[**GetHealth200Response**](GetHealth200Response.md)
|
|
59
|
+
|
|
60
|
+
### Authorization
|
|
61
|
+
|
|
62
|
+
No authorization required
|
|
63
|
+
|
|
64
|
+
### HTTP request headers
|
|
65
|
+
|
|
66
|
+
- **Content-Type**: Not defined
|
|
67
|
+
- **Accept**: application/json
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## hosted_checkout_redirect
|
|
71
|
+
|
|
72
|
+
> hosted_checkout_redirect(pk, amount, crypto, opts)
|
|
73
|
+
|
|
74
|
+
Hosted-checkout redirect (browser flow, publishable key)
|
|
75
|
+
|
|
76
|
+
Browser-facing redirect to the hosted payment page, authenticated by a **publishable** key in the query string (safe to expose client-side). Not used by the server-side SDKs — included for completeness.
|
|
77
|
+
|
|
78
|
+
### Examples
|
|
79
|
+
|
|
80
|
+
```ruby
|
|
81
|
+
require 'time'
|
|
82
|
+
require 'griffnode'
|
|
83
|
+
|
|
84
|
+
api_instance = GriffNode::SystemApi.new
|
|
85
|
+
pk = 'pk_example' # String | Publishable key, pk_live_… / pk_test_…
|
|
86
|
+
amount = 'amount_example' # String | Fiat amount (≥ 1.00 USD equivalent).
|
|
87
|
+
crypto = GriffNode::CryptoSymbol::BTC # CryptoSymbol |
|
|
88
|
+
opts = {
|
|
89
|
+
link: 'link_example' # String | Payment-link slug for attribution.
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
begin
|
|
93
|
+
# Hosted-checkout redirect (browser flow, publishable key)
|
|
94
|
+
api_instance.hosted_checkout_redirect(pk, amount, crypto, opts)
|
|
95
|
+
rescue GriffNode::ApiError => e
|
|
96
|
+
puts "Error when calling SystemApi->hosted_checkout_redirect: #{e}"
|
|
97
|
+
end
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
#### Using the hosted_checkout_redirect_with_http_info variant
|
|
101
|
+
|
|
102
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
103
|
+
|
|
104
|
+
> <Array(nil, Integer, Hash)> hosted_checkout_redirect_with_http_info(pk, amount, crypto, opts)
|
|
105
|
+
|
|
106
|
+
```ruby
|
|
107
|
+
begin
|
|
108
|
+
# Hosted-checkout redirect (browser flow, publishable key)
|
|
109
|
+
data, status_code, headers = api_instance.hosted_checkout_redirect_with_http_info(pk, amount, crypto, opts)
|
|
110
|
+
p status_code # => 2xx
|
|
111
|
+
p headers # => { ... }
|
|
112
|
+
p data # => nil
|
|
113
|
+
rescue GriffNode::ApiError => e
|
|
114
|
+
puts "Error when calling SystemApi->hosted_checkout_redirect_with_http_info: #{e}"
|
|
115
|
+
end
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Parameters
|
|
119
|
+
|
|
120
|
+
| Name | Type | Description | Notes |
|
|
121
|
+
| ---- | ---- | ----------- | ----- |
|
|
122
|
+
| **pk** | **String** | Publishable key, pk_live_… / pk_test_… | |
|
|
123
|
+
| **amount** | **String** | Fiat amount (≥ 1.00 USD equivalent). | |
|
|
124
|
+
| **crypto** | [**CryptoSymbol**](.md) | | |
|
|
125
|
+
| **link** | **String** | Payment-link slug for attribution. | [optional] |
|
|
126
|
+
|
|
127
|
+
### Return type
|
|
128
|
+
|
|
129
|
+
nil (empty response body)
|
|
130
|
+
|
|
131
|
+
### Authorization
|
|
132
|
+
|
|
133
|
+
No authorization required
|
|
134
|
+
|
|
135
|
+
### HTTP request headers
|
|
136
|
+
|
|
137
|
+
- **Content-Type**: Not defined
|
|
138
|
+
- **Accept**: application/json
|
|
139
|
+
|
data/docs/Transaction.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# GriffNode::Transaction
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **transaction_id** | **String** | | |
|
|
8
|
+
| **status** | [**TransactionStatus**](TransactionStatus.md) | | |
|
|
9
|
+
| **type** | **String** | | [optional] |
|
|
10
|
+
| **crypto** | [**CryptoSymbol**](CryptoSymbol.md) | | |
|
|
11
|
+
| **deposit_address** | **String** | | [optional] |
|
|
12
|
+
| **amount_crypto** | **Float** | | [optional] |
|
|
13
|
+
| **amount_fiat** | **Float** | | |
|
|
14
|
+
| **amount_usd** | **Float** | | |
|
|
15
|
+
| **amount_paid** | **Float** | | [optional] |
|
|
16
|
+
| **amount_remaining** | **Float** | | [optional] |
|
|
17
|
+
| **currency_fiat** | [**FiatCurrency**](FiatCurrency.md) | | [default to 'USD'] |
|
|
18
|
+
| **fiat_to_usd_rate** | **Float** | | [optional] |
|
|
19
|
+
| **exchange_rate** | **Float** | USD per unit of crypto, locked at creation. | [optional] |
|
|
20
|
+
| **confirmations_required** | **Integer** | | [optional] |
|
|
21
|
+
| **payment_url** | **String** | | [optional] |
|
|
22
|
+
| **order_id** | **String** | | [optional] |
|
|
23
|
+
| **customer_email** | **String** | | [optional] |
|
|
24
|
+
| **items** | [**Array<LineItem>**](LineItem.md) | | [optional] |
|
|
25
|
+
| **payments** | [**Array<PaymentSplit>**](PaymentSplit.md) | On-chain payments detected toward this transaction. | [optional] |
|
|
26
|
+
| **metadata** | **Hash<String, String>** | Free-form key/value (≤20 keys, string values ≤500 chars, ≤4 KB total). | [optional] |
|
|
27
|
+
| **success_url** | **String** | | [optional] |
|
|
28
|
+
| **cancel_url** | **String** | | [optional] |
|
|
29
|
+
| **created_at** | **Time** | | |
|
|
30
|
+
| **updated_at** | **Time** | | [optional] |
|
|
31
|
+
| **expires_at** | **Time** | | |
|
|
32
|
+
|
|
33
|
+
## Example
|
|
34
|
+
|
|
35
|
+
```ruby
|
|
36
|
+
require 'griffnode'
|
|
37
|
+
|
|
38
|
+
instance = GriffNode::Transaction.new(
|
|
39
|
+
transaction_id: null,
|
|
40
|
+
status: null,
|
|
41
|
+
type: null,
|
|
42
|
+
crypto: null,
|
|
43
|
+
deposit_address: null,
|
|
44
|
+
amount_crypto: null,
|
|
45
|
+
amount_fiat: null,
|
|
46
|
+
amount_usd: null,
|
|
47
|
+
amount_paid: null,
|
|
48
|
+
amount_remaining: null,
|
|
49
|
+
currency_fiat: null,
|
|
50
|
+
fiat_to_usd_rate: null,
|
|
51
|
+
exchange_rate: null,
|
|
52
|
+
confirmations_required: null,
|
|
53
|
+
payment_url: null,
|
|
54
|
+
order_id: null,
|
|
55
|
+
customer_email: null,
|
|
56
|
+
items: null,
|
|
57
|
+
payments: null,
|
|
58
|
+
metadata: null,
|
|
59
|
+
success_url: null,
|
|
60
|
+
cancel_url: null,
|
|
61
|
+
created_at: null,
|
|
62
|
+
updated_at: null,
|
|
63
|
+
expires_at: null
|
|
64
|
+
)
|
|
65
|
+
```
|
|
66
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# GriffNode::TransactionEnvelope
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **success** | **Object** | | |
|
|
8
|
+
| **data** | [**Transaction**](Transaction.md) | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'griffnode'
|
|
14
|
+
|
|
15
|
+
instance = GriffNode::TransactionEnvelope.new(
|
|
16
|
+
success: null,
|
|
17
|
+
data: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|