azure_mgmt_commerce 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 248648ed19132bde45d9295c777ad82b3d0a7357
4
- data.tar.gz: 2ccc0590df23f89a01a433c39b0ec3fe09fa658e
3
+ metadata.gz: f8a17aec8ccfa54691cf1e3f7dcabe04d55d1779
4
+ data.tar.gz: c27f2b4436c6734cdfee0f7ce3d5b14d322651bf
5
5
  SHA512:
6
- metadata.gz: 8aa4502c6d4b33d67f2e8d7c15ae725de997d4290800ff5438f3a0309be6c316eea1519a3f0c7cbf452b9b89e02b79e07821b4d3e193baa6409918973060ecf6
7
- data.tar.gz: 92cdec4822ed8e04f706938386323cd62948b4f361917dab43f17593dece1183ad5f6bb6be00b9bef4a8129ff432dd71f474f7f20b076c0c52514d3af9c4fce7
6
+ metadata.gz: 1dea8daaf04ea86c5c61cc65a61e469f18c81d92b67e5ee4f3e3b1c71b705474fd619efc5e38f3c0d69920adde64855da07d03b8d6c91654d79ef8058bca2110
7
+ data.tar.gz: dcf51e7bf5d74bdf109b913f753abcd6e3509af4dcc6ef53b91e24cffcbf985b52deec7bed1ed205e3e17b83a39945e8860360eea3266211c830bfc379f1ef77
@@ -25,12 +25,12 @@ module Azure::ARM::Commerce
25
25
  autoload :UsageManagementClient, 'generated/azure_mgmt_commerce/usage_management_client.rb'
26
26
 
27
27
  module Models
28
- autoload :OfferTermInfo, 'generated/azure_mgmt_commerce/models/offer_term_info.rb'
29
28
  autoload :MeterInfo, 'generated/azure_mgmt_commerce/models/meter_info.rb'
29
+ autoload :ResourceRateCardInfo, 'generated/azure_mgmt_commerce/models/resource_rate_card_info.rb'
30
30
  autoload :UsageAggregation, 'generated/azure_mgmt_commerce/models/usage_aggregation.rb'
31
31
  autoload :InfoField, 'generated/azure_mgmt_commerce/models/info_field.rb'
32
32
  autoload :UsageAggregationListResult, 'generated/azure_mgmt_commerce/models/usage_aggregation_list_result.rb'
33
- autoload :ResourceRateCardInfo, 'generated/azure_mgmt_commerce/models/resource_rate_card_info.rb'
33
+ autoload :OfferTermInfo, 'generated/azure_mgmt_commerce/models/offer_term_info.rb'
34
34
  autoload :RateCardQueryParameters, 'generated/azure_mgmt_commerce/models/rate_card_query_parameters.rb'
35
35
  autoload :ErrorResponse, 'generated/azure_mgmt_commerce/models/error_response.rb'
36
36
  autoload :MonetaryCredit, 'generated/azure_mgmt_commerce/models/monetary_credit.rb'
@@ -6,7 +6,7 @@
6
6
  module Azure::ARM::Commerce
7
7
  module Models
8
8
  #
9
- # Describes ehe format of Error response.
9
+ # Describes the format of Error response.
10
10
  #
11
11
  class ErrorResponse
12
12
 
@@ -7,7 +7,7 @@ module Azure::ARM::Commerce
7
7
  module Models
8
8
  #
9
9
  # Model object.
10
- #
10
+ #
11
11
  #
12
12
  class MonetaryCommitment < OfferTermInfo
13
13
 
@@ -7,7 +7,7 @@ module Azure::ARM::Commerce
7
7
  module Models
8
8
  #
9
9
  # Model object.
10
- #
10
+ #
11
11
  #
12
12
  class MonetaryCredit < OfferTermInfo
13
13
 
@@ -7,7 +7,7 @@ module Azure::ARM::Commerce
7
7
  module Models
8
8
  #
9
9
  # Model object.
10
- #
10
+ #
11
11
  #
12
12
  class RecurringCharge < OfferTermInfo
13
13
 
@@ -25,71 +25,92 @@ module Azure::ARM::Commerce
25
25
  #
26
26
  # Query aggregated Azure subscription consumption data for a date range.
27
27
  #
28
- # @param reportedstart_time [DateTime] The start of the time range to retrieve
28
+ # @param reported_start_time [DateTime] The start of the time range to retrieve
29
29
  # data for.
