cybersource_rest_client 0.0.87 → 0.0.88

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 (104) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cybersource_rest_client/api/acp_checkout_api.rb +553 -0
  3. data/lib/cybersource_rest_client/api/agent_registration_api.rb +721 -0
  4. data/lib/cybersource_rest_client/api/bank_account_validation_api.rb +0 -1
  5. data/lib/cybersource_rest_client/api/enrollment_api.rb +104 -0
  6. data/lib/cybersource_rest_client/api/{merchant_capabilities_api.rb → merchant_registration_api.rb} +47 -391
  7. data/lib/cybersource_rest_client/api/payment_events_api.rb +197 -0
  8. data/lib/cybersource_rest_client/api/product_feed_api.rb +365 -0
  9. data/lib/cybersource_rest_client/api/purchase_intent_api.rb +278 -0
  10. data/lib/cybersource_rest_client/api/ucp_checkout_api.rb +453 -0
  11. data/lib/cybersource_rest_client/models/activate_merchant_key_response200.rb +1 -1
  12. data/lib/cybersource_rest_client/models/add_agent_key_response201.rb +11 -11
  13. data/lib/cybersource_rest_client/models/agent_registration_response201.rb +13 -15
  14. data/lib/cybersource_rest_client/models/agent_registration_response201_keys.rb +8 -8
  15. data/lib/cybersource_rest_client/models/agent_request.rb +9 -11
  16. data/lib/cybersource_rest_client/models/agent_update.rb +7 -9
  17. data/lib/cybersource_rest_client/models/auth_reversal_request.rb +1 -1
  18. data/lib/cybersource_rest_client/models/boarding_payouts_configurations.rb +1 -1
  19. data/lib/cybersource_rest_client/models/{inline_response_200_19_google_merchant_products.rb → boarding_payouts_configurations_acquirer.rb} +33 -76
  20. data/lib/cybersource_rest_client/models/{inline_response_200_19_errors.rb → boarding_payouts_configurations_merchant_descriptor.rb} +25 -33
  21. data/lib/cybersource_rest_client/models/boarding_payouts_configurations_processors.rb +581 -0
  22. data/lib/cybersource_rest_client/models/capture_payment_request.rb +1 -1
  23. data/lib/cybersource_rest_client/models/create_order_request.rb +11 -1
  24. data/lib/cybersource_rest_client/models/create_payment_request.rb +14 -1
  25. data/lib/cybersource_rest_client/models/create_session_req.rb +14 -1
  26. data/lib/cybersource_rest_client/models/create_session_request.rb +14 -1
  27. data/lib/cybersource_rest_client/models/iccv1agents_keys.rb +4 -4
  28. data/lib/cybersource_rest_client/models/iccv1merchants_api_integrations.rb +2 -2
  29. data/lib/cybersource_rest_client/models/iccv1merchants_encryption_key.rb +6 -6
  30. data/lib/cybersource_rest_client/models/iccv1merchants_protocol_interactions.rb +1 -1
  31. data/lib/cybersource_rest_client/models/iccv1merchants_web_integrations.rb +2 -2
  32. data/lib/cybersource_rest_client/models/inline_response_200_17.rb +55 -0
  33. data/lib/cybersource_rest_client/models/inline_response_200_18.rb +40 -0
  34. data/lib/cybersource_rest_client/models/inline_response_200_19.rb +30 -107
  35. data/lib/cybersource_rest_client/models/inline_response_200_19_processing.rb +213 -0
  36. data/lib/cybersource_rest_client/models/inline_response_200_19_syndication.rb +224 -0
  37. data/lib/cybersource_rest_client/models/inline_response_200_20_products.rb +80 -682
  38. data/lib/cybersource_rest_client/models/inline_response_201_12.rb +40 -0
  39. data/lib/cybersource_rest_client/models/inline_response_201_12_fulfillment_options.rb +30 -0
  40. data/lib/cybersource_rest_client/models/inline_response_201_12_totals.rb +15 -0
  41. data/lib/cybersource_rest_client/models/inline_response_201_6_setups_risk.rb +15 -5
  42. data/lib/cybersource_rest_client/models/inline_response_201_6_setups_value_added_services.rb +15 -5
  43. data/lib/cybersource_rest_client/models/{deactivate_merchant_key_response200.rb → inline_response_202_1.rb} +11 -16
  44. data/lib/cybersource_rest_client/models/key_request.rb +4 -4
  45. data/lib/cybersource_rest_client/models/key_request_1.rb +5 -5
  46. data/lib/cybersource_rest_client/models/key_update.rb +5 -5
  47. data/lib/cybersource_rest_client/models/key_update_1.rb +5 -5
  48. data/lib/cybersource_rest_client/models/list_agent_keys_response200.rb +2 -2
  49. data/lib/cybersource_rest_client/models/merchant_registration_response201.rb +10 -10
  50. data/lib/cybersource_rest_client/models/merchant_registration_response201_api_integrations.rb +225 -0
  51. data/lib/cybersource_rest_client/models/merchant_registration_response201_keys.rb +1 -1
  52. data/lib/cybersource_rest_client/models/merchant_registration_response201_web_integrations.rb +225 -0
  53. data/lib/cybersource_rest_client/models/merchant_request.rb +7 -7
  54. data/lib/cybersource_rest_client/models/merchant_update.rb +7 -7
  55. data/lib/cybersource_rest_client/models/mit_reversal_request.rb +1 -1
  56. data/lib/cybersource_rest_client/models/mit_void_request.rb +15 -5
  57. data/lib/cybersource_rest_client/models/payments_configuration_setup.rb +11 -1
  58. data/lib/cybersource_rest_client/models/payments_products.rb +11 -1
  59. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response.rb +12 -1
  60. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1.rb +12 -1
  61. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_order_information.rb +44 -1
  62. data/lib/cybersource_rest_client/models/{pts_v2_payouts_post201_response_merchant_information_merchant_descriptor.rb → pts_v2_payments_post201_response_1_order_information_merchant_descriptor.rb} +1 -1
  63. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_processor_information.rb +18 -1
  64. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_installment_information.rb +101 -5
  65. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_ship_to.rb +12 -1
  66. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_point_of_sale_information.rb +22 -5
  67. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +22 -5
  68. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb +22 -5
  69. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response.rb +1 -1
  70. data/lib/cybersource_rest_client/models/{ptsv2paymentsidreversals_point_of_sale_information.rb → pts_v2_payments_reversals_post201_response_point_of_sale_information.rb} +2 -2
  71. data/lib/cybersource_rest_client/models/{ptsv2paymentsidreversals_point_of_sale_information_emv.rb → pts_v2_payments_reversals_post201_response_point_of_sale_information_emv.rb} +1 -1
  72. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_processor_information.rb +22 -5
  73. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_merchant_information.rb +1 -1
  74. data/lib/cybersource_rest_client/models/ptsv2intents_buyer_information.rb +196 -0
  75. data/lib/cybersource_rest_client/models/ptsv2intents_merchant_information_merchant_descriptor.rb +18 -1
  76. data/lib/cybersource_rest_client/models/ptsv2intents_order_information_bill_to.rb +154 -1
  77. data/lib/cybersource_rest_client/models/ptsv2intents_order_information_line_items.rb +16 -5
  78. data/lib/cybersource_rest_client/models/ptsv2intentsid_merchant_information.rb +1 -1
  79. data/lib/cybersource_rest_client/models/ptsv2intentsid_merchant_information_merchant_descriptor.rb +207 -0
  80. data/lib/cybersource_rest_client/models/{ptsv2paymentsidcaptures_point_of_sale_information.rb → ptsv2payments_buyer.rb} +55 -31
  81. data/lib/cybersource_rest_client/models/{inline_response_200_19_google_merchant.rb → ptsv2payments_order_history.rb} +42 -41
  82. data/lib/cybersource_rest_client/models/ptsv2payments_ship_to.rb +281 -0
  83. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_point_of_sale_information.rb +1 -1
  84. data/lib/cybersource_rest_client/models/{ptsv2paymentsidcaptures_point_of_sale_information_emv.rb → ptsv2paymentsidrefunds_point_of_sale_information_emv.rb} +1 -1
  85. data/lib/cybersource_rest_client/models/risk_products.rb +15 -5
  86. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_point_of_sale_information.rb +1 -1
  87. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information.rb +1 -1
  88. data/lib/cybersource_rest_client/models/unifiedrisk_acquirer_merchant_account_security_amount.rb +3 -3
  89. data/lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor_expected_annual_sales.rb +3 -3
  90. data/lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor_expected_average_ticket_size.rb +3 -3
  91. data/lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor_expected_monthly_sales.rb +3 -3
  92. data/lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor_limit_value.rb +3 -3
  93. data/lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account_balance_before.rb +2 -2
  94. data/lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account_credit_limit.rb +3 -3
  95. data/lib/cybersource_rest_client/models/unifiedrisk_transaction_additional_fees.rb +2 -2
  96. data/lib/cybersource_rest_client/models/unifiedrisk_transaction_amount.rb +3 -3
  97. data/lib/cybersource_rest_client/models/value_added_services_products.rb +15 -5
  98. data/lib/cybersource_rest_client/models/void_capture_request.rb +15 -5
  99. data/lib/cybersource_rest_client/models/void_credit_request.rb +15 -5
  100. data/lib/cybersource_rest_client/models/void_payment_request.rb +15 -5
  101. data/lib/cybersource_rest_client/models/void_refund_request.rb +15 -5
  102. data/lib/cybersource_rest_client.rb +25 -11
  103. metadata +27 -13
  104. data/lib/cybersource_rest_client/api/agent_capabilities_api.rb +0 -2279
