processout 3.2.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 +4 -4
- data/lib/processout/balances.rb +46 -0
- data/lib/processout/balances_customer_action.rb +81 -0
- data/lib/processout/customer.rb +12 -0
- data/lib/processout/invoice.rb +36 -0
- data/lib/processout/invoice_submerchant.rb +182 -0
- data/lib/processout/networking/request.rb +1 -1
- data/lib/processout/submerchant_address.rb +136 -0
- data/lib/processout/submerchant_phone_number.rb +81 -0
- data/lib/processout/token.rb +15 -1
- data/lib/processout/version.rb +1 -1
- data/lib/processout.rb +30 -6
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27dbfd6662a8d4871b474640909dfe014350c864f0b3d649e0c86362e1d2694a
|
4
|
+
data.tar.gz: baca0debeaea8e603ffa81810f643023a5b5e5347c7983d0e5c4f6a27386c514
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52e65edd6f92fdbe6e1cfbd3a4e68ab86ca991910272926a40524a28fc3787409dc8ae4bb58676f6aeee7397f725481dc88bdcf7af52368e312b4896b6070d0e
|
7
|
+
data.tar.gz: 4def781681112753e5911e005a275f9c29239e5cf356a47b1a08d4a4e7656bbd723cd800698d4b9221f4358bd1dcea5cef34582cf4837ac90f700ac37948bab8
|
data/lib/processout/balances.rb
CHANGED
@@ -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
|
data/lib/processout/customer.rb
CHANGED
@@ -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
|
}
|
data/lib/processout/invoice.rb
CHANGED
@@ -20,6 +20,7 @@ module ProcessOut
|
|
20
20
|
attr_reader :token
|
21
21
|
attr_reader :token_id
|
22
22
|
attr_reader :details
|
23
|
+
attr_reader :submerchant
|
23
24
|
attr_reader :url
|
24
25
|
attr_reader :url_qrcode
|
25
26
|
attr_reader :name
|
@@ -58,6 +59,7 @@ module ProcessOut
|
|
58
59
|
attr_reader :unsupported_feature_bypass
|
59
60
|
attr_reader :verification
|
60
61
|
attr_reader :auto_capture_at
|
62
|
+
attr_reader :reference_id
|
61
63
|
|
62
64
|
|
63
65
|
def id=(val)
|
@@ -184,6 +186,22 @@ module ProcessOut
|
|
184
186
|
|
185
187
|
end
|
186
188
|
|
189
|
+
def submerchant=(val)
|
190
|
+
if val.nil?
|
191
|
+
@submerchant = val
|
192
|
+
return
|
193
|
+
end
|
194
|
+
|
195
|
+
if val.instance_of? InvoiceSubmerchant
|
196
|
+
@submerchant = val
|
197
|
+
else
|
198
|
+
obj = InvoiceSubmerchant.new(@client)
|
199
|
+
obj.fill_with_data(val)
|
200
|
+
@submerchant = obj
|
201
|
+
end
|
202
|
+
|
203
|
+
end
|
204
|
+
|
187
205
|
def url=(val)
|
188
206
|
@url = val
|
189
207
|
end
|
@@ -432,6 +450,10 @@ module ProcessOut
|
|
432
450
|
@auto_capture_at = val
|
433
451
|
end
|
434
452
|
|
453
|
+
def reference_id=(val)
|
454
|
+
@reference_id = val
|
455
|
+
end
|
456
|
+
|
435
457
|
|
436
458
|
# Initializes the Invoice object
|
437
459
|
# Params:
|
@@ -452,6 +474,7 @@ module ProcessOut
|
|
452
474
|
self.token = data.fetch(:token, nil)
|
453
475
|
self.token_id = data.fetch(:token_id, nil)
|
454
476
|
self.details = data.fetch(:details, nil)
|
477
|
+
self.submerchant = data.fetch(:submerchant, nil)
|
455
478
|
self.url = data.fetch(:url, nil)
|
456
479
|
self.url_qrcode = data.fetch(:url_qrcode, nil)
|
457
480
|
self.name = data.fetch(:name, nil)
|
@@ -490,6 +513,7 @@ module ProcessOut
|
|
490
513
|
self.unsupported_feature_bypass = data.fetch(:unsupported_feature_bypass, nil)
|
491
514
|
self.verification = data.fetch(:verification, nil)
|
492
515
|
self.auto_capture_at = data.fetch(:auto_capture_at, nil)
|
516
|
+
self.reference_id = data.fetch(:reference_id, nil)
|
493
517
|
|
494
518
|
end
|
495
519
|
|
@@ -513,6 +537,7 @@ module ProcessOut
|
|
513
537
|
"token": self.token,
|
514
538
|
"token_id": self.token_id,
|
515
539
|
"details": self.details,
|
540
|
+
"submerchant": self.submerchant,
|
516
541
|
"url": self.url,
|
517
542
|
"url_qrcode": self.url_qrcode,
|
518
543
|
"name": self.name,
|
@@ -551,6 +576,7 @@ module ProcessOut
|
|
551
576
|
"unsupported_feature_bypass": self.unsupported_feature_bypass,
|
552
577
|
"verification": self.verification,
|
553
578
|
"auto_capture_at": self.auto_capture_at,
|
579
|
+
"reference_id": self.reference_id,
|
554
580
|
}.to_json
|
555
581
|
end
|
556
582
|
|
@@ -597,6 +623,9 @@ module ProcessOut
|
|
597
623
|
if data.include? "details"
|
598
624
|
self.details = data["details"]
|
599
625
|
end
|
626
|
+
if data.include? "submerchant"
|
627
|
+
self.submerchant = data["submerchant"]
|
628
|
+
end
|
600
629
|
if data.include? "url"
|
601
630
|
self.url = data["url"]
|
602
631
|
end
|
@@ -711,6 +740,9 @@ module ProcessOut
|
|
711
740
|
if data.include? "auto_capture_at"
|
712
741
|
self.auto_capture_at = data["auto_capture_at"]
|
713
742
|
end
|
743
|
+
if data.include? "reference_id"
|
744
|
+
self.reference_id = data["reference_id"]
|
745
|
+
end
|
714
746
|
|
715
747
|
self
|
716
748
|
end
|
@@ -734,6 +766,7 @@ module ProcessOut
|
|
734
766
|
self.token = data.fetch(:token, self.token)
|
735
767
|
self.token_id = data.fetch(:token_id, self.token_id)
|
736
768
|
self.details = data.fetch(:details, self.details)
|
769
|
+
self.submerchant = data.fetch(:submerchant, self.submerchant)
|
737
770
|
self.url = data.fetch(:url, self.url)
|
738
771
|
self.url_qrcode = data.fetch(:url_qrcode, self.url_qrcode)
|
739
772
|
self.name = data.fetch(:name, self.name)
|
@@ -772,6 +805,7 @@ module ProcessOut
|
|
772
805
|
self.unsupported_feature_bypass = data.fetch(:unsupported_feature_bypass, self.unsupported_feature_bypass)
|
773
806
|
self.verification = data.fetch(:verification, self.verification)
|
774
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)
|
775
809
|
|
776
810
|
self
|
777
811
|
end
|
@@ -1139,6 +1173,8 @@ module ProcessOut
|
|
1139
1173
|
"currency" => @currency,
|
1140
1174
|
"metadata" => @metadata,
|
1141
1175
|
"details" => @details,
|
1176
|
+
"submerchant" => @submerchant,
|
1177
|
+
"reference_id" => @reference_id,
|
1142
1178
|
"exemption_reason_3ds2" => @exemption_reason_3ds2,
|
1143
1179
|
"sca_exemption_reason" => @sca_exemption_reason,
|
1144
1180
|
"challenge_indicator" => @challenge_indicator,
|
@@ -0,0 +1,182 @@
|
|
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 InvoiceSubmerchant
|
10
|
+
|
11
|
+
attr_reader :id
|
12
|
+
attr_reader :name
|
13
|
+
attr_reader :reference
|
14
|
+
attr_reader :mcc
|
15
|
+
attr_reader :phone_number
|
16
|
+
attr_reader :email
|
17
|
+
attr_reader :address
|
18
|
+
attr_reader :tax_reference
|
19
|
+
attr_reader :service_establishment_number
|
20
|
+
|
21
|
+
|
22
|
+
def id=(val)
|
23
|
+
@id = val
|
24
|
+
end
|
25
|
+
|
26
|
+
def name=(val)
|
27
|
+
@name = val
|
28
|
+
end
|
29
|
+
|
30
|
+
def reference=(val)
|
31
|
+
@reference = val
|
32
|
+
end
|
33
|
+
|
34
|
+
def mcc=(val)
|
35
|
+
@mcc = val
|
36
|
+
end
|
37
|
+
|
38
|
+
def phone_number=(val)
|
39
|
+
if val.nil?
|
40
|
+
@phone_number = val
|
41
|
+
return
|
42
|
+
end
|
43
|
+
|
44
|
+
if val.instance_of? SubmerchantPhoneNumber
|
45
|
+
@phone_number = val
|
46
|
+
else
|
47
|
+
obj = SubmerchantPhoneNumber.new(@client)
|
48
|
+
obj.fill_with_data(val)
|
49
|
+
@phone_number = obj
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
def email=(val)
|
55
|
+
@email = val
|
56
|
+
end
|
57
|
+
|
58
|
+
def address=(val)
|
59
|
+
if val.nil?
|
60
|
+
@address = val
|
61
|
+
return
|
62
|
+
end
|
63
|
+
|
64
|
+
if val.instance_of? SubmerchantAddress
|
65
|
+
@address = val
|
66
|
+
else
|
67
|
+
obj = SubmerchantAddress.new(@client)
|
68
|
+
obj.fill_with_data(val)
|
69
|
+
@address = obj
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
73
|
+
|
74
|
+
def tax_reference=(val)
|
75
|
+
@tax_reference = val
|
76
|
+
end
|
77
|
+
|
78
|
+
def service_establishment_number=(val)
|
79
|
+
@service_establishment_number = val
|
80
|
+
end
|
81
|
+
|
82
|
+
|
83
|
+
# Initializes the InvoiceSubmerchant object
|
84
|
+
# Params:
|
85
|
+
# +client+:: +ProcessOut+ client instance
|
86
|
+
# +data+:: data that can be used to fill the object
|
87
|
+
def initialize(client, data = {})
|
88
|
+
@client = client
|
89
|
+
|
90
|
+
self.id = data.fetch(:id, nil)
|
91
|
+
self.name = data.fetch(:name, nil)
|
92
|
+
self.reference = data.fetch(:reference, nil)
|
93
|
+
self.mcc = data.fetch(:mcc, nil)
|
94
|
+
self.phone_number = data.fetch(:phone_number, nil)
|
95
|
+
self.email = data.fetch(:email, nil)
|
96
|
+
self.address = data.fetch(:address, nil)
|
97
|
+
self.tax_reference = data.fetch(:tax_reference, nil)
|
98
|
+
self.service_establishment_number = data.fetch(:service_establishment_number, nil)
|
99
|
+
|
100
|
+
end
|
101
|
+
|
102
|
+
# Create a new InvoiceSubmerchant using the current client
|
103
|
+
def new(data = {})
|
104
|
+
InvoiceSubmerchant.new(@client, data)
|
105
|
+
end
|
106
|
+
|
107
|
+
# Overrides the JSON marshaller to only send the fields we want
|
108
|
+
def to_json(options)
|
109
|
+
{
|
110
|
+
"id": self.id,
|
111
|
+
"name": self.name,
|
112
|
+
"reference": self.reference,
|
113
|
+
"mcc": self.mcc,
|
114
|
+
"phone_number": self.phone_number,
|
115
|
+
"email": self.email,
|
116
|
+
"address": self.address,
|
117
|
+
"tax_reference": self.tax_reference,
|
118
|
+
"service_establishment_number": self.service_establishment_number,
|
119
|
+
}.to_json
|
120
|
+
end
|
121
|
+
|
122
|
+
# Fills the object with data coming from the API
|
123
|
+
# Params:
|
124
|
+
# +data+:: +Hash+ of data coming from the API
|
125
|
+
def fill_with_data(data)
|
126
|
+
if data.nil?
|
127
|
+
return self
|
128
|
+
end
|
129
|
+
if data.include? "id"
|
130
|
+
self.id = data["id"]
|
131
|
+
end
|
132
|
+
if data.include? "name"
|
133
|
+
self.name = data["name"]
|
134
|
+
end
|
135
|
+
if data.include? "reference"
|
136
|
+
self.reference = data["reference"]
|
137
|
+
end
|
138
|
+
if data.include? "mcc"
|
139
|
+
self.mcc = data["mcc"]
|
140
|
+
end
|
141
|
+
if data.include? "phone_number"
|
142
|
+
self.phone_number = data["phone_number"]
|
143
|
+
end
|
144
|
+
if data.include? "email"
|
145
|
+
self.email = data["email"]
|
146
|
+
end
|
147
|
+
if data.include? "address"
|
148
|
+
self.address = data["address"]
|
149
|
+
end
|
150
|
+
if data.include? "tax_reference"
|
151
|
+
self.tax_reference = data["tax_reference"]
|
152
|
+
end
|
153
|
+
if data.include? "service_establishment_number"
|
154
|
+
self.service_establishment_number = data["service_establishment_number"]
|
155
|
+
end
|
156
|
+
|
157
|
+
self
|
158
|
+
end
|
159
|
+
|
160
|
+
# Prefills the object with the data passed as parameters
|
161
|
+
# Params:
|
162
|
+
# +data+:: +Hash+ of data
|
163
|
+
def prefill(data)
|
164
|
+
if data.nil?
|
165
|
+
return self
|
166
|
+
end
|
167
|
+
self.id = data.fetch(:id, self.id)
|
168
|
+
self.name = data.fetch(:name, self.name)
|
169
|
+
self.reference = data.fetch(:reference, self.reference)
|
170
|
+
self.mcc = data.fetch(:mcc, self.mcc)
|
171
|
+
self.phone_number = data.fetch(:phone_number, self.phone_number)
|
172
|
+
self.email = data.fetch(:email, self.email)
|
173
|
+
self.address = data.fetch(:address, self.address)
|
174
|
+
self.tax_reference = data.fetch(:tax_reference, self.tax_reference)
|
175
|
+
self.service_establishment_number = data.fetch(:service_establishment_number, self.service_establishment_number)
|
176
|
+
|
177
|
+
self
|
178
|
+
end
|
179
|
+
|
180
|
+
|
181
|
+
end
|
182
|
+
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/3.
|
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, "")
|
@@ -0,0 +1,136 @@
|
|
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 SubmerchantAddress
|
10
|
+
|
11
|
+
attr_reader :line1
|
12
|
+
attr_reader :line2
|
13
|
+
attr_reader :city
|
14
|
+
attr_reader :state
|
15
|
+
attr_reader :country_code
|
16
|
+
attr_reader :zip
|
17
|
+
attr_reader :county
|
18
|
+
|
19
|
+
|
20
|
+
def line1=(val)
|
21
|
+
@line1 = val
|
22
|
+
end
|
23
|
+
|
24
|
+
def line2=(val)
|
25
|
+
@line2 = val
|
26
|
+
end
|
27
|
+
|
28
|
+
def city=(val)
|
29
|
+
@city = val
|
30
|
+
end
|
31
|
+
|
32
|
+
def state=(val)
|
33
|
+
@state = val
|
34
|
+
end
|
35
|
+
|
36
|
+
def country_code=(val)
|
37
|
+
@country_code = val
|
38
|
+
end
|
39
|
+
|
40
|
+
def zip=(val)
|
41
|
+
@zip = val
|
42
|
+
end
|
43
|
+
|
44
|
+
def county=(val)
|
45
|
+
@county = val
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
# Initializes the SubmerchantAddress object
|
50
|
+
# Params:
|
51
|
+
# +client+:: +ProcessOut+ client instance
|
52
|
+
# +data+:: data that can be used to fill the object
|
53
|
+
def initialize(client, data = {})
|
54
|
+
@client = client
|
55
|
+
|
56
|
+
self.line1 = data.fetch(:line1, nil)
|
57
|
+
self.line2 = data.fetch(:line2, nil)
|
58
|
+
self.city = data.fetch(:city, nil)
|
59
|
+
self.state = data.fetch(:state, nil)
|
60
|
+
self.country_code = data.fetch(:country_code, nil)
|
61
|
+
self.zip = data.fetch(:zip, nil)
|
62
|
+
self.county = data.fetch(:county, nil)
|
63
|
+
|
64
|
+
end
|
65
|
+
|
66
|
+
# Create a new SubmerchantAddress using the current client
|
67
|
+
def new(data = {})
|
68
|
+
SubmerchantAddress.new(@client, data)
|
69
|
+
end
|
70
|
+
|
71
|
+
# Overrides the JSON marshaller to only send the fields we want
|
72
|
+
def to_json(options)
|
73
|
+
{
|
74
|
+
"line1": self.line1,
|
75
|
+
"line2": self.line2,
|
76
|
+
"city": self.city,
|
77
|
+
"state": self.state,
|
78
|
+
"country_code": self.country_code,
|
79
|
+
"zip": self.zip,
|
80
|
+
"county": self.county,
|
81
|
+
}.to_json
|
82
|
+
end
|
83
|
+
|
84
|
+
# Fills the object with data coming from the API
|
85
|
+
# Params:
|
86
|
+
# +data+:: +Hash+ of data coming from the API
|
87
|
+
def fill_with_data(data)
|
88
|
+
if data.nil?
|
89
|
+
return self
|
90
|
+
end
|
91
|
+
if data.include? "line1"
|
92
|
+
self.line1 = data["line1"]
|
93
|
+
end
|
94
|
+
if data.include? "line2"
|
95
|
+
self.line2 = data["line2"]
|
96
|
+
end
|
97
|
+
if data.include? "city"
|
98
|
+
self.city = data["city"]
|
99
|
+
end
|
100
|
+
if data.include? "state"
|
101
|
+
self.state = data["state"]
|
102
|
+
end
|
103
|
+
if data.include? "country_code"
|
104
|
+
self.country_code = data["country_code"]
|
105
|
+
end
|
106
|
+
if data.include? "zip"
|
107
|
+
self.zip = data["zip"]
|
108
|
+
end
|
109
|
+
if data.include? "county"
|
110
|
+
self.county = data["county"]
|
111
|
+
end
|
112
|
+
|
113
|
+
self
|
114
|
+
end
|
115
|
+
|
116
|
+
# Prefills the object with the data passed as parameters
|
117
|
+
# Params:
|
118
|
+
# +data+:: +Hash+ of data
|
119
|
+
def prefill(data)
|
120
|
+
if data.nil?
|
121
|
+
return self
|
122
|
+
end
|
123
|
+
self.line1 = data.fetch(:line1, self.line1)
|
124
|
+
self.line2 = data.fetch(:line2, self.line2)
|
125
|
+
self.city = data.fetch(:city, self.city)
|
126
|
+
self.state = data.fetch(:state, self.state)
|
127
|
+
self.country_code = data.fetch(:country_code, self.country_code)
|
128
|
+
self.zip = data.fetch(:zip, self.zip)
|
129
|
+
self.county = data.fetch(:county, self.county)
|
130
|
+
|
131
|
+
self
|
132
|
+
end
|
133
|
+
|
134
|
+
|
135
|
+
end
|
136
|
+
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 SubmerchantPhoneNumber
|
10
|
+
|
11
|
+
attr_reader :dialing_code
|
12
|
+
attr_reader :number
|
13
|
+
|
14
|
+
|
15
|
+
def dialing_code=(val)
|
16
|
+
@dialing_code = val
|
17
|
+
end
|
18
|
+
|
19
|
+
def number=(val)
|
20
|
+
@number = val
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
# Initializes the SubmerchantPhoneNumber 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.dialing_code = data.fetch(:dialing_code, nil)
|
32
|
+
self.number = data.fetch(:number, nil)
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
# Create a new SubmerchantPhoneNumber using the current client
|
37
|
+
def new(data = {})
|
38
|
+
SubmerchantPhoneNumber.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
|
+
"dialing_code": self.dialing_code,
|
45
|
+
"number": self.number,
|
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? "dialing_code"
|
57
|
+
self.dialing_code = data["dialing_code"]
|
58
|
+
end
|
59
|
+
if data.include? "number"
|
60
|
+
self.number = data["number"]
|
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.dialing_code = data.fetch(:dialing_code, self.dialing_code)
|
74
|
+
self.number = data.fetch(:number, self.number)
|
75
|
+
|
76
|
+
self
|
77
|
+
end
|
78
|
+
|
79
|
+
|
80
|
+
end
|
81
|
+
end
|
data/lib/processout/token.rb
CHANGED
@@ -30,6 +30,7 @@ module ProcessOut
|
|
30
30
|
attr_reader :manual_invoice_cancellation
|
31
31
|
attr_reader :verification_status
|
32
32
|
attr_reader :can_get_balance
|
33
|
+
attr_reader :webhook_url
|
33
34
|
|
34
35
|
|
35
36
|
def id=(val)
|
@@ -168,6 +169,10 @@ module ProcessOut
|
|
168
169
|
@can_get_balance = val
|
169
170
|
end
|
170
171
|
|
172
|
+
def webhook_url=(val)
|
173
|
+
@webhook_url = val
|
174
|
+
end
|
175
|
+
|
171
176
|
|
172
177
|
# Initializes the Token object
|
173
178
|
# Params:
|
@@ -198,6 +203,7 @@ module ProcessOut
|
|
198
203
|
self.manual_invoice_cancellation = data.fetch(:manual_invoice_cancellation, nil)
|
199
204
|
self.verification_status = data.fetch(:verification_status, nil)
|
200
205
|
self.can_get_balance = data.fetch(:can_get_balance, nil)
|
206
|
+
self.webhook_url = data.fetch(:webhook_url, nil)
|
201
207
|
|
202
208
|
end
|
203
209
|
|
@@ -231,6 +237,7 @@ module ProcessOut
|
|
231
237
|
"manual_invoice_cancellation": self.manual_invoice_cancellation,
|
232
238
|
"verification_status": self.verification_status,
|
233
239
|
"can_get_balance": self.can_get_balance,
|
240
|
+
"webhook_url": self.webhook_url,
|
234
241
|
}.to_json
|
235
242
|
end
|
236
243
|
|
@@ -307,6 +314,9 @@ module ProcessOut
|
|
307
314
|
if data.include? "can_get_balance"
|
308
315
|
self.can_get_balance = data["can_get_balance"]
|
309
316
|
end
|
317
|
+
if data.include? "webhook_url"
|
318
|
+
self.webhook_url = data["webhook_url"]
|
319
|
+
end
|
310
320
|
|
311
321
|
self
|
312
322
|
end
|
@@ -340,6 +350,7 @@ module ProcessOut
|
|
340
350
|
self.manual_invoice_cancellation = data.fetch(:manual_invoice_cancellation, self.manual_invoice_cancellation)
|
341
351
|
self.verification_status = data.fetch(:verification_status, self.verification_status)
|
342
352
|
self.can_get_balance = data.fetch(:can_get_balance, self.can_get_balance)
|
353
|
+
self.webhook_url = data.fetch(:webhook_url, self.webhook_url)
|
343
354
|
|
344
355
|
self
|
345
356
|
end
|
@@ -419,6 +430,8 @@ module ProcessOut
|
|
419
430
|
"description" => @description,
|
420
431
|
"invoice_id" => @invoice_id,
|
421
432
|
"manual_invoice_cancellation" => @manual_invoice_cancellation,
|
433
|
+
"webhook_url" => @webhook_url,
|
434
|
+
"gateway_configuration_id" => @gateway_configuration_id,
|
422
435
|
"source" => options.fetch(:source, nil),
|
423
436
|
"settings" => options.fetch(:settings, nil),
|
424
437
|
"device" => options.fetch(:device, nil),
|
@@ -464,7 +477,8 @@ module ProcessOut
|
|
464
477
|
"verify_metadata" => options.fetch(:verify_metadata, nil),
|
465
478
|
"set_default" => options.fetch(:set_default, nil),
|
466
479
|
"verify_statement_descriptor" => options.fetch(:verify_statement_descriptor, nil),
|
467
|
-
"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)
|
468
482
|
}
|
469
483
|
|
470
484
|
response = Response.new(request.put(path, data, options))
|
data/lib/processout/version.rb
CHANGED
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"
|
@@ -38,6 +39,9 @@ require "processout/invoice_shipping_phone"
|
|
38
39
|
require "processout/invoice_billing"
|
39
40
|
require "processout/unsupported_feature_bypass"
|
40
41
|
require "processout/invoice_detail"
|
42
|
+
require "processout/invoice_submerchant"
|
43
|
+
require "processout/submerchant_phone_number"
|
44
|
+
require "processout/submerchant_address"
|
41
45
|
require "processout/customer_action"
|
42
46
|
require "processout/dunning_action"
|
43
47
|
require "processout/payout"
|
@@ -61,11 +65,11 @@ require "processout/payment_data_three_ds_authentication"
|
|
61
65
|
require "processout/transaction_operation"
|
62
66
|
require "processout/webhook"
|
63
67
|
require "processout/webhook_endpoint"
|
64
|
-
require "processout/card_create_request"
|
65
68
|
require "processout/device"
|
66
69
|
require "processout/card_contact"
|
67
70
|
require "processout/card_shipping"
|
68
71
|
require "processout/card_update_request"
|
72
|
+
require "processout/card_create_request"
|
69
73
|
require "processout/error_codes"
|
70
74
|
require "processout/category_error_codes"
|
71
75
|
require "processout/external_three_ds"
|
@@ -119,6 +123,11 @@ module ProcessOut
|
|
119
123
|
obj = Balance.new(self, data)
|
120
124
|
end
|
121
125
|
|
126
|
+
# Create a new BalancesCustomerAction instance
|
127
|
+
def balances_customer_action(data = {})
|
128
|
+
obj = BalancesCustomerAction.new(self, data)
|
129
|
+
end
|
130
|
+
|
122
131
|
# Create a new Card instance
|
123
132
|
def card(data = {})
|
124
133
|
obj = Card.new(self, data)
|
@@ -274,6 +283,21 @@ module ProcessOut
|
|
274
283
|
obj = InvoiceDetail.new(self, data)
|
275
284
|
end
|
276
285
|
|
286
|
+
# Create a new InvoiceSubmerchant instance
|
287
|
+
def invoice_submerchant(data = {})
|
288
|
+
obj = InvoiceSubmerchant.new(self, data)
|
289
|
+
end
|
290
|
+
|
291
|
+
# Create a new SubmerchantPhoneNumber instance
|
292
|
+
def submerchant_phone_number(data = {})
|
293
|
+
obj = SubmerchantPhoneNumber.new(self, data)
|
294
|
+
end
|
295
|
+
|
296
|
+
# Create a new SubmerchantAddress instance
|
297
|
+
def submerchant_address(data = {})
|
298
|
+
obj = SubmerchantAddress.new(self, data)
|
299
|
+
end
|
300
|
+
|
277
301
|
# Create a new CustomerAction instance
|
278
302
|
def customer_action(data = {})
|
279
303
|
obj = CustomerAction.new(self, data)
|
@@ -389,11 +413,6 @@ module ProcessOut
|
|
389
413
|
obj = WebhookEndpoint.new(self, data)
|
390
414
|
end
|
391
415
|
|
392
|
-
# Create a new CardCreateRequest instance
|
393
|
-
def card_create_request(data = {})
|
394
|
-
obj = CardCreateRequest.new(self, data)
|
395
|
-
end
|
396
|
-
|
397
416
|
# Create a new Device instance
|
398
417
|
def device(data = {})
|
399
418
|
obj = Device.new(self, data)
|
@@ -414,6 +433,11 @@ module ProcessOut
|
|
414
433
|
obj = CardUpdateRequest.new(self, data)
|
415
434
|
end
|
416
435
|
|
436
|
+
# Create a new CardCreateRequest instance
|
437
|
+
def card_create_request(data = {})
|
438
|
+
obj = CardCreateRequest.new(self, data)
|
439
|
+
end
|
440
|
+
|
417
441
|
# Create a new ErrorCodes instance
|
418
442
|
def error_codes(data = {})
|
419
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.
|
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-
|
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
|
@@ -122,6 +123,7 @@ files:
|
|
122
123
|
- lib/processout/invoice_risk.rb
|
123
124
|
- lib/processout/invoice_shipping.rb
|
124
125
|
- lib/processout/invoice_shipping_phone.rb
|
126
|
+
- lib/processout/invoice_submerchant.rb
|
125
127
|
- lib/processout/invoice_tax.rb
|
126
128
|
- lib/processout/native_apm_parameter_definition.rb
|
127
129
|
- lib/processout/native_apm_parameter_value.rb
|
@@ -146,6 +148,8 @@ files:
|
|
146
148
|
- lib/processout/project_sftp_settings.rb
|
147
149
|
- lib/processout/project_sftp_settings_public.rb
|
148
150
|
- lib/processout/refund.rb
|
151
|
+
- lib/processout/submerchant_address.rb
|
152
|
+
- lib/processout/submerchant_phone_number.rb
|
149
153
|
- lib/processout/subscription.rb
|
150
154
|
- lib/processout/three_ds.rb
|
151
155
|
- lib/processout/token.rb
|
@@ -175,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
179
|
- !ruby/object:Gem::Version
|
176
180
|
version: '0'
|
177
181
|
requirements: []
|
178
|
-
rubygems_version: 3.
|
182
|
+
rubygems_version: 3.0.3.1
|
179
183
|
signing_key:
|
180
184
|
specification_version: 4
|
181
185
|
summary: Ruby bindings for the ProcessOut API
|