azure_mgmt_billing 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing.rb +17 -17
  3. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing/billing_management_client.rb +3 -3
  4. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing/billing_periods.rb +4 -4
  5. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing/invoices.rb +5 -5
  6. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing/models/billing_period.rb +1 -1
  7. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing/models/billing_periods_list_result.rb +1 -1
  8. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing/models/download_url.rb +1 -1
  9. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing/models/error_details.rb +1 -1
  10. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing/models/error_response.rb +1 -1
  11. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing/models/invoice.rb +1 -1
  12. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing/models/invoices_list_result.rb +1 -1
  13. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing/models/operation.rb +1 -1
  14. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing/models/operation_display.rb +1 -1
  15. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing/models/operation_list_result.rb +1 -1
  16. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing/models/resource.rb +1 -1
  17. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing/module_definition.rb +3 -2
  18. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing/operations.rb +3 -3
  19. data/lib/{generated → 2017-04-24-preview/generated}/azure_mgmt_billing/version.rb +2 -2
  20. data/lib/azure_mgmt_billing.rb +2 -2
  21. data/lib/module_definition.rb +7 -0
  22. data/lib/profiles/common/configurable.rb +73 -0
  23. data/lib/profiles/common/default.rb +68 -0
  24. data/lib/profiles/latest/billing_latest_profile_client.rb +33 -0
  25. data/lib/profiles/latest/billing_module_definition.rb +9 -0
  26. data/lib/profiles/latest/modules/billing_profile_module.rb +90 -0
  27. data/lib/version.rb +7 -0
  28. metadata +27 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 08b1c50ab16eeb76bb7cad1e3cfdfb7386585ff4
4
- data.tar.gz: ba81831775c570160990470ac80bd91a94b26a23
3
+ metadata.gz: b60b7b96847f9725152ab0aa744d1486f2c4f66a
4
+ data.tar.gz: cb37b9d2ffb8f31cb72cf1084c77ef0f4fe32759
5
5
  SHA512:
6
- metadata.gz: bd77430a52ce18ba2beaae61f052675aafbc4af0c32b1b21e2a3544201493a0799bb9450b3703213269859b991f6f2610942b743221e7f64c1d456ccc1403d00
7
- data.tar.gz: d0617bd265e290febf55e3b2c6c91161912e5b33bf81c7aa2f7e43ac299f76bacabe2d0477f7537944baf5e5be84da8d9ffa2aa0af7774bb989499d555f78aa3
6
+ metadata.gz: 1585e2a93a70fe690a363736bf01a27e7ed333e152e39be5eaad462bd87570bd18f1c336f6ec8d7972c8722ec4e60a87fd6012a4a54d0e5ec14e9437e1b73c32
7
+ data.tar.gz: 733d69e39a6520e0f0ccbe64bd54da399bec27fd868e54699060136dfc26e2d9c009e39b95d27261fedd17a5d2c59c1fb2d62dea8b7e4790abb2072786e4e8a1
@@ -16,26 +16,26 @@ require 'faraday'
16
16
  require 'faraday-cookie_jar'
17
17
  require 'concurrent'
18
18
  require 'ms_rest'
19
- require 'generated/azure_mgmt_billing/module_definition'
19
+ require '2017-04-24-preview/generated/azure_mgmt_billing/module_definition'
20
20
  require 'ms_rest_azure'
21
21
 
22
- module Azure::ARM::Billing
23
- autoload :BillingPeriods, 'generated/azure_mgmt_billing/billing_periods.rb'
24
- autoload :Invoices, 'generated/azure_mgmt_billing/invoices.rb'
25
- autoload :Operations, 'generated/azure_mgmt_billing/operations.rb'
26
- autoload :BillingManagementClient, 'generated/azure_mgmt_billing/billing_management_client.rb'
22
+ module Azure::Billing::Mgmt::V2017_04_24_preview
23
+ autoload :BillingPeriods, '2017-04-24-preview/generated/azure_mgmt_billing/billing_periods.rb'
24
+ autoload :Invoices, '2017-04-24-preview/generated/azure_mgmt_billing/invoices.rb'
25
+ autoload :Operations, '2017-04-24-preview/generated/azure_mgmt_billing/operations.rb'
26
+ autoload :BillingManagementClient, '2017-04-24-preview/generated/azure_mgmt_billing/billing_management_client.rb'
27
27
 
