recurly 2.17.1 → 2.17.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af034077b30e3eb275c880063b1fb538b3eaa47d8505cc890c2cbd9962beed56
4
- data.tar.gz: 4b9352c55f04379e26f11e9f465b0c66de0c60a61307c2f801e1c500e23cc8c5
3
+ metadata.gz: 4752c14e472ced10529d8bd2b493f2e5c03a8a9a9e33db8ca91d3a57fcdfa52c
4
+ data.tar.gz: 6bdbd5104e69776143a28399bdb39b4eb937ddaf346569dce5fac8f6b968f828
5
5
  SHA512:
6
- metadata.gz: d415dc2552689e41bd0c79b1dc87aac8461aa86c21bd84fd3d026ef8828cad8189972b3d0a5e72ec63fa09ac01af7000fcf460a0dc73db0786ee7b4972c596d1
7
- data.tar.gz: 41e2a66fcded4b0715d50616f54b727233ac8368c955b47ab0ebf1252dd03864806bcae2e8b7477aed85e82d0c07fceb2583c54a434d83c632a98307eed21305
6
+ metadata.gz: 7c7290821641b06e6abef950254bef9a0cc923d5946283b30490e04e15d262d3ba3a70cf7262edaf8a56ee663541f3cf651bb902d89d7a5a19099c132760b1cd
7
+ data.tar.gz: 733eb8f8276930da52a17bd7db9257ba4254da05e34246273bf7b353cb99aa748de24fde6515d66f59d3d53734568b49cb476754987299333edb928f9ad4d391
data/README.md CHANGED
@@ -22,20 +22,15 @@ speed boost) if it's available and loaded in your app's environment.
22
22
 
23
23
  ## Configuration
24
24
 
25
- If you're using Rails, you can generate an initializer with the following
26
- command:
27
-
28
- ``` bash
29
- $ rails g recurly:config
30
- ```
31
-
32
- If you're not using Rails, use the following template:
25
+ Use the following template to configure Recurly:
33
26
 
34
27
  ``` ruby
35
28
  Recurly.subdomain = ENV['RECURLY_SUBDOMAIN']
36
29
  Recurly.api_key = ENV['RECURLY_API_KEY']
37
30
  ```
38
31
 
32
+ > Note: In Rails, these would be added in an initializer `config/initializers/recurly.rb`.
33
+
39
34
  Configure the client library with
40
35
  [your API credentials](https://app.recurly.com/go/developer/api_access).
41
36
 
@@ -64,6 +64,8 @@ module Recurly
64
64
  first_name
65
65
  last_name
66
66
  company_name
67
+ company
68
+ phone
67
69
  accept_language
68
70
  hosted_login_token
69
71
  vat_number
@@ -83,6 +85,7 @@ module Recurly
83
85
  preferred_locale
84
86
  )
85
87
  alias to_param account_code
88
+ alias company_name company
86
89
 
87
90
  # Creates an invoice from the pending charges on the account.
88
91
  # Raises an error if it fails.
@@ -17,7 +17,7 @@ module Recurly
17
17
  @@base_uri = "https://api.recurly.com/v2/"
18
18
  @@valid_domains = [".recurly.com"]
19
19
 
20
- RECURLY_API_VERSION = '2.15'
20
+ RECURLY_API_VERSION = '2.16'
21
21
 
22
22
  FORMATS = Helper.hash_with_indifferent_read_access(
23
23
  'pdf' => 'application/pdf',
@@ -47,6 +47,8 @@ module Recurly
47
47
  def xml
48
48
  @xml ||= begin
49
49
  XML.new(response.body) if response and response.body and not response.body.empty?
50
+ rescue Recurly::XML::ParseError
51
+ nil
50
52
  end
51
53
  end
52
54
  end
@@ -12,10 +12,14 @@ module Recurly
12
12
  define_attribute_methods %w(
13
13
  action
14
14
  amount_in_cents
15
+ applied_to_invoice_number
15
16
  currency
16
17
  created_at
17
18
  original_credit_payment
19
+ original_credit_payment_uuid
20
+ original_invoice_number
18
21
  refund_transaction
22
+ refund_transaction_uuid
19
23
  updated_at
20
24
  uuid
21
25
  voided_at
@@ -30,6 +30,9 @@ module Recurly
30
30
  unit_amount_in_cents
31
31
  updated_at
32
32
  canceled_at
33
+ gifter_account_code
34
+ recipient_account_code
35
+ invoice_number
33
36
  )
34
37
  alias to_param id
35
38
 
@@ -104,6 +104,10 @@ module Recurly
104
104
  origin
105
105
  credit_customer_notes
106
106
  refund_method
107
+ subscription_id
108
+ subscription_ids
109
+ dunning_events_count
110
+ final_dunning_event
107
111
  )
