processout 3.3.0 → 3.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: 75601257145ef1eb4375638b5ca39be8b73645409ab8a7cf25f1d8d6b65b58e1
4
- data.tar.gz: e23c62e04974f47300b5904bf3e3eb5a4d331c236a8e14696baca24e6784ee75
3
+ metadata.gz: 27dbfd6662a8d4871b474640909dfe014350c864f0b3d649e0c86362e1d2694a
4
+ data.tar.gz: baca0debeaea8e603ffa81810f643023a5b5e5347c7983d0e5c4f6a27386c514
5
5
  SHA512:
6
- metadata.gz: a6d3bfc576fcbb6b4789d12a5be1e70e5d5f6b9878f29dd5a34e26a83e1c6312b1360846cfca14fc42630d847aa9d329744515201cdc03b1f80fea136737f724
7
- data.tar.gz: f5d3980b0c3d7b859ece2d75f5c46af5a296582b08e38d81c53f36206a4251e76b6189e8f9869e46fba697c4694dc3d424b9b589b39f7f31978e5fbd813e2727
6
+ metadata.gz: 52e65edd6f92fdbe6e1cfbd3a4e68ab86ca991910272926a40524a28fc3787409dc8ae4bb58676f6aeee7397f725481dc88bdcf7af52368e312b4896b6070d0e
7
+ data.tar.gz: 4def781681112753e5911e005a275f9c29239e5cf356a47b1a08d4a4e7656bbd723cd800698d4b9221f4358bd1dcea5cef34582cf4837ac90f700ac37948bab8
@@ -9,6 +9,8 @@ module ProcessOut
9
9
  class Balances
10
10
 
11
11
  attr_reader :vouchers
12
+ attr_reader :available_balance
13
+ attr_reader :customer_action
12
14
 
13
15
 
14
16
  def vouchers=(val)
@@ -31,6 +33,38 @@ module ProcessOut
31
33
 
32
34
  end
33
35
 
36
+ def available_balance=(val)
37
+ if val.nil?
38
+ @available_balance = val
39
+ return
40
+ end
41
+
42
+ if val.instance_of? Balance
43
+ @available_balance = val
44
+ else
45
+ obj = Balance.new(@client)
46
+ obj.fill_with_data(val)
47
+ @available_balance = obj
48
+ end
49
+
50
+ end
51
+
52
+ def customer_action=(val)
53
+ if val.nil?
54
+ @customer_action = val
55
+ return
56
+ end
57
+
58
+ if val.instance_of? BalancesCustomerAction
59
+ @customer_action = val
60
+ else
61
+ obj = BalancesCustomerAction.new(@client)
62
+ obj.fill_with_data(val)
63
+ @customer_action = obj
64
+ end
65
+
66
+ end
67
+
34
68
 
35
69
  # Initializes the Balances object
36
70
  # Params:
@@ -40,6 +74,8 @@ module ProcessOut
40
74
  @client = client
41
75
 
42
76
  self.vouchers = data.fetch(:vouchers, nil)
77
+ self.available_balance = data.fetch(:available_balance, nil)
78
+ self.customer_action = data.fetch(:customer_action, nil)
43
79
 
44
80
  end
45
81
 
@@ -52,6 +88,8 @@ module ProcessOut
52
88
  def to_json(options)
53
89
  {
54
90
  "vouchers": self.vouchers,
91
+ "available_balance": self.available_balance,
92
+ "customer_action": self.customer_action,
55
93
  }.to_json
56
94
  end
57
95
 
@@ -65,6 +103,12 @@ module ProcessOut
65
103
  if data.include? "vouchers"
66
104
  self.vouchers = data["vouchers"]
67
105
  end
106
+ if data.include? "available_balance"
107
+ self.available_balance = data["available_balance"]
108
+ end
109
+ if data.include? "customer_action"
110
+ self.customer_action = data["customer_action"]
111
+ end
68
112
 
69
113
  self
70
114
  end
@@ -77,6 +121,8 @@ module ProcessOut
77
121
  return self
78
122
  end
79
123
  self.vouchers = data.fetch(:vouchers, self.vouchers)
