recurly 2.10.5 → 2.11.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of recurly might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 8e13772317176aaf69b6e856951daa32227e6f534a8bd58a7f08126e5a30e6a1
4
- data.tar.gz: c710080c11c55d525225dcf35efaca658e45eb6c5b5458c5a43c7e4ad9deba94
2
+ SHA1:
3
+ metadata.gz: 86a4a49660c2a809ff771b6ae267bcdc47d6d915
4
+ data.tar.gz: 7478ca330dab1ddbfceafd73fca39d4b4dd2a0c7
5
5
  SHA512:
6
- metadata.gz: 7d77399dd921733fd137f278672f1651ff96a14ecfb5ed038b070d21eb42face7d64ad15d5880c2284ba201e0abc8e19516911949dfd7014fe409ab88ad0294d
7
- data.tar.gz: 968072f0aee3fbb4731ae47cfec5d0e337e363071318cd80ee9a5d50475e9951df3c9153cc1040846505533a99e0d6d2ca384d4d5bcc08845af0aa1a8da81b01
6
+ metadata.gz: 98bf5846b115094c09baf037498a002fa73ba2adab27f2a8e9d46ad81818cf7f4a0d4a8f261dbefd2a09ffadaa882daa00b5c62612b99dd65ee5d7efee54fcc0
7
+ data.tar.gz: 2d7365c45ffa1459377d275e94c323f4a1d7b0fe85257d3d31651aa734429fdf068049acc83b606cde459f35c845273109c2be83ddf4cc541da24fd9be812572
data/README.md CHANGED
@@ -14,7 +14,7 @@ Recurly is packaged as a Ruby gem. We recommend you install it with
14
14
  [Bundler](http://gembundler.com/) by adding the following line to your Gemfile:
15
15
 
16
16
  ``` ruby
17
- gem 'recurly', '~> 2.10.3'
17
+ gem 'recurly', '~> 2.10.2'
18
18
  ```
19
19
 
20
20
  Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
data/lib/recurly.rb CHANGED
@@ -87,8 +87,6 @@ module Recurly
87
87
  end
88
88
 
89
89
  # Assigns a logger to log requests/responses and more.
90
- # The logger can only be set if the environment variable
91
- # `RECURLY_INSECURE_DEBUG` equals `true`.
92
90
  #
93
91
  # @return [Logger, nil]
94
92
  # @example
@@ -100,22 +98,6 @@ module Recurly
100
98
  # Recurly.logger = nil # Or Recurly.logger = Logger.new nil
101
99
  attr_accessor :logger
102
100
 
103
- def logger=(logger)
104
- if ENV['RECURLY_INSECURE_DEBUG'].to_s.downcase == 'true'
105
- @logger = logger
106
- puts <<-MSG
107
- [WARNING] Recurly logger enabled. The logger has the potential to leak
108
- PII and should never be used in production environments.
109
- MSG
110
- else
111
- puts <<-MSG
112
- [WARNING] Recurly logger has been disabled. If you wish to use it,
113
- only do so in a non-production environment and make sure
114
- the `RECURLY_INSECURE_DEBUG` environment variable is set to `true`.
115
- MSG
116
- end
117
- end
118
-
119
101
  # Convenience logging method includes a Logger#progname dynamically.
120
102
  # @return [true, nil]
121
103
  def log level, message
data/lib/recurly/api.rb CHANGED
@@ -15,9 +15,8 @@ module Recurly
15
15
  require 'recurly/api/errors'
16
16
 
17
17
  @@base_uri = "https://api.recurly.com/v2/"
18
- @@valid_domains = [".recurly.com"]
19
18
 
20
- RECURLY_API_VERSION = '2.7'
19
+ RECURLY_API_VERSION = '2.8'
21
20
 
22
21
  FORMATS = Helper.hash_with_indifferent_read_access(
23
22
  'pdf' => 'application/pdf',
@@ -76,13 +75,6 @@ module Recurly
76
75
  URI.parse @@base_uri.sub('api', Recurly.subdomain)
77
76
  end
78
77
 
79
- def validate_uri!(uri)
80
- domain = @@valid_domains.detect { |d| uri.host.end_with?(d) }
81
- unless domain
82
- raise ArgumentError, "URI #{uri} is invalid. You may only make requests to a Recurly domain."
83
- end
84
- end
85
-
86
78
  # @return [String]
87
79
  def user_agent
88
80
  "Recurly/#{Version}; #{RUBY_DESCRIPTION}"
@@ -43,7 +43,6 @@ module Recurly
43
43
  }
44
44
  uri += "?#{pairs.join '&'}"
45
45
  end
46
- self.validate_uri!(uri)
47
46
  request = METHODS[method].new uri.request_uri, head
48
47
  request.basic_auth(*[Recurly.api_key, nil].flatten[0, 2])
49
48
  if options[:body]
@@ -95,6 +95,9 @@ module Recurly
95
95
  po_number
96
96
  net_terms
97
97
  coupon_codes
98
+ terms_and_conditions
99
+ customer_notes
100
+ vat_reverse_charge_notes
98
101
  )
99
102
 
100
103
  class << self
@@ -335,8 +335,9 @@ module Recurly
335
335
  raise NotFound, "can't find a record with nil identifier"
336
336
  end
337
337
 
338
+ uri = uuid =~ /^http/ ? uuid : member_path(uuid)
338
339
  begin
339
- from_response API.get(member_path(uuid), {}, options)
340
+ from_response API.get(uri, {}, options)
340
341
  rescue API::NotFound => e
341
342
  raise NotFound, e.description
342
343
  end
@@ -633,12 +634,9 @@ module Recurly
633
634
  return if response.body.to_s.length.zero?
634
635
  fresh = self.class.from_response response
635
636
  else
636
- options = {:etag => (etag unless changed?)}
637
- fresh = if @href
638
- self.class.from_response API.get(@href, {}, options)
639
- else
640
- self.class.find(to_param, options)
641
- end
637
+ fresh = self.class.find(
638
+ @href || to_param, :etag => (etag unless changed?)
639
+ )
642
640
  end
643
641
  fresh and copy_from fresh
644
642
  persist! true
@@ -75,6 +75,7 @@ module Recurly
75
75
  started_with_gift
76
76
  converted_at
77
77
  no_billing_info_reason
78
+ imported_trial
78
79
  )
79
80
  alias to_param uuid
80
81
 
@@ -1,8 +1,8 @@
1
1
  module Recurly
2
2
  module Version
3
3
  MAJOR = 2
4
- MINOR = 10
5
- PATCH = 5
4
+ MINOR = 11
5
+ PATCH = 0
6
6
  PRE = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recurly
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.5
4
+ version: 2.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-09 00:00:00.000000000 Z
11
+ date: 2017-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
238
238
  version: '0'
239
239
  requirements: []
240
240
  rubyforge_project:
241
- rubygems_version: 2.7.6
241
+ rubygems_version: 2.6.13
242
242
  signing_key:
243
243
  specification_version: 4
244
244
  summary: Recurly API Client