108
112
  alias to_param invoice_number_with_prefix
109
113
 
@@ -88,7 +88,6 @@ module Recurly
88
88
  # @raise [API::NotModified] If the <tt>:etag</tt> option is set and
89
89
  # matches the server's.
90
90
  def initialize resource_class, options = {}
91
- options[:cursor] &&= options[:cursor].to_i
92
91
  @parent = options.delete :parent
93
92
  @uri = options.delete :uri
94
93
  @etag = options.delete :etag
@@ -14,8 +14,12 @@ module Recurly
14
14
  phone
15
15
  nickname
16
16
  company
17
+ company_name
17
18
  email
18
19
  geo_code
20
+ vat_number
21
+ street1
22
+ street2
19
23
  )
20
24
  alias to_param address1
21
25
  end
@@ -92,6 +92,8 @@ module Recurly
92
92
  next_bill_date
93
93
  current_term_started_at
94
94
  current_term_ends_at
95
+ total_amount_in_cents
96
+ resume_at
95
97
  )
96
98
  alias to_param uuid
97
99
 
@@ -40,6 +40,7 @@ module Recurly
40
40
  cvv_result
41
41
  avs_result
42
42
  avs_result_street
43
+ avs_result_postal
43
44
  created_at
44
45
  updated_at
45
46
  details
@@ -57,6 +58,18 @@ module Recurly
57
58
  origin
58
59
  message
59
60
  approval_code
61
+ date
62
+ gateway
63
+ gateway_error_codes
64
+ invoice_id
65
+ invoice_number
66
+ invoice_number_prefix
67
+ failure_type
68
+ billing_phone
69
+ billing_postal
70
+ billing_country
71
+ subscription_id
72
+ manually_entered
60
73
  )
61
74
  alias to_param uuid
62
75
  alias fraud_info fraud
@@ -15,6 +15,10 @@ module Recurly
15
15
  billed_at
16
16
  created_at
17
17
  updated_at
18
+ subscription_id
19
+ add_on_code
20
+ measured_unit_id
21
+ modified_at
18
22
  )
19
23
 
20
24
  # Usages are only writeable and readable through {SubscriptionAddOns} instances.
@@ -2,7 +2,7 @@ module Recurly
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 17
5
- PATCH = 1
5
+ PATCH = 2
6
6
  PRE = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
@@ -1,5 +1,7 @@
1
1
  module Recurly
2
2
  class XML
3
+ ParseError = Class.new(StandardError)
4
+
3
5
  class << self
4
6
  def cast(el)
5
7
  # return nil if the `nil` attribute is present
@@ -2,7 +2,9 @@ module Recurly
2
2
  class XML
3
3
  module NokogiriAdapter
4
4
  def initialize xml
5
- @root = Nokogiri(xml).root
5
+ @root = Nokogiri::XML(xml) { |config| config.strict }.root
6
+ rescue Nokogiri::XML::SyntaxError
7
+ raise ParseError
6
8
  end
7
9
 
8
10
  def add_element name, value = nil
@@ -5,6 +5,8 @@ module Recurly
5
5
  module REXMLAdapter
6
6
  def initialize xml
7
7
  @root = ::REXML::Document.new(xml).root
8
+ rescue REXML::ParseException
9
+ raise ParseError
8
10
  end
9
11
 
10
12
  def add_element name, value = nil
metadata CHANGED
@@ -1,20 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recurly
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.17.1
4
+ version: 2.17.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-25 00:00:00.000000000 Z
11
+ date: 2018-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.8'
20
+ - - ">="
18
21
  - !ruby/object:Gem::Version
19
22
  version: 1.8.2
20
23
  type: :development
@@ -22,6 +25,9 @@ dependencies:
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.8'
30
+ - - ">="
25
31
  - !ruby/object:Gem::Version
26
32
  version: 1.8.2
27
33
  - !ruby/object:Gem::Dependency
@@ -43,6 +49,9 @@ dependencies:
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
51
  - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '5.8'
54
+ - - ">="
46
55
  - !ruby/object:Gem::Version
47
56
  version: 5.8.0