124
+ self.available_balance = data.fetch(:available_balance, self.available_balance)
125
+ self.customer_action = data.fetch(:customer_action, self.customer_action)
80
126
 
81
127
  self
82
128
  end
@@ -0,0 +1,81 @@
1
+ # The content of this file was automatically generated
2
+
3
+ require "cgi"
4
+ require "json"
5
+ require "processout/networking/request"
6
+ require "processout/networking/response"
7
+
8
+ module ProcessOut
9
+ class BalancesCustomerAction
10
+
11
+ attr_reader :type
12
+ attr_reader :value
13
+
14
+
15
+ def type=(val)
16
+ @type = val
17
+ end
18
+
19
+ def value=(val)
20
+ @value = val
21
+ end
22
+
23
+
24
+ # Initializes the BalancesCustomerAction object
25
+ # Params:
26
+ # +client+:: +ProcessOut+ client instance
27
+ # +data+:: data that can be used to fill the object
28
+ def initialize(client, data = {})
29
+ @client = client
30
+
31
+ self.type = data.fetch(:type, nil)
32
+ self.value = data.fetch(:value, nil)
33
+
34
+ end
35
+
36
+ # Create a new BalancesCustomerAction using the current client
37
+ def new(data = {})
38
+ BalancesCustomerAction.new(@client, data)
39
+ end
40
+
41
+ # Overrides the JSON marshaller to only send the fields we want
42
+ def to_json(options)
43
+ {
44
+ "type": self.type,
45
+ "value": self.value,
46
+ }.to_json
47
+ end
48
+
49
+ # Fills the object with data coming from the API
50
+ # Params:
51
+ # +data+:: +Hash+ of data coming from the API
52
+ def fill_with_data(data)
53
+ if data.nil?
54
+ return self
55
+ end
56
+ if data.include? "type"
57
+ self.type = data["type"]
58
+ end
59
+ if data.include? "value"
60
+ self.value = data["value"]
61
+ end
62
+
63
+ self
64
+ end
65
+
66
+ # Prefills the object with the data passed as parameters
67
+ # Params:
68
+ # +data+:: +Hash+ of data
69
+ def prefill(data)
70
+ if data.nil?
71
+ return self
72
+ end
73
+ self.type = data.fetch(:type, self.type)
74
+ self.value = data.fetch(:value, self.value)
75
+
76
+ self
77
+ end
78
+
79
+
80
+ end
81
+ end
@@ -39,6 +39,7 @@ module ProcessOut
39
39
  attr_reader :created_at
40
40
  attr_reader :registered_at
41
41
  attr_reader :date_of_birth
42
+ attr_reader :reference_id
42
43
 
43
44
 
44
45
  def id=(val)
@@ -249,6 +250,10 @@ module ProcessOut
249
250
  @date_of_birth = val
250
251
  end
251
252
 
253
+ def reference_id=(val)
254
+ @reference_id = val
255
+ end
256
+
252
257
 
253
258
  # Initializes the Customer object
254
259
  # Params:
@@ -288,6 +293,7 @@ module ProcessOut
288
293
  self.created_at = data.fetch(:created_at, nil)
289
294
  self.registered_at = data.fetch(:registered_at, nil)
290
295
  self.date_of_birth = data.fetch(:date_of_birth, nil)
296
+ self.reference_id = data.fetch(:reference_id, nil)
291
297
 
292
298
  end
293
299
 
@@ -330,6 +336,7 @@ module ProcessOut
330
336
  "created_at": self.created_at,
331
337
  "registered_at": self.registered_at,
332
338
  "date_of_birth": self.date_of_birth,
339
+ "reference_id": self.reference_id,
333
340
  }.to_json
334
341
  end
335
342
 
@@ -433,6 +440,9 @@ module ProcessOut
433
440
  if data.include? "date_of_birth"
434
441
  self.date_of_birth = data["date_of_birth"]
435
442
  end
443
+ if data.include? "reference_id"
444
+ self.reference_id = data["reference_id"]
445
+ end
436
446
 
437
447
  self
438
448
  end
