connect-sdk-ruby 4.3.0 → 4.4.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: 6eb70538d7cb572c35fca75c5d19fa3b7aa898aadf8303fed5f0b648e36ade87
4
- data.tar.gz: 709340e0e61f1a9421768407179b707321a2f883acadb97df052183798190aba
3
+ metadata.gz: 54c42ab6f26c971ce052daeaa9f77507e5e8a1834d02aafa1d6eaba990f6a9f3
4
+ data.tar.gz: 5acc6a35246e51484ef742b5f9c4c1da2adc494e62f0a3e56b764f2728b551a6
5
5
  SHA512:
6
- metadata.gz: 8ab8e6993d9472abc575763089c3a037911b0b71858ef75f3799f96e8d6f3e2e9e004622945eb9827844ee86d259f614b9ebef985db95d1fe8479b1a55866560
7
- data.tar.gz: dfcba9e5ea4755debd7b92d54d28198b25719f58b68f043a93c2ac461b1c6cb73e6af2bee9a0e69c810a03ab9373ea9a930950e7a504b374718df79b4ea62f7f
6
+ metadata.gz: 626b19b220d5c1c39783db5eddac52f29ec5935f5c235d9f6ad340a82b7340bbceb9becced95db34830c83d2d9b2a9ce2c59c8820b35fe7fa6e72a33915a295d
7
+ data.tar.gz: 6000f020d9ab11ed52955aeb042639a1a2b790b3c6b67e1df9f0fd698494be49229d500918f099cba0833051c65d805da41997935355d0d47df6b5a712a95539
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'connect-sdk-ruby'
3
- spec.version = '4.3.0'
3
+ spec.version = '4.4.0'
4
4
  spec.authors = ['Worldline Global Collect']
5
5
  spec.email = ['github.connect@worldline.com']
6
6
  spec.summary = %q{SDK to communicate with the Worldline Global Collect platform using the Worldline Connect Server API}
@@ -14,7 +14,7 @@ module Worldline
14
14
  class MetadataProvider
15
15
  private
16
16
 
17
- SDK_VERSION = '4.3.0'.freeze
17
+ SDK_VERSION = '4.4.0'.freeze
18
18
  SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'.freeze
