azure_mgmt_commerce 0.15.2 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2015-06-01-preview/generated/azure_mgmt_commerce/rate_card.rb +6 -5
- data/lib/2015-06-01-preview/generated/azure_mgmt_commerce/usage_aggregates.rb +15 -13
- data/lib/2015-06-01-preview/generated/azure_mgmt_commerce/usage_management_client.rb +4 -1
- data/lib/profiles/latest/commerce_latest_profile_client.rb +28 -9
- data/lib/profiles/latest/commerce_module_definition.rb +0 -1
- data/lib/profiles/latest/modules/commerce_profile_module.rb +64 -45
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7206510404ea68f82ed7c5f6e62bacb99fb5043f
|
4
|
+
data.tar.gz: bdf3db65df390cacea5e58c3f401bf07934dff9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da09b636abee965ac1599429a9b2c509fa0e2d56c45e24d0717b9021062bfac59a625a6779373343f6732e41903fa04cae5c2d1240ab0fe270551a18bb31f410
|
7
|
+
data.tar.gz: c43052a3314b375fe8e7f24ed86304b3923a3218a862fbde380ad7388323bead2924144144346da27ca6d3eb0ed01bbf80aa2cb034a1b43d962566d5fcf33db0
|
@@ -40,8 +40,8 @@ module Azure::Commerce::Mgmt::V2015_06_01_preview
|
|
40
40
|
#
|
41
41
|
# @return [ResourceRateCardInfo] operation results.
|
42
42
|
#
|
43
|
-
def get(filter, custom_headers
|
44
|
-
response = get_async(filter, custom_headers).value!
|
43
|
+
def get(filter, custom_headers:nil)
|
44
|
+
response = get_async(filter, custom_headers:custom_headers).value!
|
45
45
|
response.body unless response.nil?
|
46
46
|
end
|
47
47
|
|
@@ -64,8 +64,8 @@ module Azure::Commerce::Mgmt::V2015_06_01_preview
|
|
64
64
|
#
|
65
65
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
66
66
|
#
|
67
|
-
def get_with_http_info(filter, custom_headers
|
68
|
-
get_async(filter, custom_headers).value!
|
67
|
+
def get_with_http_info(filter, custom_headers:nil)
|
68
|
+
get_async(filter, custom_headers:custom_headers).value!
|
69
69
|
end
|
70
70
|
|
71
71
|
#
|
@@ -87,13 +87,14 @@ module Azure::Commerce::Mgmt::V2015_06_01_preview
|
|
87
87
|
#
|
88
88
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
89
89
|
#
|
90
|
-
def get_async(filter, custom_headers
|
90
|
+
def get_async(filter, custom_headers:nil)
|
91
91
|
fail ArgumentError, 'filter is nil' if filter.nil?
|
92
92
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
93
93
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
94
94
|
|
95
95
|
|
96
96
|
request_headers = {}
|
97
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
97
98
|
|
98
99
|
# Set Headers
|
99
100
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -47,8 +47,8 @@ module Azure::Commerce::Mgmt::V2015_06_01_preview
|
|
47
47
|
#
|
48
48
|
# @return [Array<UsageAggregation>] operation results.
|
49
49
|
#
|
50
|
-
def list(reported_start_time, reported_end_time, show_details
|
51
|
-
first_page = list_as_lazy(reported_start_time, reported_end_time, show_details, aggregation_granularity, continuation_token, custom_headers)
|
50
|
+
def list(reported_start_time, reported_end_time, show_details:nil, aggregation_granularity:nil, continuation_token:nil, custom_headers:nil)
|
51
|
+
first_page = list_as_lazy(reported_start_time, reported_end_time, show_details:show_details, aggregation_granularity:aggregation_granularity, continuation_token:continuation_token, custom_headers:custom_headers)
|
52
52
|
first_page.get_all_items
|
53
53
|
end
|
54
54
|
|
@@ -78,8 +78,8 @@ module Azure::Commerce::Mgmt::V2015_06_01_preview
|
|
78
78
|
#
|
79
79
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
80
80
|
#
|
81
|
-
def list_with_http_info(reported_start_time, reported_end_time, show_details
|
82
|
-
list_async(reported_start_time, reported_end_time, show_details, aggregation_granularity, continuation_token, custom_headers).value!
|
81
|
+
def list_with_http_info(reported_start_time, reported_end_time, show_details:nil, aggregation_granularity:nil, continuation_token:nil, custom_headers:nil)
|
82
|
+
list_async(reported_start_time, reported_end_time, show_details:show_details, aggregation_granularity:aggregation_granularity, continuation_token:continuation_token, custom_headers:custom_headers).value!
|
83
83
|
end
|
84
84
|
|
85
85
|
#
|
@@ -108,7 +108,7 @@ module Azure::Commerce::Mgmt::V2015_06_01_preview
|
|
108
108
|
#
|
109
109
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
110
110
|
#
|
111
|
-
def list_async(reported_start_time, reported_end_time, show_details
|
111
|
+
def list_async(reported_start_time, reported_end_time, show_details:nil, aggregation_granularity:nil, continuation_token:nil, custom_headers:nil)
|
112
112
|
fail ArgumentError, 'reported_start_time is nil' if reported_start_time.nil?
|
113
113
|
fail ArgumentError, 'reported_end_time is nil' if reported_end_time.nil?
|
114
114
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
@@ -116,6 +116,7 @@ module Azure::Commerce::Mgmt::V2015_06_01_preview
|
|
116
116
|
|
117
117
|
|
118
118
|
request_headers = {}
|
119
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
119
120
|
|
120
121
|
# Set Headers
|
121
122
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -170,8 +171,8 @@ module Azure::Commerce::Mgmt::V2015_06_01_preview
|
|
170
171
|
#
|
171
172
|
# @return [UsageAggregationListResult] operation results.
|
172
173
|
#
|
173
|
-
def list_next(next_page_link, custom_headers
|
174
|
-
response = list_next_async(next_page_link, custom_headers).value!
|
174
|
+
def list_next(next_page_link, custom_headers:nil)
|
175
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
175
176
|
response.body unless response.nil?
|
176
177
|
end
|
177
178
|
|
@@ -185,8 +186,8 @@ module Azure::Commerce::Mgmt::V2015_06_01_preview
|
|
185
186
|
#
|
186
187
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
187
188
|
#
|
188
|
-
def list_next_with_http_info(next_page_link, custom_headers
|
189
|
-
list_next_async(next_page_link, custom_headers).value!
|
189
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
190
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
190
191
|
end
|
191
192
|
|
192
193
|
#
|
@@ -199,11 +200,12 @@ module Azure::Commerce::Mgmt::V2015_06_01_preview
|
|
199
200
|
#
|
200
201
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
201
202
|
#
|
202
|
-
def list_next_async(next_page_link, custom_headers
|
203
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
203
204
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
204
205
|
|
205
206
|
|
206
207
|
request_headers = {}
|
208
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
207
209
|
|
208
210
|
# Set Headers
|
209
211
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -274,12 +276,12 @@ module Azure::Commerce::Mgmt::V2015_06_01_preview
|
|
274
276
|
# @return [UsageAggregationListResult] which provide lazy access to pages of
|
275
277
|
# the response.
|
276
278
|
#
|
277
|
-
def list_as_lazy(reported_start_time, reported_end_time, show_details
|
278
|
-
response = list_async(reported_start_time, reported_end_time, show_details, aggregation_granularity, continuation_token, custom_headers).value!
|
279
|
+
def list_as_lazy(reported_start_time, reported_end_time, show_details:nil, aggregation_granularity:nil, continuation_token:nil, custom_headers:nil)
|
280
|
+
response = list_async(reported_start_time, reported_end_time, show_details:show_details, aggregation_granularity:aggregation_granularity, continuation_token:continuation_token, custom_headers:custom_headers).value!
|
279
281
|
unless response.nil?
|
280
282
|
page = response.body
|
281
283
|
page.next_method = Proc.new do |next_page_link|
|
282
|
-
list_next_async(next_page_link, custom_headers)
|
284
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
283
285
|
end
|
284
286
|
page
|
285
287
|
end
|
@@ -109,6 +109,9 @@ module Azure::Commerce::Mgmt::V2015_06_01_preview
|
|
109
109
|
fail ArgumentError, 'path is nil' if path.nil?
|
110
110
|
|
111
111
|
request_url = options[:base_url] || @base_url
|
112
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
113
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
114
|
+
end
|
112
115
|
|
113
116
|
request_headers = @request_headers
|
114
117
|
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
@@ -125,7 +128,7 @@ module Azure::Commerce::Mgmt::V2015_06_01_preview
|
|
125
128
|
#
|
126
129
|
def add_telemetry
|
127
130
|
sdk_information = 'azure_mgmt_commerce'
|
128
|
-
sdk_information = "#{sdk_information}/0.
|
131
|
+
sdk_information = "#{sdk_information}/0.16.0"
|
129
132
|
add_user_agent_information(sdk_information)
|
130
133
|
end
|
131
134
|
end
|
@@ -5,17 +5,36 @@
|
|
5
5
|
require 'profiles/latest/commerce_module_definition'
|
6
6
|
require 'profiles/latest/modules/commerce_profile_module'
|
7
7
|
|
8
|
-
module Azure::Commerce::Profiles::Latest
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
module Azure::Commerce::Profiles::Latest
|
9
|
+
module Mgmt
|
10
|
+
#
|
11
|
+
# Client class for the Latest profile SDK.
|
12
|
+
#
|
13
|
+
class Client < CommerceManagementClass
|
14
|
+
include MsRestAzure::Common::Configurable
|
14
15
|
|
16
|
+
#
|
17
|
+
# Initializes a new instance of the Client class.
|
18
|
+
# @param options [Hash] hash of client options.
|
19
|
+
# options = {
|
20
|
+
# tenant_id: 'YOUR TENANT ID',
|
21
|
+
# client_id: 'YOUR CLIENT ID',
|
22
|
+
# client_secret: 'YOUR CLIENT SECRET',
|
23
|
+
# subscription_id: 'YOUR SUBSCRIPTION ID',
|
24
|
+
# credentials: credentials,
|
25
|
+
# active_directory_settings: active_directory_settings,
|
26
|
+
# base_url: 'YOUR BASE URL',
|
27
|
+
# options: options
|
28
|
+
# }
|
29
|
+
# 'credentials' are optional and if not passed in the hash, will be obtained
|
30
|
+
# from MsRest::TokenCredentials using MsRestAzure::ApplicationTokenProvider.
|
31
|
+
#
|
32
|
+
# Also, base_url, active_directory_settings & options are optional.
|
33
|
+
#
|
34
|
+
def initialize(options = {})
|
35
|
+
super(options)
|
36
|
+
end
|
15
37
|
|
16
|
-
def initialize(options = {})
|
17
|
-
super(options)
|
18
38
|
end
|
19
|
-
|
20
39
|
end
|
21
40
|
end
|
@@ -4,7 +4,8 @@
|
|
4
4
|
|
5
5
|
require 'azure_mgmt_commerce'
|
6
6
|
|
7
|
-
module Azure::Commerce::Profiles::Latest
|
7
|
+
module Azure::Commerce::Profiles::Latest
|
8
|
+
module Mgmt
|
8
9
|
UsageAggregates = Azure::Commerce::Mgmt::V2015_06_01_preview::UsageAggregates
|
9
10
|
RateCard = Azure::Commerce::Mgmt::V2015_06_01_preview::RateCard
|
10
11
|
|
@@ -24,9 +25,9 @@ module Azure::Commerce::Profiles::Latest::Mgmt
|
|
24
25
|
end
|
25
26
|
|
26
27
|
#
|
27
|
-
#
|
28
|
+
# CommerceManagementClass
|
28
29
|
#
|
29
|
-
class
|
30
|
+
class CommerceManagementClass
|
30
31
|
attr_reader :usage_aggregates, :rate_card, :configurable, :base_url, :options, :model_classes
|
31
32
|
|
32
33
|
def initialize(options = {})
|
@@ -38,55 +39,73 @@ module Azure::Commerce::Profiles::Latest::Mgmt
|
|
38
39
|
|
39
40
|
reset!(options)
|
40
41
|
|
41
|
-
@configurable
|
42
|
+
@configurable = self
|
43
|
+
@base_url = options[:base_url].nil? ? nil:options[:base_url]
|
44
|
+
@options = options[:options].nil? ? nil:options[:options]
|
42
45
|
|
43
|
-
client_0 = Azure::Commerce::Mgmt::V2015_06_01_preview::UsageManagementClient.new(configurable.credentials, base_url, options)
|
44
|
-
if(client_0.respond_to?(:subscription_id))
|
45
|
-
client_0.subscription_id = configurable.subscription_id
|
46
|
+
@client_0 = Azure::Commerce::Mgmt::V2015_06_01_preview::UsageManagementClient.new(configurable.credentials, base_url, options)
|
47
|
+
if(@client_0.respond_to?(:subscription_id))
|
48
|
+
@client_0.subscription_id = configurable.subscription_id
|
46
49
|
end
|
47
|
-
@
|
48
|
-
@
|
50
|
+
add_telemetry(@client_0)
|
51
|
+
@usage_aggregates = @client_0.usage_aggregates
|
52
|
+
@rate_card = @client_0.rate_card
|
49
53
|
|
50
54
|
@model_classes = ModelClasses.new
|
51
55
|
end
|
52
56
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
def info_field
|
64
|
-
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::InfoField
|
65
|
-
end
|
66
|
-
def usage_aggregation_list_result
|
67
|
-
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::UsageAggregationListResult
|
68
|
-
end
|
69
|
-
def offer_term_info
|
70
|
-
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::OfferTermInfo
|
71
|
-
end
|
72
|
-
def rate_card_query_parameters
|
73
|
-
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::RateCardQueryParameters
|
74
|
-
end
|
75
|
-
def error_response
|
76
|
-
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::ErrorResponse
|
77
|
-
end
|
78
|
-
def monetary_credit
|
79
|
-
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::MonetaryCredit
|
80
|
-
end
|
81
|
-
def monetary_commitment
|
82
|
-
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::MonetaryCommitment
|
83
|
-
end
|
84
|
-
def recurring_charge
|
85
|
-
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::RecurringCharge
|
86
|
-
end
|
87
|
-
def aggregation_granularity
|
88
|
-
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::AggregationGranularity
|
57
|
+
def add_telemetry(client)
|
58
|
+
profile_information = 'Profiles/Latest/Commerce/Mgmt'
|
59
|
+
client.add_user_agent_information(profile_information)
|
60
|
+
end
|
61
|
+
|
62
|
+
def method_missing(method, *args)
|
63
|
+
if @client_0.respond_to?method
|
64
|
+
@client_0.send(method, *args)
|
65
|
+
else
|
66
|
+
super
|
89
67
|
end
|
90
68
|
end
|
69
|
+
|
70
|
+
end
|
71
|
+
|
72
|
+
class ModelClasses
|
73
|
+
def meter_info
|
74
|
+
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::MeterInfo
|
75
|
+
end
|
76
|
+
def resource_rate_card_info
|
77
|
+
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::ResourceRateCardInfo
|
78
|
+
end
|
79
|
+
def usage_aggregation
|
80
|
+
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::UsageAggregation
|
81
|
+
end
|
82
|
+
def info_field
|
83
|
+
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::InfoField
|
84
|
+
end
|
85
|
+
def usage_aggregation_list_result
|
86
|
+
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::UsageAggregationListResult
|
87
|
+
end
|
88
|
+
def offer_term_info
|
89
|
+
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::OfferTermInfo
|
90
|
+
end
|
91
|
+
def rate_card_query_parameters
|
92
|
+
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::RateCardQueryParameters
|
93
|
+
end
|
94
|
+
def error_response
|
95
|
+
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::ErrorResponse
|
96
|
+
end
|
97
|
+
def monetary_credit
|
98
|
+
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::MonetaryCredit
|
99
|
+
end
|
100
|
+
def monetary_commitment
|
101
|
+
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::MonetaryCommitment
|
102
|
+
end
|
103
|
+
def recurring_charge
|
104
|
+
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::RecurringCharge
|
105
|
+
end
|
106
|
+
def aggregation_granularity
|
107
|
+
Azure::Commerce::Mgmt::V2015_06_01_preview::Models::AggregationGranularity
|
108
|
+
end
|
91
109
|
end
|
110
|
+
end
|
92
111
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure_mgmt_commerce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Microsoft Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|