@@ -0,0 +1,453 @@
1
+ =begin
2
+ #CyberSource Merged Spec
3
+
4
+ #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
+
6
+ OpenAPI spec version: 0.0.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.38
10
+ =end
11
+
12
+ require 'uri'
13
+ require 'AuthenticationSDK/util/MLEUtility'
14
+ module CyberSource
15
+ class UCPCheckoutApi
16
+ attr_accessor :api_client
17
+
18
+ def initialize(api_client = ApiClient.default, config)
19
+ @api_client = api_client
20
+ @api_client.set_configuration(config)
21
+ end
22
+ # Cancel Checkout UCP
23
+ # Cancels an active UCP checkout session. No charge is made. This operation is idempotent — cancelling an already-cancelled session returns a successful response. Sessions also expire automatically after 30 minutes of inactivity.
24
+ #
25
+ # @param session_id The unique identifier of the UCP checkout session to cancel.
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [InlineResponse20113]
28
+ #
29
+ def ucp_cancel_checkout(session_id, opts = {})
30
+ data, status_code, headers = ucp_cancel_checkout_with_http_info(session_id, opts)
31
+ return data, status_code, headers
32
+ end
33
+
34
+ # Cancel Checkout UCP
35
+ # Cancels an active UCP checkout session. No charge is made. This operation is idempotent — cancelling an already-cancelled session returns a successful response. Sessions also expire automatically after 30 minutes of inactivity.
36
+ # @param session_id The unique identifier of the UCP checkout session to cancel.
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(InlineResponse20113, Fixnum, Hash)>] InlineResponse20113 data, response status code and response headers
39
+ def ucp_cancel_checkout_with_http_info(session_id, opts = {})
40
+
41
+ if @api_client.config.debugging
42
+ begin
43
+ raise
44
+ @api_client.config.logger.debug 'Calling API: UCPCheckoutApi.ucp_cancel_checkout ...'
45
+ rescue
46
+ puts 'Cannot write to log'
47
+ end
48
+ end
49
+ # verify the required parameter 'session_id' is set
50
+ if @api_client.config.client_side_validation && session_id.nil?
51
+ fail ArgumentError, "Missing the required parameter 'session_id' when calling UCPCheckoutApi.ucp_cancel_checkout"
52
+ end
53
+ # resource path
54
+ local_var_path = 'icc/v1/checkout-sessions/{session_id}/cancel'.sub('{' + 'session_id' + '}', session_id.to_s)
55
+
56
+ # query parameters
57
+ query_params = {}
58
+
59
+ # header parameters
60
+ header_params = {}
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
63
+ # HTTP header 'Content-Type'
64
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
65
+
66
+ # form parameters
67
+ form_params = {}
68
+
69
+ # http body (model)
70
+ if 'POST' == 'POST'
71
+ post_body = '{}'
72
+ else
73
+ post_body = nil
74
+ end
75
+ inbound_mle_status = "mandatory"
76
+ if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["ucp_cancel_checkout","ucp_cancel_checkout_with_http_info"])
77
+ begin
78
+ post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
79
+ rescue
80
+ raise
81
+ end
82
+ end
83
+
84
+ is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["ucp_cancel_checkout","ucp_cancel_checkout_with_http_info"])
85
+
86
+ auth_names = []
87
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
88
+ :header_params => header_params,
89
+ :query_params => query_params,
90
+ :form_params => form_params,
91
+ :body => post_body,
92
+ :auth_names => auth_names,
93
+ :return_type => 'InlineResponse20113',
94
+ :isResponseMLEForApi => is_response_mle_for_api)
95
+ if @api_client.config.debugging
96
+ begin
97
+ raise
98
+ @api_client.config.logger.debug "API called: UCPCheckoutApi#ucp_cancel_checkout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
99
+ rescue
100
+ puts 'Cannot write to log'
101
+ end
102
+ end
103
+ return data, status_code, headers
104
+ end
105
+ # Complete Checkout UCP
106
+ # **Final step of the UCP checkout flow.** Finalizes the session and places the order with the merchant. ACG translates the UCP completion request to the merchant's checkout API. On success, the session transitions to `completed`. An `order_id` is not returned in the UCP response — use the ACP Complete endpoint if you need order confirmation details. **Always use an `idempotency-key`** to prevent duplicate orders on network retries.
107
+ #
108
+ # @param session_id The unique identifier of the UCP checkout session to complete.
109
+ # @param [Hash] opts the optional parameters
110
+ # @option opts [String] :idempotency_key **Strongly recommended.** A unique key that ensures this order is placed exactly once on retries. Lowercase per UCP spec.
111
+ # @option opts [UcpCompleteCheckoutRequest] :ucp_complete_checkout_request UCP completion payload containing payment instrument and optional risk signals. If payment context was already provided in the Create or Update call, the body can be omitted. Risk signals are logged for fraud analysis and are not forwarded to the merchant.
112
+ # @return [InlineResponse20113]
113
+ #
114
+ def ucp_complete_checkout(session_id, opts = {})
115
+ data, status_code, headers = ucp_complete_checkout_with_http_info(session_id, opts)
116
+ return data, status_code, headers
117
+ end
118
+
119
+ # Complete Checkout UCP
120
+ # **Final step of the UCP checkout flow.** Finalizes the session and places the order with the merchant. ACG translates the UCP completion request to the merchant&#39;s checkout API. On success, the session transitions to &#x60;completed&#x60;. An &#x60;order_id&#x60; is not returned in the UCP response — use the ACP Complete endpoint if you need order confirmation details. **Always use an &#x60;idempotency-key&#x60;** to prevent duplicate orders on network retries.
121
+ # @param session_id The unique identifier of the UCP checkout session to complete.
122
+ # @param [Hash] opts the optional parameters
123
+ # @option opts [String] :idempotency_key **Strongly recommended.** A unique key that ensures this order is placed exactly once on retries. Lowercase per UCP spec.
124
+ # @option opts [UcpCompleteCheckoutRequest] :ucp_complete_checkout_request UCP completion payload containing payment instrument and optional risk signals. If payment context was already provided in the Create or Update call, the body can be omitted. Risk signals are logged for fraud analysis and are not forwarded to the merchant.
125
+ # @return [Array<(InlineResponse20113, Fixnum, Hash)>] InlineResponse20113 data, response status code and response headers
126
+ def ucp_complete_checkout_with_http_info(session_id, opts = {})
127
+
128
+ if @api_client.config.debugging
129
+ begin
130
+ raise
131
+ @api_client.config.logger.debug 'Calling API: UCPCheckoutApi.ucp_complete_checkout ...'
132
+ rescue
133
+ puts 'Cannot write to log'
134
+ end
135
+ end
136
+ # verify the required parameter 'session_id' is set
137
+ if @api_client.config.client_side_validation && session_id.nil?
138
+ fail ArgumentError, "Missing the required parameter 'session_id' when calling UCPCheckoutApi.ucp_complete_checkout"
139
+ end
140
+ # resource path
141
+ local_var_path = 'icc/v1/checkout-sessions/{session_id}/complete'.sub('{' + 'session_id' + '}', session_id.to_s)
142
+
143
+ # query parameters
144
+ query_params = {}
145
+
146
+ # header parameters
147
+ header_params = {}
148
+ # HTTP header 'Accept' (if needed)
149
+ header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
150
+ # HTTP header 'Content-Type'
151
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
152
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
153
+
154
+ # form parameters
155
+ form_params = {}
156
+
157
+ # http body (model)
158
+ post_body = @api_client.object_to_http_body(opts[:'ucp_complete_checkout_request'])
159
+ sdk_tracker = SdkTracker.new
160
+ post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'UcpCompleteCheckoutRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
161
+ inbound_mle_status = "mandatory"
162
+ if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["ucp_complete_checkout","ucp_complete_checkout_with_http_info"])
163
+ begin
164
+ post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
165
+ rescue
166
+ raise
167
+ end
168
+ end
169
+
170
+ is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["ucp_complete_checkout","ucp_complete_checkout_with_http_info"])
171
+
172
+ auth_names = []
173
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
174
+ :header_params => header_params,
175
+ :query_params => query_params,
176
+ :form_params => form_params,
177
+ :body => post_body,
178
+ :auth_names => auth_names,
179
+ :return_type => 'InlineResponse20113',
180
+ :isResponseMLEForApi => is_response_mle_for_api)
181
+ if @api_client.config.debugging
182
+ begin
183
+ raise
184
+ @api_client.config.logger.debug "API called: UCPCheckoutApi#ucp_complete_checkout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
185
+ rescue
186
+ puts 'Cannot write to log'
187
+ end
188
+ end
189
+ return data, status_code, headers
190
+ end
191
+ # Create Checkout Session UCP
192
+ # **Step 1 of the UCP checkout flow.** Creates a new UCP checkout session using Google's Universal Commerce Protocol format. ACG translates the UCP request into the internal ACP format, applies merchant pricing, and returns a UCP-format session response with a session `id`. UCP uses `line_items` (instead of `items`) and lowercase header names (`idempotency-key`) per the UCP specification. **Store the `id`** from the response — it is required for all subsequent UCP calls.
193
+ #
194
+ # @param ucp_create_checkout_session_request UCP checkout session creation payload containing line items, buyer details, currency, and optional payment, fulfillment, and discount information.
195
+ # @param [Hash] opts the optional parameters
196
+ # @option opts [String] :idempotency_key Client-generated unique key (UUID recommended) to ensure this request is processed exactly once. Lowercase per UCP specification.
197
+ # @return [InlineResponse20113]
198
+ #
199
+ def ucp_create_checkout_session(ucp_create_checkout_session_request, opts = {})
200
+ data, status_code, headers = ucp_create_checkout_session_with_http_info(ucp_create_checkout_session_request, opts)
201
+ return data, status_code, headers
202
+ end
203
+
204
+ # Create Checkout Session UCP
205
+ # **Step 1 of the UCP checkout flow.** Creates a new UCP checkout session using Google&#39;s Universal Commerce Protocol format. ACG translates the UCP request into the internal ACP format, applies merchant pricing, and returns a UCP-format session response with a session &#x60;id&#x60;. UCP uses &#x60;line_items&#x60; (instead of &#x60;items&#x60;) and lowercase header names (&#x60;idempotency-key&#x60;) per the UCP specification. **Store the &#x60;id&#x60;** from the response — it is required for all subsequent UCP calls.
206
+ # @param ucp_create_checkout_session_request UCP checkout session creation payload containing line items, buyer details, currency, and optional payment, fulfillment, and discount information.
207
+ # @param [Hash] opts the optional parameters
208
+ # @option opts [String] :idempotency_key Client-generated unique key (UUID recommended) to ensure this request is processed exactly once. Lowercase per UCP specification.
209
+ # @return [Array<(InlineResponse20113, Fixnum, Hash)>] InlineResponse20113 data, response status code and response headers
210
+ def ucp_create_checkout_session_with_http_info(ucp_create_checkout_session_request, opts = {})
211
+
212
+ if @api_client.config.debugging
213
+ begin
214
+ raise
215
+ @api_client.config.logger.debug 'Calling API: UCPCheckoutApi.ucp_create_checkout_session ...'
216
+ rescue
217
+ puts 'Cannot write to log'
218
+ end
219
+ end
220
+ # verify the required parameter 'ucp_create_checkout_session_request' is set
221
+ if @api_client.config.client_side_validation && ucp_create_checkout_session_request.nil?
222
+ fail ArgumentError, "Missing the required parameter 'ucp_create_checkout_session_request' when calling UCPCheckoutApi.ucp_create_checkout_session"
223
+ end
224
+ # resource path
225
+ local_var_path = 'icc/v1/checkout-sessions'
226
+
227
+ # query parameters
228
+ query_params = {}
229
+
230
+ # header parameters
231
+ header_params = {}
232
+ # HTTP header 'Accept' (if needed)
233
+ header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
234
+ # HTTP header 'Content-Type'
235
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
236
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
237
+
238
+ # form parameters
239
+ form_params = {}
240
+
241
+ # http body (model)
242
+ post_body = @api_client.object_to_http_body(ucp_create_checkout_session_request)
243
+ sdk_tracker = SdkTracker.new
244
+ post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'UcpCreateCheckoutSessionRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
245
+ inbound_mle_status = "mandatory"
246
+ if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["ucp_create_checkout_session","ucp_create_checkout_session_with_http_info"])
247
+ begin
248
+ post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
249
+ rescue
250
+ raise
251
+ end
252
+ end
253
+
254
+ is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["ucp_create_checkout_session","ucp_create_checkout_session_with_http_info"])
255
+
256
+ auth_names = []
257
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
258
+ :header_params => header_params,
259
+ :query_params => query_params,
260
+ :form_params => form_params,
261
+ :body => post_body,
262
+ :auth_names => auth_names,
263
+ :return_type => 'InlineResponse20113',
264
+ :isResponseMLEForApi => is_response_mle_for_api)
265
+ if @api_client.config.debugging
266
+ begin
267
+ raise
268
+ @api_client.config.logger.debug "API called: UCPCheckoutApi#ucp_create_checkout_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
269
+ rescue
270
+ puts 'Cannot write to log'
271
+ end
272
+ end
273
+ return data, status_code, headers
274
+ end
275
+ # Get Checkout Session UCP
276
+ # Retrieves the current state of a UCP checkout session. Use this to verify session status, retrieve updated totals after a fulfillment change, or resume a session after an interruption.
277
+ #
278
+ # @param session_id The unique identifier of the UCP checkout session to retrieve. Obtained from the &#x60;id&#x60; field in the Create Session response.
279
+ # @param ucp_get_checkout_session_request Empty request body.
280
+ # @param [Hash] opts the optional parameters
281
+ # @return [InlineResponse20113]
282
+ #
283
+ def ucp_get_checkout_session(session_id, ucp_get_checkout_session_request, opts = {})
284
+ data, status_code, headers = ucp_get_checkout_session_with_http_info(session_id, ucp_get_checkout_session_request, opts)
285
+ return data, status_code, headers
286
+ end
287
+
288
+ # Get Checkout Session UCP
289
+ # Retrieves the current state of a UCP checkout session. Use this to verify session status, retrieve updated totals after a fulfillment change, or resume a session after an interruption.
290
+ # @param session_id The unique identifier of the UCP checkout session to retrieve. Obtained from the &#x60;id&#x60; field in the Create Session response.
291
+ # @param ucp_get_checkout_session_request Empty request body.
292
+ # @param [Hash] opts the optional parameters
293
+ # @return [Array<(InlineResponse20113, Fixnum, Hash)>] InlineResponse20113 data, response status code and response headers
294
+ def ucp_get_checkout_session_with_http_info(session_id, ucp_get_checkout_session_request, opts = {})
295
+
296
+ if @api_client.config.debugging
297
+ begin
298
+ raise
299
+ @api_client.config.logger.debug 'Calling API: UCPCheckoutApi.ucp_get_checkout_session ...'
300
+ rescue
301
+ puts 'Cannot write to log'
302
+ end
303
+ end
304
+ # verify the required parameter 'session_id' is set
305
+ if @api_client.config.client_side_validation && session_id.nil?
306
+ fail ArgumentError, "Missing the required parameter 'session_id' when calling UCPCheckoutApi.ucp_get_checkout_session"
307
+ end
308
+ # verify the required parameter 'ucp_get_checkout_session_request' is set
309
+ if @api_client.config.client_side_validation && ucp_get_checkout_session_request.nil?
310
+ fail ArgumentError, "Missing the required parameter 'ucp_get_checkout_session_request' when calling UCPCheckoutApi.ucp_get_checkout_session"
311
+ end
312
+ # resource path
313
+ local_var_path = 'icc/v1/checkout-sessions/{session_id}'.sub('{' + 'session_id' + '}', session_id.to_s)
314
+
315
+ # query parameters
316
+ query_params = {}
317
+
318
+ # header parameters
319
+ header_params = {}
320
+ # HTTP header 'Accept' (if needed)
321
+ header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
322
+ # HTTP header 'Content-Type'
323
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
324
+
325
+ # form parameters
326
+ form_params = {}
327
+
328
+ # http body (model)
329
+ post_body = @api_client.object_to_http_body(ucp_get_checkout_session_request)
330
+ sdk_tracker = SdkTracker.new
331
+ post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'Object', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
332
+ inbound_mle_status = "false"
333
+ if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["ucp_get_checkout_session","ucp_get_checkout_session_with_http_info"])
334
+ begin
335
+ post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
336
+ rescue
337
+ raise
338
+ end
339
+ end
340
+
341
+ is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["ucp_get_checkout_session","ucp_get_checkout_session_with_http_info"])
342
+
343
+ auth_names = []
344
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
345
+ :header_params => header_params,
346
+ :query_params => query_params,
347
+ :form_params => form_params,
348
+ :body => post_body,
349
+ :auth_names => auth_names,
350
+ :return_type => 'InlineResponse20113',
351
+ :isResponseMLEForApi => is_response_mle_for_api)
352
+ if @api_client.config.debugging
353
+ begin
354
+ raise
355
+ @api_client.config.logger.debug "API called: UCPCheckoutApi#ucp_get_checkout_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
356
+ rescue
357
+ puts 'Cannot write to log'
358
+ end
359
+ end
360
+ return data, status_code, headers
361
+ end
362
+ # Update Checkout Session UCP
363
+ # Modifies an active UCP checkout session and returns the updated session state. Use this to change line item quantities, update fulfillment address or method, or apply discount codes. Totals are recalculated and returned in the response. Only the fields you include in the request body are updated.
364
+ #
365
+ # @param session_id The unique identifier of the UCP checkout session to update.
366
+ # @param ucp_update_checkout_session_request UCP session update payload. All fields are optional — only fields you include will be applied.
367
+ # @param [Hash] opts the optional parameters
368
+ # @option opts [String] :idempotency_key Client-generated unique key for idempotency. Lowercase per UCP spec.
369
+ # @return [InlineResponse20113]
370
+ #
371
+ def ucp_update_checkout_session(session_id, ucp_update_checkout_session_request, opts = {})
372
+ data, status_code, headers = ucp_update_checkout_session_with_http_info(session_id, ucp_update_checkout_session_request, opts)
373
+ return data, status_code, headers
374
+ end
375
+
376
+ # Update Checkout Session UCP
377
+ # Modifies an active UCP checkout session and returns the updated session state. Use this to change line item quantities, update fulfillment address or method, or apply discount codes. Totals are recalculated and returned in the response. Only the fields you include in the request body are updated.
378
+ # @param session_id The unique identifier of the UCP checkout session to update.
379
+ # @param ucp_update_checkout_session_request UCP session update payload. All fields are optional — only fields you include will be applied.
380
+ # @param [Hash] opts the optional parameters
381
+ # @option opts [String] :idempotency_key Client-generated unique key for idempotency. Lowercase per UCP spec.
382
+ # @return [Array<(InlineResponse20113, Fixnum, Hash)>] InlineResponse20113 data, response status code and response headers
383
+ def ucp_update_checkout_session_with_http_info(session_id, ucp_update_checkout_session_request, opts = {})
384
+
385
+ if @api_client.config.debugging
386
+ begin
387
+ raise
388
+ @api_client.config.logger.debug 'Calling API: UCPCheckoutApi.ucp_update_checkout_session ...'
389
+ rescue
390
+ puts 'Cannot write to log'
391
+ end
392
+ end
393
+ # verify the required parameter 'session_id' is set
394
+ if @api_client.config.client_side_validation && session_id.nil?
395
+ fail ArgumentError, "Missing the required parameter 'session_id' when calling UCPCheckoutApi.ucp_update_checkout_session"
396
+ end
397
+ # verify the required parameter 'ucp_update_checkout_session_request' is set
398
+ if @api_client.config.client_side_validation && ucp_update_checkout_session_request.nil?
399
+ fail ArgumentError, "Missing the required parameter 'ucp_update_checkout_session_request' when calling UCPCheckoutApi.ucp_update_checkout_session"
400
+ end
401
+ # resource path
402
+ local_var_path = 'icc/v1/checkout-sessions/{session_id}'.sub('{' + 'session_id' + '}', session_id.to_s)
403
+
404
+ # query parameters
405
+ query_params = {}
406
+
407
+ # header parameters
408
+ header_params = {}
409
+ # HTTP header 'Accept' (if needed)
410
+ header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
411
+ # HTTP header 'Content-Type'
412
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
413
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
414
+
415
+ # form parameters
416
+ form_params = {}
417
+
418
+ # http body (model)
419
+ post_body = @api_client.object_to_http_body(ucp_update_checkout_session_request)
420
+ sdk_tracker = SdkTracker.new
421
+ post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'UcpUpdateCheckoutSessionRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
422
+ inbound_mle_status = "mandatory"
423
+ if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["ucp_update_checkout_session","ucp_update_checkout_session_with_http_info"])
424
+ begin
425
+ post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
426
+ rescue
427
+ raise
428
+ end
429
+ end
430
+
431
+ is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["ucp_update_checkout_session","ucp_update_checkout_session_with_http_info"])
432
+
433
+ auth_names = []
434
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
435
+ :header_params => header_params,
436
+ :query_params => query_params,
437
+ :form_params => form_params,
438
+ :body => post_body,
439
+ :auth_names => auth_names,
440
+ :return_type => 'InlineResponse20113',
441
+ :isResponseMLEForApi => is_response_mle_for_api)
442
+ if @api_client.config.debugging
443
+ begin
444
+ raise
445
+ @api_client.config.logger.debug "API called: UCPCheckoutApi#ucp_update_checkout_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
446
+ rescue
447
+ puts 'Cannot write to log'
448
+ end
449
+ end
450
+ return data, status_code, headers
451
+ end
452
+ end
453
+ end
@@ -32,7 +32,7 @@ module CyberSource
32
32
  # JWE key wrap algorithm Possible values: - RSA-OAEP - RSA-OAEP-256 - RSA-OAEP-384 - RSA-OAEP-512