19
19
  PROHIBITED_HEADERS = [SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key','Date', 'Content-Type', 'Authorization'].sort!.freeze
20
20
  CHARSET = 'utf-8'.freeze
@@ -51,10 +51,8 @@ module Worldline
51
51
  # If this Response does not contain a header with the given name, return _nil_ instead
52
52
  def self.get_disposition_filename(headers)
53
53
  header_value = get_header_value(headers, "Content-Disposition")
54
- unless header_value.nil?
55
- if header_value =~ /(?:^|;)\s*filename\s*=\s*(.*?)\s*(?:;|$)i/
56
- return trim_quotes($2)
57
- end
54
+ if !header_value.nil? && header_value =~ /(?:^|;)\s*filename\s*=\s*(.*?)\s*(?:;|$)i/
55
+ return trim_quotes($2)
58
56
  end
59
57
 
60
58
  return nil
@@ -65,11 +63,9 @@ module Worldline
65
63
  # Trims the single or double quotes at the beginning and end of parameter _filename_ if they exist
66
64
  # If they don't exist, it returns the original _filename_ instead
67
65
  def trim_quotes(filename)
68
- unless filename.length < 2
69
- if (filename.chars.first == '\'' && filename.chars.last == '\"') ||
70
- (filename.chars.first == '"' && filename.chars.last == '"')
71
- return filename[1...-1]
72
- end
66
+ if filename.length >= 2 &&
67
+ (filename.chars.first == '\'' && filename.chars.last == '\'') || (filename.chars.first == '"' && filename.chars.last == '"')
68
+ return filename[1...-1]
73
69
  end
74
70
  filename
75
71
  end
@@ -5,16 +5,20 @@
5
5
  require 'worldline/connect/sdk/domain/data_object'
6
6
  require 'worldline/connect/sdk/v1/domain/click_to_pay_configuration_mastercard'
7
7
  require 'worldline/connect/sdk/v1/domain/click_to_pay_configuration_visa'
8
+ require 'worldline/connect/sdk/v1/domain/click_to_pay_display_hints'
8
9
 
9
10
  module Worldline
10
11
  module Connect
11
12
  module SDK
12
13
  module V1
13
14
  module Domain
15
+ # @attr [Worldline::Connect::SDK::V1::Domain::ClickToPayDisplayHints] display_hints
14
16
  # @attr [Worldline::Connect::SDK::V1::Domain::ClickToPayConfigurationMastercard] mastercard
15
17
  # @attr [Worldline::Connect::SDK::V1::Domain::ClickToPayConfigurationVisa] visa
16
18
  class ClickToPayConfiguration < Worldline::Connect::SDK::Domain::DataObject
17
19
 
20
+ attr_accessor :display_hints
21
+
18
22
  attr_accessor :mastercard
19
23
 
20
24
  attr_accessor :visa
@@ -22,6 +26,7 @@ module Worldline
22
26
  # @return (Hash)
23
27
  def to_h
24
28
  hash = super
29
+ hash['displayHints'] = @display_hints.to_h unless @display_hints.nil?
25
30
  hash['mastercard'] = @mastercard.to_h unless @mastercard.nil?
26
31
  hash['visa'] = @visa.to_h unless @visa.nil?
27
32
  hash
@@ -29,6 +34,10 @@ module Worldline
29
34
 
30
35
  def from_hash(hash)
31
36
  super
37
+ if hash.has_key? 'displayHints'
38
+ raise TypeError, "value '%s' is not a Hash" % [hash['displayHints']] unless hash['displayHints'].is_a? Hash
39
+ @display_hints = Worldline::Connect::SDK::V1::Domain::ClickToPayDisplayHints.new_from_hash(hash['displayHints'])
40
+ end
32
41
  if hash.has_key? 'mastercard'
33
42
  raise TypeError, "value '%s' is not a Hash" % [hash['mastercard']] unless hash['mastercard'].is_a? Hash
34
43
  @mastercard = Worldline::Connect::SDK::V1::Domain::ClickToPayConfigurationMastercard.new_from_hash(hash['mastercard'])
@@ -0,0 +1,35 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://apireference.connect.worldline-solutions.com/
4
+ #
5
+ require 'worldline/connect/sdk/domain/data_object'
6
+
7
+ module Worldline
8
+ module Connect
9
+ module SDK
10
+ module V1
11
+ module Domain
12
+ # @attr [String] logo
13
+ class ClickToPayDisplayHints < Worldline::Connect::SDK::Domain::DataObject
14
+
15
+ attr_accessor :logo
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['logo'] = @logo unless @logo.nil?
21
+ hash
22
+ end
23
+
24
+ def from_hash(hash)
25
+ super
26
+ if hash.has_key? 'logo'
27
+ @logo = hash['logo']
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: connect-sdk-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.0
4
+ version: 4.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Worldline Global Collect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-02-11 00:00:00.000000000 Z
11
+ date: 2026-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient
@@ -368,6 +368,7 @@ files:
368
368
  - lib/worldline/connect/sdk/v1/domain/click_to_pay_configuration.rb
369
369
  - lib/worldline/connect/sdk/v1/domain/click_to_pay_configuration_mastercard.rb
370
370
  - lib/worldline/connect/sdk/v1/domain/click_to_pay_configuration_visa.rb
371
+ - lib/worldline/connect/sdk/v1/domain/click_to_pay_display_hints.rb
371
372
  - lib/worldline/connect/sdk/v1/domain/click_to_pay_scheme_configuration_base.rb
372
373
  - lib/worldline/connect/sdk/v1/domain/company_information.rb
373
374
  - lib/worldline/connect/sdk/v1/domain/complete_payment_card_payment_method_specific_input.rb