28
28
  module Models
29
- autoload :Resource, 'generated/azure_mgmt_billing/models/resource.rb'
30
- autoload :BillingPeriodsListResult, 'generated/azure_mgmt_billing/models/billing_periods_list_result.rb'
31
- autoload :InvoicesListResult, 'generated/azure_mgmt_billing/models/invoices_list_result.rb'
32
- autoload :ErrorDetails, 'generated/azure_mgmt_billing/models/error_details.rb'
33
- autoload :OperationDisplay, 'generated/azure_mgmt_billing/models/operation_display.rb'
34
- autoload :DownloadUrl, 'generated/azure_mgmt_billing/models/download_url.rb'
35
- autoload :Operation, 'generated/azure_mgmt_billing/models/operation.rb'
36
- autoload :ErrorResponse, 'generated/azure_mgmt_billing/models/error_response.rb'
37
- autoload :OperationListResult, 'generated/azure_mgmt_billing/models/operation_list_result.rb'
38
- autoload :BillingPeriod, 'generated/azure_mgmt_billing/models/billing_period.rb'
39
- autoload :Invoice, 'generated/azure_mgmt_billing/models/invoice.rb'
29
+ autoload :Resource, '2017-04-24-preview/generated/azure_mgmt_billing/models/resource.rb'
30
+ autoload :BillingPeriodsListResult, '2017-04-24-preview/generated/azure_mgmt_billing/models/billing_periods_list_result.rb'
31
+ autoload :InvoicesListResult, '2017-04-24-preview/generated/azure_mgmt_billing/models/invoices_list_result.rb'
32
+ autoload :ErrorDetails, '2017-04-24-preview/generated/azure_mgmt_billing/models/error_details.rb'
33
+ autoload :OperationDisplay, '2017-04-24-preview/generated/azure_mgmt_billing/models/operation_display.rb'
34
+ autoload :DownloadUrl, '2017-04-24-preview/generated/azure_mgmt_billing/models/download_url.rb'
35
+ autoload :Operation, '2017-04-24-preview/generated/azure_mgmt_billing/models/operation.rb'
36
+ autoload :ErrorResponse, '2017-04-24-preview/generated/azure_mgmt_billing/models/error_response.rb'
37
+ autoload :OperationListResult, '2017-04-24-preview/generated/azure_mgmt_billing/models/operation_list_result.rb'
38
+ autoload :BillingPeriod, '2017-04-24-preview/generated/azure_mgmt_billing/models/billing_period.rb'
39
+ autoload :Invoice, '2017-04-24-preview/generated/azure_mgmt_billing/models/invoice.rb'
40
40
  end
41
41
  end
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Billing
6
+ module Azure::Billing::Mgmt::V2017_04_24_preview
7
7
  #
8
8
  # A service client - single point of access to the REST API.
9
9
  #
@@ -129,8 +129,8 @@ module Azure::ARM::Billing
129
129
  #
130
130
  def add_telemetry
131
131
  sdk_information = 'azure_mgmt_billing'
132
- if defined? Azure::ARM::Billing::VERSION
133
- sdk_information = "#{sdk_information}/#{Azure::ARM::Billing::VERSION}"
132
+ if defined? Azure::Billing::Mgmt::V2017_04_24_preview::VERSION
133
+ sdk_information = "#{sdk_information}/#{Azure::Billing::Mgmt::V2017_04_24_preview::VERSION}"
134
134
  end
135
135
  add_user_agent_information(sdk_information)
136
136
  end
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Billing
6
+ module Azure::Billing::Mgmt::V2017_04_24_preview
7
7
  #
8
8
  # Billing client provides access to billing resources for Azure Web-Direct
9
9
  # subscriptions. Other subscription types which were not purchased directly
@@ -123,7 +123,7 @@ module Azure::ARM::Billing
123
123
  if status_code == 200
124
124
  begin
