gocardless_pro 2.55.0 → 2.56.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gocardless_pro/client.rb +11 -1
- data/lib/gocardless_pro/resources/logo.rb +38 -0
- data/lib/gocardless_pro/resources/payer_theme.rb +36 -0
- data/lib/gocardless_pro/services/logos_service.rb +48 -0
- data/lib/gocardless_pro/services/payer_themes_service.rb +49 -0
- data/lib/gocardless_pro/version.rb +1 -1
- data/lib/gocardless_pro.rb +6 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ff9a9f0905147eeb174b5e7d4ce029edc6f3b623525b8a23c18bed65964f95a
|
4
|
+
data.tar.gz: 9a8252e55308ecf44bd9b4c20dde80b34020dc1593ff56beb2301c0c34ac253f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b66fc420814c249b1f18280d9700c2dbd4f3953e2860f6a046c308e2ce11657ba9bcffed50d2925845a0f51996aa49d026b9d1ec1d51a6bcf8033b49bc187478
|
7
|
+
data.tar.gz: 7c4d56b3e7230598cfb3b2668c99e157fd168dbbcc60722dcbbaa87b2a807e54a791dbcaeb0d73a2cf9996ae3b64074cd27feaf438a990c8d83ba484c5378250
|
@@ -78,6 +78,11 @@ module GoCardlessPro
|
|
78
78
|
@institutions ||= Services::InstitutionsService.new(@api_service)
|
79
79
|
end
|
80
80
|
|
81
|
+
# Access to the service for logo to make API calls
|
82
|
+
def logos
|
83
|
+
@logos ||= Services::LogosService.new(@api_service)
|
84
|
+
end
|
85
|
+
|
81
86
|
# Access to the service for mandate to make API calls
|
82
87
|
def mandates
|
83
88
|
@mandates ||= Services::MandatesService.new(@api_service)
|
@@ -108,6 +113,11 @@ module GoCardlessPro
|
|
108
113
|
@payer_authorisations ||= Services::PayerAuthorisationsService.new(@api_service)
|
109
114
|
end
|
110
115
|
|
116
|
+
# Access to the service for payer_theme to make API calls
|
117
|
+
def payer_themes
|
118
|
+
@payer_themes ||= Services::PayerThemesService.new(@api_service)
|
119
|
+
end
|
120
|
+
|
111
121
|
# Access to the service for payment to make API calls
|
112
122
|
def payments
|
113
123
|
@payments ||= Services::PaymentsService.new(@api_service)
|
@@ -218,7 +228,7 @@ module GoCardlessPro
|
|
218
228
|
'User-Agent' => "#{user_agent}",
|
219
229
|
'Content-Type' => 'application/json',
|
220
230
|
'GoCardless-Client-Library' => 'gocardless-pro-ruby',
|
221
|
-
'GoCardless-Client-Version' => '2.
|
231
|
+
'GoCardless-Client-Version' => '2.56.0',
|
222
232
|
},
|
223
233
|
}
|
224
234
|
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
#
|
2
|
+
# This client is automatically generated from a template and JSON schema definition.
|
3
|
+
# See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
|
4
|
+
#
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
|
8
|
+
module GoCardlessPro
|
9
|
+
# A module containing classes for each of the resources in the GC Api
|
10
|
+
module Resources
|
11
|
+
# Represents an instance of a logo resource returned from the API
|
12
|
+
|
13
|
+
# Logos are image uploads that, when associated with a creditor, are shown
|
14
|
+
# on the [billing request flow](#billing-requests-billing-request-flows)
|
15
|
+
# payment pages.
|
16
|
+
class Logo
|
17
|
+
attr_reader :id
|
18
|
+
|
19
|
+
# Initialize a logo resource instance
|
20
|
+
# @param object [Hash] an object returned from the API
|
21
|
+
def initialize(object, response = nil)
|
22
|
+
@object = object
|
23
|
+
|
24
|
+
@id = object['id']
|
25
|
+
@response = response
|
26
|
+
end
|
27
|
+
|
28
|
+
def api_response
|
29
|
+
ApiResponse.new(@response)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Provides the logo resource as a hash of all its readable attributes
|
33
|
+
def to_h
|
34
|
+
@object
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
#
|
2
|
+
# This client is automatically generated from a template and JSON schema definition.
|
3
|
+
# See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
|
4
|
+
#
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
|
8
|
+
module GoCardlessPro
|
9
|
+
# A module containing classes for each of the resources in the GC Api
|
10
|
+
module Resources
|
11
|
+
# Represents an instance of a payer_theme resource returned from the API
|
12
|
+
|
13
|
+
# Custom colour themes for payment pages and customer notifications.
|
14
|
+
class PayerTheme
|
15
|
+
attr_reader :id
|
16
|
+
|
17
|
+
# Initialize a payer_theme resource instance
|
18
|
+
# @param object [Hash] an object returned from the API
|
19
|
+
def initialize(object, response = nil)
|
20
|
+
@object = object
|
21
|
+
|
22
|
+
@id = object['id']
|
23
|
+
@response = response
|
24
|
+
end
|
25
|
+
|
26
|
+
def api_response
|
27
|
+
ApiResponse.new(@response)
|
28
|
+
end
|
29
|
+
|
30
|
+
# Provides the payer_theme resource as a hash of all its readable attributes
|
31
|
+
def to_h
|
32
|
+
@object
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require_relative './base_service'
|
2
|
+
|
3
|
+
# encoding: utf-8
|
4
|
+
#
|
5
|
+
# This client is automatically generated from a template and JSON schema definition.
|
6
|
+
# See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
|
7
|
+
#
|
8
|
+
|
9
|
+
module GoCardlessPro
|
10
|
+
module Services
|
11
|
+
# Service for making requests to the Logo endpoints
|
12
|
+
class LogosService < BaseService
|
13
|
+
# Creates a new logo associated with a creditor. If a creditor already has a
|
14
|
+
# logo, this will update the existing logo linked to the creditor.
|
15
|
+
# Example URL: /branding/logos
|
16
|
+
# @param options [Hash] parameters as a hash, under a params key.
|
17
|
+
def create_for_creditor(options = {})
|
18
|
+
path = '/branding/logos'
|
19
|
+
|
20
|
+
params = options.delete(:params) || {}
|
21
|
+
options[:params] = {}
|
22
|
+
options[:params][envelope_key] = params
|
23
|
+
|
24
|
+
options[:retry_failures] = true
|
25
|
+
|
26
|
+
response = make_request(:post, path, options)
|
27
|
+
|
28
|
+
return if response.body.nil?
|
29
|
+
|
30
|
+
Resources::Logo.new(unenvelope_body(response.body), response)
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
# Unenvelope the response of the body using the service's `envelope_key`
|
36
|
+
#
|
37
|
+
# @param body [Hash]
|
38
|
+
def unenvelope_body(body)
|
39
|
+
body[envelope_key] || body['data']
|
40
|
+
end
|
41
|
+
|
42
|
+
# return the key which API responses will envelope data under
|
43
|
+
def envelope_key
|
44
|
+
'logos'
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require_relative './base_service'
|
2
|
+
|
3
|
+
# encoding: utf-8
|
4
|
+
#
|
5
|
+
# This client is automatically generated from a template and JSON schema definition.
|
6
|
+
# See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
|
7
|
+
#
|
8
|
+
|
9
|
+
module GoCardlessPro
|
10
|
+
module Services
|
11
|
+
# Service for making requests to the PayerTheme endpoints
|
12
|
+
class PayerThemesService < BaseService
|
13
|
+
# Creates a new payer theme associated with a creditor. If a creditor already
|
14
|
+
# has payer themes, this will update the existing payer theme linked to the
|
15
|
+
# creditor.
|
16
|
+
# Example URL: /branding/payer_themes
|
17
|
+
# @param options [Hash] parameters as a hash, under a params key.
|
18
|
+
def create_for_creditor(options = {})
|
19
|
+
path = '/branding/payer_themes'
|
20
|
+
|
21
|
+
params = options.delete(:params) || {}
|
22
|
+
options[:params] = {}
|
23
|
+
options[:params][envelope_key] = params
|
24
|
+
|
25
|
+
options[:retry_failures] = true
|
26
|
+
|
27
|
+
response = make_request(:post, path, options)
|
28
|
+
|
29
|
+
return if response.body.nil?
|
30
|
+
|
31
|
+
Resources::PayerTheme.new(unenvelope_body(response.body), response)
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
# Unenvelope the response of the body using the service's `envelope_key`
|
37
|
+
#
|
38
|
+
# @param body [Hash]
|
39
|
+
def unenvelope_body(body)
|
40
|
+
body[envelope_key] || body['data']
|
41
|
+
end
|
42
|
+
|
43
|
+
# return the key which API responses will envelope data under
|
44
|
+
def envelope_key
|
45
|
+
'payer_themes'
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
data/lib/gocardless_pro.rb
CHANGED
@@ -84,6 +84,9 @@ require_relative 'gocardless_pro/services/instalment_schedules_service'
|
|
84
84
|
require_relative 'gocardless_pro/resources/institution'
|
85
85
|
require_relative 'gocardless_pro/services/institutions_service'
|
86
86
|
|
87
|
+
require_relative 'gocardless_pro/resources/logo'
|
88
|
+
require_relative 'gocardless_pro/services/logos_service'
|
89
|
+
|
87
90
|
require_relative 'gocardless_pro/resources/mandate'
|
88
91
|
require_relative 'gocardless_pro/services/mandates_service'
|
89
92
|
|
@@ -102,6 +105,9 @@ require_relative 'gocardless_pro/services/negative_balance_limits_service'
|
|
102
105
|
require_relative 'gocardless_pro/resources/payer_authorisation'
|
103
106
|
require_relative 'gocardless_pro/services/payer_authorisations_service'
|
104
107
|
|
108
|
+
require_relative 'gocardless_pro/resources/payer_theme'
|
109
|
+
require_relative 'gocardless_pro/services/payer_themes_service'
|
110
|
+
|
105
111
|
require_relative 'gocardless_pro/resources/payment'
|
106
112
|
require_relative 'gocardless_pro/services/payments_service'
|
107
113
|
|
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.
|
4
|
+
version: 2.56.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GoCardless
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -127,12 +127,14 @@ files:
|
|
127
127
|
- lib/gocardless_pro/resources/event.rb
|
128
128
|
- lib/gocardless_pro/resources/instalment_schedule.rb
|
129
129
|
- lib/gocardless_pro/resources/institution.rb
|
130
|
+
- lib/gocardless_pro/resources/logo.rb
|
130
131
|
- lib/gocardless_pro/resources/mandate.rb
|
131
132
|
- lib/gocardless_pro/resources/mandate_import.rb
|
132
133
|
- lib/gocardless_pro/resources/mandate_import_entry.rb
|
133
134
|
- lib/gocardless_pro/resources/mandate_pdf.rb
|
134
135
|
- lib/gocardless_pro/resources/negative_balance_limit.rb
|
135
136
|
- lib/gocardless_pro/resources/payer_authorisation.rb
|
137
|
+
- lib/gocardless_pro/resources/payer_theme.rb
|
136
138
|
- lib/gocardless_pro/resources/payment.rb
|
137
139
|
- lib/gocardless_pro/resources/payout.rb
|
138
140
|
- lib/gocardless_pro/resources/payout_item.rb
|
@@ -162,12 +164,14 @@ files:
|
|
162
164
|
- lib/gocardless_pro/services/events_service.rb
|
163
165
|
- lib/gocardless_pro/services/instalment_schedules_service.rb
|
164
166
|
- lib/gocardless_pro/services/institutions_service.rb
|
167
|
+
- lib/gocardless_pro/services/logos_service.rb
|
165
168
|
- lib/gocardless_pro/services/mandate_import_entries_service.rb
|
166
169
|
- lib/gocardless_pro/services/mandate_imports_service.rb
|
167
170
|
- lib/gocardless_pro/services/mandate_pdfs_service.rb
|
168
171
|
- lib/gocardless_pro/services/mandates_service.rb
|
169
172
|
- lib/gocardless_pro/services/negative_balance_limits_service.rb
|
170
173
|
- lib/gocardless_pro/services/payer_authorisations_service.rb
|
174
|
+
- lib/gocardless_pro/services/payer_themes_service.rb
|
171
175
|
- lib/gocardless_pro/services/payments_service.rb
|
172
176
|
- lib/gocardless_pro/services/payout_items_service.rb
|
173
177
|
- lib/gocardless_pro/services/payouts_service.rb
|