33
33
  attr_accessor :algorithm
34
34
 
35
- # JWE content encryption algorithm Possible values: - A256GCM - A128GCM - C20P - A256CBC-HS512 - A128CBC-HS256 - A256CCM - A128CCM
35
+ # JWE content encryption algorithm Possible values: - A256GCM - A128GCM - C20P - A256CBC_HS512 - A128CBC_HS256 - A256CCM - A128CCM
36
36
  attr_accessor :encryption_type
37
37
 
38
38
  # Key expiration date in UTC
@@ -14,37 +14,37 @@ require 'date'
14
14
  module CyberSource
15
15
  # Response object for a single agent public key, including agent context.
16
16
  class AddAgentKeyResponse201
17
- # Unique key identifier. Generated from VARS.
17
+ # Unique key identifier (UUID) generated by VARS on creation
18
18
  attr_accessor :id
19
19
 
20
- # Agent identifier
20
+ # Unique identifier of the agent this key belongs to (64-char SHA-256 hash)
21
21
  attr_accessor :agent_id
22
22
 
23
- # Agent name
23
+ # Display name of the agent this key belongs to
24
24
  attr_accessor :agent_name
25
25
 
26
- # Agent classification Possible values: - trusted - known
26
+ # Agent classification: 'trusted' (commercially onboarded via Visa) or 'known' (open-source/community agent, unverified) Possible values: - trusted - known
27
27
  attr_accessor :agent_type
