processout 2.19.0 → 2.21.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: f065ffc8b4c4906b9e43a303634ff8b7616bca300ea665d96467505d88c3bc9f
4
- data.tar.gz: a44221558588b9c1708c1af5762b8bca9635302bd4c07b479dab254552d0f9bc
3
+ metadata.gz: eab8012a5585d533bf5b9ddba812e23fcc0a1de9081a992b1871b6361b190487
4
+ data.tar.gz: e57cd04556c21199e5be55a7604c349f8d9583cdd36e5c441cdb729ac3eb46a4
5
5
  SHA512:
6
- metadata.gz: f4c560759d1c4a0fa15f026a13023844f3e8b0d60e2dfc4e2fc8f06fc8f671463d9825d03b22b64ab941ffa15a3c593e30207d92d612455c45fef1364f3acc24
7
- data.tar.gz: 0751fb06011fa6d53dbe37f34263bd28a5f29906a6cb7ce1a265ef130b8af7bc45fca555d05680f51a0a175e110c651b1e0cca11374ce31b46702c9d00e7a824
6
+ metadata.gz: b75bf519d613c6da0aa5ce1a47556ea51ae3b5d3fc064fe87f77fe0304dc5babf2755c964e8ff020b9ad9a6cbe95cdc361481ed7ddbf0e339cf9cae896cdc172
7
+ data.tar.gz: 74c03c16febf369638017bd719a96b2263cb265a8b287ede45444aa6d5121ea5ca58d8f0cbfff887272076a6e6cec901ef55c209981ed5131b830a94a2e56edd
@@ -89,6 +89,27 @@ module ProcessOut
89
89
  return_values[0]
90
90
  end
91
91
 
92
+ # Delete a given alternative merchant certificate
93
+ # Params:
94
+ # +options+:: +Hash+ of options
95
+ def delete(options = {})
96
+ self.prefill(options)
97
+
98
+ request = Request.new(@client)
99
+ path = "/projects/applepay/alternative-merchant-certificates/" + CGI.escape(@id) + ""
100
+ data = {
101
+
102
+ }
103
+
104
+ response = Response.new(request.delete(path, data, options))
105
+ return_values = Array.new
106
+
107
+ return_values.push(response.success)
108
+
109
+
110
+ return_values[0]
111
+ end
112
+
92
113
 
93
114
  end
94
115
  end
@@ -8,9 +8,14 @@ require "processout/networking/response"
8
8
  module ProcessOut
9
9
  class ApplePayAlternativeMerchantCertificates
10
10
 
11
+ attr_reader :count
11
12
  attr_reader :alternative_merchant_certificates
12
13
 
13
14
 
15
+ def count=(val)
16
+ @count = val
17
+ end
18
+
14
19
  def alternative_merchant_certificates=(val)
15
20
  if val.nil?
16
21
  @alternative_merchant_certificates = []
@@ -39,6 +44,7 @@ module ProcessOut
39
44
  def initialize(client, data = {})
40
45
  @client = client
41
46
 
47
+ self.count = data.fetch(:count, nil)
42
48
  self.alternative_merchant_certificates = data.fetch(:alternative_merchant_certificates, nil)
43
49
 
44
50
  end
@@ -51,6 +57,7 @@ module ProcessOut
51
57
  # Overrides the JSON marshaller to only send the fields we want
52
58
  def to_json(options)
53
59
  {
60
+ "count": self.count,
54
61
  "alternative_merchant_certificates": self.alternative_merchant_certificates,
55
62
  }.to_json
56
63
  end
@@ -62,6 +69,9 @@ module ProcessOut
62
69
  if data.nil?
63
70
  return self
64
71
  end
72
+ if data.include? "count"
73
+ self.count = data["count"]
74
+ end
65
75
  if data.include? "alternative_merchant_certificates"
66
76
  self.alternative_merchant_certificates = data["alternative_merchant_certificates"]
67
77
  end
@@ -76,6 +86,7 @@ module ProcessOut
76
86
  if data.nil?
77
87
  return self
78
88
  end
89
+ self.count = data.fetch(:count, self.count)
79
90
  self.alternative_merchant_certificates = data.fetch(:alternative_merchant_certificates, self.alternative_merchant_certificates)
80
91
 
81
92
  self
@@ -10,6 +10,7 @@ module ProcessOut
10
10
 
11
11
  attr_reader :amount
12
12
  attr_reader :currency
13
+ attr_reader :expiry
13
14
 
14
15
 
15
16
  def amount=(val)
@@ -20,6 +21,10 @@ module ProcessOut
20
21
  @currency = val
21
22
  end
22
23
 
24
+ def expiry=(val)
25
+ @expiry = val
26
+ end
27
+
23
28
 
24
29
  # Initializes the Balance object
25
30
  # Params:
@@ -30,6 +35,7 @@ module ProcessOut
30
35
 
31
36
  self.amount = data.fetch(:amount, nil)
32
37
  self.currency = data.fetch(:currency, nil)
38
+ self.expiry = data.fetch(:expiry, nil)
33
39
 