48
57
  type: :development
@@ -50,6 +59,9 @@ dependencies:
50
59
  version_requirements: !ruby/object:Gem::Requirement
51
60
  requirements:
52
61
  - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: '5.8'
64
+ - - ">="
53
65
  - !ruby/object:Gem::Version
54
66
  version: 5.8.0
55
67
  - !ruby/object:Gem::Dependency
@@ -57,6 +69,9 @@ dependencies:
57
69
  requirement: !ruby/object:Gem::Requirement
58
70
  requirements:
59
71
  - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: '2.4'
74
+ - - ">="
60
75
  - !ruby/object:Gem::Version
61
76
  version: 2.4.0
62
77
  type: :development
@@ -64,6 +79,9 @@ dependencies:
64
79
  version_requirements: !ruby/object:Gem::Requirement
65
80
  requirements:
66
81
  - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '2.4'
84
+ - - ">="
67
85
  - !ruby/object:Gem::Version
68
86
  version: 2.4.0
69
87
  - !ruby/object:Gem::Dependency
@@ -71,6 +89,9 @@ dependencies:
71
89
  requirement: !ruby/object:Gem::Requirement
72
90
  requirements:
73
91
  - - "~>"
92
+ - !ruby/object:Gem::Version
93
+ version: '2.3'
94
+ - - ">="
74
95
  - !ruby/object:Gem::Version
75
96
  version: 2.3.2
76
97
  type: :development
@@ -78,20 +99,23 @@ dependencies:
78
99
  version_requirements: !ruby/object:Gem::Requirement
79
100
  requirements:
80
101
  - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '2.3'
104
+ - - ">="
81
105
  - !ruby/object:Gem::Version
82
106
  version: 2.3.2
83
107
  - !ruby/object:Gem::Dependency
84
108
  name: simplecov
85
109
  requirement: !ruby/object:Gem::Requirement
86
110
  requirements:
87
- - - ">="
111
+ - - "~>"
88
112
  - !ruby/object:Gem::Version
89
113
  version: '0'
90
114
  type: :development
91
115
  prerelease: false
92
116
  version_requirements: !ruby/object:Gem::Requirement
93
117
  requirements:
94
- - - ">="
118
+ - - "~>"
95
119
  - !ruby/object:Gem::Version
96
120
  version: '0'
97
121
  - !ruby/object:Gem::Dependency
@@ -112,42 +136,48 @@ dependencies:
112
136
  name: redcarpet
113
137
  requirement: !ruby/object:Gem::Requirement
114
138
  requirements:
139
+ - - "~>"
140
+ - !ruby/object:Gem::Version
141
+ version: '3.4'
115
142
  - - ">="
116
143
  - !ruby/object:Gem::Version
117
- version: '0'
144
+ version: 3.4.0
118
145
  type: :development
119
146
  prerelease: false
120
147
  version_requirements: !ruby/object:Gem::Requirement
121
148
  requirements:
149
+ - - "~>"
150
+ - !ruby/object:Gem::Version
151
+ version: '3.4'
122
152
  - - ">="
123
153
  - !ruby/object:Gem::Version
124
- version: '0'
154
+ version: 3.4.0
125
155
  - !ruby/object:Gem::Dependency
126
156
  name: racc
127
157
  requirement: !ruby/object:Gem::Requirement
128
158
  requirements:
129
- - - ">="
159
+ - - "~>"
130
160
  - !ruby/object:Gem::Version
131
- version: '0'
161
+ version: '1'
132
162
  type: :development
133
163
  prerelease: false
134
164
  version_requirements: !ruby/object:Gem::Requirement
135
165
  requirements:
136
- - - ">="
166
+ - - "~>"
137
167
  - !ruby/object:Gem::Version
138
- version: '0'
168
+ version: '1'
139
169
  - !ruby/object:Gem::Dependency
140
170
  name: pry
141
171
  requirement: !ruby/object:Gem::Requirement
142
172
  requirements:
143
- - - ">="
173
+ - - "~>"
144
174
  - !ruby/object:Gem::Version
145
175
  version: '0'
146
176
  type: :development
147
177
  prerelease: false
148
178
  version_requirements: !ruby/object:Gem::Requirement
149
179
  requirements:
150
- - - ">="
180
+ - - "~>"
151
181
  - !ruby/object:Gem::Version
152
182
  version: '0'
153
183
  description: 'An API client library for Recurly: https://recurly.com'