gocardless_pro 3.1.0 → 3.2.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d491b212bf75a7f70a1191be6b0d7d94eb4fb6cfd2d319047d62d0e2e9adf94b
|
4
|
+
data.tar.gz: e473a9b05df7ec6b70e48f2b426a7fae6585ed0c919a3963d91431d6fe5bd4a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b605624bcbbace950cf6ad9c4558a0b06abc9da731c85e934645716918cd9b9b9a5b25649e7a3e9fab57d8ca38f4facb8a221276062a1671e168eaff294d94e6
|
7
|
+
data.tar.gz: eeb013ab2a0278f9f56ccb437b0f61107d7afdbdbb9670a58aff1c6afea7086b319f9a349996401d64c68281c9be743a27d1e1e7318d6ae0a6681325e438a6d1
|
@@ -233,7 +233,7 @@ module GoCardlessPro
|
|
233
233
|
'User-Agent' => "#{user_agent}",
|
234
234
|
'Content-Type' => 'application/json',
|
235
235
|
'GoCardless-Client-Library' => 'gocardless-pro-ruby',
|
236
|
-
'GoCardless-Client-Version' => '3.
|
236
|
+
'GoCardless-Client-Version' => '3.2.0'
|
237
237
|
}
|
238
238
|
}
|
239
239
|
end
|
@@ -41,7 +41,7 @@ module GoCardlessPro
|
|
41
41
|
# href="mailto:help@gocardless.com">get in touch</a> if you would like to
|
42
42
|
# use this API.</p>
|
43
43
|
class MandateImportEntry
|
44
|
-
attr_reader :created_at, :record_identifier
|
44
|
+
attr_reader :created_at, :processing_errors, :record_identifier
|
45
45
|
|
46
46
|
# Initialize a mandate_import_entry resource instance
|
47
47
|
# @param object [Hash] an object returned from the API
|
@@ -50,6 +50,7 @@ module GoCardlessPro
|
|
50
50
|
|
51
51
|
@created_at = object['created_at']
|
52
52
|
@links = object['links']
|
53
|
+
@processing_errors = object['processing_errors']
|
53
54
|
@record_identifier = object['record_identifier']
|
54
55
|
@response = response
|
55
56
|
end
|
@@ -11,8 +11,7 @@ module GoCardlessPro
|
|
11
11
|
# Service for making requests to the BillingRequest endpoints
|
12
12
|
class BillingRequestsService < BaseService
|
13
13
|
# <p class="notice"><strong>Important</strong>: All properties associated with
|
14
|
-
# `subscription_request`
|
15
|
-
# for ACH and PAD schemes.</p>
|
14
|
+
# `subscription_request` are only supported for ACH and PAD schemes.</p>
|
16
15
|
# Example URL: /billing_requests
|
17
16
|
# @param options [Hash] parameters as a hash, under a params key.
|
18
17
|
def create(options = {})
|
@@ -47,6 +46,78 @@ module GoCardlessPro
|
|
47
46
|
Resources::BillingRequest.new(unenvelope_body(response.body), response)
|
48
47
|
end
|
49
48
|
|
49
|
+
# <p class="notice"><strong>Important</strong>: All properties associated with
|
50
|
+
# `instalment_schedule_request` are only supported for ACH and PAD schemes.</p>
|
51
|
+
# Example URL: /billing_requests
|
52
|
+
# @param options [Hash] parameters as a hash, under a params key.
|
53
|
+
def create_with_instalments_with_dates(options = {})
|
54
|
+
path = '/billing_requests'
|
55
|
+
|
56
|
+
params = options.delete(:params) || {}
|
57
|
+
options[:params] = {}
|
58
|
+
options[:params][envelope_key] = params
|
59
|
+
|
60
|
+
options[:retry_failures] = true
|
61
|
+
|
62
|
+
begin
|
63
|
+
response = make_request(:post, path, options)
|
64
|
+
|
65
|
+
# Response doesn't raise any errors until #body is called
|
66
|
+
response.tap(&:body)
|
67
|
+
rescue InvalidStateError => e
|
68
|
+
if e.idempotent_creation_conflict?
|
69
|
+
case @api_service.on_idempotency_conflict
|
70
|
+
when :raise
|
71
|
+
raise IdempotencyConflict, e.error
|
72
|
+
when :fetch
|
73
|
+
return get(e.conflicting_resource_id)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
raise e
|
78
|
+
end
|
79
|
+
|
80
|
+
return if response.body.nil?
|
81
|
+
|
82
|
+
Resources::BillingRequest.new(unenvelope_body(response.body), response)
|
83
|
+
end
|
84
|
+
|
85
|
+
# <p class="notice"><strong>Important</strong>: All properties associated with
|
86
|
+
# `instalment_schedule_request` are only supported for ACH and PAD schemes.</p>
|
87
|
+
# Example URL: /billing_requests
|
88
|
+
# @param options [Hash] parameters as a hash, under a params key.
|
89
|
+
def create_with_instalments_with_schedule(options = {})
|
90
|
+
path = '/billing_requests'
|
91
|
+
|
92
|
+
params = options.delete(:params) || {}
|
93
|
+
options[:params] = {}
|
94
|
+
options[:params][envelope_key] = params
|
95
|
+
|
96
|
+
options[:retry_failures] = true
|
97
|
+
|
98
|
+
begin
|
99
|
+
response = make_request(:post, path, options)
|
100
|
+
|
101
|
+
# Response doesn't raise any errors until #body is called
|
102
|
+
response.tap(&:body)
|
103
|
+
rescue InvalidStateError => e
|
104
|
+
if e.idempotent_creation_conflict?
|
105
|
+
case @api_service.on_idempotency_conflict
|
106
|
+
when :raise
|
107
|
+
raise IdempotencyConflict, e.error
|
108
|
+
when :fetch
|
109
|
+
return get(e.conflicting_resource_id)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
raise e
|
114
|
+
end
|
115
|
+
|
116
|
+
return if response.body.nil?
|
117
|
+
|
118
|
+
Resources::BillingRequest.new(unenvelope_body(response.body), response)
|
119
|
+
end
|
120
|
+
|
50
121
|
# If the billing request has a pending <code>collect_customer_details</code>
|
51
122
|
# action, this endpoint can be used to collect the details in order to
|
52
123
|
# complete it.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gocardless_pro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GoCardless
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -86,7 +86,7 @@ dependencies:
|
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: 0.9.11
|
89
|
-
description:
|
89
|
+
description:
|
90
90
|
email:
|
91
91
|
- engineering@gocardless.com
|
92
92
|
executables: []
|
@@ -192,7 +192,7 @@ homepage: https://github.com/gocardless/gocardless-pro-ruby
|
|
192
192
|
licenses:
|
193
193
|
- MIT
|
194
194
|
metadata: {}
|
195
|
-
post_install_message:
|
195
|
+
post_install_message:
|
196
196
|
rdoc_options: []
|
197
197
|
require_paths:
|
198
198
|
- lib
|
@@ -208,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
208
208
|
version: '0'
|
209
209
|
requirements: []
|
210
210
|
rubygems_version: 3.4.19
|
211
|
-
signing_key:
|
211
|
+
signing_key:
|
212
212
|
specification_version: 4
|
213
213
|
summary: A gem for calling the GoCardless Pro API
|
214
214
|
test_files: []
|