recurly 2.18.18 → 2.18.19
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/README.md +1 -1
- data/lib/recurly/account.rb +19 -0
- data/lib/recurly/billing_info.rb +3 -0
- data/lib/recurly/invoice.rb +4 -0
- data/lib/recurly/purchase.rb +4 -0
- data/lib/recurly/subscription.rb +6 -5
- data/lib/recurly/version.rb +1 -1
- metadata +5 -87
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ac56d6049b53eb2c114df18605fe133df332a509acf3af2cfccffa5214b8f3e8
|
|
4
|
+
data.tar.gz: 19b49d89780da52cefe3c957ef0feee12c3cc751e40be0c7caf6280726e1a569
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e3cdaecdc4f14781d7a90a446e29e801b794ebd6e2d33d97bdecf6bcc503da995d9d5d90c92d5e5f3e57e87233fb7a9d2c4621fe84182c584512cc7158985bba
|
|
7
|
+
data.tar.gz: 9bb12a7e753efc7628b8200660a7f1f1748baa0abc4b95caff5c257d6855af5731bfe7c7d0492c55500e0281a71d4a565b3c6450a6309d8e9af8e6afc04bc01b
|
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.18.
|
|
17
|
+
gem 'recurly', '~> 2.18.19'
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
|
data/lib/recurly/account.rb
CHANGED
|
@@ -124,6 +124,25 @@ module Recurly
|
|
|
124
124
|
raise Invalid, e.message
|
|
125
125
|
end
|
|
126
126
|
|
|
127
|
+
def create_billing_info(billing_info)
|
|
128
|
+
billing_info = billing_info
|
|
129
|
+
billing_info.uri = "#{path}/billing_infos"
|
|
130
|
+
billing_info.save!
|
|
131
|
+
billing_info
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
def get_billing_infos
|
|
135
|
+
Pager.new(Recurly::BillingInfo, uri: "#{path}/billing_infos", parent: self)
|
|
136
|
+
rescue Recurly::API::UnprocessableEntity => e
|
|
137
|
+
raise Invalid, e.message
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
def get_billing_info(billing_info_uuid)
|
|
141
|
+
BillingInfo.from_response API.get("#{path}/billing_infos/#{billing_info_uuid}")
|
|
142
|
+
rescue Recurly::API::UnprocessableEntity => e
|
|
143
|
+
raise Invalid, e.message
|
|
144
|
+
end
|
|
145
|
+
|
|
127
146
|
# Reopen an account.
|
|
128
147
|
#
|
|
129
148
|
# @return [true, false] +true+ when successful, +false+ when unable to
|
data/lib/recurly/billing_info.rb
CHANGED
|
@@ -16,6 +16,7 @@ module Recurly
|
|
|
16
16
|
belongs_to :account
|
|
17
17
|
|
|
18
18
|
define_attribute_methods %w(
|
|
19
|
+
uuid
|
|
19
20
|
first_name
|
|
20
21
|
last_name
|
|
21
22
|
company
|
|
@@ -42,6 +43,8 @@ module Recurly
|
|
|
42
43
|
mandate_reference
|
|
43
44
|
tax_identifier
|
|
44
45
|
tax_identifier_type
|
|
46
|
+
primary_payment_method
|
|
47
|
+
backup_payment_method
|
|
45
48
|
) | CREDIT_CARD_ATTRIBUTES | BANK_ACCOUNT_ATTRIBUTES | AMAZON_ATTRIBUTES | PAYPAL_ATTRIBUTES | ROKU_ATTRIBUTES | SEPA_ATTRIBUTES | BACS_ATTRIBUTES | BECS_ATTRIBUTES
|
|
46
49
|
|
|
47
50
|
# Verify an account's stored billing info
|
data/lib/recurly/invoice.rb
CHANGED
|
@@ -51,6 +51,9 @@ module Recurly
|
|
|
51
51
|
# @return [Invoice, nil]
|
|
52
52
|
has_one :original_invoice, class_name: :Invoice, readonly: true
|
|
53
53
|
|
|
54
|
+
# @return [BillingInfo, nil]
|
|
55
|
+
has_one :billing_info, class_name: :BillingInfo, readonly: true
|
|
56
|
+
|
|
54
57
|
# Returns the first redemption in the Invoice's redemptions.
|
|
55
58
|
# This was placed here for backwards compatibility when we went from
|
|
56
59
|
# having a single redemption per invoice to multiple redemptions per invoice.
|
|
@@ -111,6 +114,7 @@ module Recurly
|
|
|
111
114
|
gateway_code
|
|
112
115
|
surcharge_in_cents
|
|
113
116
|
tax_details
|
|
117
|
+
billing_info_uuid
|
|
114
118
|
)
|
|
115
119
|
alias to_param invoice_number_with_prefix
|
|
116
120
|
|
data/lib/recurly/purchase.rb
CHANGED
|
@@ -128,6 +128,9 @@ module Recurly
|
|
|
128
128
|
# @return [[ShippingFee], nil]
|
|
129
129
|
has_many :shipping_fees, class_name: :ShippingFee, readonly: false
|
|
130
130
|
|
|
131
|
+
# @return [BillingInfo, nil]
|
|
132
|
+
has_one :billing_info, class_name: :BillingInfo, readonly: true
|
|
133
|
+
|
|
131
134
|
define_attribute_methods %w(
|
|
132
135
|
currency
|
|
133
136
|
collection_method
|
|
@@ -140,6 +143,7 @@ module Recurly
|
|
|
140
143
|
shipping_address_id
|
|
141
144
|
gateway_code
|
|
142
145
|
transaction_type
|
|
146
|
+
billing_info_uuid
|
|
143
147
|
)
|
|
144
148
|
|
|
145
149
|
class << self
|
data/lib/recurly/subscription.rb
CHANGED
|
@@ -85,6 +85,7 @@ module Recurly
|
|
|
85
85
|
timeframe
|
|
86
86
|
started_with_gift
|
|
87
87
|
converted_at
|
|
88
|
+
billing_info_uuid
|
|
88
89
|
no_billing_info_reason
|
|
89
90
|
imported_trial
|
|
90
91
|
credit_customer_notes
|
|
@@ -176,7 +177,7 @@ module Recurly
|
|
|
176
177
|
|
|
177
178
|
# Convert free trial to paid subscription when transaction_type is "moto"
|
|
178
179
|
# which stands for "Mail Order Telephone Order".
|
|
179
|
-
#
|
|
180
|
+
#
|
|
180
181
|
# @return true
|
|
181
182
|
def convert_trial_moto()
|
|
182
183
|
builder = XML.new("<subscription/>")
|
|
@@ -186,8 +187,8 @@ module Recurly
|
|
|
186
187
|
end
|
|
187
188
|
|
|
188
189
|
# Convert free trial to paid subscription. Optionally uses a 3ds token.
|
|
189
|
-
#
|
|
190
|
-
# @param three_d_secure_action_result_token_id [String] three_d_secure_action_result_token_id
|
|
190
|
+
#
|
|
191
|
+
# @param three_d_secure_action_result_token_id [String] three_d_secure_action_result_token_id
|
|
191
192
|
# returned by Recurly.js referencing the result of the 3DS authentication for PSD2
|
|
192
193
|
# @return true when payment is accepted
|
|
193
194
|
def convert_trial(three_d_secure_action_result_token_id = nil)
|
|
@@ -198,8 +199,8 @@ module Recurly
|
|
|
198
199
|
billing_info.add_element('three_d_secure_action_result_token_id', three_d_secure_action_result_token_id)
|
|
199
200
|
builder.to_s
|
|
200
201
|
end
|
|
201
|
-
|
|
202
|
-
reload API.put("#{uri}/convert_trial", body)
|
|
202
|
+
|
|
203
|
+
reload API.put("#{uri}/convert_trial", body)
|
|
203
204
|
true
|
|
204
205
|
end
|
|
205
206
|
|
data/lib/recurly/version.rb
CHANGED
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.18.
|
|
4
|
+
version: 2.18.19
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Recurly
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-04-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|
|
@@ -118,88 +118,6 @@ dependencies:
|
|
|
118
118
|
- - "~>"
|
|
119
119
|
- !ruby/object:Gem::Version
|
|
120
120
|
version: '0'
|
|
121
|
-
- !ruby/object:Gem::Dependency
|
|
122
|
-
name: yard
|
|
123
|
-
requirement: !ruby/object:Gem::Requirement
|
|
124
|
-
requirements:
|
|
125
|
-
- - "~>"
|
|
126
|
-
- !ruby/object:Gem::Version
|
|
127
|
-
version: 0.9.9
|
|
128
|
-
type: :development
|
|
129
|
-
prerelease: false
|
|
130
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
131
|
-
requirements:
|
|
132
|
-
- - "~>"
|
|
133
|
-
- !ruby/object:Gem::Version
|
|
134
|
-
version: 0.9.9
|
|
135
|
-
- !ruby/object:Gem::Dependency
|
|
136
|
-
name: redcarpet
|
|
137
|
-
requirement: !ruby/object:Gem::Requirement
|
|
138
|
-
requirements:
|
|
139
|
-
- - ">="
|
|
140
|
-
- !ruby/object:Gem::Version
|
|
141
|
-
version: 3.4.0
|
|
142
|
-
- - "~>"
|
|
143
|
-
- !ruby/object:Gem::Version
|
|
144
|
-
version: '3.4'
|
|
145
|
-
type: :development
|
|
146
|
-
prerelease: false
|
|
147
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
148
|
-
requirements:
|
|
149
|
-
- - ">="
|
|
150
|
-
- !ruby/object:Gem::Version
|
|
151
|
-
version: 3.4.0
|
|
152
|
-
- - "~>"
|
|
153
|
-
- !ruby/object:Gem::Version
|
|
154
|
-
version: '3.4'
|
|
155
|
-
- !ruby/object:Gem::Dependency
|
|
156
|
-
name: racc
|
|
157
|
-
requirement: !ruby/object:Gem::Requirement
|
|
158
|
-
requirements:
|
|
159
|
-
- - "~>"
|
|
160
|
-
- !ruby/object:Gem::Version
|
|
161
|
-
version: '1'
|
|
162
|
-
type: :development
|
|
163
|
-
prerelease: false
|
|
164
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
165
|
-
requirements:
|
|
166
|
-
- - "~>"
|
|
167
|
-
- !ruby/object:Gem::Version
|
|
168
|
-
version: '1'
|
|
169
|
-
- !ruby/object:Gem::Dependency
|
|
170
|
-
name: pry
|
|
171
|
-
requirement: !ruby/object:Gem::Requirement
|
|
172
|
-
requirements:
|
|
173
|
-
- - ">="
|
|
174
|
-
- !ruby/object:Gem::Version
|
|
175
|
-
version: 0.9.10
|
|
176
|
-
- - "<"
|
|
177
|
-
- !ruby/object:Gem::Version
|
|
178
|
-
version: 0.11.0
|
|
179
|
-
type: :development
|
|
180
|
-
prerelease: false
|
|
181
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
182
|
-
requirements:
|
|
183
|
-
- - ">="
|
|
184
|
-
- !ruby/object:Gem::Version
|
|
185
|
-
version: 0.9.10
|
|
186
|
-
- - "<"
|
|
187
|
-
- !ruby/object:Gem::Version
|
|
188
|
-
version: 0.11.0
|
|
189
|
-
- !ruby/object:Gem::Dependency
|
|
190
|
-
name: pry-nav
|
|
191
|
-
requirement: !ruby/object:Gem::Requirement
|
|
192
|
-
requirements:
|
|
193
|
-
- - "~>"
|
|
194
|
-
- !ruby/object:Gem::Version
|
|
195
|
-
version: 0.2.4
|
|
196
|
-
type: :development
|
|
197
|
-
prerelease: false
|
|
198
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
199
|
-
requirements:
|
|
200
|
-
- - "~>"
|
|
201
|
-
- !ruby/object:Gem::Version
|
|
202
|
-
version: 0.2.4
|
|
203
121
|
description: 'An API client library for Recurly: https://recurly.com'
|
|
204
122
|
email: support@recurly.com
|
|
205
123
|
executables: []
|
|
@@ -332,7 +250,7 @@ homepage: https://github.com/recurly/recurly-client-ruby
|
|
|
332
250
|
licenses:
|
|
333
251
|
- MIT
|
|
334
252
|
metadata: {}
|
|
335
|
-
post_install_message:
|
|
253
|
+
post_install_message:
|
|
336
254
|
rdoc_options:
|
|
337
255
|
- "--main"
|
|
338
256
|
- README.md
|
|
@@ -350,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
350
268
|
version: '0'
|
|
351
269
|
requirements: []
|
|
352
270
|
rubygems_version: 3.0.3
|
|
353
|
-
signing_key:
|
|
271
|
+
signing_key:
|
|
354
272
|
specification_version: 4
|
|
355
273
|
summary: Recurly API Client
|
|
356
274
|
test_files: []
|