34
40
  end
35
41
 
@@ -43,6 +49,7 @@ module ProcessOut
43
49
  {
44
50
  "amount": self.amount,
45
51
  "currency": self.currency,
52
+ "expiry": self.expiry,
46
53
  }.to_json
47
54
  end
48
55
 
@@ -59,6 +66,9 @@ module ProcessOut
59
66
  if data.include? "currency"
60
67
  self.currency = data["currency"]
61
68
  end
69
+ if data.include? "expiry"
70
+ self.expiry = data["expiry"]
71
+ end
62
72
 
63
73
  self
64
74
  end
@@ -72,6 +82,7 @@ module ProcessOut
72
82
  end
73
83
  self.amount = data.fetch(:amount, self.amount)
74
84
  self.currency = data.fetch(:currency, self.currency)
85
+ self.expiry = data.fetch(:expiry, self.expiry)
75
86
 
76
87
  self
77
88
  end
@@ -47,6 +47,9 @@ module ProcessOut
47
47
  attr_reader :challenge_indicator
48
48
  attr_reader :incremental
49
49
  attr_reader :tax
50
+ attr_reader :payment_type
51
+ attr_reader :initiation_type
52
+ attr_reader :payment_intent
50
53
 
51
54
 
52
55
  def id=(val)
@@ -341,6 +344,18 @@ module ProcessOut
341
344
 
342
345
  end
343
346
 
347
+ def payment_type=(val)
348
+ @payment_type = val
349
+ end
350
+
351
+ def initiation_type=(val)
352
+ @initiation_type = val
353
+ end
354
+
355
+ def payment_intent=(val)
356
+ @payment_intent = val
357
+ end
358
+
344
359
 
345
360
  # Initializes the Invoice object
346
361
  # Params:
@@ -388,6 +403,9 @@ module ProcessOut
388
403
  self.challenge_indicator = data.fetch(:challenge_indicator, nil)
389
404
  self.incremental = data.fetch(:incremental, nil)
390
405
  self.tax = data.fetch(:tax, nil)
406
+ self.payment_type = data.fetch(:payment_type, nil)
407
+ self.initiation_type = data.fetch(:initiation_type, nil)
408
+ self.payment_intent = data.fetch(:payment_intent, nil)
391
409
 
392
410
  end
393
411
 
@@ -438,6 +456,9 @@ module ProcessOut
438
456
  "challenge_indicator": self.challenge_indicator,
439
457
  "incremental": self.incremental,
440
458
  "tax": self.tax,
459
+ "payment_type": self.payment_type,
460
+ "initiation_type": self.initiation_type,
461
+ "payment_intent": self.payment_intent,
441
462
  }.to_json
442
463
  end
443
464
 
@@ -565,6 +586,15 @@ module ProcessOut
565
586
  if data.include? "tax"
566
587
  self.tax = data["tax"]
567
588
  end
589
+ if data.include? "payment_type"
590
+ self.payment_type = data["payment_type"]
591
+ end
592
+ if data.include? "initiation_type"
593
+ self.initiation_type = data["initiation_type"]
594
+ end
595
+ if data.include? "payment_intent"
596
+ self.payment_intent = data["payment_intent"]
597
+ end
568
598
 
569
599
  self
570
600
  end
@@ -615,6 +645,9 @@ module ProcessOut
615
645
  self.challenge_indicator = data.fetch(:challenge_indicator, self.challenge_indicator)
616
646
  self.incremental = data.fetch(:incremental, self.incremental)
617
647
  self.tax = data.fetch(:tax, self.tax)
648
+ self.payment_type = data.fetch(:payment_type, self.payment_type)
649
+ self.initiation_type = data.fetch(:initiation_type, self.initiation_type)
650
+ self.payment_intent = data.fetch(:payment_intent, self.payment_intent)
618
651
 
619
652
  self
620
653
  end
@@ -629,6 +662,7 @@ module ProcessOut
629
662
  request = Request.new(@client)
630
663
  path = "/invoices/" + CGI.escape(@id) + "/increment_authorization"
631
664
  data = {
665
+ "metadata" => options.fetch(:metadata, nil),
632
666
  "amount" => amount
633
667
  }
634
668
 
@@ -661,6 +695,7 @@ module ProcessOut
661
695
  "capture_amount" => options.fetch(:capture_amount, nil),
662
696
  "enable_three_d_s_2" => options.fetch(:enable_three_d_s_2, nil),
663
697
  "auto_capture_at" => options.fetch(:auto_capture_at, nil),
698
+ "metadata" => options.fetch(:metadata, nil),
664
699
  "source" => source
665
700
  }
666
701
 
@@ -694,6 +729,7 @@ module ProcessOut
694
729
  "capture_amount" => options.fetch(:capture_amount, nil),
695
730
  "auto_capture_at" => options.fetch(:auto_capture_at, nil),
696
731
  "enable_three_d_s_2" => options.fetch(:enable_three_d_s_2, nil),
732
+ "metadata" => options.fetch(:metadata, nil),
697
733
  "source" => source
