droplet_kit 3.8.1 → 3.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/lib/droplet_kit.rb +3 -0
- data/lib/droplet_kit/client.rb +1 -0
- data/lib/droplet_kit/mappings/balance_mapping.rb +14 -0
- data/lib/droplet_kit/models/balance.rb +8 -0
- data/lib/droplet_kit/resources/balance_resource.rb +10 -0
- data/lib/droplet_kit/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 817503da27fa13094693c81ceaf605dea004e28273aed2ae507cbcbc970d7cf5
|
4
|
+
data.tar.gz: f7545ad2cc17947ae6ca310e27f9e6a435a78ef2273ea5c07fc13cc1fbe10ba7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd0d4889db87949b4758021de2e2d3dc0b8ed0606c03435f9269c48e1931eb01e1572413620390f06a790e7347d614dc2220d3faf811fef362b25947eecaa450
|
7
|
+
data.tar.gz: a0a8a9acc022b86c904baad0b1591c9229591974883f272fa8f93c86994e22029f6d20f9440bc8c6e41e201ce3f50188f1545ea32d85a5f6717a8791a32b7190
|
data/README.md
CHANGED
@@ -502,6 +502,16 @@ Actions supported:
|
|
502
502
|
|
503
503
|
* `client.account.info()`
|
504
504
|
|
505
|
+
## Balance resource
|
506
|
+
|
507
|
+
```ruby
|
508
|
+
client = DropletKit::Client.new(access_token: 'TOKEN')
|
509
|
+
client.balance #=> DropletKit::AccountResource
|
510
|
+
```
|
511
|
+
|
512
|
+
Actions supported:
|
513
|
+
|
514
|
+
* `client.balance.info()`
|
505
515
|
|
506
516
|
## Floating IP resource
|
507
517
|
|
data/lib/droplet_kit.rb
CHANGED
@@ -24,6 +24,7 @@ module DropletKit
|
|
24
24
|
autoload :SSHKey, 'droplet_kit/models/ssh_key'
|
25
25
|
autoload :MetaInformation, 'droplet_kit/models/meta_information'
|
26
26
|
autoload :Account, 'droplet_kit/models/account'
|
27
|
+
autoload :Balance, 'droplet_kit/models/balance'
|
27
28
|
autoload :DropletUpgrade, 'droplet_kit/models/droplet_upgrade'
|
28
29
|
autoload :FloatingIp, 'droplet_kit/models/floating_ip'
|
29
30
|
autoload :Project, 'droplet_kit/models/project'
|
@@ -79,6 +80,7 @@ module DropletKit
|
|
79
80
|
autoload :RegionResource, 'droplet_kit/resources/region_resource'
|
80
81
|
autoload :SizeResource, 'droplet_kit/resources/size_resource'
|
81
82
|
autoload :AccountResource, 'droplet_kit/resources/account_resource'
|
83
|
+
autoload :BalanceResource, 'droplet_kit/resources/balance_resource'
|
82
84
|
autoload :DropletUpgradeResource, 'droplet_kit/resources/droplet_upgrade_resource'
|
83
85
|
autoload :FloatingIpResource, 'droplet_kit/resources/floating_ip_resource'
|
84
86
|
autoload :FloatingIpActionResource, 'droplet_kit/resources/floating_ip_action_resource'
|
@@ -115,6 +117,7 @@ module DropletKit
|
|
115
117
|
autoload :ImageActionMapping, 'droplet_kit/mappings/image_action_mapping'
|
116
118
|
autoload :SSHKeyMapping, 'droplet_kit/mappings/ssh_key_mapping'
|
117
119
|
autoload :AccountMapping, 'droplet_kit/mappings/account_mapping'
|
120
|
+
autoload :BalanceMapping, 'droplet_kit/mappings/balance_mapping'
|
118
121
|
autoload :DropletUpgradeMapping, 'droplet_kit/mappings/droplet_upgrade_mapping'
|
119
122
|
autoload :FloatingIpMapping, 'droplet_kit/mappings/floating_ip_mapping'
|
120
123
|
autoload :ProjectMapping, 'droplet_kit/mappings/project_mapping'
|
data/lib/droplet_kit/client.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
module DropletKit
|
2
|
+
class BalanceMapping
|
3
|
+
include Kartograph::DSL
|
4
|
+
|
5
|
+
kartograph do
|
6
|
+
mapping Balance
|
7
|
+
property :month_to_date_balance, scopes: [:read]
|
8
|
+
property :account_balance, scopes: [:read]
|
9
|
+
property :month_to_date_usage, scopes: [:read]
|
10
|
+
property :generated_at, scopes: [:read]
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/droplet_kit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: droplet_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DigitalOcean API Engineering team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: virtus
|
@@ -150,6 +150,7 @@ files:
|
|
150
150
|
- lib/droplet_kit/error_handling_resourcable.rb
|
151
151
|
- lib/droplet_kit/mappings/account_mapping.rb
|
152
152
|
- lib/droplet_kit/mappings/action_mapping.rb
|
153
|
+
- lib/droplet_kit/mappings/balance_mapping.rb
|
153
154
|
- lib/droplet_kit/mappings/cdn_mapping.rb
|
154
155
|
- lib/droplet_kit/mappings/certificate_mapping.rb
|
155
156
|
- lib/droplet_kit/mappings/container_registry_mapping.rb
|
@@ -208,6 +209,7 @@ files:
|
|
208
209
|
- lib/droplet_kit/mappings/vpc_member_mapping.rb
|
209
210
|
- lib/droplet_kit/models/account.rb
|
210
211
|
- lib/droplet_kit/models/action.rb
|
212
|
+
- lib/droplet_kit/models/balance.rb
|
211
213
|
- lib/droplet_kit/models/base_model.rb
|
212
214
|
- lib/droplet_kit/models/cdn.rb
|
213
215
|
- lib/droplet_kit/models/certificate.rb
|
@@ -269,6 +271,7 @@ files:
|
|
269
271
|
- lib/droplet_kit/paginated_resource.rb
|
270
272
|
- lib/droplet_kit/resources/account_resource.rb
|
271
273
|
- lib/droplet_kit/resources/action_resource.rb
|
274
|
+
- lib/droplet_kit/resources/balance_resource.rb
|
272
275
|
- lib/droplet_kit/resources/cdn_resource.rb
|
273
276
|
- lib/droplet_kit/resources/certificate_resource.rb
|
274
277
|
- lib/droplet_kit/resources/container_registry_repository_resource.rb
|
@@ -318,7 +321,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
318
321
|
- !ruby/object:Gem::Version
|
319
322
|
version: '0'
|
320
323
|
requirements: []
|
321
|
-
rubygems_version: 3.
|
324
|
+
rubygems_version: 3.1.2
|
322
325
|
signing_key:
|
323
326
|
specification_version: 4
|
324
327
|
summary: Droplet Kit is the official Ruby library for DigitalOcean's API
|