28
28
 
29
- # Unique identifier for the key
29
+ # Name for this key, unique within the agent
30
30
  attr_accessor :key_name
31
31
 
32
- # Base64-encoded public key
32
+ # Base64-encoded public key. Supported formats: PEM (PKCS#8, PKCS#1) and JWK
33
33
  attr_accessor :public_key
34
34
 
35
- # Signing algorithm Possible values: - RSA-SHA256 - RSA-SHA512 - ECDSA-SHA256 - ECDSA-SHA512 - EdDSA
35
+ # HTTP Signature signing algorithm (RFC 9421 §3.3). Must match the key type and curve. Possible values: - rsa-pss-sha256 - rsa-pss-sha512 - ecdsa-p256-sha256 - ecdsa-p384-sha384 - ed25519
36
36
  attr_accessor :algorithm
37
37
 
38
- # Key expiration date in UTC
38
+ # ISO 8601 UTC datetime when this key expires. Expired keys cannot be activated.
39
39
  attr_accessor :expiration_date
40
40
 
41
- # Key lifecycle status Possible values: - active - deactivated - expired
41
+ # Current lifecycle status of the key: 'active' (in use), 'deactivated' (manually disabled), or 'expired' (past expiration date) Possible values: - active - deactivated - expired
42
42
  attr_accessor :status
