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,295 @@
|
|
|
1
|
+
# GriffNode::TransactionsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.griffnode.com/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**create_detailed_transaction**](TransactionsApi.md#create_detailed_transaction) | **POST** /transactions/create-detailed | Create an itemized transaction (Professional/Enterprise plans) |
|
|
8
|
+
| [**create_transaction**](TransactionsApi.md#create_transaction) | **POST** /transactions/create | Create a payment transaction |
|
|
9
|
+
| [**get_transaction**](TransactionsApi.md#get_transaction) | **GET** /transactions/{transaction_id} | Retrieve a single transaction |
|
|
10
|
+
| [**list_transactions**](TransactionsApi.md#list_transactions) | **GET** /transactions/list | List the merchant's transactions (newest first) |
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## create_detailed_transaction
|
|
14
|
+
|
|
15
|
+
> <TransactionEnvelope> create_detailed_transaction(create_detailed_transaction_request, opts)
|
|
16
|
+
|
|
17
|
+
Create an itemized transaction (Professional/Enterprise plans)
|
|
18
|
+
|
|
19
|
+
### Examples
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require 'time'
|
|
23
|
+
require 'griffnode'
|
|
24
|
+
# setup authorization
|
|
25
|
+
GriffNode.configure do |config|
|
|
26
|
+
# Configure Bearer authorization: SecretKey
|
|
27
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
api_instance = GriffNode::TransactionsApi.new
|
|
31
|
+
create_detailed_transaction_request = GriffNode::CreateDetailedTransactionRequest.new({crypto: GriffNode::CryptoSymbol::BTC, items: [GriffNode::LineItem.new({name: 'name_example', price: 3.56})], order_id: 'order_id_example'}) # CreateDetailedTransactionRequest |
|
|
32
|
+
opts = {
|
|
33
|
+
x_idempotency_key: 'x_idempotency_key_example' # String | Optional unique key for a create request (e.g. a UUID). A retried create with the same key returns the original transaction instead of creating a duplicate — send it on every create so a network retry can't double-charge the customer.
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
begin
|
|
37
|
+
# Create an itemized transaction (Professional/Enterprise plans)
|
|
38
|
+
result = api_instance.create_detailed_transaction(create_detailed_transaction_request, opts)
|
|
39
|
+
p result
|
|
40
|
+
rescue GriffNode::ApiError => e
|
|
41
|
+
puts "Error when calling TransactionsApi->create_detailed_transaction: #{e}"
|
|
42
|
+
end
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### Using the create_detailed_transaction_with_http_info variant
|
|
46
|
+
|
|
47
|
+
This returns an Array which contains the response data, status code and headers.
|
|
48
|
+
|
|
49
|
+
> <Array(<TransactionEnvelope>, Integer, Hash)> create_detailed_transaction_with_http_info(create_detailed_transaction_request, opts)
|
|
50
|
+
|
|
51
|
+
```ruby
|
|
52
|
+
begin
|
|
53
|
+
# Create an itemized transaction (Professional/Enterprise plans)
|
|
54
|
+
data, status_code, headers = api_instance.create_detailed_transaction_with_http_info(create_detailed_transaction_request, opts)
|
|
55
|
+
p status_code # => 2xx
|
|
56
|
+
p headers # => { ... }
|
|
57
|
+
p data # => <TransactionEnvelope>
|
|
58
|
+
rescue GriffNode::ApiError => e
|
|
59
|
+
puts "Error when calling TransactionsApi->create_detailed_transaction_with_http_info: #{e}"
|
|
60
|
+
end
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Parameters
|
|
64
|
+
|
|
65
|
+
| Name | Type | Description | Notes |
|
|
66
|
+
| ---- | ---- | ----------- | ----- |
|
|
67
|
+
| **create_detailed_transaction_request** | [**CreateDetailedTransactionRequest**](CreateDetailedTransactionRequest.md) | | |
|
|
68
|
+
| **x_idempotency_key** | **String** | Optional unique key for a create request (e.g. a UUID). A retried create with the same key returns the original transaction instead of creating a duplicate — send it on every create so a network retry can't double-charge the customer. | [optional] |
|
|
69
|
+
|
|
70
|
+
### Return type
|
|
71
|
+
|
|
72
|
+
[**TransactionEnvelope**](TransactionEnvelope.md)
|
|
73
|
+
|
|
74
|
+
### Authorization
|
|
75
|
+
|
|
76
|
+
[SecretKey](../README.md#SecretKey)
|
|
77
|
+
|
|
78
|
+
### HTTP request headers
|
|
79
|
+
|
|
80
|
+
- **Content-Type**: application/json
|
|
81
|
+
- **Accept**: application/json
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
## create_transaction
|
|
85
|
+
|
|
86
|
+
> <TransactionEnvelope> create_transaction(create_transaction_request, opts)
|
|
87
|
+
|
|
88
|
+
Create a payment transaction
|
|
89
|
+
|
|
90
|
+
### Examples
|
|
91
|
+
|
|
92
|
+
```ruby
|
|
93
|
+
require 'time'
|
|
94
|
+
require 'griffnode'
|
|
95
|
+
# setup authorization
|
|
96
|
+
GriffNode.configure do |config|
|
|
97
|
+
# Configure Bearer authorization: SecretKey
|
|
98
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
api_instance = GriffNode::TransactionsApi.new
|
|
102
|
+
create_transaction_request = GriffNode::CreateTransactionRequest.new({crypto: GriffNode::CryptoSymbol::BTC, amount: 3.56}) # CreateTransactionRequest |
|
|
103
|
+
opts = {
|
|
104
|
+
x_idempotency_key: 'x_idempotency_key_example' # String | Optional unique key for a create request (e.g. a UUID). A retried create with the same key returns the original transaction instead of creating a duplicate — send it on every create so a network retry can't double-charge the customer.
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
begin
|
|
108
|
+
# Create a payment transaction
|
|
109
|
+
result = api_instance.create_transaction(create_transaction_request, opts)
|
|
110
|
+
p result
|
|
111
|
+
rescue GriffNode::ApiError => e
|
|
112
|
+
puts "Error when calling TransactionsApi->create_transaction: #{e}"
|
|
113
|
+
end
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
#### Using the create_transaction_with_http_info variant
|
|
117
|
+
|
|
118
|
+
This returns an Array which contains the response data, status code and headers.
|
|
119
|
+
|
|
120
|
+
> <Array(<TransactionEnvelope>, Integer, Hash)> create_transaction_with_http_info(create_transaction_request, opts)
|
|
121
|
+
|
|
122
|
+
```ruby
|
|
123
|
+
begin
|
|
124
|
+
# Create a payment transaction
|
|
125
|
+
data, status_code, headers = api_instance.create_transaction_with_http_info(create_transaction_request, opts)
|
|
126
|
+
p status_code # => 2xx
|
|
127
|
+
p headers # => { ... }
|
|
128
|
+
p data # => <TransactionEnvelope>
|
|
129
|
+
rescue GriffNode::ApiError => e
|
|
130
|
+
puts "Error when calling TransactionsApi->create_transaction_with_http_info: #{e}"
|
|
131
|
+
end
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Parameters
|
|
135
|
+
|
|
136
|
+
| Name | Type | Description | Notes |
|
|
137
|
+
| ---- | ---- | ----------- | ----- |
|
|
138
|
+
| **create_transaction_request** | [**CreateTransactionRequest**](CreateTransactionRequest.md) | | |
|
|
139
|
+
| **x_idempotency_key** | **String** | Optional unique key for a create request (e.g. a UUID). A retried create with the same key returns the original transaction instead of creating a duplicate — send it on every create so a network retry can't double-charge the customer. | [optional] |
|
|
140
|
+
|
|
141
|
+
### Return type
|
|
142
|
+
|
|
143
|
+
[**TransactionEnvelope**](TransactionEnvelope.md)
|
|
144
|
+
|
|
145
|
+
### Authorization
|
|
146
|
+
|
|
147
|
+
[SecretKey](../README.md#SecretKey)
|
|
148
|
+
|
|
149
|
+
### HTTP request headers
|
|
150
|
+
|
|
151
|
+
- **Content-Type**: application/json
|
|
152
|
+
- **Accept**: application/json
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
## get_transaction
|
|
156
|
+
|
|
157
|
+
> <TransactionEnvelope> get_transaction(transaction_id)
|
|
158
|
+
|
|
159
|
+
Retrieve a single transaction
|
|
160
|
+
|
|
161
|
+
### Examples
|
|
162
|
+
|
|
163
|
+
```ruby
|
|
164
|
+
require 'time'
|
|
165
|
+
require 'griffnode'
|
|
166
|
+
# setup authorization
|
|
167
|
+
GriffNode.configure do |config|
|
|
168
|
+
# Configure Bearer authorization: SecretKey
|
|
169
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
api_instance = GriffNode::TransactionsApi.new
|
|
173
|
+
transaction_id = 'transaction_id_example' # String |
|
|
174
|
+
|
|
175
|
+
begin
|
|
176
|
+
# Retrieve a single transaction
|
|
177
|
+
result = api_instance.get_transaction(transaction_id)
|
|
178
|
+
p result
|
|
179
|
+
rescue GriffNode::ApiError => e
|
|
180
|
+
puts "Error when calling TransactionsApi->get_transaction: #{e}"
|
|
181
|
+
end
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
#### Using the get_transaction_with_http_info variant
|
|
185
|
+
|
|
186
|
+
This returns an Array which contains the response data, status code and headers.
|
|
187
|
+
|
|
188
|
+
> <Array(<TransactionEnvelope>, Integer, Hash)> get_transaction_with_http_info(transaction_id)
|
|
189
|
+
|
|
190
|
+
```ruby
|
|
191
|
+
begin
|
|
192
|
+
# Retrieve a single transaction
|
|
193
|
+
data, status_code, headers = api_instance.get_transaction_with_http_info(transaction_id)
|
|
194
|
+
p status_code # => 2xx
|
|
195
|
+
p headers # => { ... }
|
|
196
|
+
p data # => <TransactionEnvelope>
|
|
197
|
+
rescue GriffNode::ApiError => e
|
|
198
|
+
puts "Error when calling TransactionsApi->get_transaction_with_http_info: #{e}"
|
|
199
|
+
end
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Parameters
|
|
203
|
+
|
|
204
|
+
| Name | Type | Description | Notes |
|
|
205
|
+
| ---- | ---- | ----------- | ----- |
|
|
206
|
+
| **transaction_id** | **String** | | |
|
|
207
|
+
|
|
208
|
+
### Return type
|
|
209
|
+
|
|
210
|
+
[**TransactionEnvelope**](TransactionEnvelope.md)
|
|
211
|
+
|
|
212
|
+
### Authorization
|
|
213
|
+
|
|
214
|
+
[SecretKey](../README.md#SecretKey)
|
|
215
|
+
|
|
216
|
+
### HTTP request headers
|
|
217
|
+
|
|
218
|
+
- **Content-Type**: Not defined
|
|
219
|
+
- **Accept**: application/json
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
## list_transactions
|
|
223
|
+
|
|
224
|
+
> <ListTransactions200Response> list_transactions(opts)
|
|
225
|
+
|
|
226
|
+
List the merchant's transactions (newest first)
|
|
227
|
+
|
|
228
|
+
### Examples
|
|
229
|
+
|
|
230
|
+
```ruby
|
|
231
|
+
require 'time'
|
|
232
|
+
require 'griffnode'
|
|
233
|
+
# setup authorization
|
|
234
|
+
GriffNode.configure do |config|
|
|
235
|
+
# Configure Bearer authorization: SecretKey
|
|
236
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
api_instance = GriffNode::TransactionsApi.new
|
|
240
|
+
opts = {
|
|
241
|
+
limit: 56, # Integer |
|
|
242
|
+
offset: 56, # Integer |
|
|
243
|
+
status: GriffNode::TransactionStatus::PENDING, # TransactionStatus |
|
|
244
|
+
crypto: GriffNode::CryptoSymbol::BTC # CryptoSymbol |
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
begin
|
|
248
|
+
# List the merchant's transactions (newest first)
|
|
249
|
+
result = api_instance.list_transactions(opts)
|
|
250
|
+
p result
|
|
251
|
+
rescue GriffNode::ApiError => e
|
|
252
|
+
puts "Error when calling TransactionsApi->list_transactions: #{e}"
|
|
253
|
+
end
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
#### Using the list_transactions_with_http_info variant
|
|
257
|
+
|
|
258
|
+
This returns an Array which contains the response data, status code and headers.
|
|
259
|
+
|
|
260
|
+
> <Array(<ListTransactions200Response>, Integer, Hash)> list_transactions_with_http_info(opts)
|
|
261
|
+
|
|
262
|
+
```ruby
|
|
263
|
+
begin
|
|
264
|
+
# List the merchant's transactions (newest first)
|
|
265
|
+
data, status_code, headers = api_instance.list_transactions_with_http_info(opts)
|
|
266
|
+
p status_code # => 2xx
|
|
267
|
+
p headers # => { ... }
|
|
268
|
+
p data # => <ListTransactions200Response>
|
|
269
|
+
rescue GriffNode::ApiError => e
|
|
270
|
+
puts "Error when calling TransactionsApi->list_transactions_with_http_info: #{e}"
|
|
271
|
+
end
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Parameters
|
|
275
|
+
|
|
276
|
+
| Name | Type | Description | Notes |
|
|
277
|
+
| ---- | ---- | ----------- | ----- |
|
|
278
|
+
| **limit** | **Integer** | | [optional][default to 20] |
|
|
279
|
+
| **offset** | **Integer** | | [optional][default to 0] |
|
|
280
|
+
| **status** | [**TransactionStatus**](.md) | | [optional] |
|
|
281
|
+
| **crypto** | [**CryptoSymbol**](.md) | | [optional] |
|
|
282
|
+
|
|
283
|
+
### Return type
|
|
284
|
+
|
|
285
|
+
[**ListTransactions200Response**](ListTransactions200Response.md)
|
|
286
|
+
|
|
287
|
+
### Authorization
|
|
288
|
+
|
|
289
|
+
[SecretKey](../README.md#SecretKey)
|
|
290
|
+
|
|
291
|
+
### HTTP request headers
|
|
292
|
+
|
|
293
|
+
- **Content-Type**: Not defined
|
|
294
|
+
- **Accept**: application/json
|
|
295
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# GriffNode::WebhookPayload
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **event** | **String** | | |
|
|
8
|
+
| **timestamp** | **Time** | | |
|
|
9
|
+
| **transaction_id** | **String** | | |
|
|
10
|
+
| **status** | [**TransactionStatus**](TransactionStatus.md) | | |
|
|
11
|
+
| **currency_crypto** | [**CryptoSymbol**](CryptoSymbol.md) | | [optional] |
|
|
12
|
+
| **currency_fiat** | [**FiatCurrency**](FiatCurrency.md) | | [optional][default to 'USD'] |
|
|
13
|
+
| **amount_fiat** | **String** | Decimal string. | [optional] |
|
|
14
|
+
| **amount_usd** | **String** | Decimal string. | [optional] |
|
|
15
|
+
| **amount_crypto** | **String** | Decimal string. | [optional] |
|
|
16
|
+
| **order_id** | **String** | | [optional] |
|
|
17
|
+
| **receipt_url** | **String** | Present on completed/overpaid. | [optional] |
|
|
18
|
+
| **metadata** | **Hash<String, String>** | Free-form key/value (≤20 keys, string values ≤500 chars, ≤4 KB total). | [optional] |
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'griffnode'
|
|
24
|
+
|
|
25
|
+
instance = GriffNode::WebhookPayload.new(
|
|
26
|
+
event: null,
|
|
27
|
+
timestamp: null,
|
|
28
|
+
transaction_id: null,
|
|
29
|
+
status: null,
|
|
30
|
+
currency_crypto: null,
|
|
31
|
+
currency_fiat: null,
|
|
32
|
+
amount_fiat: null,
|
|
33
|
+
amount_usd: null,
|
|
34
|
+
amount_crypto: null,
|
|
35
|
+
order_id: null,
|
|
36
|
+
receipt_url: null,
|
|
37
|
+
metadata: null
|
|
38
|
+
)
|
|
39
|
+
```
|
|
40
|
+
|
data/git_push.sh
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
|
3
|
+
#
|
|
4
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
|
5
|
+
|
|
6
|
+
git_user_id=$1
|
|
7
|
+
git_repo_id=$2
|
|
8
|
+
release_note=$3
|
|
9
|
+
git_host=$4
|
|
10
|
+
|
|
11
|
+
if [ "$git_host" = "" ]; then
|
|
12
|
+
git_host="github.com"
|
|
13
|
+
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
if [ "$git_user_id" = "" ]; then
|
|
17
|
+
git_user_id="GIT_USER_ID"
|
|
18
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
if [ "$git_repo_id" = "" ]; then
|
|
22
|
+
git_repo_id="GIT_REPO_ID"
|
|
23
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
if [ "$release_note" = "" ]; then
|
|
27
|
+
release_note="Minor update"
|
|
28
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# Initialize the local directory as a Git repository
|
|
32
|
+
git init
|
|
33
|
+
|
|
34
|
+
# Adds the files in the local repository and stages them for commit.
|
|
35
|
+
git add .
|
|
36
|
+
|
|
37
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
|
38
|
+
git commit -m "$release_note"
|
|
39
|
+
|
|
40
|
+
# Sets the new remote
|
|
41
|
+
git_remote=$(git remote)
|
|
42
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
|
43
|
+
|
|
44
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
|
45
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
|
46
|
+
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
|
47
|
+
else
|
|
48
|
+
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
git pull origin master
|
|
54
|
+
|
|
55
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
|
56
|
+
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
|
57
|
+
git push origin master 2>&1 | grep -v 'To https'
|
data/griffnode.gemspec
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
=begin
|
|
4
|
+
#GriffNode API
|
|
5
|
+
|
|
6
|
+
#Accept Bitcoin, Litecoin, Dogecoin, Dash, Ethereum and ERC-20 tokens. Server-to-server, authenticated with a secret API key (`Authorization: Bearer sk_live_…` for live, or `sk_test_…` for test mode — same base URL). All monetary amounts in API responses are JSON numbers; **webhook** amounts are strings to preserve decimal precision (see the `webhooks` section). **Rate limits.** Every request is rate-limited per API key in two windows — per minute and per hour — by plan tier (min/hour): starter 30/500, business 100/2000, professional 300/5000, enterprise 1000/20000. Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` (Unix seconds) for the per-minute window. On `429` the body is `error: \"RATE_LIMIT_EXCEEDED\"` (either window) with a `Retry-After` header (seconds) — clients should retry after it. A separate `429` with `error: \"MONTHLY_LIMIT_REACHED\"` means the plan's monthly transaction quota (not the request rate).
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.1
|
|
9
|
+
|
|
10
|
+
Generated by: https://openapi-generator.tech
|
|
11
|
+
Generator version: 7.10.0
|
|
12
|
+
|
|
13
|
+
=end
|
|
14
|
+
|
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
16
|
+
require "griffnode/version"
|
|
17
|
+
|
|
18
|
+
Gem::Specification.new do |s|
|
|
19
|
+
s.name = "griffnode"
|
|
20
|
+
s.version = GriffNode::VERSION
|
|
21
|
+
s.platform = Gem::Platform::RUBY
|
|
22
|
+
s.authors = ["GriffNode"]
|
|
23
|
+
s.email = ["dev@griffnode.com"]
|
|
24
|
+
s.homepage = "https://griffnode.com"
|
|
25
|
+
s.summary = "GriffNode API Ruby Gem"
|
|
26
|
+
s.description = "Official GriffNode SDK. Non-custodial crypto payment gateway: accept BTC, ETH, LTC, DOGE, DASH and ERC-20 tokens straight to your own wallet."
|
|
27
|
+
s.license = "Unlicense"
|
|
28
|
+
s.required_ruby_version = ">= 2.7"
|
|
29
|
+
s.metadata = {
|
|
30
|
+
"homepage_uri" => "https://griffnode.com",
|
|
31
|
+
"source_code_uri" => "https://github.com/GriffNode/ruby-sdk",
|
|
32
|
+
"documentation_uri" => "https://docs.griffnode.com/reference",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
|
36
|
+
|
|
37
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
|
38
|
+
|
|
39
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
|
40
|
+
s.test_files = `find spec/*`.split("\n")
|
|
41
|
+
s.executables = []
|
|
42
|
+
s.require_paths = ["lib"]
|
|
43
|
+
end
|