vrpayment-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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +56 -14
  3. data/LICENSE +1 -1
  4. data/README.md +57 -29
  5. data/lib/vrpayment-ruby-sdk/api_client.rb +1 -1
  6. data/lib/vrpayment-ruby-sdk/api_exception_error_codes.rb +60 -0
  7. data/lib/vrpayment-ruby-sdk/models/bogus_express_checkout_approval_request.rb +230 -0
  8. data/lib/vrpayment-ruby-sdk/models/bogus_express_checkout_payment_data.rb +241 -0
  9. data/lib/vrpayment-ruby-sdk/models/express_checkout_approval_response.rb +270 -0
  10. data/lib/vrpayment-ruby-sdk/models/express_checkout_create_response.rb +13 -4
  11. data/lib/vrpayment-ruby-sdk/models/express_checkout_session.rb +39 -1
  12. data/lib/vrpayment-ruby-sdk/models/express_checkout_session_create.rb +21 -1
  13. data/lib/vrpayment-ruby-sdk/models/express_checkout_shipping_address_change_request.rb +239 -0
  14. data/lib/vrpayment-ruby-sdk/models/express_checkout_shipping_address_change_response.rb +241 -0
  15. data/lib/vrpayment-ruby-sdk/models/express_checkout_shipping_method_change_request.rb +231 -0
  16. data/lib/vrpayment-ruby-sdk/models/express_checkout_shipping_method_change_response.rb +241 -0
  17. data/lib/vrpayment-ruby-sdk/models/express_checkout_shipping_option.rb +1 -1
  18. data/lib/vrpayment-ruby-sdk/models/payment_terminal_address.rb +43 -5
  19. data/lib/vrpayment-ruby-sdk/models/payment_terminal_dcc_transaction_sum.rb +302 -0
  20. data/lib/vrpayment-ruby-sdk/models/payment_terminal_transaction_sum.rb +332 -0
  21. data/lib/vrpayment-ruby-sdk/models/payment_terminal_transaction_summary.rb +347 -0
  22. data/lib/vrpayment-ruby-sdk/models/refund.rb +13 -1
  23. data/lib/vrpayment-ruby-sdk/models/refund_create.rb +13 -1
  24. data/lib/vrpayment-ruby-sdk/models/rendered_terminal_transaction_summary.rb +241 -0
  25. data/lib/vrpayment-ruby-sdk/models/scope.rb +15 -15
  26. data/lib/vrpayment-ruby-sdk/models/subscription_update_request.rb +22 -45
  27. data/lib/vrpayment-ruby-sdk/models/terminal_transaction_summary_list_response.rb +253 -0
  28. data/lib/vrpayment-ruby-sdk/models/terminal_transaction_summary_search_response.rb +263 -0
  29. data/lib/vrpayment-ruby-sdk/models/transaction_completion.rb +13 -1
  30. data/lib/vrpayment-ruby-sdk/models/transaction_completion_details.rb +26 -4
  31. data/lib/vrpayment-ruby-sdk/models/transaction_user_interface_type.rb +2 -1
  32. data/lib/vrpayment-ruby-sdk/sdk_exception_error_codes.rb +55 -0
  33. data/lib/vrpayment-ruby-sdk/service/bogus_express_checkout_service.rb +114 -0
  34. data/lib/vrpayment-ruby-sdk/service/express_checkout_service.rb +162 -0
  35. data/lib/vrpayment-ruby-sdk/service/payment_terminal_transaction_summaries_service.rb +372 -0
  36. data/lib/vrpayment-ruby-sdk/service/webhook_encryption_keys_service.rb +2 -2
  37. data/lib/vrpayment-ruby-sdk/utils/encryption_util.rb +5 -5
  38. data/lib/vrpayment-ruby-sdk/version.rb +1 -1
  39. data/lib/vrpayment-ruby-sdk/vrpayment_sdk_exception.rb +2 -33
  40. data/lib/vrpayment-ruby-sdk.rb +20 -1
  41. data/test/test_querying.rb +11 -0
  42. metadata +19 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf4a20abd8d0b2e5cf963eceefa5c8c6eb999f7bd5fde5c31059b62102a01641
