recurly 2.8.0.rc3 → 2.8.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
2
  SHA1:
3
- metadata.gz: 858632bc27cb9ab5afdb879b3465fcd9bf852211
4
- data.tar.gz: e58bef94c3f63a3e3abf95b0dec28be12acc9fa6
3
+ metadata.gz: 0c26a4ee0410a6a2dccbb5ee6841c45ee6bb21fb
4
+ data.tar.gz: 9c67f455ce8b93cbaca306a2e379d6d666280f06
5
5
  SHA512:
6
- metadata.gz: 6f53e1bb38066c646379b1ed2b8981b891c9498424233b8f333e5b39b7deabfe07f6505649c4a0b007d81223f1aa465c2f969b46746a969771c41fa2c774717f
7
- data.tar.gz: 79f7bb2723c94f82dc3daceeda2469434771af5c475ac8801f609444a08d4ce08df63365a57411d33ffa29e410d35c6a6b70a312135940b8bb9b96cadcca6c86
6
+ metadata.gz: 6c5a5cd87e4110aa3d860392a2d01421ca60d6e72c2c9ffedb7daf9583046bb3bda54131b4d73a78fb5fd392811244c5ce4de247e759d0ae025cd3e2689b5969
7
+ data.tar.gz: f2525658444ab89c9d74d74bcc09bb19ca98f66773b8f1e1f64136224ea5252b017541041412d117da9a6c969559aecb5d0cb3e38e3a0c2adcd77f0fb417fdbe
data/README.md CHANGED
@@ -5,6 +5,8 @@
5
5
  [Recurly](https://recurly.com/)'s Ruby client library is an interface to its
6
6
  [REST API](https://dev.recurly.com/docs/getting-started).
7
7
 
8
+ You can also look at [rubydocs](http://www.rubydoc.info/github/recurly/recurly-client-ruby/master)
9
+ to see documentation on the classes and methods available.
8
10
 
9
11
  ## Installation
10
12
 
@@ -12,7 +14,7 @@ Recurly is packaged as a Ruby gem. We recommend you install it with
12
14
  [Bundler](http://gembundler.com/) by adding the following line to your Gemfile:
13
15
 
14
16
  ``` ruby
15
- gem 'recurly', '~> 2.7.5'
17
+ gem 'recurly', '~> 2.8.0'
16
18
  ```
17
19
 
18
20
  Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
@@ -48,6 +48,11 @@ module Recurly
48
48
  updated_at
49
49
  closed_at
50
50
  vat_location_valid
51
+ has_live_subscription
52
+ has_active_subscription
53
+ has_future_subscription
54
+ has_canceled_subscription
55
+ has_past_due_invoice
51
56
  )
52
57
  alias to_param account_code
53
58
 
@@ -26,6 +26,7 @@ module Recurly
26
26
  token_id
27
27
  currency
28
28
  geo_code
29
+ updated_at
29
30
  ) | CREDIT_CARD_ATTRIBUTES | BANK_ACCOUNT_ATTRIBUTES | AMAZON_ATTRIBUTES | PAYPAL_ATTRIBUTES | ROKU_ATTRIBUTES
30
31
 
31
32
  # @return ["credit_card", "paypal", "amazon", "bank_account", "roku", nil] The type of billing info.
@@ -17,6 +17,7 @@ module Recurly
17
17
  has_many :unique_coupon_codes, class_name: :Coupon
18
18
 
19
19
  define_attribute_methods %w(
20
+ id
20
21
  coupon_code
21
22
  name
22
23
  state
@@ -66,6 +66,9 @@ module Recurly
66
66
  tax_types
67
67
  refund_tax_date
68
68
  refund_geo_code
69
+ subtotal_after_discount_in_cents
70
+ attempt_next_collection_at
71
+ recovery_reason
69
72
  )
70
73
  alias to_param invoice_number_with_prefix
71
74
 
@@ -94,6 +97,16 @@ module Recurly
94
97
  true
95
98
  end
96
99
 
100
+ # Initiate a collection attempt on an invoice.
101
+ #
102
+ # @return [true, false] +true+ when successful, +false+ when unable to
103
+ # (e.g., the invoice has already been collected, a collection attempt was already made)
104
+ def force_collect
105
+ return false unless link? :force_collect
106
+ reload follow_link :force_collect
107
+ true
108
+ end
109
+
97
110
  def enter_offline_payment(attrs={})
98
111
  Transaction.from_response API.post("#{uri}/transactions", attrs.empty? ? nil : Transaction.to_xml(attrs))
99
112
  rescue Recurly::API::UnprocessableEntity => e
@@ -332,8 +332,7 @@ module Recurly
332
332
  # for subscriptions use uuid
333
333
  # for transactions use uuid
334
334
  def find(uuid, options = {})
335
- if uuid.nil?
336
- # Should we raise an ArgumentError, instead?
335
+ if uuid.nil? || uuid.to_s.empty?
337
336
  raise NotFound, "can't find a record with nil identifier"
338
337
  end
339
338
 
@@ -412,6 +411,9 @@ module Recurly
412
411
  end
413
412
 
414
413
  xml.each_element do |el|
414
+ # skip this element if it's an xml comment
415
+ next if defined?(Nokogiri::XML::Node::TEXT_NODE) && el.is_a?(Nokogiri::XML::Comment)
416
+
415
417
  if el.name == 'a'
416
418
  record.links[el.attribute('name').value] = {
417
419
  :method => el.attribute('method').to_s,
@@ -71,6 +71,8 @@ module Recurly
71
71
  revenue_schedule_type
72
72
  shipping_address_id
73
73
  timeframe
74
+ started_with_gift
75
+ converted_at
74
76
  )
75
77
  alias to_param uuid
76
78
 
@@ -53,6 +53,10 @@ module Recurly
53
53
  accounting_code
54
54
  fraud
55
55
  product_code
56
+ gateway_type
57
+ origin
58
+ message
59
+ approval_code
56
60
  )
57
61
  alias to_param uuid
58
62
  alias fraud_info fraud
@@ -3,7 +3,7 @@ module Recurly
3
3
  MAJOR = 2
4
4
  MINOR = 8
5
5
  PATCH = 0
6
- PRE = 'rc3'
6
+ PRE = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
9
9
 
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.8.0.rc3
4
+ version: 2.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-17 00:00:00.000000000 Z
11
+ date: 2017-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -233,12 +233,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
233
233
  version: 1.9.3
234
234
  required_rubygems_version: !ruby/object:Gem::Requirement
235
235
  requirements:
236
- - - ">"
236
+ - - ">="
237
237
  - !ruby/object:Gem::Version
238
- version: 1.3.1
238
+ version: '0'
239
239
  requirements: []
240
240
  rubyforge_project:
241
- rubygems_version: 2.4.5.2
241
+ rubygems_version: 2.5.1
242
242
  signing_key:
243
243
  specification_version: 4
244
244
  summary: Recurly API Client