recurly 2.17.11 → 2.18.0
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 +5 -5
- data/README.md +1 -1
- data/lib/recurly/account.rb +1 -0
- data/lib/recurly/adjustment.rb +1 -0
- data/lib/recurly/api.rb +1 -1
- data/lib/recurly/billing_info.rb +1 -0
- data/lib/recurly/invoice.rb +18 -2
- data/lib/recurly/juris_detail.rb +1 -0
- data/lib/recurly/purchase.rb +1 -0
- data/lib/recurly/subscription.rb +1 -0
- data/lib/recurly/tax_type.rb +1 -0
- data/lib/recurly/version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: fa3a6583aae99844185b0c2a98740596b4d5cf12
|
4
|
+
data.tar.gz: 3af828ab17994fa0ed0376c460bffa470b1eb2e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11bf511f85233e0d498dc1debae2c3611fab6260c83b5e8d12d84053acaaecaea1a2eb7172dcafaf20d7ebfd353c07418a214ec635add505214e59b69e16ae78
|
7
|
+
data.tar.gz: 92da77b27aaccf4e5b942e6b457ddeb4ee5e71c1b98b0eb8240892e888fbbe5453c570c953f6ff4a72ce00f4fa4650524e439b3b34dc4c639d2192ebe4ca0d6b
|
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.
|
17
|
+
gem 'recurly', '~> 2.18'
|
18
18
|
```
|
19
19
|
|
20
20
|
Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
|
data/lib/recurly/account.rb
CHANGED
data/lib/recurly/adjustment.rb
CHANGED
data/lib/recurly/api.rb
CHANGED
data/lib/recurly/billing_info.rb
CHANGED
@@ -35,6 +35,7 @@ module Recurly
|
|
35
35
|
gateway_code
|
36
36
|
fraud_session_id
|
37
37
|
three_d_secure_action_result_token_id
|
38
|
+
transaction_type
|
38
39
|
) | CREDIT_CARD_ATTRIBUTES | BANK_ACCOUNT_ATTRIBUTES | AMAZON_ATTRIBUTES | PAYPAL_ATTRIBUTES | ROKU_ATTRIBUTES
|
39
40
|
|
40
41
|
# @return ["credit_card", "paypal", "amazon", "bank_account", "roku", nil] The type of billing info.
|
data/lib/recurly/invoice.rb
CHANGED
@@ -109,6 +109,7 @@ module Recurly
|
|
109
109
|
dunning_events_count
|
110
110
|
final_dunning_event
|
111
111
|
gateway_code
|
112
|
+
surcharge_in_cents
|
112
113
|
)
|
113
114
|
alias to_param invoice_number_with_prefix
|
114
115
|
|
@@ -142,11 +143,20 @@ module Recurly
|
|
142
143
|
|
143
144
|
# Initiate a collection attempt on an invoice.
|
144
145
|
#
|
146
|
+
# @example
|
147
|
+
# # Optionally set transaction type
|
148
|
+
# invoice.force_collect(transaction_type: 'moto')
|
149
|
+
#
|
150
|
+
# @param options [Hash] Optional set of details to send to collect endpoint.
|
145
151
|
# @return [true, false] +true+ when successful, +false+ when unable to
|
146
152
|
# (e.g., the invoice is no longer open).
|
147
|
-
def force_collect
|
153
|
+
def force_collect(options = {})
|
148
154
|
return false unless link? :force_collect
|
149
|
-
|
155
|
+
http_opts = {}
|
156
|
+
if options[:transaction_type]
|
157
|
+
http_opts[:body] = transaction_type_xml(options[:transaction_type])
|
158
|
+
end
|
159
|
+
reload follow_link(:force_collect, http_opts)
|
150
160
|
true
|
151
161
|
end
|
152
162
|
|
@@ -266,6 +276,12 @@ module Recurly
|
|
266
276
|
builder.to_s
|
267
277
|
end
|
268
278
|
|
279
|
+
def transaction_type_xml(transaction_type)
|
280
|
+
builder = XML.new("<invoice/>")
|
281
|
+
builder.add_element 'transaction_type', transaction_type.to_s
|
282
|
+
builder.to_s
|
283
|
+
end
|
284
|
+
|
269
285
|
# Invoices are only writeable through {Account} instances.
|
270
286
|
embedded! true
|
271
287
|
undef destroy
|
data/lib/recurly/juris_detail.rb
CHANGED
data/lib/recurly/purchase.rb
CHANGED
data/lib/recurly/subscription.rb
CHANGED
data/lib/recurly/tax_type.rb
CHANGED
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.
|
4
|
+
version: 2.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -328,7 +328,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
328
328
|
version: '0'
|
329
329
|
requirements: []
|
330
330
|
rubyforge_project:
|
331
|
-
rubygems_version: 2.
|
331
|
+
rubygems_version: 2.6.14.4
|
332
332
|
signing_key:
|
333
333
|
specification_version: 4
|
334
334
|
summary: Recurly API Client
|