43
43
 
44
- # Creation timestamp
44
+ # ISO 8601 UTC timestamp when the key was created
45
45
  attr_accessor :created_at
46
46
 
47
- # Last update timestamp
47
+ # ISO 8601 UTC timestamp when the key was last updated
48
48
  attr_accessor :updated_at
49
49
 
50
50
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -17,37 +17,37 @@ module CyberSource
17
17
  # Unique agent identifier (64-char SHA-256 hash of domain + email + tokenRequestorId)
18
18
  attr_accessor :id
19
19
 
20
- # Agent name
20
+ # Display name for the agent
21
21
  attr_accessor :name
22
22
 
23
- # Agent domain URL
23
+ # Fully-qualified HTTPS URL of the agent's home domain
24
24
  attr_accessor :domain
25
25
 
26
- # Agent description
26
+ # Description of the agent's purpose or capabilities
27
27
  attr_accessor :description
28
28
 
29
- # Contact email
29
+ # Contact email for the team or individual responsible for this agent
30
30
  attr_accessor :contact_email
31
31
 
32
- # Unique token requestor identifier
32
+ # Token Requestor ID (TRID) assigned by Visa, shared with the parent trusted agent for OSAs
33
33
  attr_accessor :token_requestor_id
34
34
 
35
- # Agent classification: 'trusted' (commercially onboarded) or 'known' (open-source/unverified) Possible values: - trusted - known
35
+ # Agent classification: 'trusted' (commercially onboarded via Visa) or 'known' (open-source/community agent, unverified) Possible values: - trusted - known
36
36
  attr_accessor :agent_type