125
125
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
126
- result_mapper = Azure::ARM::Billing::Models::BillingPeriodsListResult.mapper()
126
+ result_mapper = Azure::Billing::Mgmt::V2017_04_24_preview::Models::BillingPeriodsListResult.mapper()
127
127
  result.body = @client.deserialize(result_mapper, parsed_response)
128
128
  rescue Exception => e
129
129
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -210,7 +210,7 @@ module Azure::ARM::Billing
210
210
  if status_code == 200
211
211
  begin
212
212
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
213
- result_mapper = Azure::ARM::Billing::Models::BillingPeriod.mapper()
213
+ result_mapper = Azure::Billing::Mgmt::V2017_04_24_preview::Models::BillingPeriod.mapper()
214
214
  result.body = @client.deserialize(result_mapper, parsed_response)
215
215
  rescue Exception => e
216
216
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -300,7 +300,7 @@ module Azure::ARM::Billing
300
300
  if status_code == 200
301
301
  begin
302
302
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
303
- result_mapper = Azure::ARM::Billing::Models::BillingPeriodsListResult.mapper()
303
+ result_mapper = Azure::Billing::Mgmt::V2017_04_24_preview::Models::BillingPeriodsListResult.mapper()
304
304
  result.body = @client.deserialize(result_mapper, parsed_response)
305
305
  rescue Exception => e
306
306
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Billing
6
+ module Azure::Billing::Mgmt::V2017_04_24_preview
7
7
  #
8
8
  # Billing client provides access to billing resources for Azure Web-Direct
9
9
  # subscriptions. Other subscription types which were not purchased directly
@@ -141,7 +141,7 @@ module Azure::ARM::Billing
141
141
  if status_code == 200
142
142
  begin
143
143
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
144
- result_mapper = Azure::ARM::Billing::Models::InvoicesListResult.mapper()
144
+ result_mapper = Azure::Billing::Mgmt::V2017_04_24_preview::Models::InvoicesListResult.mapper()
145
145
  result.body = @client.deserialize(result_mapper, parsed_response)
146
146
  rescue Exception => e
147
147
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -231,7 +231,7 @@ module Azure::ARM::Billing
231
231
  if status_code == 200
232
232
  begin
233
233
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
234
- result_mapper = Azure::ARM::Billing::Models::Invoice.mapper()
234
+ result_mapper = Azure::Billing::Mgmt::V2017_04_24_preview::Models::Invoice.mapper()
235
235
  result.body = @client.deserialize(result_mapper, parsed_response)
236
236
  rescue Exception => e
237
237
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -317,7 +317,7 @@ module Azure::ARM::Billing
317
317
  if status_code == 200
318
318
  begin
319
319
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
320
- result_mapper = Azure::ARM::Billing::Models::Invoice.mapper()
320
+ result_mapper = Azure::Billing::Mgmt::V2017_04_24_preview::Models::Invoice.mapper()
321
321
  result.body = @client.deserialize(result_mapper, parsed_response)
322
322
  rescue Exception => e
323
323
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -413,7 +413,7 @@ module Azure::ARM::Billing
413
413
  if status_code == 200
414
414
  begin
415
415
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
416
- result_mapper = Azure::ARM::Billing::Models::InvoicesListResult.mapper()
416
+ result_mapper = Azure::Billing::Mgmt::V2017_04_24_preview::Models::InvoicesListResult.mapper()
417
417
  result.body = @client.deserialize(result_mapper, parsed_response)
418
418
  rescue Exception => e
419
419
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Billing
6
+ module Azure::Billing::Mgmt::V2017_04_24_preview
7
7
  module Models
8
8
  #
9
9
  # A billing period resource.
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Billing
6
+ module Azure::Billing::Mgmt::V2017_04_24_preview
7
7
  module Models
8
8
  #
9
9
  # Result of listing billing periods. It contains a list of available
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Billing
6
+ module Azure::Billing::Mgmt::V2017_04_24_preview
7
7
  module Models
8
8
  #
9
9
  # A secure URL that can be used to download a PDF invoice until the URL
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Billing
6
+ module Azure::Billing::Mgmt::V2017_04_24_preview
7
7
  module Models