30
30
  # @param reported_end_time [DateTime] The end of the time range to retrieve
31
31
  # data for.
32
- # @param show_details [Boolean] When set to true (default), the aggregates are
33
- # broken down into the instance metadata which is more granular.
34
- # @param aggregation_granularity [AggregationGranularity] Value is either daily
35
- # (default) or hourly to tell the API how to return the results grouped by day
36
- # or hour. Possible values include: 'Daily', 'Hourly'
37
- # @param continuation_token [String] Retrieved from previous calls, this is the
38
- # bookmark used for progress when the responses are paged.
32
+ # @param show_details [Boolean] `True` returns usage data in instance-level
33
+ # detail, `false` causes server-side aggregation with fewer details. For
34
+ # example, if you have 3 website instances, by default you will get 3 line
35
+ # items for website consumption. If you specify showDetails = false, the data
36
+ # will be aggregated as a single line item for website consumption within the
37
+ # time period (for the given subscriptionId, meterId, usageStartTime and
38
+ # usageEndTime).
39
+ # @param aggregation_granularity [AggregationGranularity] `Daily` (default)
40
+ # returns the data in daily granularity, `Hourly` returns the data in hourly
41
+ # granularity. Possible values include: 'Daily', 'Hourly'
42
+ # @param continuation_token [String] Used when a continuation token string is
43
+ # provided in the response body of the previous call, enabling paging through a
44
+ # large result set. If not present, the data is retrieved from the beginning of
45
+ # the day/hour (based on the granularity) passed in.
39
46
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
40
47
  # will be added to the HTTP request.
41
48
  #
42
49
  # @return [Array<UsageAggregation>] operation results.
43
50
  #
44
- def list(reportedstart_time, reported_end_time, show_details = nil, aggregation_granularity = nil, continuation_token = nil, custom_headers = nil)
45
- first_page = list_as_lazy(reportedstart_time, reported_end_time, show_details, aggregation_granularity, continuation_token, custom_headers)
51
+ def list(reported_start_time, reported_end_time, show_details = nil, aggregation_granularity = nil, continuation_token = nil, custom_headers = nil)
52
+ first_page = list_as_lazy(reported_start_time, reported_end_time, show_details, aggregation_granularity, continuation_token, custom_headers)
46
53
  first_page.get_all_items
47
54
  end
48
55
 
49
56
  #
50
57
  # Query aggregated Azure subscription consumption data for a date range.
51
58
  #
52
- # @param reportedstart_time [DateTime] The start of the time range to retrieve
59
+ # @param reported_start_time [DateTime] The start of the time range to retrieve
53
60
  # data for.
54
61
  # @param reported_end_time [DateTime] The end of the time range to retrieve
55
62
  # data for.
56
- # @param show_details [Boolean] When set to true (default), the aggregates are
57
- # broken down into the instance metadata which is more granular.
58
- # @param aggregation_granularity [AggregationGranularity] Value is either daily
59
- # (default) or hourly to tell the API how to return the results grouped by day
60
- # or hour. Possible values include: 'Daily', 'Hourly'
61
- # @param continuation_token [String] Retrieved from previous calls, this is the
62
- # bookmark used for progress when the responses are paged.
63
+ # @param show_details [Boolean] `True` returns usage data in instance-level
64
+ # detail, `false` causes server-side aggregation with fewer details. For
65
+ # example, if you have 3 website instances, by default you will get 3 line
66
+ # items for website consumption. If you specify showDetails = false, the data
67
+ # will be aggregated as a single line item for website consumption within the
68
+ # time period (for the given subscriptionId, meterId, usageStartTime and
69
+ # usageEndTime).
70
+ # @param aggregation_granularity [AggregationGranularity] `Daily` (default)
71
+ # returns the data in daily granularity, `Hourly` returns the data in hourly
72
+ # granularity. Possible values include: 'Daily', 'Hourly'
73
+ # @param continuation_token [String] Used when a continuation token string is
74
+ # provided in the response body of the previous call, enabling paging through a
75
+ # large result set. If not present, the data is retrieved from the beginning of
76
+ # the day/hour (based on the granularity) passed in.
63
77
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
64
78
  # will be added to the HTTP request.
65
79
  #
66
80
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
67
81
  #