37
37
 
38
- # Additional agent metadata
38
+ # Free-form metadata object for agent context (e.g., AI framework, language, runtime). Max 10KB.
39
39
  attr_accessor :agent_metadata
40
40
 
41
- # Whether the agent is active
41
+ # Whether the agent is currently active. Deactivated agents cannot add or activate keys.
42
42
  attr_accessor :is_active
43
43
 
44
- # Creation timestamp
44
+ # ISO 8601 UTC timestamp when the agent was registered
45
45
  attr_accessor :created_at
46
46
 
47
- # Last update timestamp
47
+ # ISO 8601 UTC timestamp when the agent was last updated
48
48
  attr_accessor :updated_at
49
49
 
50
- # List of keys associated with the agent
50
+ # List of public keys associated with the agent (both active and deactivated)
51
51
  attr_accessor :keys
52
52
 
53
53
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -96,7 +96,7 @@ module CyberSource
96
96
  :'contact_email' => :'String',
97
97
  :'token_requestor_id' => :'String',
98
98
  :'agent_type' => :'String',
99
- :'agent_metadata' => :'Hash<String, String>',
99
+ :'agent_metadata' => :'Object',
100
100
  :'is_active' => :'BOOLEAN',
101
101
  :'created_at' => :'DateTime',
102
102
  :'updated_at' => :'DateTime',
