wallee-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/wallee-ruby-sdk/api_client.rb +1 -1
- data/lib/wallee-ruby-sdk/api_exception_error_codes.rb +60 -0
- data/lib/wallee-ruby-sdk/models/bogus_express_checkout_approval_request.rb +230 -0
- data/lib/wallee-ruby-sdk/models/bogus_express_checkout_payment_data.rb +241 -0
- data/lib/wallee-ruby-sdk/models/express_checkout_approval_response.rb +270 -0
- data/lib/wallee-ruby-sdk/models/express_checkout_create_response.rb +13 -4
- data/lib/wallee-ruby-sdk/models/express_checkout_session.rb +39 -1
- data/lib/wallee-ruby-sdk/models/express_checkout_session_create.rb +21 -1
- data/lib/wallee-ruby-sdk/models/express_checkout_shipping_address_change_request.rb +239 -0
- data/lib/wallee-ruby-sdk/models/express_checkout_shipping_address_change_response.rb +241 -0
- data/lib/wallee-ruby-sdk/models/express_checkout_shipping_method_change_request.rb +231 -0
- data/lib/wallee-ruby-sdk/models/express_checkout_shipping_method_change_response.rb +241 -0
- data/lib/wallee-ruby-sdk/models/express_checkout_shipping_option.rb +1 -1
- data/lib/wallee-ruby-sdk/models/payment_terminal_address.rb +43 -5
- data/lib/wallee-ruby-sdk/models/payment_terminal_dcc_transaction_sum.rb +302 -0
- data/lib/wallee-ruby-sdk/models/payment_terminal_transaction_sum.rb +332 -0
- data/lib/wallee-ruby-sdk/models/payment_terminal_transaction_summary.rb +347 -0
- data/lib/wallee-ruby-sdk/models/refund.rb +13 -1
- data/lib/wallee-ruby-sdk/models/refund_create.rb +13 -1
- data/lib/wallee-ruby-sdk/models/rendered_terminal_transaction_summary.rb +241 -0
- data/lib/wallee-ruby-sdk/models/scope.rb +15 -15
- data/lib/wallee-ruby-sdk/models/terminal_transaction_summary_list_response.rb +253 -0
- data/lib/wallee-ruby-sdk/models/terminal_transaction_summary_search_response.rb +263 -0
- data/lib/wallee-ruby-sdk/models/transaction_completion.rb +13 -1
- data/lib/wallee-ruby-sdk/models/transaction_completion_details.rb +26 -4
- data/lib/wallee-ruby-sdk/models/transaction_user_interface_type.rb +2 -1
- data/lib/wallee-ruby-sdk/sdk_exception_error_codes.rb +55 -0
- data/lib/wallee-ruby-sdk/service/bogus_express_checkout_service.rb +114 -0
- data/lib/wallee-ruby-sdk/service/express_checkout_service.rb +162 -0
- data/lib/wallee-ruby-sdk/service/payment_terminal_transaction_summaries_service.rb +372 -0
- data/lib/wallee-ruby-sdk/service/webhook_encryption_keys_service.rb +2 -2
- data/lib/wallee-ruby-sdk/utils/encryption_util.rb +5 -5
- data/lib/wallee-ruby-sdk/version.rb +1 -1
- data/lib/wallee-ruby-sdk/wallee_sdk_exception.rb +2 -33
- data/lib/wallee-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: f8c4ee7c8230b4f0b1e8f4edbabce7f0f358cc6bd0d257798f46eb56007c0375
|
|
4
|
+
data.tar.gz: f59cbf96480b2428f8a94106744d90f2e4623d5a994adc8579dc8abcf58f9984
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fe75c85e732ec339b4d74ee3c9a09359f2a918dd293044f9e7326acd83401ad647faadd69b17973af11bfa443a8071fd644031f1d8359654705ce5ed75a1ce87
|
|
7
|
+
data.tar.gz: 207b856202202b56689d9efd027310d3a0abb41f04accd517dea1466f1beefe4bfee2f7405000143d89ff1a36e9c8686b747385154db143fa66cffff15f4e077
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
wallee-ruby-sdk (6.
|
|
4
|
+
wallee-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
|
test-unit (~> 3.6.7)
|
|
79
84
|
wallee-ruby-sdk!
|
|
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
|
+
power_assert (3.0.1) sha256=8ce9876716cc74e863fcd4cdcdc52d792bd983598d1af3447083a3a9a4d34103
|
|
108
|
+
pry (0.16.0) sha256=d76c69065698ed1f85e717bd33d7942c38a50868f6b0673c636192b3d1b6054e
|
|
109
|
+
pry-byebug (3.12.0) sha256=594e094ae8a8390a7ad4c7b36ae36e13304ed02664c67417d108dc5f7213d1b7
|
|
110
|
+
psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974
|
|
111
|
+
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
|
|
112
|
+
rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
|
|
113
|
+
rake (13.0.6) sha256=5ce4bf5037b4196c24ac62834d8db1ce175470391026bd9e557d669beeb19097
|
|
114
|
+
reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835
|
|
115
|
+
rubocop (0.66.0) sha256=f05a6896f367765b3f0fba663d0add120444f8de604dada405662b10a0860f5a
|
|
116
|
+
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
|
|
117
|
+
stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1
|
|
118
|
+
test-unit (3.6.9) sha256=2be6ae0354623702f004ae626c98337f5e17f2ecc0fc334a9e6fdbb2c7c534da
|
|
119
|
+
unicode-display_width (1.5.0) sha256=9890eebd24feb4cb0e0542c9b8c6beecb40cda27be8c7afe49312625b36156eb
|
|
120
|
+
uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
|
|
121
|
+
wallee-ruby-sdk (6.4.0)
|
|
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://app-wallee.com//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
|
|
@@ -748,6 +753,16 @@ Web API client: [*link*](https://app-wallee.com//api/client)<br>
|
|
|
748
753
|
<strong>GET</strong> /payment/dunning-flows/search
|
|
749
754
|
Search dunning flows
|
|
750
755
|
<br><br>
|
|
756
|
+
- <strong>ExpressCheckoutService</strong><br>
|
|
757
|
+
* <code>patch_express_checkout_shipping_address_change</code>
|
|
758
|
+
<strong>PATCH</strong> /express-checkout/shipping/address-change
|
|
759
|
+
Change shipping address
|
|
760
|
+
<br><br>
|
|
761
|
+
- <strong>ExpressCheckoutService</strong><br>
|
|
762
|
+
* <code>patch_express_checkout_shipping_method_change</code>
|
|
763
|
+
<strong>PATCH</strong> /express-checkout/shipping/method-change
|
|
764
|
+
Change shipping method
|
|
765
|
+
<br><br>
|
|
751
766
|
- <strong>ExpressCheckoutService</strong><br>
|
|
752
767
|
* <code>post_express_checkout_create_session</code>
|
|
753
768
|
<strong>POST</strong> /express-checkout/create-session
|
|
@@ -1128,6 +1143,26 @@ Web API client: [*link*](https://app-wallee.com//api/client)<br>
|
|
|
1128
1143
|
<strong>GET</strong> /payment/sales-channels/search
|
|
1129
1144
|
Search payment sales channels.
|
|
1130
1145
|
<br><br>
|
|
1146
|
+
- <strong>PaymentTerminalTransactionSummariesService</strong><br>
|
|
1147
|
+
* <code>get_payment_terminals_transaction_summaries</code>
|
|
1148
|
+
<strong>GET</strong> /payment/terminals/transaction-summaries
|
|
1149
|
+
List all summaries
|
|
1150
|
+
<br><br>
|
|
1151
|
+
- <strong>PaymentTerminalTransactionSummariesService</strong><br>
|
|
1152
|
+
* <code>get_payment_terminals_transaction_summaries_id</code>
|
|
1153
|
+
<strong>GET</strong> /payment/terminals/transaction-summaries/{id}
|
|
1154
|
+
Retrieve a summary
|
|
1155
|
+
<br><br>
|
|
1156
|
+
- <strong>PaymentTerminalTransactionSummariesService</strong><br>
|
|
1157
|
+
* <code>get_payment_terminals_transaction_summaries_id_receipt</code>
|
|
1158
|
+
<strong>GET</strong> /payment/terminals/transaction-summaries/{id}/receipt
|
|
1159
|
+
Retrieve a rendered summary receipt
|
|
1160
|
+
<br><br>
|
|
1161
|
+
- <strong>PaymentTerminalTransactionSummariesService</strong><br>
|
|
1162
|
+
* <code>get_payment_terminals_transaction_summaries_search</code>
|
|
1163
|
+
<strong>GET</strong> /payment/terminals/transaction-summaries/search
|
|
1164
|
+
Search summaries
|
|
1165
|
+
<br><br>
|
|
1131
1166
|
- <strong>PaymentTerminalsService</strong><br>
|
|
1132
1167
|
* <code>delete_payment_terminals_id</code>
|
|
1133
1168
|
<strong>DELETE</strong> /payment/terminals/{id}
|
|
@@ -2656,6 +2691,8 @@ Additional Api models documentation: [*link*](https://app-wallee.com/en-us/doc/a
|
|
|
2656
2691
|
* <strong>BillingCycleModel</strong>
|
|
2657
2692
|
* <strong>BillingCycleType</strong>
|
|
2658
2693
|
* <strong>BillingDayCustomization</strong>
|
|
2694
|
+
* <strong>BogusExpressCheckoutApprovalRequest</strong>
|
|
2695
|
+
* <strong>BogusExpressCheckoutPaymentData</strong>
|
|
2659
2696
|
* <strong>CardAuthenticationResponse</strong>
|
|
2660
2697
|
* <strong>CardAuthenticationVersion</strong>
|
|
2661
2698
|
* <strong>CardCryptogram</strong>
|
|
@@ -2777,10 +2814,15 @@ Additional Api models documentation: [*link*](https://app-wallee.com/en-us/doc/a
|
|
|
2777
2814
|
* <strong>DunningFlowSearchResponse</strong>
|
|
2778
2815
|
* <strong>DunningFlowType</strong>
|
|
2779
2816
|
* <strong>Environment</strong>
|
|
2817
|
+
* <strong>ExpressCheckoutApprovalResponse</strong>
|
|
2780
2818
|
* <strong>ExpressCheckoutCreateResponse</strong>
|
|
2781
2819
|
* <strong>ExpressCheckoutSession</strong>
|
|
2782
2820
|
* <strong>ExpressCheckoutSessionCreate</strong>
|
|
2783
2821
|
* <strong>ExpressCheckoutSessionState</strong>
|
|
2822
|
+
* <strong>ExpressCheckoutShippingAddressChangeRequest</strong>
|
|
2823
|
+
* <strong>ExpressCheckoutShippingAddressChangeResponse</strong>
|
|
2824
|
+
* <strong>ExpressCheckoutShippingMethodChangeRequest</strong>
|
|
2825
|
+
* <strong>ExpressCheckoutShippingMethodChangeResponse</strong>
|
|
2784
2826
|
* <strong>ExpressCheckoutShippingOption</strong>
|
|
2785
2827
|
* <strong>ExpressCheckoutWalletType</strong>
|
|
2786
2828
|
* <strong>ExternalTransferBankTransaction</strong>
|
|
@@ -2915,6 +2957,7 @@ Additional Api models documentation: [*link*](https://app-wallee.com/en-us/doc/a
|
|
|
2915
2957
|
* <strong>PaymentTerminalConfigurationVersion</strong>
|
|
2916
2958
|
* <strong>PaymentTerminalConfigurationVersionState</strong>
|
|
2917
2959
|
* <strong>PaymentTerminalCreate</strong>
|
|
2960
|
+
* <strong>PaymentTerminalDccTransactionSum</strong>
|
|
2918
2961
|
* <strong>PaymentTerminalLocation</strong>
|
|
2919
2962
|
* <strong>PaymentTerminalLocationState</strong>
|
|
2920
2963
|
* <strong>PaymentTerminalLocationVersion</strong>
|
|
@@ -2922,6 +2965,8 @@ Additional Api models documentation: [*link*](https://app-wallee.com/en-us/doc/a
|
|
|
2922
2965
|
* <strong>PaymentTerminalPreparing</strong>
|
|
2923
2966
|
* <strong>PaymentTerminalReceiptType</strong>
|
|
2924
2967
|
* <strong>PaymentTerminalState</strong>
|
|
2968
|
+
* <strong>PaymentTerminalTransactionSum</strong>
|
|
2969
|
+
* <strong>PaymentTerminalTransactionSummary</strong>
|
|
2925
2970
|
* <strong>PaymentTerminalTransactionSummaryReference</strong>
|
|
2926
2971
|
* <strong>PaymentTerminalType</strong>
|
|
2927
2972
|
* <strong>PaymentTerminalUpdate</strong>
|
|
@@ -2981,6 +3026,7 @@ Additional Api models documentation: [*link*](https://app-wallee.com/en-us/doc/a
|
|
|
2981
3026
|
* <strong>RenderedDocument</strong>
|
|
2982
3027
|
* <strong>RenderedTerminalReceipt</strong>
|
|
2983
3028
|
* <strong>RenderedTerminalReceiptListResponse</strong>
|
|
3029
|
+
* <strong>RenderedTerminalTransactionSummary</strong>
|
|
2984
3030
|
* <strong>RestAddressFormat</strong>
|
|
2985
3031
|
* <strong>RestAddressFormatField</strong>
|
|
2986
3032
|
* <strong>RestApiBulkOperationResult</strong>
|
|
@@ -3106,6 +3152,8 @@ Additional Api models documentation: [*link*](https://app-wallee.com/en-us/doc/a
|
|
|
3106
3152
|
* <strong>TerminalListResponse</strong>
|
|
3107
3153
|
* <strong>TerminalReceiptFormat</strong>
|
|
3108
3154
|
* <strong>TerminalSearchResponse</strong>
|
|
3155
|
+
* <strong>TerminalTransactionSummaryListResponse</strong>
|
|
3156
|
+
* <strong>TerminalTransactionSummarySearchResponse</strong>
|
|
3109
3157
|
* <strong>Token</strong>
|
|
3110
3158
|
* <strong>TokenCreate</strong>
|
|
3111
3159
|
* <strong>TokenListResponse</strong>
|
|
@@ -3186,40 +3234,20 @@ When working with webhooks, the `WalleeRubySdk::WalleeSdkException` may throw er
|
|
|
3186
3234
|
|
|
3187
3235
|
### Error Code Categories
|
|
3188
3236
|
|
|
3189
|
-
| **
|
|
3190
|
-
|
|
3191
|
-
| **
|
|
3192
|
-
| **
|
|
3193
|
-
| **2000–2999** | Server-Side Errors | Errors typically caused by incorrect data provided by the server |
|
|
3194
|
-
|
|
3195
|
-
### Error Code Reference
|
|
3196
|
-
|
|
3197
|
-
| **Code** | **Error Name** | **Description** | **Category** |
|
|
3198
|
-
|----------|----------------|-----------------|--------------|
|
|
3199
|
-
| 404 | `UNKNOWN_WEBHOOK_ENCRYPTION_PUBLIC_KEY` | Unknown webhook signature public key | Not Found |
|
|
3200
|
-
| 1000 | `WEBHOOK_ENCRYPTION_GENERAL_ERROR` | General webhook encryption error | Client-Side |
|
|
3201
|
-
| 1001 | `INVALID_WEBHOOK_ENCRYPTION_PUBLIC_KEY` | Invalid webhook signature public key | Client-Side |
|
|
3202
|
-
| 1002 | `INVALID_WEBHOOK_ENCRYPTION_HEADER_FORMAT` | Invalid webhook signature header | Client-Side |
|
|
3203
|
-
| 1003 | `UNSUPPORTED_WEBHOOK_ENCRYPTION_ALGORYTHM` | Unsupported webhook signature algorithm | Client-Side |
|
|
3204
|
-
| 1004 | `UNKNOWN_WEBHOOK_ENCRYPTION_PROVIDER` | Unknown webhook encryption provider | Client-Side |
|
|
3205
|
-
| 1005 | `WEBHOOK_ENCRYPTION_VERIFIER_INIT_ERROR` | Encryption verifier initialization error | Client-Side |
|
|
3206
|
-
| 1006 | `WEBHOOK_ENCRYPTION_VERIFIER_CONTENT_UPDATE_ERROR` | Error during content update in encryption verifier | Client-Side |
|
|
3207
|
-
| 1007 | `WEBHOOK_ENCRYPTION_SIGNATURE_VERIFICATION_FAILED` | Encryption signature verification failed | Client-Side |
|
|
3208
|
-
| 1008 | `INVALID_WEBHOOK_ENCRYPTION_CONTENT_SIGNATURE` | Invalid webhook content signature | Client-Side |
|
|
3209
|
-
| 2000 | `MISSING_WEBHOOK_ENCRYPTION_ALGORYTHM` | Missing webhook signature algorithm value | Server-Side |
|
|
3237
|
+
| **Exception** | **Description** |
|
|
3238
|
+
|----------------------------|---------------------------------------------------------------------------------------|
|
|
3239
|
+
| **ApiExceptionErrorCodes** | Lists the possible HTTP error codes an `ApiException` can generate |
|
|
3240
|
+
| **SdkExceptionErrorCodes** | Lists the possible error codes a `WalleeSdkException` can generate |
|
|
3210
3241
|
|
|
3211
3242
|
### Usage Example
|
|
3212
3243
|
```ruby
|
|
3213
3244
|
begin
|
|
3214
|
-
#
|
|
3215
|
-
rescue
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
# Handle invalid public key
|
|
3219
|
-
when 1007
|
|
3220
|
-
# Handle signature verification failure
|
|
3245
|
+
# SDK operation
|
|
3246
|
+
rescue WalleeRubySdk::ApiError => ex
|
|
3247
|
+
if WalleeRubySdk::ApiExceptionErrorCodes.is?(ex, WalleeRubySdk::ApiExceptionErrorCodes::CONFLICT)
|
|
3248
|
+
# Conflict error handling
|
|
3221
3249
|
else
|
|
3222
|
-
#
|
|
3250
|
+
# Other error handling
|
|
3223
3251
|
end
|
|
3224
3252
|
end
|
|
3225
3253
|
```
|
|
@@ -118,7 +118,7 @@ module WalleeRubySdk
|
|
|
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': "wallee",
|
|
124
124
|
'x-meta-sdk-language-version': RUBY_VERSION
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
# Wallee AG Ruby SDK
|
|
3
|
+
#
|
|
4
|
+
# This library allows to interact with the Wallee AG payment service.
|
|
5
|
+
#
|
|
6
|
+
# Copyright owner: Wallee AG
|
|
7
|
+
# Website: https://en.wallee.com
|
|
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 WalleeRubySdk
|
|
24
|
+
module ApiExceptionErrorCodes
|
|
25
|
+
# This class represents possible HTTP error codes which can be sent by the API.
|
|
26
|
+
# This list corresponds to https://app-wallee.com/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
|
+
# Wallee AG Ruby SDK
|
|
3
|
+
#
|
|
4
|
+
# This library allows to interact with the Wallee AG payment service.
|
|
5
|
+
#
|
|
6
|
+
# Copyright owner: Wallee AG
|
|
7
|
+
# Website: https://en.wallee.com
|
|
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 WalleeRubySdk
|
|
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 `WalleeRubySdk::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 `WalleeRubySdk::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 = WalleeRubySdk.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
|