8
8
  #
9
9
  # The details of the error.
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Billing
6
+ module Azure::Billing::Mgmt::V2017_04_24_preview
7
7
  module Models
8
8
  #
9
9
  # Error response indicates that the service is not able to process the
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Billing
6
+ module Azure::Billing::Mgmt::V2017_04_24_preview
7
7
  module Models
8
8
  #
9
9
  # An invoice resource can be used download a PDF version of an invoice.
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Billing
6
+ module Azure::Billing::Mgmt::V2017_04_24_preview
7
7
  module Models
8
8
  #
9
9
  # Result of listing invoices. It contains a list of available invoices in
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Billing
6
+ module Azure::Billing::Mgmt::V2017_04_24_preview
7
7
  module Models
8
8
  #
9
9
  # A Billing REST API operation.
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Billing
6
+ module Azure::Billing::Mgmt::V2017_04_24_preview
7
7
  module Models
8
8
  #
9
9
  # The object that represents the operation.
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Billing
6
+ module Azure::Billing::Mgmt::V2017_04_24_preview
7
7
  module Models
8
8
  #
9
9
  # Result listing billing operations. It contains a list of operations and a
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Billing
6
+ module Azure::Billing::Mgmt::V2017_04_24_preview
7
7
  module Models
8
8
  #
9
9
  # The Resource model definition.
@@ -4,5 +4,6 @@
4
4
  # regenerated.
5
5
 
6
6
  module Azure end
7
- module Azure::ARM end
8
- module Azure::ARM::Billing end
7
+ module Azure::Billing end
8
+ module Azure::Billing::Mgmt end
9
+ module Azure::Billing::Mgmt::V2017_04_24_preview end
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Billing
6
+ module Azure::Billing::Mgmt::V2017_04_24_preview
7
7
  #
8
8
  # Billing client provides access to billing resources for Azure Web-Direct
9
9
  # subscriptions. Other subscription types which were not purchased directly
@@ -91,7 +91,7 @@ module Azure::ARM::Billing
91
91
  if status_code == 200
92
92
  begin
93
93
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
94
- result_mapper = Azure::ARM::Billing::Models::OperationListResult.mapper()
94
+ result_mapper = Azure::Billing::Mgmt::V2017_04_24_preview::Models::OperationListResult.mapper()
95
95
  result.body = @client.deserialize(result_mapper, parsed_response)
96
96
  rescue Exception => e
97
97
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -178,7 +178,7 @@ module Azure::ARM::Billing
178
178
  if status_code == 200
179
179
  begin
180
180
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
181
- result_mapper = Azure::ARM::Billing::Models::OperationListResult.mapper()
181
+ result_mapper = Azure::Billing::Mgmt::V2017_04_24_preview::Models::OperationListResult.mapper()
182
182
  result.body = @client.deserialize(result_mapper, parsed_response)
183
183
  rescue Exception => e
184
184
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -3,6 +3,6 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Billing
7
- VERSION = '0.14.0'
6
+ module Azure::Billing::Mgmt::V2017_04_24_preview
7
+ VERSION = '0.15.0'
8
8
  end
@@ -2,5 +2,5 @@
2
2
  # Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  # Licensed under the MIT License. See License.txt in the project root for license information.
4
4
 