@@ -141,9 +141,7 @@ module CyberSource
141
141
  end
142
142
 
143
143
  if attributes.has_key?(:'agentMetadata')
144
- if (value = attributes[:'agentMetadata']).is_a?(Hash)
145
- self.agent_metadata = value
146
- end
144
+ self.agent_metadata = attributes[:'agentMetadata']
147
145
  end
148
146
 
149
147
  if attributes.has_key?(:'isActive')
@@ -14,28 +14,28 @@ require 'date'
14
14
  module CyberSource
15
15
  # Key item for agent keys list response (excludes agentId/agentName/agentType since they are at parent level)
16
16
  class AgentRegistrationResponse201Keys
17
- # Unique key identifier. Generated from VARS.
17
+ # Unique key identifier (UUID) generated by VARS on creation
18
18
  attr_accessor :id
19
19
 
20
- # Unique identifier for the key
20
+ # Name for this key, unique within the agent
21
21
  attr_accessor :key_name
22
22
 
23
- # Base64-encoded public key
23
+ # Base64-encoded public key. Supported formats: PEM (PKCS#8, PKCS#1) and JWK
24
24
  attr_accessor :public_key
25
25
 
26
- # Signing algorithm Possible values: - RSA-SHA256 - RSA-SHA512 - ECDSA-SHA256 - ECDSA-SHA512 - EdDSA
26
+ # HTTP Signature signing algorithm (RFC 9421 §3.3). Must match the key type and curve. Possible values: - rsa-pss-sha256 - rsa-pss-sha512 - ecdsa-p256-sha256 - ecdsa-p384-sha384 - ed25519
27
27
  attr_accessor :algorithm
28
28
 
29
- # Key expiration date in UTC
29
+ # ISO 8601 UTC datetime when this key expires. Expired keys cannot be activated.
30
30
  attr_accessor :expiration_date
31
31
 
32
- # Key lifecycle status Possible values: - active - deactivated - expired
32
+ # Current lifecycle status of the key: 'active' (in use), 'deactivated' (manually disabled), or 'expired' (past expiration date) Possible values: - active - deactivated - expired
33
33
  attr_accessor :status
34
34
 
35
- # Creation timestamp
35
+ # ISO 8601 UTC timestamp when the key was created
36
36
  attr_accessor :created_at
37
37
 
38
- # Last update timestamp
38
+ # ISO 8601 UTC timestamp when the key was last updated
39
39
  attr_accessor :updated_at
40
40
 
41
41
  # Attribute mapping from ruby-style variable name to JSON key.