@@ -475,6 +485,7 @@ module ProcessOut
475
485
  self.created_at = data.fetch(:created_at, self.created_at)
476
486
  self.registered_at = data.fetch(:registered_at, self.registered_at)
477
487
  self.date_of_birth = data.fetch(:date_of_birth, self.date_of_birth)
488
+ self.reference_id = data.fetch(:reference_id, self.reference_id)
478
489
 
479
490
  self
480
491
  end
@@ -675,6 +686,7 @@ module ProcessOut
675
686
  "sex" => @sex,
676
687
  "metadata" => @metadata,
677
688
  "id" => @id,
689
+ "reference_id" => @reference_id,
678
690
  "registered_at" => @registered_at,
679
691
  "phone_number" => @phone_number
680
692
  }
@@ -59,6 +59,7 @@ module ProcessOut
59
59
  attr_reader :unsupported_feature_bypass
60
60
  attr_reader :verification
61
61
  attr_reader :auto_capture_at
62
+ attr_reader :reference_id
62
63
 
63
64
 
64
65
  def id=(val)
@@ -449,6 +450,10 @@ module ProcessOut
449
450
  @auto_capture_at = val
450
451
  end
451
452
 
453
+ def reference_id=(val)
454
+ @reference_id = val
455
+ end
456
+
452
457
 
453
458
  # Initializes the Invoice object
454
459
  # Params:
@@ -508,6 +513,7 @@ module ProcessOut
508
513
  self.unsupported_feature_bypass = data.fetch(:unsupported_feature_bypass, nil)
509
514
  self.verification = data.fetch(:verification, nil)
510
515
  self.auto_capture_at = data.fetch(:auto_capture_at, nil)
516
+ self.reference_id = data.fetch(:reference_id, nil)
511
517
 
512
518
  end
513
519
 
@@ -570,6 +576,7 @@ module ProcessOut
570
576
  "unsupported_feature_bypass": self.unsupported_feature_bypass,
571
577
  "verification": self.verification,
572
578
  "auto_capture_at": self.auto_capture_at,
579
+ "reference_id": self.reference_id,
573
580
  }.to_json
574
581
  end
575
582
 
@@ -733,6 +740,9 @@ module ProcessOut
733
740
  if data.include? "auto_capture_at"
734
741
  self.auto_capture_at = data["auto_capture_at"]
735
742
  end
743
+ if data.include? "reference_id"
744
+ self.reference_id = data["reference_id"]
745
+ end
736
746
 
737
747
  self
738
748
  end
@@ -795,6 +805,7 @@ module ProcessOut
795
805
  self.unsupported_feature_bypass = data.fetch(:unsupported_feature_bypass, self.unsupported_feature_bypass)
796
806
  self.verification = data.fetch(:verification, self.verification)
797
807
  self.auto_capture_at = data.fetch(:auto_capture_at, self.auto_capture_at)
808
+ self.reference_id = data.fetch(:reference_id, self.reference_id)
798
809
 
799
810
  self
800
811
  end
@@ -1163,6 +1174,7 @@ module ProcessOut
1163
1174
  "metadata" => @metadata,
1164
1175
  "details" => @details,
1165
1176
  "submerchant" => @submerchant,
1177
+ "reference_id" => @reference_id,
1166
1178
  "exemption_reason_3ds2" => @exemption_reason_3ds2,
1167
1179
  "sca_exemption_reason" => @sca_exemption_reason,
1168
1180
  "challenge_indicator" => @challenge_indicator,
@@ -13,7 +13,7 @@ module ProcessOut
13
13
  req.basic_auth @client.project_id, @client.project_secret
14
14
  req.content_type = "application/json"
15
15
  req["API-Version"] = "1.4.0.0"
16
- req["User-Agent"] = "ProcessOut Ruby-Bindings/3.3.0"
16
+ req["User-Agent"] = "ProcessOut Ruby-Bindings/3.4.0"
17
17
 
18
18
  unless options.nil?
19
19
  req["Idempotency-Key"] = options.fetch(:idempotency_key, "")
@@ -431,6 +431,7 @@ module ProcessOut
431
431
  "invoice_id" => @invoice_id,