4
- data.tar.gz: 53494b3343b2b0191ccbe8b66c7cd3b986aa5135582fd1631a20773617901810
3
+ metadata.gz: ef174b737da235efb93e17cb8072f33fa48d027113533de6e044ce5e5a407f1b
4
+ data.tar.gz: bc0fc78816143f44e171df2fb6822a939c78a231b7d636afd8d963293c0f12f4
5
5
  SHA512:
6
- metadata.gz: 155f08adab610849a44d3b4cc81b73df4baea6abf692cc8f042d0f2a2a586fe8e0a62fbdb23586dfa526702444acdfdcd57e7f5fb7d34208f19ac5fb4cbe6b80
7
- data.tar.gz: 8d492f4272c54335868d27a10ef1866b7f926687f0b209d68bd2e6710899160c30e588b80a6536fc46165174a7871662efe4fa427c702fd0024dcda8dd6d58fb
6
+ metadata.gz: 83e27b8aa6904de7319934087dcfd303590280cefd114e7036a199307bf943e09f878267649d7b0244723a08e99e0e0956c93eab17e51129fcabb93b7b7f8f82
7
+ data.tar.gz: f462f78b025c657627b9df4d0487ce5e07a974d04471aac885678577fe7438cd928fb7df3263e4856777d0c13a8206f397baa2ff7b95892a4f7676d630a54613
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vrpayment-ruby-sdk (6.2.0)
4
+ vrpayment-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 (12.0.0)
16
+ byebug (13.0.0)
17
+ reline (>= 0.6.0)
17
18
  coderay (1.1.3)
18
- concurrent-ruby (1.3.5)
19
- date (3.5.0)
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.16.0)
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.8.0)
38
+ net-http (0.9.1)
37
39
  uri (>= 0.11.1)
38
40
  parallel (1.27.0)
39
- parser (3.3.10.0)
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.15.2)
45
+ pry (0.16.0)
44
46
  coderay (~> 1.1)
45
47
  method_source (~> 1.0)
46
- pry-byebug (3.11.0)
47
- byebug (~> 12.0)
48
- pry (>= 0.13, < 0.16)
49
- psych (5.2.6)
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.1.8)
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
  vrpayment-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
+ vrpayment-ruby-sdk (6.4.0)
122
+
81
123
  BUNDLED WITH
