megam_api 0.59 → 0.60

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6962d753033b0018f0d9fa3f7bf84490be095630
4
- data.tar.gz: 0bc5ed0fcb60fc33613d53e2ab5fa44e2c90c822
3
+ metadata.gz: e1a0cdb5d59b8121bacce77444aa19f1f09f5b2b
4
+ data.tar.gz: 8fd06bd4747a2173d48975a5174616d2514fd912
5
5
  SHA512:
6
- metadata.gz: 74add9831ce71475d431e5cc5939aa9d9e8b66bd762b5d9b1a9fe97d407a73683c3c7aa57f6e0e8c7a8a6b30188c84887fcc6cd9fa56744116d45bbf4bcf12d8
7
- data.tar.gz: e9525f69232eee8935272ffb7c2ef8db7c3af613122a173d1c15f7a0e1942911a84a165c9d6762a745e7cc209edfa38a5612c14f9b354a83bfd0bc37bf2c4d29
6
+ metadata.gz: 29c412146699c468d6e8dad37f87c6e5c660178a15aa27d0a3d265f16af4dbff67f1e531d8859ed9ee11cea48002db6d7842d84f7b4e4cef14de107cded92fb5
7
+ data.tar.gz: e7454a68624ee2bc14383fc5f567f590c865d6205d668f6585cbd24ec68a78f4fb24fc5338b80851875376224862d8bbf548812b0da654436617667c9178e0a4
@@ -1,5 +1,5 @@
1
1
  module Megam
2
2
  class API
3
- VERSION = "0.59"
3
+ VERSION = "0.60"
4
4
  end
5
5
  end
@@ -100,6 +100,26 @@ module Megam
100
100
  end
101
101
  @discounts[res]
102
102
  end
103
+
104
+ #THIS RETURNS NIL WHEN A PARTICULAR PROMO TYPE IS NOT PRESENT -
105
+ #DID NOT DISTURB THE ACTUAL LOOKUP
106
+ def lookup_p(discounts)
107
+ lookup_by = nil
108
+ if discounts.kind_of?(Megam::Discounts)
109
+ lookup_by = discounts.code
110
+ elsif discounts.kind_of?(String)
111
+ lookup_by = discounts
112
+ else
113
+ raise ArgumentError, "Must pass a Megam::discounts or String to lookup"
114
+ end
115
+ res =@discounts_by_name[lookup_by]
116
+ unless res
117
+ return nil
118
+ end
119
+ @discounts[res]
120
+ end
121
+
122
+
103
123
 
104
124
  # Transform the ruby obj -> to a Hash
105
125
  def to_hash
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: megam_api
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.59'
4
+ version: '0.60'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajthilak, Kishorekumar Neelamegam, Thomas Alrin, Yeshwanth Kumar, Subash Sethurajan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-22 00:00:00.000000000 Z
11
+ date: 2015-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon
@@ -257,8 +257,34 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
257
  version: '0'
258
258
  requirements: []
259
259
  rubyforge_project:
260
- rubygems_version: 2.4.7
260
+ rubygems_version: 2.4.6
261
261
  signing_key:
262
262
  specification_version: 4
263
263
  summary: Ruby Client for the Megam
264
- test_files: []
264
+ test_files:
265
+ - test/test_accounts.rb
266
+ - test/test_assemblies.rb
267
+ - test/test_assembly.rb
268
+ - test/test_availableunits.rb
269
+ - test/test_balances.rb
270
+ - test/test_billinghistories.rb
271
+ - test/test_billings.rb
272
+ - test/test_cat_requests.rb
273
+ - test/test_cloudtoolsettings.rb
274
+ - test/test_components.rb
275
+ - test/test_credithistories.rb
276
+ - test/test_csars.rb
277
+ - test/test_discounts.rb
278
+ - test/test_domains.rb
279
+ - test/test_event.rb
280
+ - test/test_helper.rb
281
+ - test/test_login.rb
282
+ - test/test_logs.rb
283
+ - test/test_marketplaceaddons.rb
284
+ - test/test_marketplaces.rb
285
+ - test/test_organizations.rb
286
+ - test/test_predefclouds.rb
287
+ - test/test_promos.rb
288
+ - test/test_requests.rb
289
+ - test/test_sshkeys.rb
290
+ - test/test_subscriptions.rb