gocardless_pro 2.48.0 → 2.49.0

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: a259c52338d06dac655a59f69aba53fa2c590a039167d6f9cf66fc090f2c0589
4
- data.tar.gz: f73d29637aee11636991a04cf99f1c093c07128db249abb09d318e3c1b62d3bc
3
+ metadata.gz: 3769898443af6429937b0ea2201ef22e49dbf609287eea0be289f1a82a39cc2c
4
+ data.tar.gz: 50e8e8ed48d0874c01353f7b7e5cf2fe7241fbb499b31b72adf56a5bf0551c74
5
5
  SHA512:
6
- metadata.gz: 4c3feb1806b7381405e750632f25b2b2c45e9c0b5cdd668283bb3bfcfbfaba5400fe33542da56d91f932e9711d5e0cebbf60d17d1b18374d323b9b64121f6327
7
- data.tar.gz: d853bf591d92e942a91b5d0dff9d4f34d340cf7187ee55932ba0135c25d75a45bb5a7504ace21b2a8540fd42132f2ade3321d5c3c1be3b249d3f99d53a517b19
6
+ metadata.gz: a46c745378d7656f9ce5352d19f30f42b772f6abef2fd9fac47f2893a6308a13c813ffa649e5628f4d8ebb80867144a6402940eba94d0e17edc4eea89a903b5e
7
+ data.tar.gz: 30569d4cfe359df1622dca5490da2d0b17370c922b75c57149c737557f710326a36da762ebf6eba15309d53d9018d11dcb840037f68f0947658a493e1c09cbbe
data/README.md CHANGED
@@ -118,13 +118,13 @@ For POST and PUT requests you need to pass in the body in under the `params` key
118
118
 
119
119
  When creating a resource, the library will automatically include a randomly-generated
120
120
  [idempotency key](https://developer.gocardless.com/api-reference/#making-requests-idempotency-keys)
121
- - this means that if a request appears to fail but is in fact successful (for example due
121
+ - This means that if a request appears to fail but is in fact successful (for example due
122
122
  to a timeout), you will not end up creating multiple duplicates of the resource.
123
123
  - By default if a request results in an Idempotency Key conflict
124
124
  the library will make a second request and return the object that was
125
125
  originally created with the Idempotency Key. If you wish, you can instead configure
126
126
  the client to raise the conflict for you to handle. e.g
127
- ```
127
+ ```rb
128
128
  @client = GoCardlessPro::Client.new(
129
129
  access_token: ENV["GOCARDLESS_TOKEN"],
130
130
  on_idempotency_conflict: :raise,
@@ -213,7 +213,7 @@ module GoCardlessPro
213
213
  'User-Agent' => "#{user_agent}",
214
214
  'Content-Type' => 'application/json',
215
215
  'GoCardless-Client-Library' => 'gocardless-pro-ruby',
216
- 'GoCardless-Client-Version' => '2.48.0',
216
+ 'GoCardless-Client-Version' => '2.49.0',
217
217
  },
218
218
  }
219
219
  end
@@ -23,6 +23,7 @@ module GoCardlessPro
23
23
  attr_reader :details
24
24
  attr_reader :id
25
25
  attr_reader :metadata
26
+ attr_reader :resource_metadata
26
27
  attr_reader :resource_type
27
28
 
28
29
  # Initialize a event resource instance
@@ -37,6 +38,7 @@ module GoCardlessPro
37
38
  @id = object['id']
38
39
  @links = object['links']
39
40
  @metadata = object['metadata']
41
+ @resource_metadata = object['resource_metadata']
40
42
  @resource_type = object['resource_type']
41
43
  @response = response
42
44
  end
@@ -19,6 +19,7 @@ module GoCardlessPro
19
19
  attr_reader :authorisation_source
20
20
  attr_reader :consent_parameters
21
21
  attr_reader :created_at
22
+ attr_reader :funds_settlement
22
23
  attr_reader :id
23
24
  attr_reader :metadata
24
25
  attr_reader :next_possible_charge_date
@@ -36,6 +37,7 @@ module GoCardlessPro
36
37
  @authorisation_source = object['authorisation_source']
37
38
  @consent_parameters = object['consent_parameters']
38
39
  @created_at = object['created_at']
40
+ @funds_settlement = object['funds_settlement']
39
41
  @id = object['id']
40
42
  @links = object['links']
41
43
  @metadata = object['metadata']
@@ -65,6 +65,7 @@ module GoCardlessPro
65
65
 
66
66
  @created_at = object['created_at']
67
67
  @id = object['id']
68
+ @links = object['links']
68
69
  @scheme = object['scheme']
69
70
  @status = object['status']
70
71
  @response = response
@@ -74,10 +75,25 @@ module GoCardlessPro
74
75
  ApiResponse.new(@response)
75
76
  end
76
77
 
78
+ # Return the links that the resource has
79
+ def links
80
+ @mandate_import_links ||= Links.new(@links)
81
+ end
82
+
77
83
  # Provides the mandate_import resource as a hash of all its readable attributes
78
84
  def to_h
79
85
  @object
80
86
  end
87
+
88
+ class Links
89
+ def initialize(links)
90
+ @links = links || {}
91
+ end
92
+
93
+ def creditor
94
+ @links['creditor']
95
+ end
96
+ end
81
97
  end
82
98
  end
83
99
  end
@@ -16,27 +16,21 @@ module GoCardlessPro
16
16
  # changed on a per-creditor basis.
17
17
  #
18
18
  class NegativeBalanceLimit
19
- attr_reader :active
20
19
  attr_reader :balance_limit
21
20
  attr_reader :created_at
22
21
  attr_reader :currency
23
22
  attr_reader :id
24
- attr_reader :reason
25
- attr_reader :updated_at
26
23
 
27
24
  # Initialize a negative_balance_limit resource instance
28
25
  # @param object [Hash] an object returned from the API
29
26
  def initialize(object, response = nil)
30
27
  @object = object
31
28
 
32
- @active = object['active']
33
29
  @balance_limit = object['balance_limit']
34
30
  @created_at = object['created_at']
35
31
  @currency = object['currency']
36
32
  @id = object['id']
37
33
  @links = object['links']
38
- @reason = object['reason']
39
- @updated_at = object['updated_at']
40
34
  @response = response
41
35
  end
42
36
 
@@ -11,10 +11,9 @@ module GoCardlessPro
11
11
  # Represents an instance of a redirect_flow resource returned from the API
12
12
 
13
13
  # <p class="deprecated-notice"><strong>Deprecated</strong>: Redirect Flows
14
- # are our legacy APIs for setting up
15
- # mandates and will no longer be supported in the future. We strongly
16
- # recommend using the
17
- # [Billing Request flow](#billing-requests) instead.</p>
14
+ # are legacy APIs and cannot be used by new integrators.
15
+ # The [Billing Request flow](#billing-requests) API should be used for
16
+ # your payment flows.</p>
18
17
  #
19
18
  # Redirect flows enable you to use GoCardless' [hosted payment
20
19
  # pages](https://pay-sandbox.gocardless.com/AL000000AKFPFF) to set up
@@ -11,13 +11,6 @@ module GoCardlessPro
11
11
  # Service for making requests to the Institution endpoints
12
12
  class InstitutionsService < BaseService
13
13
  # Returns a list of supported institutions.
14
- #
15
- # <p class="deprecated-notice"><strong>Deprecated</strong>: This list
16
- # institutions endpoint
17
- # is no longer supported. We strongly recommend using the
18
- # [List Institutions For Billing
19
- # Request](#institutions-list-institutions-for-billing-request)
20
- # instead.</p>
21
14
  # Example URL: /institutions
22
15
  # @param options [Hash] parameters as a hash, under a params key.
23
16
  def list(options = {})
@@ -39,8 +39,9 @@ module GoCardlessPro
39
39
  ).enumerator