82
- 2.7.2
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 2025 VR Payment GmbH
189
+ Copyright 2026 VR Payment GmbH
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
@@ -203,6 +203,11 @@ Web API client: [*link*](https://gateway.vr-payment.de//api/client)<br>
203
203
  &nbsp;&nbsp;&nbsp;&nbsp;<strong>GET</strong> /payment/bank-transactions/search
204
204
  &nbsp;&nbsp;&nbsp;&nbsp;Search bank transactions
205
205
  <br><br>
206
+ - <strong>BogusExpressCheckoutService</strong><br>
207
+ &nbsp;&nbsp;* <code>post_bogus_express_checkout_on_approve</code>
208
+ &nbsp;&nbsp;&nbsp;&nbsp;<strong>POST</strong> /bogus-express-checkout/on-approve
209
+ &nbsp;&nbsp;&nbsp;&nbsp;Approve express checkout wallet payment
210
+ <br><br>
206
211
  - <strong>ChargeAttemptsService</strong><br>
207
212
  &nbsp;&nbsp;* <code>get_payment_charge_attempts</code>
208
213
  &nbsp;&nbsp;&nbsp;&nbsp;<strong>GET</strong> /payment/charge-attempts
@@ -603,6 +608,16 @@ Web API client: [*link*](https://gateway.vr-payment.de//api/client)<br>
603
608
  &nbsp;&nbsp;&nbsp;&nbsp;<strong>GET</strong> /payment/dunning-flows/search
604
609
  &nbsp;&nbsp;&nbsp;&nbsp;Search dunning flows
605
610
  <br><br>
611
+ - <strong>ExpressCheckoutService</strong><br>
612
+ &nbsp;&nbsp;* <code>patch_express_checkout_shipping_address_change</code>
613
+ &nbsp;&nbsp;&nbsp;&nbsp;<strong>PATCH</strong> /express-checkout/shipping/address-change
614
+ &nbsp;&nbsp;&nbsp;&nbsp;Change shipping address
615
+ <br><br>
616
+ - <strong>ExpressCheckoutService</strong><br>
617
+ &nbsp;&nbsp;* <code>patch_express_checkout_shipping_method_change</code>
618
+ &nbsp;&nbsp;&nbsp;&nbsp;<strong>PATCH</strong> /express-checkout/shipping/method-change
619
+ &nbsp;&nbsp;&nbsp;&nbsp;Change shipping method
620
+ <br><br>
606
621
  - <strong>ExpressCheckoutService</strong><br>
607
622
  &nbsp;&nbsp;* <code>post_express_checkout_create_session</code>
608
623
  &nbsp;&nbsp;&nbsp;&nbsp;<strong>POST</strong> /express-checkout/create-session
@@ -983,6 +998,26 @@ Web API client: [*link*](https://gateway.vr-payment.de//api/client)<br>
983
998
  &nbsp;&nbsp;&nbsp;&nbsp;<strong>GET</strong> /payment/sales-channels/search
984
999
  &nbsp;&nbsp;&nbsp;&nbsp;Search payment sales channels.
985
1000
  <br><br>
1001
+ - <strong>PaymentTerminalTransactionSummariesService</strong><br>
1002
+ &nbsp;&nbsp;* <code>get_payment_terminals_transaction_summaries</code>
1003
+ &nbsp;&nbsp;&nbsp;&nbsp;<strong>GET</strong> /payment/terminals/transaction-summaries
1004
+ &nbsp;&nbsp;&nbsp;&nbsp;List all summaries
1005
+ <br><br>
1006
+ - <strong>PaymentTerminalTransactionSummariesService</strong><br>
1007
+ &nbsp;&nbsp;* <code>get_payment_terminals_transaction_summaries_id</code>
1008
+ &nbsp;&nbsp;&nbsp;&nbsp;<strong>GET</strong> /payment/terminals/transaction-summaries/{id}
1009
+ &nbsp;&nbsp;&nbsp;&nbsp;Retrieve a summary
1010
+ <br><br>
1011
+ - <strong>PaymentTerminalTransactionSummariesService</strong><br>
1012
+ &nbsp;&nbsp;* <code>get_payment_terminals_transaction_summaries_id_receipt</code>
1013
+ &nbsp;&nbsp;&nbsp;&nbsp;<strong>GET</strong> /payment/terminals/transaction-summaries/{id}/receipt
1014
+ &nbsp;&nbsp;&nbsp;&nbsp;Retrieve a rendered summary receipt
1015
+ <br><br>
1016
+ - <strong>PaymentTerminalTransactionSummariesService</strong><br>
1017
+ &nbsp;&nbsp;* <code>get_payment_terminals_transaction_summaries_search</code>
1018
+ &nbsp;&nbsp;&nbsp;&nbsp;<strong>GET</strong> /payment/terminals/transaction-summaries/search
1019
+ &nbsp;&nbsp;&nbsp;&nbsp;Search summaries
1020
+ <br><br>
986
1021
  - <strong>PaymentTerminalsService</strong><br>
987
1022
  &nbsp;&nbsp;* <code>delete_payment_terminals_id</code>
988
1023
  &nbsp;&nbsp;&nbsp;&nbsp;<strong>DELETE</strong> /payment/terminals/{id}
@@ -2507,6 +2542,8 @@ Additional Api models documentation: [*link*](https://gateway.vr-payment.de/en-u
2507
2542
  * <strong>BillingCycleModel</strong>
2508
2543
  * <strong>BillingCycleType</strong>
2509
2544
  * <strong>BillingDayCustomization</strong>
2545
+ * <strong>BogusExpressCheckoutApprovalRequest</strong>
2546
+ * <strong>BogusExpressCheckoutPaymentData</strong>
2510
2547
  * <strong>CardAuthenticationResponse</strong>
2511
2548
  * <strong>CardAuthenticationVersion</strong>
2512
2549
  * <strong>CardCryptogram</strong>
@@ -2606,10 +2643,15 @@ Additional Api models documentation: [*link*](https://gateway.vr-payment.de/en-u
2606
2643
  * <strong>DunningFlowSearchResponse</strong>
2607
2644
  * <strong>DunningFlowType</strong>
2608
2645
  * <strong>Environment</strong>
2646
+ * <strong>ExpressCheckoutApprovalResponse</strong>
2609
2647
  * <strong>ExpressCheckoutCreateResponse</strong>
2610
2648
  * <strong>ExpressCheckoutSession</strong>
2611
2649
  * <strong>ExpressCheckoutSessionCreate</strong>
2612
2650
  * <strong>ExpressCheckoutSessionState</strong>
2651
+ * <strong>ExpressCheckoutShippingAddressChangeRequest</strong>
2652
+ * <strong>ExpressCheckoutShippingAddressChangeResponse</strong>
2653
+ * <strong>ExpressCheckoutShippingMethodChangeRequest</strong>
2654
+ * <strong>ExpressCheckoutShippingMethodChangeResponse</strong>
2613
2655
  * <strong>ExpressCheckoutShippingOption</strong>
2614
2656
  * <strong>ExpressCheckoutWalletType</strong>
2615
2657
  * <strong>ExternalTransferBankTransaction</strong>
@@ -2743,6 +2785,7 @@ Additional Api models documentation: [*link*](https://gateway.vr-payment.de/en-u
2743
2785
  * <strong>PaymentTerminalConfigurationVersion</strong>
2744
2786
  * <strong>PaymentTerminalConfigurationVersionState</strong>
2745
2787
  * <strong>PaymentTerminalCreate</strong>
2788
+ * <strong>PaymentTerminalDccTransactionSum</strong>
2746
2789
  * <strong>PaymentTerminalLocation</strong>
2747
2790
  * <strong>PaymentTerminalLocationState</strong>
2748
2791
  * <strong>PaymentTerminalLocationVersion</strong>
@@ -2750,6 +2793,8 @@ Additional Api models documentation: [*link*](https://gateway.vr-payment.de/en-u
2750
2793
  * <strong>PaymentTerminalPreparing</strong>
2751
2794
  * <strong>PaymentTerminalReceiptType</strong>
2752
2795
  * <strong>PaymentTerminalState</strong>
2796
+ * <strong>PaymentTerminalTransactionSum</strong>
2797
+ * <strong>PaymentTerminalTransactionSummary</strong>
2753
2798
  * <strong>PaymentTerminalTransactionSummaryReference</strong>
2754
2799
  * <strong>PaymentTerminalType</strong>
2755
2800
  * <strong>PaymentTerminalUpdate</strong>
@@ -2809,6 +2854,7 @@ Additional Api models documentation: [*link*](https://gateway.vr-payment.de/en-u
2809
2854
  * <strong>RenderedDocument</strong>
2810
2855
  * <strong>RenderedTerminalReceipt</strong>
2811
2856
  * <strong>RenderedTerminalReceiptListResponse</strong>
2857
+ * <strong>RenderedTerminalTransactionSummary</strong>
2812
2858
  * <strong>RestAddressFormat</strong>
2813
2859
  * <strong>RestAddressFormatField</strong>
2814
2860
  * <strong>RestApiBulkOperationResult</strong>
@@ -2932,6 +2978,8 @@ Additional Api models documentation: [*link*](https://gateway.vr-payment.de/en-u
2932
2978
  * <strong>TerminalListResponse</strong>
2933
2979
  * <strong>TerminalReceiptFormat</strong>
2934
2980
  * <strong>TerminalSearchResponse</strong>
2981
+ * <strong>TerminalTransactionSummaryListResponse</strong>
2982
+ * <strong>TerminalTransactionSummarySearchResponse</strong>
2935
2983
  * <strong>Token</strong>
2936
2984
  * <strong>TokenCreate</strong>
2937
2985
  * <strong>TokenListResponse</strong>
@@ -3012,40 +3060,20 @@ When working with webhooks, the `VrpaymentRubySdk::VRPaymentSdkException` may th
3012
3060
 
3013
3061
  ### Error Code Categories
3014
3062
 
3015
- | **Range** | **Category** | **Description** |
3016
- |-----------|--------------|-----------------|
3017
- | **404** | Not Found | Indicates that the requested resource could not be found or the endpoint returned an empty response |
3018
- | **1000–1999** | Client-Side Errors | Errors typically caused by invalid input |
3019
- | **2000–2999** | Server-Side Errors | Errors typically caused by incorrect data provided by the server |
3020
-
3021
- ### Error Code Reference
3022
-
3023
- | **Code** | **Error Name** | **Description** | **Category** |
3024
- |----------|----------------|-----------------|--------------|
3025
- | 404 | `UNKNOWN_WEBHOOK_ENCRYPTION_PUBLIC_KEY` | Unknown webhook signature public key | Not Found |
3026
- | 1000 | `WEBHOOK_ENCRYPTION_GENERAL_ERROR` | General webhook encryption error | Client-Side |
3027
- | 1001 | `INVALID_WEBHOOK_ENCRYPTION_PUBLIC_KEY` | Invalid webhook signature public key | Client-Side |
3028
- | 1002 | `INVALID_WEBHOOK_ENCRYPTION_HEADER_FORMAT` | Invalid webhook signature header | Client-Side |
3029
- | 1003 | `UNSUPPORTED_WEBHOOK_ENCRYPTION_ALGORYTHM` | Unsupported webhook signature algorithm | Client-Side |
3030
- | 1004 | `UNKNOWN_WEBHOOK_ENCRYPTION_PROVIDER` | Unknown webhook encryption provider | Client-Side |
3031
- | 1005 | `WEBHOOK_ENCRYPTION_VERIFIER_INIT_ERROR` | Encryption verifier initialization error | Client-Side |
3032
- | 1006 | `WEBHOOK_ENCRYPTION_VERIFIER_CONTENT_UPDATE_ERROR` | Error during content update in encryption verifier | Client-Side |
3033
- | 1007 | `WEBHOOK_ENCRYPTION_SIGNATURE_VERIFICATION_FAILED` | Encryption signature verification failed | Client-Side |
3034
- | 1008 | `INVALID_WEBHOOK_ENCRYPTION_CONTENT_SIGNATURE` | Invalid webhook content signature | Client-Side |
3035
- | 2000 | `MISSING_WEBHOOK_ENCRYPTION_ALGORYTHM` | Missing webhook signature algorithm value | Server-Side |
3063
+ | **Exception** | **Description** |
3064
+ |----------------------------|---------------------------------------------------------------------------------------|
3065
+ | **ApiExceptionErrorCodes** | Lists the possible HTTP error codes an `ApiException` can generate |
3066
+ | **SdkExceptionErrorCodes** | Lists the possible error codes a `VRPaymentSdkException` can generate |
3036
3067
 
3037
3068
  ### Usage Example
3038
3069
  ```ruby
3039
3070
  begin
3040
- # Webhook SDK operation
3041
- rescue VRPaymentSdkException => e
3042
- case e.code
3043
- when 1001
3044
- # Handle invalid public key
3045
- when 1007
3046
- # Handle signature verification failure
3071
+ # SDK operation
3072
+ rescue VrpaymentRubySdk::ApiError => ex
3073
+ if VrpaymentRubySdk::ApiExceptionErrorCodes.is?(ex, VrpaymentRubySdk::ApiExceptionErrorCodes::CONFLICT)
3074
+ # Conflict error handling
3047
3075
  else
3048
- # Handle other errors
3076
+ # Other error handling
3049
3077
  end
3050
3078
  end
3051
3079
  ```
@@ -118,7 +118,7 @@ module VrpaymentRubySdk
118
118
  http_method = http_method.to_sym.downcase
119
119
 
120
120
  default_headers = {
121
- 'x-meta-sdk-version': "6.2.0",
121
+ 'x-meta-sdk-version': "6.4.0",
122
122
  'x-meta-sdk-language': "ruby",
123
123
  'x-meta-sdk-provider': "vrpayment",
124
124
  'x-meta-sdk-language-version': RUBY_VERSION
@@ -0,0 +1,60 @@
1
+ =begin
2
+ # VR Payment Ruby SDK
3
+ #
4
+ # This library allows to interact with the VR Payment payment service.
5
+ #
6
+ # Copyright owner: Wallee AG
7
+ # Website: https://www.vr-payment.de
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 VrpaymentRubySdk
24
+ module ApiExceptionErrorCodes
25
+ # This class represents possible HTTP error codes which can be sent by the API.
26
+ # This list corresponds to https://gateway.vr-payment.de/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
+ # VR Payment Ruby SDK
3
+ #
4
+ # This library allows to interact with the VR Payment payment service.
5
+ #
6
+ # Copyright owner: Wallee AG
7
+ # Website: https://www.vr-payment.de
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 VrpaymentRubySdk
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 `VrpaymentRubySdk::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 `VrpaymentRubySdk::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 = VrpaymentRubySdk.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