postfinancecheckout-ruby-sdk 6.2.0 → 6.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/Gemfile.lock +56 -14
- data/LICENSE +1 -1
- data/README.md +57 -29
- data/lib/postfinancecheckout-ruby-sdk/api_client.rb +1 -1
- data/lib/postfinancecheckout-ruby-sdk/api_exception_error_codes.rb +60 -0
- data/lib/postfinancecheckout-ruby-sdk/models/bogus_express_checkout_approval_request.rb +230 -0
- data/lib/postfinancecheckout-ruby-sdk/models/bogus_express_checkout_payment_data.rb +241 -0
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_approval_response.rb +270 -0
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_create_response.rb +13 -4
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_session.rb +39 -1
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_session_create.rb +21 -1
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_address_change_request.rb +239 -0
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_address_change_response.rb +241 -0
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_method_change_request.rb +231 -0
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_method_change_response.rb +241 -0
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_option.rb +1 -1
- data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_address.rb +43 -5
- data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_dcc_transaction_sum.rb +302 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_transaction_sum.rb +332 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_transaction_summary.rb +347 -0
- data/lib/postfinancecheckout-ruby-sdk/models/refund.rb +13 -1
- data/lib/postfinancecheckout-ruby-sdk/models/refund_create.rb +13 -1
- data/lib/postfinancecheckout-ruby-sdk/models/rendered_terminal_transaction_summary.rb +241 -0
- data/lib/postfinancecheckout-ruby-sdk/models/scope.rb +15 -15
- data/lib/postfinancecheckout-ruby-sdk/models/subscription_update_request.rb +45 -22
- data/lib/postfinancecheckout-ruby-sdk/models/terminal_transaction_summary_list_response.rb +253 -0
- data/lib/postfinancecheckout-ruby-sdk/models/terminal_transaction_summary_search_response.rb +263 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_completion.rb +13 -1
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_completion_details.rb +26 -4
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_user_interface_type.rb +2 -1
- data/lib/postfinancecheckout-ruby-sdk/postfinancecheckout_sdk_exception.rb +2 -33
- data/lib/postfinancecheckout-ruby-sdk/sdk_exception_error_codes.rb +55 -0
- data/lib/postfinancecheckout-ruby-sdk/service/bogus_express_checkout_service.rb +114 -0
- data/lib/postfinancecheckout-ruby-sdk/service/express_checkout_service.rb +162 -0
- data/lib/postfinancecheckout-ruby-sdk/service/payment_terminal_transaction_summaries_service.rb +372 -0
- data/lib/postfinancecheckout-ruby-sdk/service/webhook_encryption_keys_service.rb +2 -2
- data/lib/postfinancecheckout-ruby-sdk/utils/encryption_util.rb +5 -5
- data/lib/postfinancecheckout-ruby-sdk/version.rb +1 -1
- data/lib/postfinancecheckout-ruby-sdk.rb +20 -1
- data/test/test_querying.rb +11 -0
- metadata +19 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0c3fdff56d8c555fe0dd4de0f5937407e26bcf7e6a9fa7a8da3ad9758203cd8b
|
|
4
|
+
data.tar.gz: bd6a0c8653adcda3538a23310971c1af75fd343abcd62841074fba52641c9991
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fee832f6d7d360d999b4d95b479629ebba0cded29743a3946fcbdb4aa2d3641b5a0aeed035fd9e57841e165065509c531590690b5e496e4cd21c7943ed58e6fe
|
|
7
|
+
data.tar.gz: 53e6560a9583420d0da6a6fdf258ce50b8f57539f7e57897eb1f4f572b87c56443ec88ad549cc53cb044e5391c3f0869452a8854805cb41cf977b362998a1d58
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
postfinancecheckout-ruby-sdk (6.
|
|
4
|
+
postfinancecheckout-ruby-sdk (6.4.0)
|
|
5
5
|
concurrent-ruby (~> 1.3.5)
|
|
6
6
|
faraday (~> 2.13.1, < 3.0)
|
|
7
7
|
faraday-multipart (~> 1.1.0)
|
|
@@ -13,10 +13,11 @@ GEM
|
|
|
13
13
|
specs:
|
|
14
14
|
ast (2.4.3)
|
|
15
15
|
base64 (0.3.0)
|
|
16
|
-
byebug (
|
|
16
|
+
byebug (13.0.0)
|
|
17
|
+
reline (>= 0.6.0)
|
|
17
18
|
coderay (1.1.3)
|
|
18
|
-
concurrent-ruby (1.3.
|
|
19
|
-
date (3.5.
|
|
19
|
+
concurrent-ruby (1.3.6)
|
|
20
|
+
date (3.5.1)
|
|
20
21
|
faraday (2.13.4)
|
|
21
22
|
faraday-net_http (>= 2.0, < 3.5)
|
|
22
23
|
json
|
|
@@ -25,33 +26,37 @@ GEM
|
|
|
25
26
|
multipart-post (~> 2.0)
|
|
26
27
|
faraday-net_http (3.4.2)
|
|
27
28
|
net-http (~> 0.5)
|
|
29
|
+
io-console (0.8.2)
|
|
28
30
|
jaro_winkler (1.5.6)
|
|
29
|
-
json (2.
|
|
31
|
+
json (2.18.1)
|
|
30
32
|
jwt (2.10.2)
|
|
31
33
|
base64
|
|
32
34
|
logger (1.7.0)
|
|
33
35
|
marcel (1.0.4)
|
|
34
36
|
method_source (1.1.0)
|
|
35
37
|
multipart-post (2.4.1)
|
|
36
|
-
net-http (0.
|
|
38
|
+
net-http (0.9.1)
|
|
37
39
|
uri (>= 0.11.1)
|
|
38
40
|
parallel (1.27.0)
|
|
39
|
-
parser (3.3.10.
|
|
41
|
+
parser (3.3.10.1)
|
|
40
42
|
ast (~> 2.4.1)
|
|
41
43
|
racc
|
|
42
44
|
power_assert (3.0.1)
|
|
43
|
-
pry (0.
|
|
45
|
+
pry (0.16.0)
|
|
44
46
|
coderay (~> 1.1)
|
|
45
47
|
method_source (~> 1.0)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
reline (>= 0.6.0)
|
|
49
|
+
pry-byebug (3.12.0)
|
|
50
|
+
byebug (~> 13.0)
|
|
51
|
+
pry (>= 0.13, < 0.17)
|
|
52
|
+
psych (5.3.1)
|
|
50
53
|
date
|
|
51
54
|
stringio
|
|
52
55
|
racc (1.8.1)
|
|
53
56
|
rainbow (3.1.1)
|
|
54
57
|
rake (13.0.6)
|
|
58
|
+
reline (0.6.3)
|
|
59
|
+
io-console (~> 0.5)
|
|
55
60
|
rubocop (0.66.0)
|
|
56
61
|
jaro_winkler (~> 1.5.1)
|
|
57
62
|
parallel (~> 1.10)
|
|
@@ -61,7 +66,7 @@ GEM
|
|
|
61
66
|
ruby-progressbar (~> 1.7)
|
|
62
67
|
unicode-display_width (>= 1.4.0, < 1.6)
|
|
63
68
|
ruby-progressbar (1.13.0)
|
|
64
|
-
stringio (3.
|
|
69
|
+
stringio (3.2.0)
|
|
65
70
|
test-unit (3.6.9)
|
|
66
71
|
power_assert
|
|
67
72
|
unicode-display_width (1.5.0)
|
|
@@ -78,5 +83,42 @@ DEPENDENCIES
|
|
|
78
83
|
rubocop (~> 0.66.0)
|
|
79
84
|
test-unit (~> 3.6.7)
|
|
80
85
|
|
|
86
|
+
CHECKSUMS
|
|
87
|
+
ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
|
|
88
|
+
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
|
|
89
|
+
byebug (13.0.0) sha256=d2263efe751941ca520fa29744b71972d39cbc41839496706f5d9b22e92ae05d
|
|
90
|
+
coderay (1.1.3) sha256=dc530018a4684512f8f38143cd2a096c9f02a1fc2459edcfe534787a7fc77d4b
|
|
91
|
+
concurrent-ruby (1.3.6) sha256=6b56837e1e7e5292f9864f34b69c5a2cbc75c0cf5338f1ce9903d10fa762d5ab
|
|
92
|
+
date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
|
|
93
|
+
faraday (2.13.4) sha256=c719ff52cfd0dbaeca79dd83ed3aeea3f621032abf8bc959d1c05666157cac26
|
|
94
|
+
faraday-multipart (1.1.1) sha256=77a18ff40149030fd1aef55bb4fc7a67ce46419a8a3fcd010e28c2526e8d8903
|
|
95
|
+
faraday-net_http (3.4.2) sha256=f147758260d3526939bf57ecf911682f94926a3666502e24c69992765875906c
|
|
96
|
+
io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
|
|
97
|
+
jaro_winkler (1.5.6) sha256=007db7805527ada1cc12f2547676181d63b0a504ec4dd7a9a2eb2424521ccd81
|
|
98
|
+
json (2.18.1) sha256=fe112755501b8d0466b5ada6cf50c8c3f41e897fa128ac5d263ec09eedc9f986
|
|
99
|
+
jwt (2.10.2) sha256=31e1ee46f7359883d5e622446969fe9c118c3da87a0b1dca765ce269c3a0c4f4
|
|
100
|
+
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
|
|
101
|
+
marcel (1.0.4) sha256=0d5649feb64b8f19f3d3468b96c680bae9746335d02194270287868a661516a4
|
|
102
|
+
method_source (1.1.0) sha256=181301c9c45b731b4769bc81e8860e72f9161ad7d66dd99103c9ab84f560f5c5
|
|
103
|
+
multipart-post (2.4.1) sha256=9872d03a8e552020ca096adadbf5e3cb1cd1cdd6acd3c161136b8a5737cdb4a8
|
|
104
|
+
net-http (0.9.1) sha256=25ba0b67c63e89df626ed8fac771d0ad24ad151a858af2cc8e6a716ca4336996
|
|
105
|
+
parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
|
|
106
|
+
parser (3.3.10.1) sha256=06f6a725d2cd91e5e7f2b7c32ba143631e1f7c8ae2fb918fc4cebec187e6a688
|
|
107
|
+
postfinancecheckout-ruby-sdk (6.4.0)
|
|
108
|
+
power_assert (3.0.1) sha256=8ce9876716cc74e863fcd4cdcdc52d792bd983598d1af3447083a3a9a4d34103
|
|
109
|
+
pry (0.16.0) sha256=d76c69065698ed1f85e717bd33d7942c38a50868f6b0673c636192b3d1b6054e
|
|
110
|
+
pry-byebug (3.12.0) sha256=594e094ae8a8390a7ad4c7b36ae36e13304ed02664c67417d108dc5f7213d1b7
|
|
111
|
+
psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974
|
|
112
|
+
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
|
|
113
|
+
rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
|
|
114
|
+
rake (13.0.6) sha256=5ce4bf5037b4196c24ac62834d8db1ce175470391026bd9e557d669beeb19097
|
|
115
|
+
reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835
|
|
116
|
+
rubocop (0.66.0) sha256=f05a6896f367765b3f0fba663d0add120444f8de604dada405662b10a0860f5a
|
|
117
|
+
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
|
|
118
|
+
stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1
|
|
119
|
+
test-unit (3.6.9) sha256=2be6ae0354623702f004ae626c98337f5e17f2ecc0fc334a9e6fdbb2c7c534da
|
|
120
|
+
unicode-display_width (1.5.0) sha256=9890eebd24feb4cb0e0542c9b8c6beecb40cda27be8c7afe49312625b36156eb
|
|
121
|
+
uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
|
|
122
|
+
|
|
81
123
|
BUNDLED WITH
|
|
82
|
-
|
|
124
|
+
4.0.4
|
data/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright
|
|
189
|
+
Copyright 2026 wallee AG
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
data/README.md
CHANGED
|
@@ -243,6 +243,11 @@ Web API client: [*link*](https://checkout.postfinance.ch//api/client)<br>
|
|
|
243
243
|
<strong>GET</strong> /payment/bank-transactions/search
|
|
244
244
|
Search bank transactions
|
|
245
245
|
<br><br>
|
|
246
|
+
- <strong>BogusExpressCheckoutService</strong><br>
|
|
247
|
+
* <code>post_bogus_express_checkout_on_approve</code>
|
|
248
|
+
<strong>POST</strong> /bogus-express-checkout/on-approve
|
|
249
|
+
Approve express checkout wallet payment
|
|
250
|
+
<br><br>
|
|
246
251
|
- <strong>ChargeAttemptsService</strong><br>
|
|
247
252
|
* <code>get_payment_charge_attempts</code>
|
|
248
253
|
<strong>GET</strong> /payment/charge-attempts
|
|
@@ -638,6 +643,16 @@ Web API client: [*link*](https://checkout.postfinance.ch//api/client)<br>
|
|
|
638
643
|
<strong>GET</strong> /payment/dunning-flows/search
|
|
639
644
|
Search dunning flows
|
|
640
645
|
<br><br>
|
|
646
|
+
- <strong>ExpressCheckoutService</strong><br>
|
|
647
|
+
* <code>patch_express_checkout_shipping_address_change</code>
|
|
648
|
+
<strong>PATCH</strong> /express-checkout/shipping/address-change
|
|
649
|
+
Change shipping address
|
|
650
|
+
<br><br>
|
|
651
|
+
- <strong>ExpressCheckoutService</strong><br>
|
|
652
|
+
* <code>patch_express_checkout_shipping_method_change</code>
|
|
653
|
+
<strong>PATCH</strong> /express-checkout/shipping/method-change
|
|
654
|
+
Change shipping method
|
|
655
|
+
<br><br>
|
|
641
656
|
- <strong>ExpressCheckoutService</strong><br>
|
|
642
657
|
* <code>post_express_checkout_create_session</code>
|
|
643
658
|
<strong>POST</strong> /express-checkout/create-session
|
|
@@ -1018,6 +1033,26 @@ Web API client: [*link*](https://checkout.postfinance.ch//api/client)<br>
|
|
|
1018
1033
|
<strong>GET</strong> /payment/sales-channels/search
|
|
1019
1034
|
Search payment sales channels.
|
|
1020
1035
|
<br><br>
|
|
1036
|
+
- <strong>PaymentTerminalTransactionSummariesService</strong><br>
|
|
1037
|
+
* <code>get_payment_terminals_transaction_summaries</code>
|
|
1038
|
+
<strong>GET</strong> /payment/terminals/transaction-summaries
|
|
1039
|
+
List all summaries
|
|
1040
|
+
<br><br>
|
|
1041
|
+
- <strong>PaymentTerminalTransactionSummariesService</strong><br>
|
|
1042
|
+
* <code>get_payment_terminals_transaction_summaries_id</code>
|
|
1043
|
+
<strong>GET</strong> /payment/terminals/transaction-summaries/{id}
|
|
1044
|
+
Retrieve a summary
|
|
1045
|
+
<br><br>
|
|
1046
|
+
- <strong>PaymentTerminalTransactionSummariesService</strong><br>
|
|
1047
|
+
* <code>get_payment_terminals_transaction_summaries_id_receipt</code>
|
|
1048
|
+
<strong>GET</strong> /payment/terminals/transaction-summaries/{id}/receipt
|
|
1049
|
+
Retrieve a rendered summary receipt
|
|
1050
|
+
<br><br>
|
|
1051
|
+
- <strong>PaymentTerminalTransactionSummariesService</strong><br>
|
|
1052
|
+
* <code>get_payment_terminals_transaction_summaries_search</code>
|
|
1053
|
+
<strong>GET</strong> /payment/terminals/transaction-summaries/search
|
|
1054
|
+
Search summaries
|
|
1055
|
+
<br><br>
|
|
1021
1056
|
- <strong>PaymentTerminalsService</strong><br>
|
|
1022
1057
|
* <code>delete_payment_terminals_id</code>
|
|
1023
1058
|
<strong>DELETE</strong> /payment/terminals/{id}
|
|
@@ -2489,6 +2524,8 @@ Additional Api models documentation: [*link*](https://checkout.postfinance.ch/en
|
|
|
2489
2524
|
* <strong>BillingCycleModel</strong>
|
|
2490
2525
|
* <strong>BillingCycleType</strong>
|
|
2491
2526
|
* <strong>BillingDayCustomization</strong>
|
|
2527
|
+
* <strong>BogusExpressCheckoutApprovalRequest</strong>
|
|
2528
|
+
* <strong>BogusExpressCheckoutPaymentData</strong>
|
|
2492
2529
|
* <strong>CardAuthenticationResponse</strong>
|
|
2493
2530
|
* <strong>CardAuthenticationVersion</strong>
|
|
2494
2531
|
* <strong>CardCryptogram</strong>
|
|
@@ -2588,10 +2625,15 @@ Additional Api models documentation: [*link*](https://checkout.postfinance.ch/en
|
|
|
2588
2625
|
* <strong>DunningFlowSearchResponse</strong>
|
|
2589
2626
|
* <strong>DunningFlowType</strong>
|
|
2590
2627
|
* <strong>Environment</strong>
|
|
2628
|
+
* <strong>ExpressCheckoutApprovalResponse</strong>
|
|
2591
2629
|
* <strong>ExpressCheckoutCreateResponse</strong>
|
|
2592
2630
|
* <strong>ExpressCheckoutSession</strong>
|
|
2593
2631
|
* <strong>ExpressCheckoutSessionCreate</strong>
|
|
2594
2632
|
* <strong>ExpressCheckoutSessionState</strong>
|
|
2633
|
+
* <strong>ExpressCheckoutShippingAddressChangeRequest</strong>
|
|
2634
|
+
* <strong>ExpressCheckoutShippingAddressChangeResponse</strong>
|
|
2635
|
+
* <strong>ExpressCheckoutShippingMethodChangeRequest</strong>
|
|
2636
|
+
* <strong>ExpressCheckoutShippingMethodChangeResponse</strong>
|
|
2595
2637
|
* <strong>ExpressCheckoutShippingOption</strong>
|
|
2596
2638
|
* <strong>ExpressCheckoutWalletType</strong>
|
|
2597
2639
|
* <strong>ExternalTransferBankTransaction</strong>
|
|
@@ -2704,6 +2746,7 @@ Additional Api models documentation: [*link*](https://checkout.postfinance.ch/en
|
|
|
2704
2746
|
* <strong>PaymentTerminalConfigurationVersion</strong>
|
|
2705
2747
|
* <strong>PaymentTerminalConfigurationVersionState</strong>
|
|
2706
2748
|
* <strong>PaymentTerminalCreate</strong>
|
|
2749
|
+
* <strong>PaymentTerminalDccTransactionSum</strong>
|
|
2707
2750
|
* <strong>PaymentTerminalLocation</strong>
|
|
2708
2751
|
* <strong>PaymentTerminalLocationState</strong>
|
|
2709
2752
|
* <strong>PaymentTerminalLocationVersion</strong>
|
|
@@ -2711,6 +2754,8 @@ Additional Api models documentation: [*link*](https://checkout.postfinance.ch/en
|
|
|
2711
2754
|
* <strong>PaymentTerminalPreparing</strong>
|
|
2712
2755
|
* <strong>PaymentTerminalReceiptType</strong>
|
|
2713
2756
|
* <strong>PaymentTerminalState</strong>
|
|
2757
|
+
* <strong>PaymentTerminalTransactionSum</strong>
|
|
2758
|
+
* <strong>PaymentTerminalTransactionSummary</strong>
|
|
2714
2759
|
* <strong>PaymentTerminalTransactionSummaryReference</strong>
|
|
2715
2760
|
* <strong>PaymentTerminalType</strong>
|
|
2716
2761
|
* <strong>PaymentTerminalUpdate</strong>
|
|
@@ -2770,6 +2815,7 @@ Additional Api models documentation: [*link*](https://checkout.postfinance.ch/en
|
|
|
2770
2815
|
* <strong>RenderedDocument</strong>
|
|
2771
2816
|
* <strong>RenderedTerminalReceipt</strong>
|
|
2772
2817
|
* <strong>RenderedTerminalReceiptListResponse</strong>
|
|
2818
|
+
* <strong>RenderedTerminalTransactionSummary</strong>
|
|
2773
2819
|
* <strong>RestAddressFormat</strong>
|
|
2774
2820
|
* <strong>RestAddressFormatField</strong>
|
|
2775
2821
|
* <strong>RestApiBulkOperationResult</strong>
|
|
@@ -2895,6 +2941,8 @@ Additional Api models documentation: [*link*](https://checkout.postfinance.ch/en
|
|
|
2895
2941
|
* <strong>TerminalListResponse</strong>
|
|
2896
2942
|
* <strong>TerminalReceiptFormat</strong>
|
|
2897
2943
|
* <strong>TerminalSearchResponse</strong>
|
|
2944
|
+
* <strong>TerminalTransactionSummaryListResponse</strong>
|
|
2945
|
+
* <strong>TerminalTransactionSummarySearchResponse</strong>
|
|
2898
2946
|
* <strong>Token</strong>
|
|
2899
2947
|
* <strong>TokenCreate</strong>
|
|
2900
2948
|
* <strong>TokenListResponse</strong>
|
|
@@ -2975,40 +3023,20 @@ When working with webhooks, the `PostfinancecheckoutRubySdk::PostFinanceCheckout
|
|
|
2975
3023
|
|
|
2976
3024
|
### Error Code Categories
|
|
2977
3025
|
|
|
2978
|
-
| **
|
|
2979
|
-
|
|
2980
|
-
| **
|
|
2981
|
-
| **
|
|
2982
|
-
| **2000–2999** | Server-Side Errors | Errors typically caused by incorrect data provided by the server |
|
|
2983
|
-
|
|
2984
|
-
### Error Code Reference
|
|
2985
|
-
|
|
2986
|
-
| **Code** | **Error Name** | **Description** | **Category** |
|
|
2987
|
-
|----------|----------------|-----------------|--------------|
|
|
2988
|
-
| 404 | `UNKNOWN_WEBHOOK_ENCRYPTION_PUBLIC_KEY` | Unknown webhook signature public key | Not Found |
|
|
2989
|
-
| 1000 | `WEBHOOK_ENCRYPTION_GENERAL_ERROR` | General webhook encryption error | Client-Side |
|
|
2990
|
-
| 1001 | `INVALID_WEBHOOK_ENCRYPTION_PUBLIC_KEY` | Invalid webhook signature public key | Client-Side |
|
|
2991
|
-
| 1002 | `INVALID_WEBHOOK_ENCRYPTION_HEADER_FORMAT` | Invalid webhook signature header | Client-Side |
|
|
2992
|
-
| 1003 | `UNSUPPORTED_WEBHOOK_ENCRYPTION_ALGORYTHM` | Unsupported webhook signature algorithm | Client-Side |
|
|
2993
|
-
| 1004 | `UNKNOWN_WEBHOOK_ENCRYPTION_PROVIDER` | Unknown webhook encryption provider | Client-Side |
|
|
2994
|
-
| 1005 | `WEBHOOK_ENCRYPTION_VERIFIER_INIT_ERROR` | Encryption verifier initialization error | Client-Side |
|
|
2995
|
-
| 1006 | `WEBHOOK_ENCRYPTION_VERIFIER_CONTENT_UPDATE_ERROR` | Error during content update in encryption verifier | Client-Side |
|
|
2996
|
-
| 1007 | `WEBHOOK_ENCRYPTION_SIGNATURE_VERIFICATION_FAILED` | Encryption signature verification failed | Client-Side |
|
|
2997
|
-
| 1008 | `INVALID_WEBHOOK_ENCRYPTION_CONTENT_SIGNATURE` | Invalid webhook content signature | Client-Side |
|
|
2998
|
-
| 2000 | `MISSING_WEBHOOK_ENCRYPTION_ALGORYTHM` | Missing webhook signature algorithm value | Server-Side |
|
|
3026
|
+
| **Exception** | **Description** |
|
|
3027
|
+
|----------------------------|---------------------------------------------------------------------------------------|
|
|
3028
|
+
| **ApiExceptionErrorCodes** | Lists the possible HTTP error codes an `ApiException` can generate |
|
|
3029
|
+
| **SdkExceptionErrorCodes** | Lists the possible error codes a `PostFinanceCheckoutSdkException` can generate |
|
|
2999
3030
|
|
|
3000
3031
|
### Usage Example
|
|
3001
3032
|
```ruby
|
|
3002
3033
|
begin
|
|
3003
|
-
#
|
|
3004
|
-
rescue
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
# Handle invalid public key
|
|
3008
|
-
when 1007
|
|
3009
|
-
# Handle signature verification failure
|
|
3034
|
+
# SDK operation
|
|
3035
|
+
rescue PostfinancecheckoutRubySdk::ApiError => ex
|
|
3036
|
+
if PostfinancecheckoutRubySdk::ApiExceptionErrorCodes.is?(ex, PostfinancecheckoutRubySdk::ApiExceptionErrorCodes::CONFLICT)
|
|
3037
|
+
# Conflict error handling
|
|
3010
3038
|
else
|
|
3011
|
-
#
|
|
3039
|
+
# Other error handling
|
|
3012
3040
|
end
|
|
3013
3041
|
end
|
|
3014
3042
|
```
|
|
@@ -118,7 +118,7 @@ module PostfinancecheckoutRubySdk
|
|
|
118
118
|
http_method = http_method.to_sym.downcase
|
|
119
119
|
|
|
120
120
|
default_headers = {
|
|
121
|
-
'x-meta-sdk-version': "6.
|
|
121
|
+
'x-meta-sdk-version': "6.4.0",
|
|
122
122
|
'x-meta-sdk-language': "ruby",
|
|
123
123
|
'x-meta-sdk-provider': "postfinancecheckout",
|
|
124
124
|
'x-meta-sdk-language-version': RUBY_VERSION
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
# PostFinance Ruby SDK
|
|
3
|
+
#
|
|
4
|
+
# This library allows to interact with the PostFinance payment service.
|
|
5
|
+
#
|
|
6
|
+
# Copyright owner: Wallee AG
|
|
7
|
+
# Website: https://www.postfinance.ch/en/private.html
|
|
8
|
+
# Developer email: ecosystem-team@wallee.com
|
|
9
|
+
#
|
|
10
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
+
# you may not use this file except in compliance with the License.
|
|
12
|
+
# You may obtain a copy of the License at
|
|
13
|
+
#
|
|
14
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
+
#
|
|
16
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
# See the License for the specific language governing permissions and
|
|
20
|
+
# limitations under the License.
|
|
21
|
+
=end
|
|
22
|
+
|
|
23
|
+
module PostfinancecheckoutRubySdk
|
|
24
|
+
module ApiExceptionErrorCodes
|
|
25
|
+
# This class represents possible HTTP error codes which can be sent by the API.
|
|
26
|
+
# This list corresponds to https://checkout.postfinance.ch/en-us/doc/api/web-service#_errors
|
|
27
|
+
|
|
28
|
+
# The request was not accepted often due to missing or invalid parameters
|
|
29
|
+
BAD_REQUEST = 400
|
|
30
|
+
# The necessary authentication credentials are missing or incorrect
|
|
31
|
+
UNAUTHORIZED = 401
|
|
32
|
+
# The application user is missing the required permissions
|
|
33
|
+
FORBIDDEN = 403
|
|
34
|
+
# The requested resource was not found
|
|
35
|
+
NOT_FOUND = 404
|
|
36
|
+
# The requested response format is not supported
|
|
37
|
+
NOT_ACCEPTABLE = 406
|
|
38
|
+
# The request conflicts with another request often because of to optimistic locking
|
|
39
|
+
CONFLICT = 409
|
|
40
|
+
# Too many operations in a bulk request
|
|
41
|
+
PAYLOAD_TOO_LARGE = 413
|
|
42
|
+
# The request provides unsupported or invalid data
|
|
43
|
+
UNSUPPORTED_MEDIA_TYPE = 415
|
|
44
|
+
# The pagination offset exceeds the limit
|
|
45
|
+
RANGE_NOT_SATISFIABLE = 416
|
|
46
|
+
# The request is well-formed but contains semantic errors. Check the response body for details
|
|
47
|
+
UNPROCESSABLE_ENTITY = 422
|
|
48
|
+
# Too many requests hit the API too quickly
|
|
49
|
+
TOO_MANY_REQUESTS = 429
|
|
50
|
+
# An internal error occurred on the server
|
|
51
|
+
INTERNAL_SERVER_ERROR = 500
|
|
52
|
+
|
|
53
|
+
# Checks if the given exception matches the specific error code.
|
|
54
|
+
# @param exception [ApiException] The exception to check
|
|
55
|
+
# @param code [Integer] The error code to compare against
|
|
56
|
+
def self.is?(exception, code)
|
|
57
|
+
exception.code == code
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
# PostFinance Ruby SDK
|
|
3
|
+
#
|
|
4
|
+
# This library allows to interact with the PostFinance payment service.
|
|
5
|
+
#
|
|
6
|
+
# Copyright owner: Wallee AG
|
|
7
|
+
# Website: https://www.postfinance.ch/en/private.html
|
|
8
|
+
# Developer email: ecosystem-team@wallee.com
|
|
9
|
+
#
|
|
10
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
+
# you may not use this file except in compliance with the License.
|
|
12
|
+
# You may obtain a copy of the License at
|
|
13
|
+
#
|
|
14
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
+
#
|
|
16
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
# See the License for the specific language governing permissions and
|
|
20
|
+
# limitations under the License.
|
|
21
|
+
=end
|
|
22
|
+
|
|
23
|
+
require 'date'
|
|
24
|
+
require 'time'
|
|
25
|
+
|
|
26
|
+
module PostfinancecheckoutRubySdk
|
|
27
|
+
class BogusExpressCheckoutApprovalRequest
|
|
28
|
+
attr_accessor :payment_data
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'payment_data' => :'paymentData'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns attribute mapping this model knows about
|
|
38
|
+
def self.acceptable_attribute_map
|
|
39
|
+
attribute_map
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Returns all the JSON keys this model knows about
|
|
43
|
+
def self.acceptable_attributes
|
|
44
|
+
acceptable_attribute_map.values
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute type mapping.
|
|
48
|
+
def self.openapi_types
|
|
49
|
+
{
|
|
50
|
+
:'payment_data' => :'BogusExpressCheckoutPaymentData'
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# List of attributes with nullable: true
|
|
55
|
+
def self.openapi_nullable
|
|
56
|
+
Set.new([
|
|
57
|
+
])
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Initializes the object
|
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
62
|
+
def initialize(attributes = {})
|
|
63
|
+
if (!attributes.is_a?(Hash))
|
|
64
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PostfinancecheckoutRubySdk::BogusExpressCheckoutApprovalRequest` initialize method"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
68
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
70
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PostfinancecheckoutRubySdk::BogusExpressCheckoutApprovalRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
72
|
+
end
|
|
73
|
+
h[k.to_sym] = v
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'payment_data')
|
|
77
|
+
self.payment_data = attributes[:'payment_data']
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
82
|
+
# @return Array for valid properties with the reasons
|
|
83
|
+
def list_invalid_properties
|
|
84
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
85
|
+
invalid_properties = Array.new
|
|
86
|
+
invalid_properties
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Check to see if the all the properties in the model are valid
|
|
90
|
+
# @return true if the model is valid
|
|
91
|
+
def valid?
|
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
93
|
+
true
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Checks equality by comparing each attribute.
|
|
97
|
+
# @param [Object] Object to be compared
|
|
98
|
+
def ==(o)
|
|
99
|
+
return true if self.equal?(o)
|
|
100
|
+
self.class == o.class &&
|
|
101
|
+
payment_data == o.payment_data
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @see the `==` method
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def eql?(o)
|
|
107
|
+
self == o
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Calculates hash code according to all attributes.
|
|
111
|
+
# @return [Integer] Hash code
|
|
112
|
+
def hash
|
|
113
|
+
[payment_data].hash
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Builds the object from hash
|
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
|
+
# @return [Object] Returns the model itself
|
|
119
|
+
def self.build_from_hash(attributes)
|
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
122
|
+
transformed_hash = {}
|
|
123
|
+
openapi_types.each_pair do |key, type|
|
|
124
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
125
|
+
transformed_hash["#{key}"] = nil
|
|
126
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
127
|
+
# check to ensure the input is an array given that the attribute
|
|
128
|
+
# is documented as an array but the input is not
|
|
129
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
130
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
131
|
+
end
|
|
132
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
new(transformed_hash)
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Deserializes the data based on type
|
|
140
|
+
# @param string type Data type
|
|
141
|
+
# @param string value Value to be deserialized
|
|
142
|
+
# @return [Object] Deserialized data
|
|
143
|
+
def self._deserialize(type, value)
|
|
144
|
+
case type.to_sym
|
|
145
|
+
when :Time
|
|
146
|
+
Time.parse(value)
|
|
147
|
+
when :Date
|
|
148
|
+
Date.parse(value)
|
|
149
|
+
when :String
|
|
150
|
+
value.to_s
|
|
151
|
+
when :Integer
|
|
152
|
+
value.to_i
|
|
153
|
+
when :Float
|
|
154
|
+
value.to_f
|
|
155
|
+
when :Boolean
|
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
157
|
+
true
|
|
158
|
+
else
|
|
159
|
+
false
|
|
160
|
+
end
|
|
161
|
+
when :Object
|
|
162
|
+
# generic object (usually a Hash), return directly
|
|
163
|
+
value
|
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
|
170
|
+
{}.tap do |hash|
|
|
171
|
+
value.each do |k, v|
|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
else # model
|
|
176
|
+
# models (e.g. Pet) or oneOf
|
|
177
|
+
klass = PostfinancecheckoutRubySdk.const_get(type)
|
|
178
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Returns the string representation of the object
|
|
183
|
+
# @return [String] String presentation of the object
|
|
184
|
+
def to_s
|
|
185
|
+
to_hash.to_s
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
|
190
|
+
def to_body
|
|
191
|
+
to_hash
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Returns the object in the form of hash
|
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
|
196
|
+
def to_hash
|
|
197
|
+
hash = {}
|
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
199
|
+
value = self.send(attr)
|
|
200
|
+
if value.nil?
|
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
hash[param] = _to_hash(value)
|
|
206
|
+
end
|
|
207
|
+
hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Outputs non-array value in the form of hash
|
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
212
|
+
# @param [Object] value Any valid value
|
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
|
214
|
+
def _to_hash(value)
|
|
215
|
+
if value.is_a?(Array)
|
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
|
217
|
+
elsif value.is_a?(Hash)
|
|
218
|
+
{}.tap do |hash|
|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
220
|
+
end
|
|
221
|
+
elsif value.respond_to? :to_hash
|
|
222
|
+
value.to_hash
|
|
223
|
+
else
|
|
224
|
+
value
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
end
|