698
734
  }
699
735
 
@@ -817,7 +853,7 @@ module ProcessOut
817
853
  request = Request.new(@client)
818
854
  path = "/invoices/" + CGI.escape(@id) + "/void"
819
855
  data = {
820
-
856
+ "metadata" => options.fetch(:metadata, nil)
821
857
  }
822
858
 
823
859
  response = Response.new(request.post(path, data, options))
@@ -882,6 +918,8 @@ module ProcessOut
882
918
  "challenge_indicator" => @challenge_indicator,
883
919
  "gateway_data" => @gateway_data,
884
920
  "merchant_initiator_type" => @merchant_initiator_type,
921
+ "initiation_type" => @initiation_type,
922
+ "payment_intent" => @payment_intent,
885
923
  "statement_descriptor" => @statement_descriptor,
886
924
  "statement_descriptor_phone" => @statement_descriptor_phone,
887
925
  "statement_descriptor_city" => @statement_descriptor_city,
@@ -895,7 +933,8 @@ module ProcessOut
895
933
  "device" => @device,
896
934
  "require_backend_capture" => @require_backend_capture,
897
935
  "external_fraud_tools" => @external_fraud_tools,
898
- "tax" => @tax
936
+ "tax" => @tax,
937
+ "payment_type" => @payment_type
899
938
  }
900
939
 
901
940
  response = Response.new(request.post(path, data, options))
@@ -20,6 +20,7 @@ module ProcessOut
20
20
  attr_reader :zip
21
21
  attr_reader :phone_number
22
22
  attr_reader :expects_shipping_at
23
+ attr_reader :relay_store_name
23
24
 
24
25
 
25
26
  def amount=(val)
@@ -70,6 +71,10 @@ module ProcessOut
70
71
  @expects_shipping_at = val
71
72
  end
72
73
 
74
+ def relay_store_name=(val)
75
+ @relay_store_name = val
76
+ end
77
+
73
78
 
74
79
  # Initializes the InvoiceShipping object
75
80
  # Params:
@@ -90,6 +95,7 @@ module ProcessOut
90
95
  self.zip = data.fetch(:zip, nil)
91
96
  self.phone_number = data.fetch(:phone_number, nil)
92
97
  self.expects_shipping_at = data.fetch(:expects_shipping_at, nil)
98
+ self.relay_store_name = data.fetch(:relay_store_name, nil)
93
99
 
94
100
  end
95
101
 
@@ -113,6 +119,7 @@ module ProcessOut
113
119
  "zip": self.zip,
114
120
  "phone_number": self.phone_number,
115
121
  "expects_shipping_at": self.expects_shipping_at,
122
+ "relay_store_name": self.relay_store_name,
116
123
  }.to_json
117
124
  end
118
125
 
@@ -159,6 +166,9 @@ module ProcessOut
159
166
  if data.include? "expects_shipping_at"
160
167
  self.expects_shipping_at = data["expects_shipping_at"]
161
168
  end
169
+ if data.include? "relay_store_name"
170
+ self.relay_store_name = data["relay_store_name"]
171
+ end
162
172
 
163
173
  self
164
174
  end
@@ -182,6 +192,7 @@ module ProcessOut
182
192
  self.zip = data.fetch(:zip, self.zip)
183
193
  self.phone_number = data.fetch(:phone_number, self.phone_number)
184
194
  self.expects_shipping_at = data.fetch(:expects_shipping_at, self.expects_shipping_at)
195
+ self.relay_store_name = data.fetch(:relay_store_name, self.relay_store_name)
185
196
 
186
197
  self
187
198
  end
@@ -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/2.19.0"
16
+ req["User-Agent"] = "ProcessOut Ruby-Bindings/2.21.0"
17
17
 
18
18
  unless options.nil?
19
19
  req["Idempotency-Key"] = options.fetch(:idempotency_key, "")
@@ -257,10 +257,10 @@ module ProcessOut
257
257
  path = "/transactions/" + CGI.escape(@transaction_id) + "/refunds"
258
258
  data = {
259
259
  "amount" => @amount,
260
- "metadata" => @metadata,
261
260
  "reason" => @reason,
262
261
  "information" => @information,
263
- "invoice_detail_ids" => @invoice_detail_ids
262
+ "invoice_detail_ids" => @invoice_detail_ids,
263
+ "metadata" => options.fetch(:metadata, nil)
264
264
  }
265
265
 
266
266
  response = Response.new(request.post(path, data, options))
@@ -1,3 +1,3 @@
1
1
  module ProcessOut
2
- VERSION = "2.19.0"
2
+ VERSION = "2.21.0"
3
3
  end
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: 2.19.0
4
+ version: 2.21.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: 2022-04-08 00:00:00.000000000 Z
11
+ date: 2023-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  - !ruby/object:Gem::Version
142
142
  version: '0'
143
143
  requirements: []
144
- rubygems_version: 3.0.3
144
+ rubygems_version: 3.0.3.1
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: Ruby bindings for the ProcessOut API