40
40
  end
41
41
 
42
- # Creates a new negative balance limit, which also deactivates the existing
43
- # limit (if present) for that currency and creditor combination.
42
+ # Creates a new negative balance limit, which replaces the existing limit (if
43
+ # present) for that currency and creditor combination.
44
+ #
44
45
  # Example URL: /negative_balance_limits
45
46
  # @param options [Hash] parameters as a hash, under a params key.
46
47
  def create(options = {})
@@ -105,8 +105,7 @@ module GoCardlessPro
105
105
  # through `transferred` and resubmits it to the banks, can be caused be
106
106
  # the UK's Current Account Switching Service (CASS) or when a customer
107
107
  # contacts GoCardless to change their bank details. It must start in the
108
- # `pending_submission` state. Only compatible with Bacs, SEPA and Autogiro
109
- # mandates.</li>
108
+ # `pending_submission` state. Only compatible with Bacs mandates.</li>
110
109
  # <li>`mandate_suspended_by_payer`: Transitions a mandate to
111
110
  # `suspended_by_payer`, as if payer has suspended the mandate after it has
112
111
  # been setup successfully. It must start in the `activated` state. Only
@@ -10,13 +10,15 @@ module GoCardlessPro
10
10
  module Services
11
11
  # Service for making requests to the SchemeIdentifier endpoints
12
12
  class SchemeIdentifiersService < BaseService
13
- # Creates a new scheme identifier. The scheme identifier must be
14
- # [applied to a creditor](#creditors-apply-a-scheme-identifier) before payments
15
- # are taken
16
- # using it. The scheme identifier must also have the `status` of active before
17
- # it can be
18
- # used. On Bacs, this will take 5 working days. On other schemes, this happens
19
- # instantly.
13
+ # Creates a new scheme identifier. The scheme identifier status will be
14
+ # `pending` while GoCardless is
15
+ # processing the request. Once the scheme identifier is ready to be used the
16
+ # status will be updated to `active`.
17
+ # At this point, GoCardless will emit a scheme identifier activated event via
18
+ # webhook to notify you of this change.
19
+ # In Bacs, it will take up to five working days for a scheme identifier to
20
+ # become active. On other schemes, including SEPA,
21
+ # this happens instantly.
20
22
  #
21
23
  # #### Scheme identifier name validations
22
24
  #
@@ -3,5 +3,5 @@ end
3
3
 
4
4
  module GoCardlessPro
5
5
  # Current version of the GC gem
6
- VERSION = '2.48.0'
6
+ VERSION = '2.49.0'
7
7
  end
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: 2.48.0
4
+ version: 2.49.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-17 00:00:00.000000000 Z
11
+ date: 2023-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday