vantage-client 0.0.6 → 0.1.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.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +70 -0
  3. data/README.md +121 -61
  4. data/docs/Cost.md +11 -0
  5. data/docs/Costs.md +11 -0
  6. data/docs/CostsApi.md +177 -0
  7. data/docs/PingApi.md +5 -4
  8. data/docs/PricesApi.md +30 -7
  9. data/docs/Report.md +13 -0
  10. data/docs/Reports.md +9 -0
  11. data/lib/vantage-client.rb +6 -1
  12. data/lib/vantage-client/api/costs_api.rb +185 -0
  13. data/lib/vantage-client/api/ping_api.rb +9 -8
  14. data/lib/vantage-client/api/prices_api.rb +25 -1
  15. data/lib/vantage-client/api_client.rb +1 -1
  16. data/lib/vantage-client/api_error.rb +1 -1
  17. data/lib/vantage-client/configuration.rb +1 -1
  18. data/lib/vantage-client/models/cost.rb +215 -0
  19. data/lib/vantage-client/models/costs.rb +216 -0
  20. data/lib/vantage-client/models/price.rb +1 -1
  21. data/lib/vantage-client/models/prices.rb +1 -1
  22. data/lib/vantage-client/models/product.rb +1 -1
  23. data/lib/vantage-client/models/products.rb +1 -1
  24. data/lib/vantage-client/models/provider.rb +1 -1
  25. data/lib/vantage-client/models/providers.rb +1 -1
  26. data/lib/vantage-client/models/report.rb +235 -0
  27. data/lib/vantage-client/models/reports.rb +196 -0
  28. data/lib/vantage-client/models/service.rb +1 -1
  29. data/lib/vantage-client/models/services.rb +1 -1
  30. data/lib/vantage-client/version.rb +2 -2
  31. data/spec/.DS_Store +0 -0
  32. data/spec/api/costs_api_spec.rb +73 -0
  33. data/spec/api/ping_api_spec.rb +3 -3
  34. data/spec/api/prices_api_spec.rb +9 -1
  35. data/spec/api_client_spec.rb +1 -1
  36. data/spec/configuration_spec.rb +1 -1
  37. data/spec/models/cost_spec.rb +59 -0
  38. data/spec/models/costs_spec.rb +59 -0
  39. data/spec/models/price_spec.rb +1 -1
  40. data/spec/models/prices_spec.rb +1 -1
  41. data/spec/models/product_spec.rb +1 -1
  42. data/spec/models/products_spec.rb +1 -1
  43. data/spec/models/provider_spec.rb +1 -1
  44. data/spec/models/providers_spec.rb +1 -1
  45. data/spec/models/report_spec.rb +71 -0
  46. data/spec/models/reports_spec.rb +47 -0
  47. data/spec/models/service_spec.rb +1 -1
  48. data/spec/models/services_spec.rb +1 -1
  49. data/spec/spec_helper.rb +1 -1
  50. data/vantage-client-0.1.0.beta.1.gem +0 -0
  51. data/vantage-client-0.1.0.beta.2.gem +0 -0
  52. data/vantage-client.gemspec +1 -1
  53. metadata +26 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 243fe9208fe7924d332f6f03b25564d991e66b3d039408005493ac4c7dbfe107
4
- data.tar.gz: 5fc8d08e8ea14bb6653733e7fea7e8628ee41949923e4f64d1615e73284fdf77
3
+ metadata.gz: f7247776b559b6a8d00a27fedd29ed81616a47ffbd7b654a903568955cc66df0
4
+ data.tar.gz: 6a8dad9ef5f488c2bb01a52e4828967acc1a5d281d953a44ef451f4902f98fbb
5
5
  SHA512:
6
- metadata.gz: 3792d480fac0f037811c53328b460da141a7c6f98b00b0d234a65e013d6bab9e36e9b933fbd2612b825e35e7a2a53b8e74562b287d46f1a46d7fead501fd57c3
7
- data.tar.gz: 24dc77ecc924688bbd0a807339157acd02eceade6e43304ca67cf20d92b9c0d1579b8b7f94ca56466498eadc8a1f63423c22526d4783ab28916f3537b3e1b864
6
+ metadata.gz: c575b3412c5941653d86de027945027b46fa291309d0f2453c4c319783ddaf7e587f0bd9671170748ac63f87d4cd9818ca1f7ee6ec1949dbe1670daeae049f59
7
+ data.tar.gz: a22d005f893b9af0d0fca3d7e2fa8035a7f4c8618126910139885bef89e27b12f39005f3cd48a8704d8d7cf2cebffc396c98362b8f61d482c7c045dd58cc0909
data/Gemfile.lock ADDED
@@ -0,0 +1,70 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ vantage-client (0.1.0.beta.2)
5
+ addressable (~> 2.3, >= 2.3.0)
6
+ json (~> 2.1, >= 2.1.0)
7
+ typhoeus (~> 1.0, >= 1.0.1)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ ZenTest (4.12.0)
13
+ addressable (2.7.0)
14
+ public_suffix (>= 2.0.2, < 5.0)
15
+ autotest (4.4.6)
16
+ ZenTest (>= 4.4.1)
17
+ autotest-fsevent (0.2.18)
18
+ sys-uname
19
+ autotest-growl (0.2.16)
20
+ autotest-rails-pure (4.1.2)
21
+ crack (0.4.5)
22
+ rexml
23
+ diff-lcs (1.4.4)
24
+ ethon (0.14.0)
25
+ ffi (>= 1.15.0)
26
+ ffi (1.15.0)
27
+ hashdiff (1.0.1)
28
+ json (2.5.1)
29
+ public_suffix (4.0.6)
30
+ rake (12.3.3)
31
+ rexml (3.2.5)
32
+ rspec (3.10.0)
33
+ rspec-core (~> 3.10.0)
34
+ rspec-expectations (~> 3.10.0)
35
+ rspec-mocks (~> 3.10.0)
36
+ rspec-core (3.10.1)
37
+ rspec-support (~> 3.10.0)
38
+ rspec-expectations (3.10.1)
39
+ diff-lcs (>= 1.2.0, < 2.0)
40
+ rspec-support (~> 3.10.0)
41
+ rspec-mocks (3.10.2)
42
+ diff-lcs (>= 1.2.0, < 2.0)
43
+ rspec-support (~> 3.10.0)
44
+ rspec-support (3.10.2)
45
+ sys-uname (1.2.2)
46
+ ffi (~> 1.1)
47
+ typhoeus (1.4.0)
48
+ ethon (>= 0.9.0)
49
+ vcr (3.0.3)
50
+ webmock (1.24.6)
51
+ addressable (>= 2.3.6)
52
+ crack (>= 0.3.2)
53
+ hashdiff
54
+
55
+ PLATFORMS
56
+ x86_64-darwin-19
57
+
58
+ DEPENDENCIES
59
+ autotest (~> 4.4, >= 4.4.6)
60
+ autotest-fsevent (~> 0.2, >= 0.2.12)
61
+ autotest-growl (~> 0.2, >= 0.2.16)
62
+ autotest-rails-pure (~> 4.1, >= 4.1.2)
63
+ rake (~> 12.3.3)
64
+ rspec (~> 3.6, >= 3.6.0)
65
+ vantage-client!
66
+ vcr (~> 3.0, >= 3.0.1)
67
+ webmock (~> 1.24, >= 1.24.3)
68
+
69
+ BUNDLED WITH
70
+ 2.2.3
data/README.md CHANGED
@@ -1,111 +1,171 @@
1
- # vantage-client
1
+ [![Build Status](https://www.travis-ci.com/vantage-sh/vantage-ruby.svg?branch=main)](https://www.travis-ci.com/vantage-sh/vantage-ruby)
2
2
 
3
- Vantage - the Ruby gem for the Vantage
3
+ # Vantage Ruby Client
4
4
 
5
- Vantage API
5
+ ![Vantage Picture](https://uploads-ssl.webflow.com/5f9ba05ba40d6414f341df34/5f9bb1764b6670c6f7739564_moutain-scene.svg)
6
6
 
7
- This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
7
 
9
- - API version: 1.0.0
10
- - Package version: 0.0.6
11
- - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
- For more information, please visit [https://www.vantage.sh](https://www.vantage.sh)
8
+ [Vantage](http://vantage.sh/) is a cloud cost transparency platform. This is the official Ruby client for the [Vantage API](http://vantage.readme.io/). You can use the API to get EC2 instance price and product information through a few simple-to-use API calls. The data offered through this API is heavily inspired from data avaiable from [ec2instances.info](http://ec2instances.info/). The feedback we get from users is that this API is significantly easier than learning and using AWS Pricing APIs. We have plans to expand the data available through this API in the future.
13
9
 
14
- ## Installation
15
-
16
- ### Build a gem
10
+ ## Need Help?
17
11
 
18
- To build the Ruby code into a gem:
12
+ Feel free to join us in our [community Slack](https://join.slack.com/t/vantagecommunity/shared_invite/zt-oey52myv-gq4AWRKkX25kjp1UGziPTw) in the #api channel. We're happy to chat and help. You're also welcome to email support@vantage.sh or ping [@JoinVantage](https://twitter.com/joinvantage) on Twitter and we're happy to give assistance. Lastly, we monitor issues on this repo if you have any feature requests or issues.
19
13
 
20
- ```shell
21
- gem build vantage-client.gemspec
22
- ```
14
+ ## Installation
23
15
 
24
- Then either install the gem locally:
16
+ The easiest way to get going is to install the client through RubyGems:
25
17
 
26
18
  ```shell
27
- gem install ./vantage-client-0.0.6.gem
19
+ gem install vantage-client
28
20
  ```
29
- (for development, run `gem install --dev ./vantage-client-0.0.6.gem` to install the development dependencies)
30
21
 
31
- or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
22
+ ## Generate a Free API Token
23
+ The Vantage API is provided completely for free but requires an API token to use. To generate a free API token, follow these steps:
32
24
 
33
- Finally add this to the Gemfile:
25
+ * Head to [http://vantage.sh/](http://vantage.sh/)
26
+ * Register a free account and confirm your email
27
+ * When you're asked _"What would you like to do first?"_ click _"Access Cloud Pricing API"_
28
+ * Create an API token from the account profile page and you're all set
34
29
 
35
- gem 'vantage-client', '~> 0.0.6'
30
+ You'll only need to do this once and you can use your API token for all usage going forward.
36
31
 
37
- ### Install from Git
32
+ ## API Primitives
38
33
 
39
- If the Ruby gem is hosted at a git repository: https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO, then add the following in the Gemfile:
34
+ The Vantage API is currently organized into four different primitives. Understanding the relationships between these primitives will be helpful as you onboard to the API. Since Vantage only supports EC2 on AWS at the moment, this is provided mainly to show how we are looking at support for future data:
40
35
 
41
- gem 'vantage-client', :git => 'https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO.git'
36
+ * **Providers**: Providers are the highest level API Primitive. A Provider represents either cloud infrastructure provider or a cloud service provider. Some examples of Providers include AWS, GCP or Azure. Providers offer many Services, which is documented below.
37
+ * **Services**: Services are what Providers offer to their customers. A Service is always tied to a Provider. Some examples of Services are EC2 or S3 from a Provider of AWS. A Service has one or more Products offered, which is documented below.
38
+ * **Products**: Products are what Services ultimately price on. Using the example of a Provider of 'AWS' and a Service of 'EC2', Products would be the individual EC2 Instance Types available such as 'm5d.16xlarge' or 'c5.xlarge'. A Product has one or more Prices, which is documented below.
39
+ * **Prices**: A Product has one or more Prices available to it. For example with EC2 instance types, a single instance type may have potential prices including an on-demand price, a spot price or a reserved instance price.
42
40
 
43
- ### Include the Ruby code directly
44
-
45
- Include the Ruby code directly using `-I` as follows:
46
-
47
- ```shell
48
- ruby -Ilib script.rb
49
- ```
50
41
 
51
42
  ## Getting Started
52
43
 
53
- Please follow the [installation](#installation) procedure and then run the following code:
44
+ Once you've installed the client, you'll want to confirm your API token is working correctly. We offer a "ping" endpoint for testing this and overall API healthiness:
45
+
54
46
  ```ruby
55
47
  # Load the gem
56
48
  require 'vantage-client'
57
49
 
58
- # Setup authorization
50
+ # Configure Vantage with your API token. Replace "YOUR_API_TOKEN" with the token you generate.
59
51
  Vantage.configure do |config|
60
- # Configure OAuth2 access token for authorization: oauth2
61
- config.access_token = 'YOUR ACCESS TOKEN'
52
+ config.access_token = 'YOUR_API_TOKEN'
62
53
  end
63
54
 
64
- api_instance = Vantage::PingApi.new
55
+ api_instance = Vantage::CostsApi.new
56
+
57
+ report_id = 'report_id_example' # String |
58
+
59
+ opts = {
60
+ start_date: 'start_date_example', # String | Query costs by the first date you would like to filter from. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T19:20:48+00:00.
61
+ end_date: 'end_date_example' # String | Query costs by the last date you would like to filter to. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T19:20:48+00:00.
62
+ }
65
63
 
66
64
  begin
67
- api_instance.ping
65
+ result = api_instance.get_costs(report_id, opts)
66
+ p result
68
67
  rescue Vantage::ApiError => e
69
- puts "Exception when calling PingApi->ping: #{e}"
68
+ puts "Exception when calling CostsApi->get_costs: #{e}"
70
69
  end
71
70
 
71
+ # {
72
+ # :ping => "pong"
73
+ # }
74
+
72
75
  ```
73
76
 
74
- ## Documentation for API Endpoints
77
+ ## Getting EC2 Instance Information
78
+
79
+ Getting EC2 instance product information is one of the most used functions of the API. Here's an example of how to get product information for a c5.xlarge EC2 instance:
80
+
81
+ ```ruby
75
82
 
76
- All URIs are relative to *https://api.vantage.sh*
83
+ # Load the gem
84
+ require 'vantage-client'
77
85
 
78
- Class | Method | HTTP request | Description
79
- ------------ | ------------- | ------------- | -------------
80
- *Vantage::PingApi* | [**ping**](docs/PingApi.md#ping) | **GET** /v1/ping |
81
- *Vantage::PricesApi* | [**get_price**](docs/PricesApi.md#get_price) | **GET** /v1/products/{product_id}/prices/{id} |
82
- *Vantage::PricesApi* | [**get_prices**](docs/PricesApi.md#get_prices) | **GET** /v1/products/{product_id}/prices |
83
- *Vantage::PricesApi* | [**get_product**](docs/PricesApi.md#get_product) | **GET** /v1/products/{id} |
84
- *Vantage::PricesApi* | [**get_products**](docs/PricesApi.md#get_products) | **GET** /v1/products |
85
- *Vantage::PricesApi* | [**get_providers**](docs/PricesApi.md#get_providers) | **GET** /v1/providers |
86
- *Vantage::PricesApi* | [**get_services**](docs/PricesApi.md#get_services) | **GET** /v1/services |
86
+ # Configure Vantage with your API token. Replace "YOUR_API_TOKEN" with the token you generate.
87
+ Vantage.configure do |config|
88
+ config.access_token = 'YOUR_API_TOKEN'
89
+ end
87
90
 
91
+ # The Vantage::PricesApi class helps get simple information
92
+ vantage_client = Vantage::PricesApi.new
93
+
94
+ # Find all instances with the instance type name of 'c5.xlarge'
95
+ response = vantage_client.get_products(name: 'c5.xlarge')
96
+
97
+ # See the entire response
98
+ puts response.products.first
99
+ # {
100
+ # :id=>"aws-ec2-c5_xlarge",
101
+ # :category=>"compute",
102
+ # :name=>"c5.xlarge",
103
+ # :service_id=>"aws-ec2",
104
+ # :provider_id=>"aws",
105
+ # :details=>{
106
+ # :gpu=>0,
107
+ # :name=>"C5 High-CPU Extra Large",
108
+ # :vcpu=>4,
109
+ # :memory=>8.0,
110
+ # :storage=>nil,
111
+ # :clock_speed_ghz=>3.0,
112
+ # :physical_processor_description=>"Intel Xeon Platinum 8124M",
113
+ # :network_performance_description=>"Up to 10 Gigabit"
114
+ # }
115
+ # }
116
+
117
+ ```
118
+
119
+ ## Getting EC2 Instance Pricing
120
+
121
+ Getting the price of an EC2 instance is also easy to do. Here's an example of how to get the price for a c5.xlarge. You'll need the product ID from the prior call to retrive prices. Note that Vantage will return all prices across all regions, platforms and lifecycle so client-side you'll want to filter for the appropriate region, platform and lifecycle.
122
+
123
+ The price returned in the example below will give you the **on-demand** price for a **linux** EC2 instance in **us-east-1**.
124
+
125
+ ```ruby
126
+
127
+ # Load the gem
128
+ require 'vantage-client'
129
+
130
+ # Configure Vantage with your API token. Replace "YOUR_API_TOKEN" with the token you generate.
131
+ Vantage.configure do |config|
132
+ config.access_token = 'YOUR_API_TOKEN'
133
+ end
134
+
135
+ # The Vantage::PricesApi class helps get simple information
136
+ vantage_client = Vantage::PricesApi.new
137
+
138
+ # Find all prices using the product ID returned in the previous example
139
+ # Note that this will return all prices across all regions and platform types by default.
140
+ response = vantage_client.get_prices('aws-ec2-c5_xlarge')
141
+
142
+ puts response.prices.first
143
+ # {
144
+ # :id=>"aws-ec2-c5_xlarge-us_east_1-on_demand-linux",
145
+ # :unit=>"hour",
146
+ # :region=>"us-east-1",
147
+ # :rate_type=>"compute",
148
+ # :currency=>"USD",
149
+ # :amount=>0.17,
150
+ # :details=>{
151
+ # :platform=>"linux",
152
+ # :lifecycle=>"on-demand"
153
+ # }
154
+ # }
155
+ ```
88
156
 
89
157
  ## Documentation for Models
90
158
 
159
+ - [Vantage::Cost](docs/Cost.md)
160
+ - [Vantage::Costs](docs/Costs.md)
91
161
  - [Vantage::Price](docs/Price.md)
92
162
  - [Vantage::Prices](docs/Prices.md)
93
163
  - [Vantage::Product](docs/Product.md)
94
164
  - [Vantage::Products](docs/Products.md)
95
165
  - [Vantage::Provider](docs/Provider.md)
96
166
  - [Vantage::Providers](docs/Providers.md)
167
+ - [Vantage::Report](docs/Report.md)
168
+ - [Vantage::Reports](docs/Reports.md)
97
169
  - [Vantage::Service](docs/Service.md)
98
170
  - [Vantage::Services](docs/Services.md)
99
171
 
100
-
101
- ## Documentation for Authorization
102
-
103
-
104
- ### oauth2
105
-
106
- - **Type**: OAuth
107
- - **Flow**: application
108
- - **Authorization URL**:
109
- - **Scopes**:
110
- - read: Grants read access
111
-
data/docs/Cost.md ADDED
@@ -0,0 +1,11 @@
1
+ # Vantage::Cost
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **accrued_at** | **String** | The date the cost was accrued. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T19:20:48+00:00. | [optional]
7
+ **amount** | **String** | The amount of the cost. | [optional]
8
+ **provider** | **String** | The service provider where the cost was incurred. e.g. AWS | [optional]
9
+ **service** | **String** | The service which incurred the cost. e.g. Amazon ElastiCache | [optional]
10
+
11
+
data/docs/Costs.md ADDED
@@ -0,0 +1,11 @@
1
+ # Vantage::Costs
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **links** | **Object** | | [optional]
7
+ **total** | **String** | The sum of all amounts of costs for the entire report for the requested period. | [optional]
8
+ **currency** | **String** | The currency both the total and cost amount values are represented in. e.g. USD | [optional]
9
+ **costs** | [**Array&lt;Cost&gt;**](Cost.md) | | [optional]
10
+
11
+
data/docs/CostsApi.md ADDED
@@ -0,0 +1,177 @@
1
+ # Vantage::CostsApi
2
+
3
+ All URIs are relative to *https://api.vantage.sh*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_costs**](CostsApi.md#get_costs) | **GET** /v1/reports/{report_id}/costs |
8
+ [**get_report**](CostsApi.md#get_report) | **GET** /v1/reports/{report_id} |
9
+ [**get_reports**](CostsApi.md#get_reports) | **GET** /v1/reports |
10
+
11
+
12
+ # **get_costs**
13
+ > Costs get_costs(report_id, opts)
14
+
15
+
16
+
17
+ Return available Costs for the specified Cost Report and optional time period. If no time period is specified it will return all available costs for the report.
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'vantage-client'
23
+ # setup authorization
24
+ Vantage.configure do |config|
25
+ # Configure OAuth2 access token for authorization: oauth2
26
+ config.access_token = 'YOUR ACCESS TOKEN'
27
+ end
28
+
29
+ api_instance = Vantage::CostsApi.new
30
+
31
+ report_id = 'report_id_example' # String |
32
+
33
+ opts = {
34
+ start_date: 'start_date_example', # String | Query costs by the first date you would like to filter from. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T19:20:48+00:00.
35
+ end_date: 'end_date_example', # String | Query costs by the last date you would like to filter to. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T19:20:48+00:00.
36
+ page: 2, # Integer | The page of results to return.
37
+ limit: 500 # Integer | The amount of results to return. The maximum is 1000
38
+ }
39
+
40
+ begin
41
+ result = api_instance.get_costs(report_id, opts)
42
+ p result
43
+ rescue Vantage::ApiError => e
44
+ puts "Exception when calling CostsApi->get_costs: #{e}"
45
+ end
46
+ ```
47
+
48
+ ### Parameters
49
+
50
+ Name | Type | Description | Notes
51
+ ------------- | ------------- | ------------- | -------------
52
+ **report_id** | **String**| |
53
+ **start_date** | **String**| Query costs by the first date you would like to filter from. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T19:20:48+00:00. | [optional]
54
+ **end_date** | **String**| Query costs by the last date you would like to filter to. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T19:20:48+00:00. | [optional]
55
+ **page** | **Integer**| The page of results to return. | [optional]
56
+ **limit** | **Integer**| The amount of results to return. The maximum is 1000 | [optional]
57
+
58
+ ### Return type
59
+
60
+ [**Costs**](Costs.md)
61
+
62
+ ### Authorization
63
+
64
+ [oauth2](../README.md#oauth2)
65
+
66
+ ### HTTP request headers
67
+
68
+ - **Content-Type**: Not defined
69
+ - **Accept**: application/json
70
+
71
+
72
+
73
+ # **get_report**
74
+ > Report get_report(report_id)
75
+
76
+
77
+
78
+ Return a Cost Report.
79
+
80
+ ### Example
81
+ ```ruby
82
+ # load the gem
83
+ require 'vantage-client'
84
+ # setup authorization
85
+ Vantage.configure do |config|
86
+ # Configure OAuth2 access token for authorization: oauth2
87
+ config.access_token = 'YOUR ACCESS TOKEN'
88
+ end
89
+
90
+ api_instance = Vantage::CostsApi.new
91
+
92
+ report_id = 'report_id_example' # String |
93
+
94
+
95
+ begin
96
+ result = api_instance.get_report(report_id)
97
+ p result
98
+ rescue Vantage::ApiError => e
99
+ puts "Exception when calling CostsApi->get_report: #{e}"
100
+ end
101
+ ```
102
+
103
+ ### Parameters
104
+
105
+ Name | Type | Description | Notes
106
+ ------------- | ------------- | ------------- | -------------
107
+ **report_id** | **String**| |
108
+
109
+ ### Return type
110
+
111
+ [**Report**](Report.md)
112
+
113
+ ### Authorization
114
+
115
+ [oauth2](../README.md#oauth2)
116
+
117
+ ### HTTP request headers
118
+
119
+ - **Content-Type**: Not defined
120
+ - **Accept**: application/json
121
+
122
+
123
+
124
+ # **get_reports**
125
+ > Reports get_reports(opts)
126
+
127
+
128
+
129
+ Return all Cost Reports.
130
+
131
+ ### Example
132
+ ```ruby
133
+ # load the gem
134
+ require 'vantage-client'
135
+ # setup authorization
136
+ Vantage.configure do |config|
137
+ # Configure OAuth2 access token for authorization: oauth2
138
+ config.access_token = 'YOUR ACCESS TOKEN'
139
+ end
140
+
141
+ api_instance = Vantage::CostsApi.new
142
+
143
+ opts = {
144
+ page: 2, # Integer | The page of results to return.
145
+ limit: 500 # Integer | The amount of results to return. The maximum is 1000
146
+ }
147
+
148
+ begin
149
+ result = api_instance.get_reports(opts)
150
+ p result
151
+ rescue Vantage::ApiError => e
152
+ puts "Exception when calling CostsApi->get_reports: #{e}"
153
+ end
154
+ ```
155
+
156
+ ### Parameters
157
+
158
+ Name | Type | Description | Notes
159
+ ------------- | ------------- | ------------- | -------------
160
+ **page** | **Integer**| The page of results to return. | [optional]
161
+ **limit** | **Integer**| The amount of results to return. The maximum is 1000 | [optional]
162
+
163
+ ### Return type
164
+
165
+ [**Reports**](Reports.md)
166
+
167
+ ### Authorization
168
+
169
+ [oauth2](../README.md#oauth2)
170
+
171
+ ### HTTP request headers
172
+
173
+ - **Content-Type**: Not defined
174
+ - **Accept**: application/json
175
+
176
+
177
+