68
- def list_with_http_info(reportedstart_time, reported_end_time, show_details = nil, aggregation_granularity = nil, continuation_token = nil, custom_headers = nil)
69
- list_async(reportedstart_time, reported_end_time, show_details, aggregation_granularity, continuation_token, custom_headers).value!
82
+ def list_with_http_info(reported_start_time, reported_end_time, show_details = nil, aggregation_granularity = nil, continuation_token = nil, custom_headers = nil)
83
+ list_async(reported_start_time, reported_end_time, show_details, aggregation_granularity, continuation_token, custom_headers).value!
70
84
  end
71
85
 
72
86
  #
73
87
  # Query aggregated Azure subscription consumption data for a date range.
74
88
  #
75
- # @param reportedstart_time [DateTime] The start of the time range to retrieve
89
+ # @param reported_start_time [DateTime] The start of the time range to retrieve
76
90
  # data for.
77
91
  # @param reported_end_time [DateTime] The end of the time range to retrieve
78
92
  # data for.
79
- # @param show_details [Boolean] When set to true (default), the aggregates are
80
- # broken down into the instance metadata which is more granular.
81
- # @param aggregation_granularity [AggregationGranularity] Value is either daily
82
- # (default) or hourly to tell the API how to return the results grouped by day
83
- # or hour. Possible values include: 'Daily', 'Hourly'
84
- # @param continuation_token [String] Retrieved from previous calls, this is the
85
- # bookmark used for progress when the responses are paged.
93
+ # @param show_details [Boolean] `True` returns usage data in instance-level
94
+ # detail, `false` causes server-side aggregation with fewer details. For
95
+ # example, if you have 3 website instances, by default you will get 3 line
96
+ # items for website consumption. If you specify showDetails = false, the data
97
+ # will be aggregated as a single line item for website consumption within the
98
+ # time period (for the given subscriptionId, meterId, usageStartTime and
99
+ # usageEndTime).
100
+ # @param aggregation_granularity [AggregationGranularity] `Daily` (default)
101
+ # returns the data in daily granularity, `Hourly` returns the data in hourly
102
+ # granularity. Possible values include: 'Daily', 'Hourly'
103
+ # @param continuation_token [String] Used when a continuation token string is
104
+ # provided in the response body of the previous call, enabling paging through a
105
+ # large result set. If not present, the data is retrieved from the beginning of
106
+ # the day/hour (based on the granularity) passed in.
86
107
  # @param [Hash{String => String}] A hash of custom headers that will be added
87
108
  # to the HTTP request.
88
109
  #
89
110
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
90
111
  #
91
- def list_async(reportedstart_time, reported_end_time, show_details = nil, aggregation_granularity = nil, continuation_token = nil, custom_headers = nil)
92
- fail ArgumentError, 'reportedstart_time is nil' if reportedstart_time.nil?
112
+ def list_async(reported_start_time, reported_end_time, show_details = nil, aggregation_granularity = nil, continuation_token = nil, custom_headers = nil)
113
+ fail ArgumentError, 'reported_start_time is nil' if reported_start_time.nil?
93
114
  fail ArgumentError, 'reported_end_time is nil' if reported_end_time.nil?
94
115
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
95
116
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
@@ -107,7 +128,7 @@ module Azure::ARM::Commerce
107
128
  options = {
108
129
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
109
130
  path_params: {'subscriptionId' => @client.subscription_id},
110
- query_params: {'reportedstartTime' => reportedstart_time,'reportedEndTime' => reported_end_time,'showDetails' => show_details,'aggregationGranularity' => aggregation_granularity,'continuationToken' => continuation_token,'api-version' => @client.api_version},
131
+ query_params: {'reportedStartTime' => reported_start_time,'reportedEndTime' => reported_end_time,'showDetails' => show_details,'aggregationGranularity' => aggregation_granularity,'continuationToken' => continuation_token,'api-version' => @client.api_version},
111
132
  headers: request_headers.merge(custom_headers || {}),
112
133
  base_url: request_url
113
134
  }
@@ -230,25 +251,32 @@ module Azure::ARM::Commerce
230
251
  #
231
252
  # Query aggregated Azure subscription consumption data for a date range.
232
253
  #
233
- # @param reportedstart_time [DateTime] The start of the time range to retrieve
254
+ # @param reported_start_time [DateTime] The start of the time range to retrieve
234
255
  # data for.
235
256
  # @param reported_end_time [DateTime] The end of the time range to retrieve
236
257
  # data for.