432
432
  "manual_invoice_cancellation" => @manual_invoice_cancellation,
433
433
  "webhook_url" => @webhook_url,
434
+ "gateway_configuration_id" => @gateway_configuration_id,
434
435
  "source" => options.fetch(:source, nil),
435
436
  "settings" => options.fetch(:settings, nil),
436
437
  "device" => options.fetch(:device, nil),
@@ -476,7 +477,8 @@ module ProcessOut
476
477
  "verify_metadata" => options.fetch(:verify_metadata, nil),
477
478
  "set_default" => options.fetch(:set_default, nil),
478
479
  "verify_statement_descriptor" => options.fetch(:verify_statement_descriptor, nil),
479
- "invoice_return_url" => options.fetch(:invoice_return_url, nil)
480
+ "invoice_return_url" => options.fetch(:invoice_return_url, nil),
481
+ "gateway_configuration_id" => options.fetch(:gateway_configuration_id, nil)
480
482
  }
481
483
 
482
484
  response = Response.new(request.put(path, data, options))
@@ -1,3 +1,3 @@
1
1
  module ProcessOut
2
- VERSION = "3.3.0"
2
+ VERSION = "3.4.0"
3
3
  end
data/lib/processout.rb CHANGED
@@ -7,6 +7,7 @@ require "processout/apple_pay_alternative_merchant_certificates"
7
7
  require "processout/alternative_merchant_certificate"
8
8
  require "processout/balances"
9
9
  require "processout/balance"
10
+ require "processout/balances_customer_action"
10
11
  require "processout/card"
11
12
  require "processout/card_information"
12
13
  require "processout/phone"
@@ -64,11 +65,11 @@ require "processout/payment_data_three_ds_authentication"
64
65
  require "processout/transaction_operation"
65
66
  require "processout/webhook"
66
67
  require "processout/webhook_endpoint"
67
- require "processout/card_create_request"
68
68
  require "processout/device"
69
69
  require "processout/card_contact"
70
70
  require "processout/card_shipping"
71
71
  require "processout/card_update_request"
72
+ require "processout/card_create_request"
72
73
  require "processout/error_codes"
73
74
  require "processout/category_error_codes"
74
75
  require "processout/external_three_ds"
@@ -122,6 +123,11 @@ module ProcessOut
122
123
  obj = Balance.new(self, data)
123
124
  end
124
125
 
126
+ # Create a new BalancesCustomerAction instance
127
+ def balances_customer_action(data = {})
128
+ obj = BalancesCustomerAction.new(self, data)
129
+ end
130
+
125
131
  # Create a new Card instance
126
132
  def card(data = {})
127
133
  obj = Card.new(self, data)
@@ -407,11 +413,6 @@ module ProcessOut
407
413
  obj = WebhookEndpoint.new(self, data)
408
414
  end
409
415
 
410
- # Create a new CardCreateRequest instance
411
- def card_create_request(data = {})
412
- obj = CardCreateRequest.new(self, data)
413
- end
414
-
415
416
  # Create a new Device instance
416
417
  def device(data = {})
417
418
  obj = Device.new(self, data)
@@ -432,6 +433,11 @@ module ProcessOut
432
433
  obj = CardUpdateRequest.new(self, data)
433
434
  end
434
435
 
436
+ # Create a new CardCreateRequest instance
437
+ def card_create_request(data = {})
438
+ obj = CardCreateRequest.new(self, data)
439
+ end
440
+
435
441
  # Create a new ErrorCodes instance
436
442
  def error_codes(data = {})
437
443
  obj = ErrorCodes.new(self, data)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: processout
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel HUEZ
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-04-14 00:00:00.000000000 Z
11
+ date: 2025-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -81,6 +81,7 @@ files:
81
81
  - lib/processout/apple_pay_alternative_merchant_certificates.rb
82
82
  - lib/processout/balance.rb
83
83
  - lib/processout/balances.rb
84
+ - lib/processout/balances_customer_action.rb
84
85
  - lib/processout/card.rb
85
86
  - lib/processout/card_contact.rb
86
87
  - lib/processout/card_create_request.rb