tribune_recurly_api 1.0.5 → 1.0.6
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 +4 -4
- data/lib/recurly_api/caching.rb +6 -6
- data/lib/recurly_api/client/plans.rb +14 -0
- data/lib/recurly_api/version.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 428cd1714997ee102df9b99bc56183a720cd4666f1d552cf9105781dd1b460f3
|
4
|
+
data.tar.gz: 8067703da783c5903489b116b748522fedd2b685c77d66d1411658306b805855
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57d171be31c09ebaf536e9d14934e2260c38cf22d6ceb034e3616dbeadf87f2036d040f85cd72622103a7d99ce70af78802deac349d766cda15cc2b9484e7561
|
7
|
+
data.tar.gz: b72b9e239cd6248761e52e59fbb4af4e14252e46f980c1a543f1cff6c1eab1b5a23ce3f650d8436814dd11b96f7f3dc6254d339e73b1da68216136fad6e5a15c
|
data/lib/recurly_api/caching.rb
CHANGED
@@ -53,12 +53,12 @@ module RecurlyApi
|
|
53
53
|
|
54
54
|
# TODO: remove below method once integration testing is done
|
55
55
|
def check_logs_for_caching_info
|
56
|
-
logger.info("#{logger_heading}: ----> caching_enabled?: #{caching_enabled?}")
|
57
|
-
# logger.info("#{logger_heading}: ----> ignore_caching?: #{ignore_caching?}")
|
58
|
-
logger.info("#{logger_heading}: ----> bypass_caching?: #{bypass_caching?}")
|
59
|
-
logger.info("#{logger_heading}: ----> http_method: #{http_method} -- #{http_method.class}")
|
60
|
-
logger.info("#{logger_heading}: ----> cache_expires_in: #{cache_expires_in}")
|
61
|
-
logger.info("#{logger_heading}: ----> cache_key: #{cache_key} -- #{cache_key.class}")
|
56
|
+
# logger.info("#{logger_heading}: ----> caching_enabled?: #{caching_enabled?}")
|
57
|
+
# # logger.info("#{logger_heading}: ----> ignore_caching?: #{ignore_caching?}")
|
58
|
+
# logger.info("#{logger_heading}: ----> bypass_caching?: #{bypass_caching?}")
|
59
|
+
# logger.info("#{logger_heading}: ----> http_method: #{http_method} -- #{http_method.class}")
|
60
|
+
# logger.info("#{logger_heading}: ----> cache_expires_in: #{cache_expires_in}")
|
61
|
+
# logger.info("#{logger_heading}: ----> cache_key: #{cache_key} -- #{cache_key.class}")
|
62
62
|
# logger.info("#{logger_heading}: ----> final response: #{final_response || fetch_response_from_cache}")
|
63
63
|
logger.info("#{logger_heading}: ----> ratelimit_retries: #{ratelimit_retries}")
|
64
64
|
end
|
@@ -45,5 +45,19 @@ module RecurlyApi
|
|
45
45
|
request_api(path_name: "plans/#{plan_id}",
|
46
46
|
cache_key_name: cache_key_name, **optional_params)
|
47
47
|
end
|
48
|
+
|
49
|
+
# Fetch Plan Info--
|
50
|
+
# { https://developers.recurly.com/api/v2021-02-25/index.html#operation/list_plan_add_ons }
|
51
|
+
# @param plan_id [String] Required, Plan ID or code.
|
52
|
+
# - For ID no prefix is used e.g. <e28zov4fw0v2>. For code use prefix <code->, ex. <code-gold>.
|
53
|
+
# @param optional_params [Hash] Optional, same as above
|
54
|
+
def plan_add_ons(plan_id:, **optional_params)
|
55
|
+
self.cache_expires_in = optional_params[:cache_expires_in] || cache_settings[:plan_expiry] unless bypass_caching?
|
56
|
+
# cache_key should be uniq for each plan(here plan_id is uniq)
|
57
|
+
# final cache key with prefix: tribune_recurly_api.plan_info.<abcdef>
|
58
|
+
cache_key_name = "plan_info.#{plan_id}.add_ons"
|
59
|
+
request_api(path_name: "plans/#{plan_id}/add_ons",
|
60
|
+
cache_key_name: cache_key_name, **optional_params)
|
61
|
+
end
|
48
62
|
end
|
49
63
|
end
|
data/lib/recurly_api/version.rb
CHANGED
@@ -18,5 +18,6 @@ module RecurlyApi
|
|
18
18
|
# VERSION = '1.0.2' # prefixing '<code->' to ssor_id is now part of GEM
|
19
19
|
# VERSION = '1.0.3' # return recurly error response
|
20
20
|
# VERSION = '1.0.4' # is yanked in rubygems.org
|
21
|
-
VERSION = '1.0.5' # cache key should be uniq
|
21
|
+
# VERSION = '1.0.5' # cache key should be uniq
|
22
|
+
VERSION = '1.0.6' # new api call to fetch plan add_ons
|
22
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tribune_recurly_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- udevulapally
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|