237
- # @param show_details [Boolean] When set to true (default), the aggregates are
238
- # broken down into the instance metadata which is more granular.
239
- # @param aggregation_granularity [AggregationGranularity] Value is either daily
240
- # (default) or hourly to tell the API how to return the results grouped by day
241
- # or hour. Possible values include: 'Daily', 'Hourly'
242
- # @param continuation_token [String] Retrieved from previous calls, this is the
243
- # bookmark used for progress when the responses are paged.
258
+ # @param show_details [Boolean] `True` returns usage data in instance-level
259
+ # detail, `false` causes server-side aggregation with fewer details. For
260
+ # example, if you have 3 website instances, by default you will get 3 line
261
+ # items for website consumption. If you specify showDetails = false, the data
262
+ # will be aggregated as a single line item for website consumption within the
263
+ # time period (for the given subscriptionId, meterId, usageStartTime and
264
+ # usageEndTime).
265
+ # @param aggregation_granularity [AggregationGranularity] `Daily` (default)
266
+ # returns the data in daily granularity, `Hourly` returns the data in hourly
267
+ # granularity. Possible values include: 'Daily', 'Hourly'
268
+ # @param continuation_token [String] Used when a continuation token string is
269
+ # provided in the response body of the previous call, enabling paging through a
270
+ # large result set. If not present, the data is retrieved from the beginning of
271
+ # the day/hour (based on the granularity) passed in.
244
272
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
245
273
  # will be added to the HTTP request.
246
274
  #
247
275
  # @return [UsageAggregationListResult] which provide lazy access to pages of
248
276
  # the response.
249
277
  #
250
- def list_as_lazy(reportedstart_time, reported_end_time, show_details = nil, aggregation_granularity = nil, continuation_token = nil, custom_headers = nil)
251
- response = list_async(reportedstart_time, reported_end_time, show_details, aggregation_granularity, continuation_token, custom_headers).value!
278
+ def list_as_lazy(reported_start_time, reported_end_time, show_details = nil, aggregation_granularity = nil, continuation_token = nil, custom_headers = nil)
279
+ response = list_async(reported_start_time, reported_end_time, show_details, aggregation_granularity, continuation_token, custom_headers).value!
252
280
  unless response.nil?
253
281
  page = response.body
254
282
  page.next_method = Proc.new do |next_page_link|
@@ -47,12 +47,11 @@ module Azure::ARM::Commerce
47
47
  # @param base_url [String] the base URI of the service.
48
48
  # @param options [Array] filters to be applied to the HTTP requests.
49
49
  #
50
- def initialize(credentials, base_url = nil, options = nil)
50
+ def initialize(credentials = nil, base_url = nil, options = nil)
51
51
  super(credentials, options)
52
52
  @base_url = base_url || 'https://management.azure.com'
53
53
 
54
- fail ArgumentError, 'credentials is nil' if credentials.nil?
55
- fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials)
54
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
56
55
  @credentials = credentials
57
56
 
58
57
  @usage_aggregates = UsageAggregates.new(self)
@@ -66,7 +65,7 @@ module Azure::ARM::Commerce
66
65
 
67
66
  #
68
67
  # Makes a request and returns the body of the response.
69
- # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
68
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
70
69
  # @param path [String] the path, relative to {base_url}.
71
70
  # @param options [Hash{String=>String}] specifying any request options like :body.
72
71
  # @return [Hash{String=>String}] containing the body of the response.
@@ -127,7 +126,7 @@ module Azure::ARM::Commerce
127
126
  def add_telemetry
128
127
  sdk_information = 'azure_mgmt_commerce'
129
128
  if defined? Azure::ARM::Commerce::VERSION
130
- sdk_information = "#{sdk_information}/#{Azure::ARM::Commerce::VERSION}"
129
+ sdk_information = "#{sdk_information}/#{Azure::ARM::Commerce::VERSION}"
131
130
  end
132
131
  add_user_agent_information(sdk_information)
133
132
  end
@@ -4,5 +4,5 @@
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::Commerce
7
- VERSION = '0.8.0'
7
+ VERSION = '0.9.0'
8
8
  end
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.8.0
4
+ version: 0.9.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: 2016-11-16 00:00:00.000000000 Z
11
+ date: 2017-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.6.2
75
+ version: 0.7.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.6.2
82
+ version: 0.7.0
83
83
  description: Microsoft Azure Commerce Management Client Library for Ruby
84
84
  email: azrubyteam@microsoft.com
85
85
  executables: []