5
- require 'generated/azure_mgmt_billing'
6
-
5
+ require '2017-04-24-preview/generated/azure_mgmt_billing'
6
+ require 'profiles/latest/billing_latest_profile_client'
@@ -0,0 +1,7 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ module Azure end
6
+ module Azure::Billing end
7
+ module Azure::Billing::Mgmt end
@@ -0,0 +1,73 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ module Azure::ARM
6
+ # The Azure::ARM::Configurable module provides basic configuration for Azure ARM activities.
7
+ module Configurable
8
+ # @return [String] Azure tenant id (also known as domain).
9
+ attr_accessor :tenant_id
10
+
11
+ # @return [String] Azure client id.
12
+ attr_accessor :client_id
13
+
14
+ # @return [String] Azure secret key.
15
+ attr_accessor :client_secret
16
+
17
+ # @return [String] Azure subscription id.
18
+ attr_accessor :subscription_id
19
+
20
+ # @return [MsRestAzure::ActiveDirectoryServiceSettings] Azure active directory service settings.
21
+ attr_accessor :active_directory_settings
22
+
23
+ # @return [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
24
+ attr_accessor :credentials
25
+
26
+ class << self
27
+ #
28
+ # List of configurable keys for {Azure::ARM::Client}.
29
+ # @return [Array] of option keys.
30
+ #
31
+ def keys
32
+ @keys ||= [:tenant_id, :client_id, :client_secret, :subscription_id, :active_directory_settings, :credentials]
33
+ end
34
+ end
35
+
36
+ #
37
+ # Set configuration options using a block.
38
+ #
39
+ def configure
40
+ yield self
41
+ end
42
+
43
+ #
44
+ # Resets the configurable options to provided options or defaults.
45
+ # This will also creates MsRest::TokenCredentials to be used for subsequent Azure Resource Manager clients.
46
+ #
47
+ def reset!(options = {})
48
+ Azure::ARM::Configurable.keys.each do |key|
49
+ default_value = Azure::ARM::Default.options[key]
50
+ instance_variable_set(:"@#{key}", options.fetch(key, default_value))
51
+ end
52
+
53
+ self
54
+ end
55
+
56
+ def config
57
+ self
58
+ end
59
+
60
+ private
61
+
62
+ #
63
+ # configures configurable options to default values
64
+ #
65
+ def setup_options
66
+ opts = {}
67
+ Azure::ARM::Configurable.keys.map do |key|
68
+ opts[key] = Azure::ARM::Default.options[key]
69
+ end
70
+ opts
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,68 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ module Azure::ARM
6
+ # Default configuration options for {Azure::ARM.Client}
7
+ module Default
8
+ class << self
9
+ #
10
+ # Default Azure Tenant Id.
11
+ # @return [String] Azure Tenant Id.
12
+ #
13
+ def tenant_id
14
+ ENV['AZURE_TENANT_ID']
15
+ end
16
+
17
+ #
18
+ # Default Azure Client Id.
19
+ # @return [String] Azure Client Id.
20
+ #
21
+ def client_id
22
+ ENV['AZURE_CLIENT_ID']
23
+ end
24
+
25
+ #
26
+ # Default Azure Client Secret.
27
+ # @return [String] Azure Client Secret.
28
+ #
29
+ def client_secret
30
+ ENV['AZURE_CLIENT_SECRET']
31
+ end
32
+
33
+ #
34
+ # Default Azure Subscription Id.
35
+ # @return [String] Azure Subscription Id.
36
+ #
37
+ def subscription_id
38
+ ENV['AZURE_SUBSCRIPTION_ID']
39
+ end
40
+
41
+ #
42
+ # Default Azure credentials to authorize HTTP requests made by the service client.
43
+ # @return [MsRest::ServiceClientCredentials] Azure credentials to authorize HTTP requests made by the service client.
44
+ #
45
+ def credentials
46
+ MsRest::TokenCredentials.new(
47
+ MsRestAzure::ApplicationTokenProvider.new(
48
+ self.tenant_id, self.client_id, self.client_secret, self.active_directory_settings))
49
+ end
50
+
51
+ #
52
+ # Default Azure Active Directory Service Settings.
53
+ # @return [MsRestAzure::ActiveDirectoryServiceSettings] Azure Active Directory Service Settings.
54
+ #
55
+ def active_directory_settings
56
+ MsRestAzure::ActiveDirectoryServiceSettings.get_azure_settings
57
+ end
58
+
59
+ #
60
+ # Configuration options.
61
+ # @return [Hash] Configuration options.
62
+ #
63
+ def options
64
+ Hash[Azure::ARM::Configurable.keys.map{|key| [key, send(key)]}]
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,33 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ require 'profiles/latest/billing_module_definition'
6
+ require 'profiles/latest/modules/billing_profile_module'
7
+ require 'profiles/common/configurable'
8
+ require 'profiles/common/default'
9
+
10
+ module Azure::Billing::Profiles::Latest::Mgmt
11
+ #
12
+ # Client class for the Latest profile SDK.
13
+ #
14
+ class Client < BillingClass
15
+ include Azure::ARM::Configurable
16
+
17
+
18
+ def initialize(options = {})
19
+ super(options)
20
+ end
21
+
22
+ def credentials
23
+ if @credentials.nil?
24
+ self.active_directory_settings ||= Azure::ARM::Default.active_directory_settings
25
+
26
+ @credentials = MsRest::TokenCredentials.new(
27
+ MsRestAzure::ApplicationTokenProvider.new(
28
+ self.tenant_id, self.client_id, self.client_secret, self.active_directory_settings))
29
+ end
30
+ @credentials
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ module Azure end
6
+ module Azure::Billing end
7
+ module Azure::Billing::Profiles end
8
+ module Azure::Billing::Profiles::Latest end
9
+ module Azure::Billing::Profiles::Latest::Mgmt end
@@ -0,0 +1,90 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ require 'azure_mgmt_billing'
6
+
7
+ module Azure::Billing::Profiles::Latest::Mgmt
8
+ BillingPeriods = Azure::Billing::Mgmt::V2017_04_24_preview::BillingPeriods
9
+ Invoices = Azure::Billing::Mgmt::V2017_04_24_preview::Invoices
10
+ Operations = Azure::Billing::Mgmt::V2017_04_24_preview::Operations
11
+
12
+ module Models
13
+ Resource = Azure::Billing::Mgmt::V2017_04_24_preview::Models::Resource
14
+ BillingPeriodsListResult = Azure::Billing::Mgmt::V2017_04_24_preview::Models::BillingPeriodsListResult
15
+ InvoicesListResult = Azure::Billing::Mgmt::V2017_04_24_preview::Models::InvoicesListResult
16
+ ErrorDetails = Azure::Billing::Mgmt::V2017_04_24_preview::Models::ErrorDetails
17
+ OperationDisplay = Azure::Billing::Mgmt::V2017_04_24_preview::Models::OperationDisplay
18
+ DownloadUrl = Azure::Billing::Mgmt::V2017_04_24_preview::Models::DownloadUrl
19
+ Operation = Azure::Billing::Mgmt::V2017_04_24_preview::Models::Operation
20
+ ErrorResponse = Azure::Billing::Mgmt::V2017_04_24_preview::Models::ErrorResponse
21
+ OperationListResult = Azure::Billing::Mgmt::V2017_04_24_preview::Models::OperationListResult
22
+ BillingPeriod = Azure::Billing::Mgmt::V2017_04_24_preview::Models::BillingPeriod
23
+ Invoice = Azure::Billing::Mgmt::V2017_04_24_preview::Models::Invoice
24
+ end
25
+
26
+ #
27
+ # Billing
28
+ #
29
+ class BillingClass
30
+ attr_reader :billing_periods, :invoices, :operations, :configurable, :base_url, :options, :model_classes
31
+
32
+ def initialize(options = {})
33
+ if options.is_a?(Hash) && options.length == 0
34
+ @options = setup_options
35
+ else
36
+ @options = options
37
+ end
38
+
39
+ reset!(options)
40
+
41
+ @configurable, @base_url, @options = self, nil, nil
42
+
43
+ client_0 = Azure::Billing::Mgmt::V2017_04_24_preview::BillingManagementClient.new(configurable.credentials, base_url, options)
44
+ if(client_0.respond_to?(:subscription_id))
45
+ client_0.subscription_id = configurable.subscription_id
46
+ end
47
+ @billing_periods = client_0.billing_periods
48
+ @invoices = client_0.invoices
49
+ @operations = client_0.operations
50
+
51
+ @model_classes = ModelClasses.new
52
+ end
53
+
54
+ class ModelClasses
55
+ def resource
56
+ Azure::Billing::Mgmt::V2017_04_24_preview::Models::Resource
57
+ end
58
+ def billing_periods_list_result
59
+ Azure::Billing::Mgmt::V2017_04_24_preview::Models::BillingPeriodsListResult
60
+ end
61
+ def invoices_list_result
62
+ Azure::Billing::Mgmt::V2017_04_24_preview::Models::InvoicesListResult
63
+ end
64
+ def error_details
65
+ Azure::Billing::Mgmt::V2017_04_24_preview::Models::ErrorDetails
66
+ end
67
+ def operation_display
68
+ Azure::Billing::Mgmt::V2017_04_24_preview::Models::OperationDisplay
69
+ end
70
+ def download_url
71
+ Azure::Billing::Mgmt::V2017_04_24_preview::Models::DownloadUrl
72
+ end
73
+ def operation
74
+ Azure::Billing::Mgmt::V2017_04_24_preview::Models::Operation
75
+ end
76
+ def error_response
77
+ Azure::Billing::Mgmt::V2017_04_24_preview::Models::ErrorResponse
78
+ end
79
+ def operation_list_result
80
+ Azure::Billing::Mgmt::V2017_04_24_preview::Models::OperationListResult
81
+ end
82
+ def billing_period
83
+ Azure::Billing::Mgmt::V2017_04_24_preview::Models::BillingPeriod
84
+ end
85
+ def invoice
86
+ Azure::Billing::Mgmt::V2017_04_24_preview::Models::Invoice
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,7 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ module Azure::Billing::Mgmt
6
+ VERSION = '0.15.0'
7
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_billing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.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: 2017-10-09 00:00:00.000000000 Z
11
+ date: 2017-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -87,25 +87,32 @@ extensions: []
87
87
  extra_rdoc_files: []
88
88
  files:
89
89
  - LICENSE.txt
90
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing.rb
91
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing/billing_management_client.rb
92
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing/billing_periods.rb
93
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing/invoices.rb
94
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing/models/billing_period.rb
95
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing/models/billing_periods_list_result.rb
96
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing/models/download_url.rb
97
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing/models/error_details.rb
98
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing/models/error_response.rb
99
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing/models/invoice.rb
100
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing/models/invoices_list_result.rb
101
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing/models/operation.rb
102
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing/models/operation_display.rb
103
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing/models/operation_list_result.rb
104
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing/models/resource.rb
105
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing/module_definition.rb
106
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing/operations.rb
107
+ - lib/2017-04-24-preview/generated/azure_mgmt_billing/version.rb
90
108
  - lib/azure_mgmt_billing.rb
91
- - lib/generated/azure_mgmt_billing.rb
92
- - lib/generated/azure_mgmt_billing/billing_management_client.rb
93
- - lib/generated/azure_mgmt_billing/billing_periods.rb
94
- - lib/generated/azure_mgmt_billing/invoices.rb
95
- - lib/generated/azure_mgmt_billing/models/billing_period.rb
96
- - lib/generated/azure_mgmt_billing/models/billing_periods_list_result.rb
97
- - lib/generated/azure_mgmt_billing/models/download_url.rb
98
- - lib/generated/azure_mgmt_billing/models/error_details.rb
99
- - lib/generated/azure_mgmt_billing/models/error_response.rb
100
- - lib/generated/azure_mgmt_billing/models/invoice.rb
101
- - lib/generated/azure_mgmt_billing/models/invoices_list_result.rb
102
- - lib/generated/azure_mgmt_billing/models/operation.rb
103
- - lib/generated/azure_mgmt_billing/models/operation_display.rb
104
- - lib/generated/azure_mgmt_billing/models/operation_list_result.rb
105
- - lib/generated/azure_mgmt_billing/models/resource.rb
106
- - lib/generated/azure_mgmt_billing/module_definition.rb
107
- - lib/generated/azure_mgmt_billing/operations.rb
108
- - lib/generated/azure_mgmt_billing/version.rb
109
+ - lib/module_definition.rb
110
+ - lib/profiles/common/configurable.rb
111
+ - lib/profiles/common/default.rb
112
+ - lib/profiles/latest/billing_latest_profile_client.rb
113
+ - lib/profiles/latest/billing_module_definition.rb
114
+ - lib/profiles/latest/modules/billing_profile_module.rb
115
+ - lib/version.rb
109
116
  homepage: https://aka.ms/azure-sdk-for-ruby
110
117
  licenses:
111
118
  - MIT