cybersource_rest_client 0.0.82 → 0.0.84

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 (400) hide show
  1. checksums.yaml +4 -4
  2. data/lib/AuthenticationSDK/authentication/jwt/JwtToken.rb +98 -42
  3. data/lib/AuthenticationSDK/core/MerchantConfig.rb +85 -44
  4. data/lib/AuthenticationSDK/logging/log_configuration.rb +2 -1
  5. data/lib/AuthenticationSDK/util/AuthJWEUtility.rb +1 -0
  6. data/lib/AuthenticationSDK/util/Cache.rb +7 -4
  7. data/lib/AuthenticationSDK/util/Constants.rb +8 -0
  8. data/lib/AuthenticationSDK/util/MLEUtility.rb +9 -0
  9. data/lib/cybersource_rest_client/api/batches_api.rb +1 -1
  10. data/lib/cybersource_rest_client/api/create_new_webhooks_api.rb +14 -22
  11. data/lib/cybersource_rest_client/api/credentials_api.rb +104 -0
  12. data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +3 -3
  13. data/lib/cybersource_rest_client/api/enrollment_api.rb +2 -2
  14. data/lib/cybersource_rest_client/api/instructions_api.rb +10 -10
  15. data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +3 -3
  16. data/lib/cybersource_rest_client/api/manage_webhooks_api.rb +20 -28
  17. data/lib/cybersource_rest_client/api/network_tokens_api.rb +654 -0
  18. data/lib/cybersource_rest_client/api/offers_api.rb +117 -0
  19. data/lib/cybersource_rest_client/api/plans_api.rb +1 -1
  20. data/lib/cybersource_rest_client/api/pull_funds_api.rb +404 -0
  21. data/lib/cybersource_rest_client/api/subscriptions_api.rb +183 -1
  22. data/lib/cybersource_rest_client/api/subscriptions_follow_ons_api.rb +1 -1
  23. data/lib/cybersource_rest_client/api/{transient_token_data_api.rb → transient_token_data_v2_api.rb} +91 -9
  24. data/lib/cybersource_rest_client/api/unified_checkout_v1_capture_context_api.rb +104 -0
  25. data/lib/cybersource_rest_client/api_client.rb +4 -0
  26. data/lib/cybersource_rest_client/models/account_validations_request.rb +15 -5
  27. data/lib/cybersource_rest_client/models/acpv1instructions_decline_threshold.rb +1 -1
  28. data/lib/cybersource_rest_client/models/acpv1instructions_mandates.rb +1 -1
  29. data/lib/cybersource_rest_client/models/acpv1instructions_recurring_payment_information.rb +1 -1
  30. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb +1 -1
  31. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information_payment_instrument.rb +1 -1
  32. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_amount_detail.rb +1 -1
  33. data/lib/cybersource_rest_client/models/acpv1mppcredentials_challenge.rb +369 -0
  34. data/lib/cybersource_rest_client/models/acpv1mppcredentials_challenge_encryption_jwk.rb +336 -0
  35. data/lib/cybersource_rest_client/models/acpv1tokens_assurance_data.rb +7 -7
  36. data/lib/cybersource_rest_client/models/acpv1tokens_authenticated_identities.rb +1 -1
  37. data/lib/cybersource_rest_client/models/acpv1tokens_authentication_context.rb +1 -1
  38. data/lib/cybersource_rest_client/models/acpv1tokens_bill_to.rb +1 -1
  39. data/lib/cybersource_rest_client/models/acpv1tokens_buyer_information.rb +1 -1
  40. data/lib/cybersource_rest_client/models/acpv1tokens_consumer_identity.rb +1 -1
  41. data/lib/cybersource_rest_client/models/acpv1tokens_device_information.rb +1 -1
  42. data/lib/cybersource_rest_client/models/acpv1tokens_enrollment_reference_data.rb +1 -1
  43. data/lib/cybersource_rest_client/models/acpv1tokens_payment_information.rb +1 -1
  44. data/lib/cybersource_rest_client/models/add_negative_list_request.rb +1 -1
  45. data/lib/cybersource_rest_client/models/auth_reversal_request.rb +11 -1
  46. data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information.rb +32 -6
  47. data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_bank.rb +1 -1
  48. data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_bank_account.rb +1 -1
  49. data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_customer.rb +196 -0
  50. data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_instrument_identifier.rb +196 -0
  51. data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_payment_instrument.rb +196 -0
  52. data/lib/cybersource_rest_client/models/bavsv1accountvalidations_token_information.rb +208 -0
  53. data/lib/cybersource_rest_client/models/boardingv1registrations_integration_information.rb +15 -5
  54. data/lib/cybersource_rest_client/models/boardingv1registrations_integration_information_msd.rb +196 -0
  55. data/lib/cybersource_rest_client/models/card_processing_config_common_processors.rb +105 -1
  56. data/lib/cybersource_rest_client/models/check_payer_auth_enrollment_request.rb +1 -1
  57. data/lib/cybersource_rest_client/models/commerce_solutions_products.rb +15 -5
  58. data/lib/cybersource_rest_client/models/create_credit_request.rb +15 -5
  59. data/lib/cybersource_rest_client/models/create_subscription_request.rb +1 -1
  60. data/lib/cybersource_rest_client/models/create_subscription_request_1.rb +1 -1
  61. data/lib/cybersource_rest_client/models/fraud_marking_action_request.rb +1 -1
  62. data/lib/cybersource_rest_client/models/generate_unified_checkout_v1_capture_context_request.rb +334 -0
  63. data/lib/cybersource_rest_client/models/get_all_subscriptions_response_order_information.rb +1 -1
  64. data/lib/cybersource_rest_client/models/get_all_subscriptions_response_order_information_amount_details.rb +240 -0
  65. data/lib/cybersource_rest_client/models/get_all_subscriptions_response_order_information_amount_details_surcharge.rb +213 -0
  66. data/lib/cybersource_rest_client/models/get_subscriptions_payments_response.rb +247 -0
  67. data/lib/cybersource_rest_client/models/get_subscriptions_payments_response_1.rb +224 -0
  68. data/lib/cybersource_rest_client/models/{pbl_payment_links_post201_response__links.rb → get_subscriptions_payments_response_1__links.rb} +1 -1
  69. data/lib/cybersource_rest_client/models/get_subscriptions_payments_response__links.rb +209 -0
  70. data/lib/cybersource_rest_client/models/get_subscriptions_payments_response_cycles_completed_count.rb +191 -0
  71. data/lib/cybersource_rest_client/models/get_subscriptions_payments_response_subscription_payment.rb +356 -0
  72. data/lib/cybersource_rest_client/models/inline_response_200_16.rb +2 -2
  73. data/lib/cybersource_rest_client/models/inline_response_200_5_integration_information.rb +15 -5
  74. data/lib/cybersource_rest_client/models/inline_response_201_1_tokenized_card.rb +27 -6
  75. data/lib/cybersource_rest_client/models/inline_response_201_4_setups_commerce_solutions.rb +15 -5
  76. data/lib/cybersource_rest_client/models/inline_response_201_4_setups_payments.rb +25 -5
  77. data/lib/cybersource_rest_client/models/inline_response_201_4_setups_risk.rb +15 -5
  78. data/lib/cybersource_rest_client/models/inline_response_201_4_setups_value_added_services.rb +25 -5
  79. data/lib/cybersource_rest_client/models/inline_response_201_9.rb +297 -0
  80. data/lib/cybersource_rest_client/models/{kmsegressv2keysasym_client_reference_information.rb → inline_response_201_9_client_reference_information.rb} +2 -3
  81. data/lib/cybersource_rest_client/models/{inline_response_200_16_error_information.rb → inline_response_201_9_error_information.rb} +1 -1
  82. data/lib/cybersource_rest_client/models/{inline_response_200_16_order_information.rb → inline_response_201_9_order_information.rb} +2 -2
  83. data/lib/cybersource_rest_client/models/{inline_response_200_16_order_information_currency_conversion.rb → inline_response_201_9_order_information_currency_conversion.rb} +2 -2
  84. data/lib/cybersource_rest_client/models/{inline_response_200_16_order_information_currency_conversion_offer.rb → inline_response_201_9_order_information_currency_conversion_offer.rb} +1 -1
  85. data/lib/cybersource_rest_client/models/inline_response_201_9_processor_information.rb +196 -0
  86. data/lib/cybersource_rest_client/models/inline_response_400_10.rb +236 -0
  87. data/lib/cybersource_rest_client/models/{inline_response_400_8_details.rb → inline_response_400_10_details.rb} +1 -1
  88. data/lib/cybersource_rest_client/models/inline_response_400_11.rb +235 -0
  89. data/lib/cybersource_rest_client/models/{inline_response_400_7_details.rb → inline_response_400_11_details.rb} +3 -3
  90. data/lib/cybersource_rest_client/models/inline_response_400_12.rb +281 -0
  91. data/lib/cybersource_rest_client/models/inline_response_400_6.rb +37 -60
  92. data/lib/cybersource_rest_client/models/inline_response_400_7.rb +6 -6
  93. data/lib/cybersource_rest_client/models/inline_response_400_8.rb +58 -36
  94. data/lib/cybersource_rest_client/models/{inline_response_400_6_fields.rb → inline_response_400_8_fields.rb} +1 -1
  95. data/lib/cybersource_rest_client/models/inline_response_400_9.rb +16 -16
  96. data/lib/cybersource_rest_client/models/inline_response_400_9_details.rb +2 -2
  97. data/lib/cybersource_rest_client/models/inline_response_404.rb +10 -20
  98. data/lib/cybersource_rest_client/models/inline_response_404_1.rb +7 -42
  99. data/lib/cybersource_rest_client/models/inline_response_404_2.rb +8 -7
  100. data/lib/cybersource_rest_client/models/{inline_response_404_1_details.rb → inline_response_404_2_details.rb} +1 -1
  101. data/lib/cybersource_rest_client/models/inline_response_404_3.rb +26 -2
  102. data/lib/cybersource_rest_client/models/inline_response_404_4.rb +17 -29
  103. data/lib/cybersource_rest_client/models/{inline_response_404_3_details.rb → inline_response_404_4_details.rb} +1 -1
  104. data/lib/cybersource_rest_client/models/inline_response_404_5.rb +28 -28
  105. data/lib/cybersource_rest_client/models/inline_response_404_6.rb +223 -0
  106. data/lib/cybersource_rest_client/models/inline_response_404_errors.rb +201 -0
  107. data/lib/cybersource_rest_client/models/inline_response_422_1.rb +1 -1
  108. data/lib/cybersource_rest_client/models/{inline_response_500_4.rb → inline_response_502_2.rb} +1 -1
  109. data/lib/cybersource_rest_client/models/iplv2paymentlinks_order_information_line_items.rb +73 -5
  110. data/lib/cybersource_rest_client/models/mit_reversal_request.rb +11 -1
  111. data/lib/cybersource_rest_client/models/mpp_credentials_request.rb +221 -0
  112. data/lib/cybersource_rest_client/models/mpp_credentials_response200.rb +338 -0
  113. data/lib/cybersource_rest_client/models/offer_request.rb +219 -0
  114. data/lib/cybersource_rest_client/models/patch_customer_payment_instrument_request.rb +1 -1
  115. data/lib/cybersource_rest_client/models/patch_customer_request.rb +1 -1
  116. data/lib/cybersource_rest_client/models/patch_payment_instrument_request.rb +1 -1
  117. data/lib/cybersource_rest_client/models/payer_auth_setup_request.rb +1 -1
  118. data/lib/cybersource_rest_client/models/payment_instrument_list_1__embedded.rb +1 -1
  119. data/lib/cybersource_rest_client/models/payment_instrument_list__embedded.rb +1 -1
  120. data/lib/cybersource_rest_client/models/{payment_instrument_list_1__embedded__embedded.rb → payment_instrument_list__embedded__embedded.rb} +1 -1
  121. data/lib/cybersource_rest_client/models/{payment_instrument_list_1__embedded_payment_instruments.rb → payment_instrument_list__embedded_payment_instruments.rb} +2 -2
  122. data/lib/cybersource_rest_client/models/payments_products.rb +25 -5
  123. data/lib/cybersource_rest_client/models/payments_products_currency_conversion_configuration_information_configurations_processors.rb +14 -2
  124. data/lib/cybersource_rest_client/models/payments_products_microform.rb +199 -0
  125. data/lib/cybersource_rest_client/models/payments_products_microform_configuration_information.rb +199 -0
  126. data/lib/cybersource_rest_client/models/payments_products_microform_configuration_information_configurations.rb +189 -0
  127. data/lib/cybersource_rest_client/models/payments_products_microform_configuration_information_configurations_features.rb +189 -0
  128. data/lib/cybersource_rest_client/models/payments_products_microform_configuration_information_configurations_features_gateway_agnostic.rb +189 -0
  129. data/lib/cybersource_rest_client/models/payments_products_microform_subscription_information.rb +227 -0
  130. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_info_features_portfolio_accessof_sensi_data.rb +190 -0
  131. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features.rb +205 -5
  132. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_after_pay.rb +190 -0
  133. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_apple_pay.rb +190 -0
  134. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_bancontact.rb +190 -0
  135. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_click_to_pay.rb +190 -0
  136. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_decision_manager.rb +190 -0
  137. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_dragon_pay.rb +190 -0
  138. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_e_check.rb +190 -0
  139. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_google_pay.rb +190 -0
  140. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_ideal.rb +190 -0
  141. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_konbini.rb +190 -0
  142. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_multibanco.rb +190 -0
  143. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_my_bank.rb +190 -0
  144. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_p24.rb +190 -0
  145. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_pay_pal.rb +190 -0
  146. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_payer_authentication.rb +190 -0
  147. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_tink_pay_by_bank.rb +190 -0
  148. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_token_management.rb +190 -0
  149. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_unified_click_to_pay_sdk.rb +190 -0
  150. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_venmo.rb +190 -0
  151. data/lib/cybersource_rest_client/models/pbl_payment_links_get200_response.rb +1 -1
  152. data/lib/cybersource_rest_client/models/pbl_payment_links_post201_response.rb +1 -1
  153. data/lib/cybersource_rest_client/models/post_customer_payment_instrument_request.rb +1 -1
  154. data/lib/cybersource_rest_client/models/post_customer_request.rb +1 -1
  155. data/lib/cybersource_rest_client/models/post_payment_instrument_request.rb +1 -1
  156. data/lib/cybersource_rest_client/models/post_tokenized_card_request.rb +15 -5
  157. data/lib/cybersource_rest_client/models/pts_v2_create_billing_agreement_post201_response_agreement_information.rb +80 -1
  158. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response.rb +55 -5
  159. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_merchant_information.rb +196 -0
  160. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_payment_account_information.rb +189 -0
  161. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_payment_information.rb +15 -5
  162. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_payment_information_account_features.rb +196 -0
  163. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_token_information.rb +189 -0
  164. data/lib/cybersource_rest_client/models/pts_v2_incremental_authorization_patch201_response_error_information.rb +1 -1
  165. data/lib/cybersource_rest_client/models/pts_v2_modify_billing_agreement_post201_response_agreement_information.rb +35 -1
  166. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_point_of_sale_information.rb +22 -5
  167. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_processor_information.rb +2 -2
  168. data/lib/cybersource_rest_client/models/pts_v2_payments_order_post201_response_order_information_shipping_details.rb +1 -1
  169. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information.rb +106 -5
  170. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information_strong_authentication.rb +22 -5
  171. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information.rb +1 -1
  172. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_account_information.rb +15 -5
  173. data/lib/cybersource_rest_client/models/{pts_v2_payments_post201_response_payment_information_tokenized_card.rb → pts_v2_payments_post201_response_payment_account_information_tokenized_card.rb} +1 -1
  174. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information.rb +1 -1
  175. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processing_information.rb +18 -1
  176. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +23 -6
  177. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_token_information.rb +15 -5
  178. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_token_information_third_party_token.rb +213 -0
  179. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response.rb +16 -6
  180. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_error_information.rb +213 -0
  181. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_order_information_amount_details.rb +18 -1
  182. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb +19 -2
  183. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_processor_information.rb +1 -1
  184. data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response_processor_information.rb +7 -1
  185. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information.rb +45 -5
  186. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information_avs.rb +196 -0
  187. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information_customer.rb +196 -0
  188. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information_electronic_verification_results.rb +281 -0
  189. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_aggregator_information.rb +317 -0
  190. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_aggregator_information_sub_merchant.rb +196 -0
  191. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_buyer_information.rb +196 -0
  192. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_client_reference_information.rb +247 -0
  193. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_merchant_information.rb +189 -0
  194. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_merchant_information_merchant_descriptor.rb +349 -0
  195. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_order_information.rb +206 -0
  196. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_order_information_amount_details.rb +275 -0
  197. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_processing_info_funding_options_initiator_origin_ini_transaction.rb +222 -0
  198. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_processing_information.rb +308 -0
  199. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_processing_information_funding_options.rb +189 -0
  200. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_processing_information_funding_options_initiator.rb +228 -0
  201. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_processing_information_payouts_options.rb +196 -0
  202. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_processing_information_recurring_options.rb +190 -0
  203. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb +607 -0
  204. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information_personal_identification.rb +265 -0
  205. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb +595 -0
  206. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_account.rb +213 -0
  207. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_consumer_authentication.rb +206 -0
  208. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_consumer_authentication_strong_authentication.rb +264 -0
  209. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_payment_information.rb +255 -0
  210. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_payment_information_card.rb +291 -0
  211. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_payment_information_customer.rb +196 -0
  212. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_payment_information_instrument_identifier.rb +196 -0
  213. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_payment_information_payment_instrument.rb +196 -0
  214. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_payment_information_tokenized_card.rb +281 -0
  215. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_personal_identification.rb +274 -0
  216. data/lib/cybersource_rest_client/models/ptsv1pullfundstransferidrefund_order_information.rb +194 -0
  217. data/lib/cybersource_rest_client/models/ptsv1pullfundstransferidrefund_order_information_amount_details.rb +205 -0
  218. data/lib/cybersource_rest_client/models/ptsv1pullfundstransferidreversal_reversal_information.rb +194 -0
  219. data/lib/cybersource_rest_client/models/ptsv1pullfundstransferidreversal_reversal_information_amount_details.rb +205 -0
  220. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_merchant_information.rb +15 -14
  221. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_merchant_information_merchant_descriptor.rb +298 -0
  222. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_payment_information.rb +219 -0
  223. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_payment_information_card.rb +264 -0
  224. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_payment_information_customer.rb +196 -0
  225. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_payment_information_instrument_identifier.rb +196 -0
  226. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_payment_information_payment_instrument.rb +196 -0
  227. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_information.rb +36 -6
  228. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_information_payouts_options.rb +1 -1
  229. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information_payment_information_card.rb +1 -19
  230. data/lib/cybersource_rest_client/models/ptsv2billingagreements_agreement_information.rb +84 -5
  231. data/lib/cybersource_rest_client/models/ptsv2billingagreements_order_information.rb +12 -2
  232. data/lib/cybersource_rest_client/models/ptsv2billingagreements_order_information_amount_details.rb +230 -0
  233. data/lib/cybersource_rest_client/models/{ptsv2intents_order_information_invoice_details.rb → ptsv2billingagreements_order_information_invoice_details.rb} +1 -1
  234. data/lib/cybersource_rest_client/models/ptsv2billingagreements_payment_information_bank.rb +15 -5
  235. data/lib/cybersource_rest_client/models/ptsv2billingagreements_payment_information_bank_account_alias.rb +207 -0
  236. data/lib/cybersource_rest_client/models/ptsv2billingagreements_processing_information.rb +18 -1
  237. data/lib/cybersource_rest_client/models/ptsv2billingagreementsid_agreement_information.rb +56 -5
  238. data/lib/cybersource_rest_client/models/ptsv2billingagreementsid_processing_information.rb +18 -1
  239. data/lib/cybersource_rest_client/models/ptsv2credits_processing_information.rb +52 -5
  240. data/lib/cybersource_rest_client/models/ptsv2credits_sender_information.rb +18 -1
  241. data/lib/cybersource_rest_client/models/ptsv2credits_token_information.rb +228 -0
  242. data/lib/cybersource_rest_client/models/ptsv2intents_order_information.rb +1 -1
  243. data/lib/cybersource_rest_client/models/ptsv2intentsid_order_information.rb +1 -1
  244. data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information_sub_merchant.rb +15 -5
  245. data/lib/cybersource_rest_client/models/ptsv2payments_consumer_authentication_information.rb +16 -5
  246. data/lib/cybersource_rest_client/models/ptsv2payments_order_information.rb +28 -1
  247. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_digital_currency.rb +231 -0
  248. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_shipping_details.rb +23 -6
  249. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb +32 -5
  250. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank.rb +15 -5
  251. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank_account_alias.rb +207 -0
  252. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_third_party_token.rb +196 -0
  253. data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb +18 -1
  254. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +89 -6
  255. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_program_indicators.rb +202 -0
  256. data/lib/cybersource_rest_client/models/ptsv2payments_processor_information.rb +56 -5
  257. data/lib/cybersource_rest_client/models/ptsv2payments_recipient_information.rb +16 -5
  258. data/lib/cybersource_rest_client/models/ptsv2payments_sender_information.rb +16 -5
  259. data/lib/cybersource_rest_client/models/ptsv2payments_token_information.rb +32 -5
  260. data/lib/cybersource_rest_client/models/ptsv2payments_token_information_token_authentication_information.rb +193 -0
  261. data/lib/cybersource_rest_client/models/ptsv2payments_token_information_token_authentication_information_authenticated_identities.rb +252 -0
  262. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant.rb +15 -5
  263. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_shipping_details.rb +100 -5
  264. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information.rb +22 -5
  265. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information.rb +18 -1
  266. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processor_information.rb +39 -5
  267. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information.rb +15 -5
  268. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information_shipping_details.rb +196 -0
  269. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information.rb +32 -5
  270. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information.rb +22 -5
  271. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_device_information.rb +196 -0
  272. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_payment_information.rb +22 -5
  273. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb +18 -5
  274. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information_payouts_options.rb +1 -1
  275. data/lib/cybersource_rest_client/models/pull_funds201_response.rb +270 -0
  276. data/lib/cybersource_rest_client/models/pull_funds201_response__links.rb +239 -0
  277. data/lib/cybersource_rest_client/models/pull_funds201_response__links_customer.rb +202 -0
  278. data/lib/cybersource_rest_client/models/pull_funds201_response__links_instrument_identifier.rb +202 -0
  279. data/lib/cybersource_rest_client/models/pull_funds201_response__links_payment_instrument.rb +202 -0
  280. data/lib/cybersource_rest_client/models/pull_funds201_response__links_refund.rb +202 -0
  281. data/lib/cybersource_rest_client/models/pull_funds201_response__links_reversal.rb +202 -0
  282. data/lib/cybersource_rest_client/models/pull_funds201_response__links_self.rb +202 -0
  283. data/lib/cybersource_rest_client/models/pull_funds201_response_error_information.rb +225 -0
  284. data/lib/cybersource_rest_client/models/pull_funds201_response_error_information_details.rb +213 -0
  285. data/lib/cybersource_rest_client/models/pull_funds201_response_order_information.rb +189 -0
  286. data/lib/cybersource_rest_client/models/pull_funds201_response_order_information_amount_details.rb +222 -0
  287. data/lib/cybersource_rest_client/models/pull_funds201_response_processor_information.rb +331 -0
  288. data/lib/cybersource_rest_client/models/pull_funds201_response_processor_information_consumer_authentication_response.rb +196 -0
  289. data/lib/cybersource_rest_client/models/pull_funds_refund201_response.rb +260 -0
  290. data/lib/cybersource_rest_client/models/pull_funds_refund201_response__links.rb +189 -0
  291. data/lib/cybersource_rest_client/models/pull_funds_refund201_response__links_self.rb +202 -0
  292. data/lib/cybersource_rest_client/models/pull_funds_refund201_response_processor_information.rb +213 -0
  293. data/lib/cybersource_rest_client/models/pull_funds_refund_request.rb +204 -0
  294. data/lib/cybersource_rest_client/models/pull_funds_request.rb +259 -0
  295. data/lib/cybersource_rest_client/models/pull_funds_reversal201_response.rb +260 -0
  296. data/lib/cybersource_rest_client/models/pull_funds_reversal201_response__links.rb +189 -0
  297. data/lib/cybersource_rest_client/models/pull_funds_reversal201_response__links_self.rb +202 -0
  298. data/lib/cybersource_rest_client/models/pull_funds_reversal201_response_error_information.rb +219 -0
  299. data/lib/cybersource_rest_client/models/pull_funds_reversal201_response_error_information_details.rb +207 -0
  300. data/lib/cybersource_rest_client/models/pull_funds_reversal201_response_processor_information.rb +247 -0
  301. data/lib/cybersource_rest_client/models/pull_funds_reversal400_response.rb +258 -0
  302. data/lib/cybersource_rest_client/models/pull_funds_reversal_request.rb +204 -0
  303. data/lib/cybersource_rest_client/models/push_funds201_response_error_information.rb +1 -1
  304. data/lib/cybersource_rest_client/models/push_funds201_response_processor_information.rb +55 -5
  305. data/lib/cybersource_rest_client/models/push_funds201_response_processor_information_merchant_advice.rb +213 -0
  306. data/lib/cybersource_rest_client/models/push_funds_request.rb +11 -1
  307. data/lib/cybersource_rest_client/models/rbsv1subscriptions_order_information.rb +189 -0
  308. data/lib/cybersource_rest_client/models/rbsv1subscriptionsid_order_information_amount_details.rb +15 -5
  309. data/lib/cybersource_rest_client/models/risk_products.rb +15 -5
  310. data/lib/cybersource_rest_client/models/riskv1addressverifications_order_information_line_items.rb +1 -10
  311. data/lib/cybersource_rest_client/models/riskv1decisions_client_reference_information.rb +0 -9
  312. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_line_items.rb +1 -1
  313. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_ship_to.rb +39 -5
  314. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_shipping_details.rb +1 -1
  315. data/lib/cybersource_rest_client/models/riskv1liststypeentries_order_information_line_items.rb +1 -1
  316. data/lib/cybersource_rest_client/models/save_asym_egress_key.rb +1 -1
  317. data/lib/cybersource_rest_client/models/tms_bin_lookup_payment_account_information_features.rb +39 -6
  318. data/lib/cybersource_rest_client/models/tms_card_art.rb +23 -1
  319. data/lib/cybersource_rest_client/models/tms_embedded_instrument_identifier_bill_to.rb +22 -5
  320. data/lib/cybersource_rest_client/models/tms_tokenized_card_delete_request.rb +189 -0
  321. data/lib/cybersource_rest_client/models/tmsv1paymentinstruments__embedded.rb +190 -0
  322. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card.rb +23 -2
  323. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_card.rb +1 -1
  324. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata.rb +16 -5
  325. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_issuer.rb +41 -8
  326. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_issuer_bank_applications.rb +201 -0
  327. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_issuer_capabilities.rb +257 -0
  328. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_verification_results.rb +202 -0
  329. data/lib/cybersource_rest_client/models/tmsv2customers__embedded.rb +200 -0
  330. data/lib/cybersource_rest_client/models/tmsv2tokenize_processing_information.rb +1 -1
  331. data/lib/cybersource_rest_client/models/{tmsv3tokenstoken_idpaymentcredentials_order_information_bill_to.rb → tmsv2tokenizedcards_bill_to.rb} +1 -1
  332. data/lib/cybersource_rest_client/models/tmsv2tokenizedcardstokenized_card_iddelete_reason.rb +208 -0
  333. data/lib/cybersource_rest_client/models/tmsv3tokenstoken_idpaymentcredentials_order_information.rb +1 -1
  334. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_shipping_details.rb +1 -1
  335. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_sender_information.rb +1 -1
  336. data/lib/cybersource_rest_client/models/ucv1sessions_appearance.rb +207 -0
  337. data/lib/cybersource_rest_client/models/ucv1sessions_appearance_variables.rb +1645 -0
  338. data/lib/cybersource_rest_client/models/ucv1sessions_capture_mandate.rb +296 -0
  339. data/lib/cybersource_rest_client/models/ucv1sessions_capture_mandate_cpf.rb +190 -0
  340. data/lib/cybersource_rest_client/models/ucv1sessions_complete_mandate.rb +229 -0
  341. data/lib/cybersource_rest_client/models/ucv1sessions_complete_mandate_tms.rb +204 -0
  342. data/lib/cybersource_rest_client/models/ucv1sessions_data.rb +311 -0
  343. data/lib/cybersource_rest_client/models/ucv1sessions_data_aggregator_information.rb +325 -0
  344. data/lib/cybersource_rest_client/models/ucv1sessions_data_aggregator_information_sub_merchant.rb +366 -0
  345. data/lib/cybersource_rest_client/models/ucv1sessions_data_buyer_information.rb +259 -0
  346. data/lib/cybersource_rest_client/models/ucv1sessions_data_buyer_information_personal_identification.rb +224 -0
  347. data/lib/cybersource_rest_client/models/ucv1sessions_data_consumer_authentication_information.rb +247 -0
  348. data/lib/cybersource_rest_client/models/ucv1sessions_data_device_information.rb +196 -0
  349. data/lib/cybersource_rest_client/models/ucv1sessions_data_installment_information.rb +196 -0
  350. data/lib/cybersource_rest_client/models/ucv1sessions_data_merchant_defined_information.rb +214 -0
  351. data/lib/cybersource_rest_client/models/ucv1sessions_data_merchant_information.rb +206 -0
  352. data/lib/cybersource_rest_client/models/ucv1sessions_data_merchant_information_merchant_descriptor.rb +332 -0
  353. data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information.rb +241 -0
  354. data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_amount_details.rb +353 -0
  355. data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_amount_details_tax_details.rb +213 -0
  356. data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_bill_to.rb +483 -0
  357. data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_bill_to_company.rb +298 -0
  358. data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_invoice_details.rb +242 -0
  359. data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_invoice_details_transaction_advice_addendum.rb +196 -0
  360. data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_line_items.rb +702 -0
  361. data/lib/cybersource_rest_client/models/{riskv1liststypeentries_client_reference_information.rb → ucv1sessions_data_order_information_shipping_details.rb} +24 -43
  362. data/lib/cybersource_rest_client/models/ucv1sessions_data_payment_information.rb +189 -0
  363. data/lib/cybersource_rest_client/models/ucv1sessions_data_payment_information_card.rb +196 -0
  364. data/lib/cybersource_rest_client/models/ucv1sessions_data_processing_information.rb +294 -0
  365. data/lib/cybersource_rest_client/models/ucv1sessions_data_processing_information_authorization_options.rb +233 -0
  366. data/lib/cybersource_rest_client/models/ucv1sessions_data_processing_information_authorization_options_initiator.rb +200 -0
  367. data/lib/cybersource_rest_client/models/ucv1sessions_data_processing_information_bank_transfer_options.rb +196 -0
  368. data/lib/cybersource_rest_client/models/ucv1sessions_data_processing_information_recurring_options.rb +192 -0
  369. data/lib/cybersource_rest_client/models/ucv1sessions_data_recipient_information.rb +383 -0
  370. data/lib/cybersource_rest_client/models/ucv1sessions_data_sender_information.rb +376 -0
  371. data/lib/cybersource_rest_client/models/ucv1sessions_data_sender_information_account.rb +213 -0
  372. data/lib/cybersource_rest_client/models/ucv1sessions_payment_configurations.rb +210 -0
  373. data/lib/cybersource_rest_client/models/ucv1sessions_payment_configurations_clicktopay.rb +190 -0
  374. data/lib/cybersource_rest_client/models/ucv1sessions_payment_configurations_googlepay.rb +192 -0
  375. data/lib/cybersource_rest_client/models/ucv1sessions_payment_configurations_tms_token.rb +216 -0
  376. data/lib/cybersource_rest_client/models/ucv1sessions_payment_configurations_tms_token_customer.rb +196 -0
  377. data/lib/cybersource_rest_client/models/ucv1sessions_payment_configurations_tms_token_instrument_identifiers.rb +195 -0
  378. data/lib/cybersource_rest_client/models/ucv1sessions_payment_configurations_tms_token_payment_instruments.rb +195 -0
  379. data/lib/cybersource_rest_client/models/ucv1sessions_transient_token_response_options.rb +190 -0
  380. data/lib/cybersource_rest_client/models/update_payments.rb +192 -0
  381. data/lib/cybersource_rest_client/models/upv1capturecontexts_data_order_information_bill_to_company.rb +20 -20
  382. data/lib/cybersource_rest_client/models/upv1capturecontexts_order_information.rb +1 -1
  383. data/lib/cybersource_rest_client/models/upv1capturecontexts_order_information_bill_to.rb +483 -0
  384. data/lib/cybersource_rest_client/models/upv1capturecontexts_order_information_bill_to_company.rb +366 -0
  385. data/lib/cybersource_rest_client/models/validate_export_compliance_request.rb +1 -1
  386. data/lib/cybersource_rest_client/models/validate_request.rb +1 -1
  387. data/lib/cybersource_rest_client/models/value_added_services_products.rb +25 -5
  388. data/lib/cybersource_rest_client/models/{riskv1authenticationsetups_client_reference_information.rb → vasv1currencyconversion_client_reference_information.rb} +43 -26
  389. data/lib/cybersource_rest_client/models/vasv1currencyconversion_client_reference_information_partner.rb +213 -0
  390. data/lib/cybersource_rest_client/models/vasv1currencyconversion_order_information.rb +199 -0
  391. data/lib/cybersource_rest_client/models/vasv1currencyconversion_order_information_amount_details.rb +213 -0
  392. data/lib/cybersource_rest_client/models/vasv1currencyconversion_order_information_currency_conversion.rb +198 -0
  393. data/lib/cybersource_rest_client/models/vasv1currencyconversion_payment_information.rb +189 -0
  394. data/lib/cybersource_rest_client/models/vasv1currencyconversion_payment_information_card.rb +196 -0
  395. data/lib/cybersource_rest_client/models/vasv1currencyconversion_point_of_sale_information.rb +213 -0
  396. data/lib/cybersource_rest_client/models/verify_customer_address_request.rb +1 -1
  397. data/lib/cybersource_rest_client.rb +222 -22
  398. metadata +281 -75
  399. data/lib/cybersource_rest_client/api/token_api.rb +0 -306
  400. data/lib/cybersource_rest_client/api/tokenized_card_api.rb +0 -371
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 767094548594be059f30d46d1fe535a39ab426beec6ae36af8e1ba8f247ed2f5
4
- data.tar.gz: ce79348dbc7437e34cddf73080911d5459bc1918b1268a66d3bee17585bd324d
3
+ metadata.gz: bb5d050b359e9fefb56a6f04e11510cc45f1c1b6f033a621495b4f82ff2d8a64
4
+ data.tar.gz: b8e37d57a3d3ec9a63ce79cb5115df8c41bedaeef333d774673f4ae07aafecc4
5
5
  SHA512:
6
- metadata.gz: f6faecf8d5d693da9e10aacefd367096aa5f659fa0b5e1d09d82a7a383ad8b97aaf779e9cc6b1bbf33f8a16301cbb2a9d92ddbb7cc6a40ac1c4ace584d0deefe
7
- data.tar.gz: b16e4826078f3ee87f886ecb1216610b71ee682c591491adde2768396a76b9869e2d4f8c31dc550071a7c8f5a1fa6254f7e7d3b2c9db87b1d900033cdc657116
6
+ metadata.gz: f712d7cca99ab978f9115b6dea2849c27c65ed3d899d5614d5687426f8d6b90d5b123f12647e7e3356f09028264f6a2a25f5a0dbeb3992af776533448f754836
7
+ data.tar.gz: bf26f45d42ad16decfe75998c29b338e0a111d36290064a2ac625f14627c47927e8828ca32e991bd067b07fdf5f21740f03278948f202f5192a569068321ea4e
@@ -4,6 +4,7 @@ require 'jwt'
4
4
  require 'json'
5
5
  require 'active_support'
6
6
  require 'time'
7
+ require 'securerandom'
7
8
  require_relative '../../core/ITokenGeneration.rb'
8
9
  require_relative '../../util/Constants.rb'
9
10
  require_relative '../../util/ExceptionHandler.rb'
@@ -16,63 +17,118 @@ public
16
17
  class GenerateJwtToken
17
18
  @log_obj
18
19
 
19
- #JWT Token-generated based on the Request type
20
+ # JWT Token generation for JWTv2 specification
20
21
  def getToken(merchantconfig_obj, gmtDatetime, isResponseMLEForApi)
21
22
  @log_obj = Log.new merchantconfig_obj.log_config, "JwtToken"
22
23
 
23
- jwtBody = ''
24
- request_type = merchantconfig_obj.requestType.upcase
25
-
26
- jwtBody = getJwtBody(request_type, gmtDatetime, merchantconfig_obj, isResponseMLEForApi)
27
- claimSet = JSON.parse(jwtBody)
28
-
29
- cache_value = Cache.new.fetchCachedP12Certificate(merchantconfig_obj)
30
- privateKey = cache_value.private_key
31
- jwt_cert_obj = cache_value.cert
32
- jwt_cert_in_der = Base64.strict_encode64(jwt_cert_obj.to_der)
33
-
34
-
35
- # JWT token-Generates using RS256 algorithm only
36
- x5clist = [jwt_cert_in_der]
37
- customHeaders = {}
38
- customHeaders['v-c-merchant-id'] = merchantconfig_obj.keyAlias
39
- customHeaders['x5c'] = x5clist
40
-
41
- # Generating JWT token
42
- token = JWT.encode(claimSet, privateKey, 'RS256', customHeaders)
43
- return token
44
- rescue StandardError => err
45
- if err.message.include? 'PKCS12_parse: mac verify failure'
46
- @log_obj.logger.error(ExceptionHandler.new.new_custom_error Constants::ERROR_PREFIX + Constants::INCORRECT_KEY_PASS)
47
- # exit!
48
- else
49
- @log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
50
- # exit!
24
+ begin
25
+ # Get payload claim set for JWTv2 (identical for both key types)
26
+ payload_claim_set = getPayloadClaimSet(merchantconfig_obj, isResponseMLEForApi)
27
+ token = ''
28
+ if merchantconfig_obj.is_shared_secret_key_type?
29
+ # Shared Secret (HMAC-SHA256) signing
30
+ @log_obj.logger.debug('Generating JWT token using shared secret (HS256)')
31
+
32
+ secret_key = merchantconfig_obj.merchantSecretKey
33
+ begin
34
+ secret_key_decoded = Base64.strict_decode64(secret_key)
35
+ rescue ArgumentError => e
36
+ raise StandardError.new("Invalid base64-encoded secret key: #{e.message}")
37
+ end
38
+
39
+ # Get header claim set with merchantKeyId as kid
40
+ header_claim_set = getHeaderClaimSet(merchant_key_id: merchantconfig_obj.merchantKeyId)
41
+
42
+ # Generate JWT token using HS256 algorithm
43
+ token = JWT.encode(payload_claim_set, secret_key_decoded, 'HS256', header_claim_set)
44
+ else
45
+ # P12 Certificate (RSA-SHA256) signing — existing behavior
46
+ @log_obj.logger.debug('Generating JWT token using P12 certificate (RS256)')
47
+
48
+ # Get cached certificate and private key
49
+ cache_value = Cache.new.fetchCachedP12Certificate(merchantconfig_obj)
50
+ private_key = cache_value.private_key
51
+ jwt_cert_obj = cache_value.cert
52
+
53
+ # Get header claim set with certificate serial number as kid
54
+ header_claim_set = getHeaderClaimSet(certificate: jwt_cert_obj)
55
+
56
+ # Generate JWT token using RS256 algorithm
57
+ token = JWT.encode(payload_claim_set, private_key, 'RS256', header_claim_set)
58
+ end
59
+
60
+ return token
61
+ rescue StandardError => err
62
+ if err.message.include? 'PKCS12_parse: mac verify failure'
63
+ @log_obj.logger.error(ExceptionHandler.new.new_custom_error Constants::ERROR_PREFIX + Constants::INCORRECT_KEY_PASS)
64
+ else
65
+ @log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
66
+ end
67
+ raise err
51
68
  end
52
- raise err
53
69
  end
54
70
 
55
- def getJwtBody(request_type, gmtDatetime, merchantconfig_obj, isResponseMLEForApi=false)
56
- jwtBody = "{\n "
57
-
71
+ private
72
+
73
+ def getPayloadClaimSet(merchantconfig_obj, isResponseMLEForApi)
74
+ jwt_payload = {}
75
+ request_type = merchantconfig_obj.requestType.upcase
76
+
77
+ # Setting the JWT digest and digest Algorithm when a POST, PUT, or PATCH request is made
58
78
  if request_type == Constants::POST_REQUEST_TYPE || request_type == Constants::PUT_REQUEST_TYPE || request_type == Constants::PATCH_REQUEST_TYPE
59
79
  payload = merchantconfig_obj.requestJsonData
60
-
61
- # Note: Digest is not passed for GET calls
62
80
  digest = DigestGeneration.new.generateDigest(payload)
63
- jwtBody = jwtBody + "\"digest\":\"" + digest + "\", \"digestAlgorithm\":\"SHA-256\", \"iat\":" + Time.parse(gmtDatetime).to_i.to_s
64
- elsif request_type == Constants::GET_REQUEST_TYPE || request_type == Constants::DELETE_REQUEST_TYPE
65
- jwtBody = jwtBody + "\"iat\":" + Time.parse(gmtDatetime).to_i.to_s
81
+ jwt_payload['digest'] = digest
82
+ jwt_payload['digestAlgorithm'] = 'SHA-256'
83
+ end
84
+
85
+ # Set the iat and exp claims using Unix timestamps
86
+ current_time = Time.now.to_i
87
+ jwt_payload['iat'] = current_time
88
+ jwt_payload['exp'] = current_time + 120 # The exp claim is set to 2 mins more than the iat claim
89
+
90
+ # Set the request method, host and resource path in the JWT body as per the specification for all request types
91
+ jwt_payload['request-method'] = request_type
92
+ jwt_payload['request-host'] = merchantconfig_obj.requestHost
93
+ jwt_payload['request-resource-path'] = merchantconfig_obj.requestTarget
94
+
95
+ # Choose issuer claim in the JWT body as per the use_metakey flag in the config file
96
+ if merchantconfig_obj.useMetaKey
97
+ issuer = merchantconfig_obj.portfolioID
66
98
  else
67
- raise StandardError.new(Constants::ERROR_PREFIX + Constants::INVALID_REQUEST_TYPE_METHOD)
99
+ issuer = merchantconfig_obj.merchantId
68
100
  end
69
101
 
102
+ jwt_payload['iss'] = issuer
103
+ jwt_payload['jti'] = SecureRandom.uuid # Unique JWT ID
104
+ jwt_payload['v-c-jwt-version'] = '2'
105
+ jwt_payload['v-c-merchant-id'] = merchantconfig_obj.merchantId
106
+
70
107
  if isResponseMLEForApi
71
- mleKid = MLEUtility.validate_and_auto_extract_response_mle_kid(merchantconfig_obj)
72
- jwtBody = jwtBody + ", \"v-c-response-mle-kid\":\"" + mleKid + "\""
108
+ mle_kid = MLEUtility.validate_and_auto_extract_response_mle_kid(merchantconfig_obj)
109
+ jwt_payload['v-c-response-mle-kid'] = mle_kid
110
+ end
111
+
112
+ return jwt_payload
113
+ end
114
+
115
+ def getHeaderClaimSet(merchant_key_id: nil, certificate: nil)
116
+ kid_value = ''
117
+ if !certificate.nil?
118
+ kid_value = MLEUtility.extract_serial_number_from_certificate(certificate)
119
+ elsif !merchant_key_id.nil? && !merchant_key_id.to_s.empty?
120
+ kid_value = merchant_key_id
121
+ else
122
+ raise StandardError.new("Either certificate or merchant_key_id must be provided for JWT header")
73
123
  end
74
124
 
75
- jwtBody = jwtBody + "\n}"
125
+ jwt_headers = {
126
+ 'kid' => kid_value,
127
+ 'typ' => 'JWT'
128
+ }
129
+
130
+ return jwt_headers
76
131
  end
132
+
77
133
  implements TokenInterface
78
134
  end
@@ -28,9 +28,11 @@ public
28
28
  @keyAlias = cybsPropertyObj['keyAlias']
29
29
  @keyPass = cybsPropertyObj['keyPass']
30
30
  @keyFilename = cybsPropertyObj['keyFilename']
31
+ @jwtKeyType = cybsPropertyObj['jwtKeyType'] ? cybsPropertyObj['jwtKeyType'].to_s.upcase : Constants::JWT_KEY_TYPE_P12
31
32
  @useMetaKey = cybsPropertyObj['useMetaKey']
32
33
  @portfolioID = cybsPropertyObj['portfolioID']
33
34
  @solutionId = cybsPropertyObj['solutionId']
35
+ @isSDK = cybsPropertyObj['isSDK'] == true || cybsPropertyObj['isSDK'].to_s.strip.casecmp?('true')
34
36
  @p12KeyFilePath = nil
35
37
  # MutualAuth & OAuth Parameters
36
38
  @enableClientCert = cybsPropertyObj['enableClientCert']
@@ -142,7 +144,9 @@ public
142
144
 
143
145
  validateMerchantDetails()
144
146
  validateMLEConfiguration(cybsPropertyObj)
145
- @p12KeyFilePath = File.join(@keysDirectory, @keyFilename + ".p12")
147
+ if !@keysDirectory.nil? && !@keysDirectory.to_s.empty? && !@keyFilename.nil? && !@keyFilename.to_s.empty?
148
+ @p12KeyFilePath = File.join(@keysDirectory, @keyFilename + ".p12")
149
+ end
146
150
  logAllProperties(cybsPropertyObj)
147
151
  end
148
152
 
@@ -227,35 +231,52 @@ public
227
231
  elsif !@merchantId.instance_of? String
228
232
  @merchantId=@merchantId.to_s
229
233
  end
230
- if @keyAlias.to_s.empty?
231
- @keyAlias = @merchantId
232
- @log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::KEY_ALIAS_NULL_EMPTY)
233
- elsif !@keyAlias.instance_of? String
234
- @keyAlias=@keyAlias.to_s
235
- elsif @keyAlias != @merchantId
236
- @keyAlias = @merchantId
237
- @log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::INCORRECT_KEY_ALIAS)
238
- end
239
- if @keyPass.to_s.empty?
240
- @keyPass = @merchantId
241
- @log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::KEY_PASS_NULL)
242
- elsif !@keyPass.instance_of? String
243
- @keyPass=@keyPass.to_s
244
- end
245
- if @keysDirectory.to_s.empty?
246
- @keysDirectory = Constants::DEFAULT_KEY_DIRECTORY
247
- @log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::KEY_DIRECTORY_EMPTY + @keysDirectory)
248
- elsif !@keysDirectory.instance_of? String
249
- @keysDirectory=@keysDirectory.to_s
250
- end
251
- if @keyFilename.to_s.empty?
252
- @keyFilename = @merchantId
253
- @log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::KEY_FILE_NAME_NULL_EMPTY)
254
- elsif !@keyFilename.instance_of? String
255
- @keyFilename=@keyFilename.to_s
256
- end
257
- if !check_key_file
258
- @log_obj.logger.error(ExceptionHandler.new.new_custom_error "Error finding or accessing the Key Directory or Key File. Please review the values in the merchant configuration.")
234
+
235
+ # Validate jwtKeyType
236
+ check_jwt_key_type
237
+
238
+ if is_shared_secret_key_type?
239
+ # Shared Secret validation — same credentials as HTTP_SIGNATURE
240
+ validateSharedSecretKeyCredentials()
241
+ else
242
+ # P12 validation (existing behavior)
243
+ if @keyAlias.to_s.empty?
244
+ @keyAlias = @merchantId
245
+ @log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::KEY_ALIAS_NULL_EMPTY)
246
+ elsif !@keyAlias.instance_of? String
247
+ @keyAlias=@keyAlias.to_s
248
+ end
249
+ if !@useMetaKey && @keyAlias != @merchantId
250
+ @keyAlias = @merchantId
251
+ @log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::INCORRECT_KEY_ALIAS)
252
+ end
253
+ if @useMetaKey && @keyAlias != @portfolioID
254
+ @keyAlias = @portfolioID
255
+ @log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::INCORRECT_KEY_ALIAS_USE_METAKEY)
256
+ end
257
+ if @keyPass.to_s.empty?
258
+ @keyPass = @merchantId
259
+ @log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::KEY_PASS_NULL)
260
+ elsif !@keyPass.instance_of? String
261
+ @keyPass=@keyPass.to_s
262
+ end
263
+ if @keysDirectory.to_s.empty?
264
+ @keysDirectory = Constants::DEFAULT_KEY_DIRECTORY
265
+ @log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::KEY_DIRECTORY_EMPTY + @keysDirectory)
266
+ elsif !@keysDirectory.instance_of? String
267
+ @keysDirectory=@keysDirectory.to_s
268
+ end
269
+ if @keyFilename.to_s.empty?
270
+ @keyFilename = @merchantId
271
+ @log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::KEY_FILE_NAME_NULL_EMPTY)
272
+ elsif !@keyFilename.instance_of? String
273
+ @keyFilename=@keyFilename.to_s
274
+ end
275
+ if !check_key_file
276
+ err = StandardError.new(Constants::ERROR_PREFIX + "Cannot find or access the Key Directory or Key File. Please review the values in the merchant configuration.")
277
+ @log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
278
+ raise err
279
+ end
259
280
  end
260
281
  end
261
282
  if @authenticationType.upcase == Constants::AUTH_TYPE_MUTUAL_AUTH
@@ -298,20 +319,7 @@ public
298
319
  elsif !@merchantId.instance_of? String
299
320
  @merchantId=@merchantId.to_s
300
321
  end
301
- if @merchantKeyId.to_s.empty?
302
- err = StandardError.new(Constants::ERROR_PREFIX+ Constants::MERCHANT_KEY_ID_MANDATORY)
303
- @log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
304
- raise err
305
- elsif !@merchantKeyId.instance_of? String
306
- @merchantKeyId=@merchantKeyId.to_s
307
- end
308
- if @merchantSecretKey.to_s.empty?
309
- err = StandardError.new(Constants::ERROR_PREFIX+ Constants::MERCHANT_SECRET_KEY_MANDATORY)
310
- @log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
311
- raise err
312
- elsif !@merchantSecretKey.instance_of? String
313
- @merchantSecretKey=@merchantSecretKey.to_s
314
- end
322
+ validateSharedSecretKeyCredentials()
315
323
  end
316
324
  if @useMetaKey && @portfolioID.to_s.empty?
317
325
  err = StandardError.new(Constants::ERROR_PREFIX+ Constants::PORTFOLIO_ID_MANDATORY)
@@ -330,6 +338,23 @@ public
330
338
  end
331
339
  end
332
340
 
341
+ def validateSharedSecretKeyCredentials()
342
+ if @merchantKeyId.to_s.empty?
343
+ err = StandardError.new(Constants::ERROR_PREFIX+ Constants::MERCHANT_KEY_ID_MANDATORY)
344
+ @log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
345
+ raise err
346
+ elsif !@merchantKeyId.instance_of? String
347
+ @merchantKeyId=@merchantKeyId.to_s
348
+ end
349
+ if @merchantSecretKey.to_s.empty?
350
+ err = StandardError.new(Constants::ERROR_PREFIX+ Constants::MERCHANT_SECRET_KEY_MANDATORY)
351
+ @log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
352
+ raise err
353
+ elsif !@merchantSecretKey.instance_of? String
354
+ @merchantSecretKey=@merchantSecretKey.to_s
355
+ end
356
+ end
357
+
333
358
  def validateMLEConfiguration(cybsPropertyObj)
334
359
  if !@useMLEGlobally.nil? && !cybsPropertyObj['enableRequestMLEForOptionalApisGlobally'].nil?
335
360
  if @useMLEGlobally != cybsPropertyObj['enableRequestMLEForOptionalApisGlobally']
@@ -581,6 +606,20 @@ public
581
606
  @log_obj.logger.info('Merchant Configuration :\n' + propertyObj.to_s)
582
607
  end
583
608
 
609
+ # Returns true when jwtKeyType is SHARED_SECRET
610
+ def is_shared_secret_key_type?
611
+ !@jwtKeyType.nil? && @jwtKeyType.upcase == Constants::JWT_KEY_TYPE_SHARED_SECRET
612
+ end
613
+
614
+ # Validates that jwtKeyType is either P12 or SHARED_SECRET
615
+ def check_jwt_key_type
616
+ unless @jwtKeyType.upcase == Constants::JWT_KEY_TYPE_P12 || @jwtKeyType.upcase == Constants::JWT_KEY_TYPE_SHARED_SECRET
617
+ err = StandardError.new(Constants::ERROR_PREFIX + Constants::INVALID_JWT_KEY_TYPE)
618
+ @log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
619
+ raise err
620
+ end
621
+ end
622
+
584
623
  def check_key_file
585
624
  # Directory exists?
586
625
  unless Dir.exist?(@keysDirectory)
@@ -622,6 +661,7 @@ public
622
661
  attr_accessor :keyAlias
623
662
  attr_accessor :keyPass
624
663
  attr_accessor :keyFilename
664
+ attr_accessor :jwtKeyType
625
665
  attr_accessor :useMetaKey
626
666
  attr_accessor :portfolioID
627
667
  attr_accessor :keepAliveTime
@@ -645,6 +685,7 @@ public
645
685
  attr_accessor :requestTarget
646
686
  attr_accessor :log_obj
647
687
  attr_accessor :solutionId
688
+ attr_accessor :isSDK
648
689
  attr_accessor :defaultCustomHeaders
649
690
  attr_accessor :pemFileDirectory
650
691
  attr_accessor :useMLEGlobally
@@ -54,7 +54,8 @@ public
54
54
  if @maxLogFiles.nil? || @maxLogFiles.to_s.empty?
55
55
  @maxLogFiles = Constants::DEFAULT_MAX_LOG_FILES
56
56
  log_message += Constants::WARNING_PREFIX + Constants::INVALID_MAX_LOG_FILES + @maxLogFiles
57
- elsif !@maxLogFiles.instance_of? Integer
57
+ end
58
+ if !@maxLogFiles.instance_of? Integer
58
59
  @maxLogFiles = @maxLogFiles.to_i
59
60
  end
60
61
  if @enableMasking == "true"
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative './Cache'
4
+ require 'stringio'
4
5
  require 'jose'
5
6
 
6
7
  public
@@ -126,8 +126,8 @@ public
126
126
  if merchantConfig.mleForRequestPublicCertPath && !merchantConfig.mleForRequestPublicCertPath.strip.empty?
127
127
  certificate_identifier = Constants::MLE_CACHE_IDENTIFIER_FOR_CONFIG_CERT
128
128
  certificate_file_path = merchantConfig.mleForRequestPublicCertPath
129
- # Priority #2: If mleForRequestPublicCertPath not provided, get mlecert from p12 if provided and jwt auth type
130
- elsif Constants::AUTH_TYPE_JWT.downcase == merchantConfig.authenticationType.downcase && merchantConfig.p12KeyFilePath
129
+ # Priority #2: If mleForRequestPublicCertPath not provided, get mlecert from p12 if provided and jwt auth type (only for P12 key type, not SHARED_SECRET)
130
+ elsif Constants::AUTH_TYPE_JWT.downcase == merchantConfig.authenticationType.downcase && !merchantConfig.is_shared_secret_key_type? && merchantConfig.p12KeyFilePath
131
131
  certificate_identifier = Constants::MLE_CACHE_IDENTIFIER_FOR_P12_CERT
132
132
  certificate_file_path = merchantConfig.p12KeyFilePath
133
133
  # Priority #3: Get mlecert from default cert in SDK as per CAS or PROD env.
@@ -224,10 +224,13 @@ public
224
224
  merchant_config.responseMlePrivateKeyFilePassword
225
225
  )
226
226
 
227
- merchant_cert = Utility.getCertificateBasedOnKeyAlias(certificate_list, merchant_config.merchantId)
227
+ # Use correct alias for MetaKey mode: portfolioID when useMetaKey is true, merchantId otherwise
228
+ response_mle_key_alias = merchant_config.useMetaKey ? merchant_config.portfolioID : merchant_config.merchantId
229
+
230
+ merchant_cert = Utility.getCertificateBasedOnKeyAlias(certificate_list, response_mle_key_alias)
228
231
 
229
232
  if merchant_cert.nil?
230
- raise StandardError.new("No certificate found for Response MLE Private Key file with merchant ID alias #{merchant_config.merchantId}")
233
+ raise StandardError.new("No certificate found for Response MLE Private Key file with alias '#{response_mle_key_alias}'")
231
234
  end
232
235
 
233
236
  # Check if this is a CyberSource-generated P12 file
@@ -66,6 +66,12 @@
66
66
 
67
67
  AUTH_TYPE_JWT = 'JWT' unless const_defined?(:AUTH_TYPE_JWT)
68
68
 
69
+ JWT_KEY_TYPE_P12 = 'P12' unless const_defined?(:JWT_KEY_TYPE_P12)
70
+
71
+ JWT_KEY_TYPE_SHARED_SECRET = 'SHARED_SECRET' unless const_defined?(:JWT_KEY_TYPE_SHARED_SECRET)
72
+
73
+ INVALID_JWT_KEY_TYPE = "Invalid jwtKeyType. Must be 'P12' or 'SHARED_SECRET'." unless const_defined?(:INVALID_JWT_KEY_TYPE)
74
+
69
75
  OLD_RUN_ENVIRONMENT_CONSTANTS = ['CYBERSOURCE.ENVIRONMENT.SANDBOX', 'CYBERSOURCE.ENVIRONMENT.PRODUCTION', 'CYBERSOURCE.IN.ENVIRONMENT.SANDBOX', 'CYBERSOURCE.IN.ENVIRONMENT.PRODUCTION', 'BANKOFAMERICA.ENVIRONMENT.SANDBOX', 'BANKOFAMERICA.ENVIRONMENT.PRODUCTION']
70
76
 
71
77
  # constants for fall back logic
@@ -146,6 +152,8 @@
146
152
 
147
153
  INCORRECT_KEY_ALIAS = 'The Entered KeyAlias is Incorrect. Assigining merchantID value' unless const_defined?(:INCORRECT_KEY_ALIAS)
148
154
 
155
+ INCORRECT_KEY_ALIAS_USE_METAKEY = 'The Entered KeyAlias is Incorrect with useMetaKey set to true. Assigining portfolioID value' unless const_defined?(:INCORRECT_KEY_ALIAS_USE_METAKEY)
156
+
149
157
  ENABLE_CLIENT_CERT_EMPTY = 'Enable Clientcert is Empty/Null.' unless const_defined?(:ENABLE_CLIENT_CERT_EMPTY)
150
158
 
151
159
  CLIENT_CERT_DIR_EMPTY = 'Client Cert Directory is Empty/Null' unless const_defined?(:CLIENT_CERT_DIR_EMPTY)
@@ -48,6 +48,15 @@ public
48
48
  return requestBody
49
49
  end
50
50
 
51
+ # Check if using shared secret JWT without explicit MLE certificate path
52
+ if mleCertificate.nil? &&
53
+ Constants::AUTH_TYPE_JWT.downcase == merchantConfig.authenticationType.downcase &&
54
+ merchantConfig.is_shared_secret_key_type?
55
+ @log_obj.logger.debug("MLE for requests with JWT shared secret authentication requires mleForRequestPublicCertPath to be explicitly provided in merchant configuration.")
56
+ @log_obj.logger.debug("Please set mleForRequestPublicCertPath to the path of your MLE public certificate file.")
57
+ raise StandardError.new(Constants::ERROR_PREFIX + "Missing MLE certificate for JWT shared secret authentication. Please provide the MLE public certificate path in the configuration.")
58
+ end
59
+
51
60
  begin
52
61
  serial_number = self.extract_serial_number_from_certificate(mleCertificate)
53
62
 
@@ -239,7 +239,7 @@ module CyberSource
239
239
  # header parameters
240
240
  header_params = {}
241
241
  # HTTP header 'Accept' (if needed)
242
- header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
242
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;charset=utf-8'])
243
243
  # HTTP header 'Content-Type'
244
244
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
245
245
 
@@ -138,7 +138,7 @@ module CyberSource
138
138
  # header parameters
139
139
  header_params = {}
140
140
  # HTTP header 'Accept' (if needed)
141
- header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
141
+ header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
142
142
  # HTTP header 'Content-Type'
143
143
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
144
144
 
@@ -182,27 +182,27 @@ module CyberSource
182
182
  # Create Webhook Security Keys
183
183
  # Create security keys that CyberSource will use internally to connect to your servers and validate messages using a digital signature. Select the CREATE example for CyberSource to generate the key on our server and maintain it for you as well. Remember to save the key in the API response, so that you can use it to validate messages later.
184
184
  #
185
- # @param v_c_sender_organization_id Sender organization id
186
- # @param v_c_permissions Encoded user permissions returned by the CGK, for the entity user who initiated the boarding
187
185
  # @param [Hash] opts the optional parameters
188
186
  # @option opts [String] :v_c_correlation_id A globally unique id associated with your request
187
+ # @option opts [String] :v_c_sender_organization_id Sender organization id
188
+ # @option opts [String] :v_c_permissions Encoded user permissions returned by the CGK, for the entity user who initiated the boarding
189
189
  # @option opts [SaveSymEgressKey] :save_sym_egress_key Provide egress Symmetric key information to save (create or store or refresh)
190
190
  # @return [InlineResponse2015]
191
191
  #
192
- def save_sym_egress_key(v_c_sender_organization_id, v_c_permissions, opts = {})
193
- data, status_code, headers = save_sym_egress_key_with_http_info(v_c_sender_organization_id, v_c_permissions, opts)
192
+ def save_sym_egress_key(opts = {})
193
+ data, status_code, headers = save_sym_egress_key_with_http_info(opts)
194
194
  return data, status_code, headers
195
195
  end
196
196
 
197
197
  # Create Webhook Security Keys
198
198
  # Create security keys that CyberSource will use internally to connect to your servers and validate messages using a digital signature. Select the CREATE example for CyberSource to generate the key on our server and maintain it for you as well. Remember to save the key in the API response, so that you can use it to validate messages later.
199
- # @param v_c_sender_organization_id Sender organization id
200
- # @param v_c_permissions Encoded user permissions returned by the CGK, for the entity user who initiated the boarding
201
199
  # @param [Hash] opts the optional parameters
202
200
  # @option opts [String] :v_c_correlation_id A globally unique id associated with your request
201
+ # @option opts [String] :v_c_sender_organization_id Sender organization id
202
+ # @option opts [String] :v_c_permissions Encoded user permissions returned by the CGK, for the entity user who initiated the boarding
203
203
  # @option opts [SaveSymEgressKey] :save_sym_egress_key Provide egress Symmetric key information to save (create or store or refresh)
204
204
  # @return [Array<(InlineResponse2015, Fixnum, Hash)>] InlineResponse2015 data, response status code and response headers
205
- def save_sym_egress_key_with_http_info(v_c_sender_organization_id, v_c_permissions, opts = {})
205
+ def save_sym_egress_key_with_http_info(opts = {})
206
206
 
207
207
  if @api_client.config.debugging
208
208
  begin
@@ -212,22 +212,14 @@ module CyberSource
212
212
  puts 'Cannot write to log'
213
213
  end
214
214
  end
215
- # verify the required parameter 'v_c_sender_organization_id' is set
216
- if @api_client.config.client_side_validation && v_c_sender_organization_id.nil?
217
- fail ArgumentError, "Missing the required parameter 'v_c_sender_organization_id' when calling CreateNewWebhooksApi.save_sym_egress_key"
218
- end
219
- #if @api_client.config.client_side_validation && v_c_sender_organization_id !~ Regexp.new(/^[A-Za-z0-9\\-_]+$/)
220
- #fail ArgumentError, "invalid value for 'v_c_sender_organization_id' when calling CreateNewWebhooksApi.save_sym_egress_key, must conform to the pattern /^[A-Za-z0-9\\-_]+$/."
221
- #end
222
-
223
- # verify the required parameter 'v_c_permissions' is set
224
- if @api_client.config.client_side_validation && v_c_permissions.nil?
225
- fail ArgumentError, "Missing the required parameter 'v_c_permissions' when calling CreateNewWebhooksApi.save_sym_egress_key"
226
- end
227
215
  #if @api_client.config.client_side_validation && !opts[:'v_c_correlation_id'].nil? && opts[:'v_c_correlation_id'] !~ Regexp.new(/^[A-Za-z0-9\\.\\-_:]+$/)
228
216
  #fail ArgumentError, "invalid value for 'opts[:\"v_c_correlation_id\"]' when calling CreateNewWebhooksApi.save_sym_egress_key, must conform to the pattern /^[A-Za-z0-9\\.\\-_:]+$/."
229
217
  #end
230
218
 
219
+ #if @api_client.config.client_side_validation && !opts[:'v_c_sender_organization_id'].nil? && opts[:'v_c_sender_organization_id'] !~ Regexp.new(/^[A-Za-z0-9\\-_]+$/)
220
+ #fail ArgumentError, "invalid value for 'opts[:\"v_c_sender_organization_id\"]' when calling CreateNewWebhooksApi.save_sym_egress_key, must conform to the pattern /^[A-Za-z0-9\\-_]+$/."
221
+ #end
222
+
231
223
  # resource path
232
224
  local_var_path = 'kms/egress/v2/keys-sym'
233
225
 
@@ -240,9 +232,9 @@ module CyberSource
240
232
  header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
241
233
  # HTTP header 'Content-Type'
242
234
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
243
- header_params[:'v-c-sender-organization-id'] = v_c_sender_organization_id
244
- header_params[:'v-c-permissions'] = v_c_permissions
245
235
  header_params[:'v-c-correlation-id'] = opts[:'v_c_correlation_id'] if !opts[:'v_c_correlation_id'].nil?
236
+ header_params[:'v-c-sender-organization-id'] = opts[:'v_c_sender_organization_id'] if !opts[:'v_c_sender_organization_id'].nil?
237
+ header_params[:'v-c-permissions'] = opts[:'v_c_permissions'] if !opts[:'v_c_permissions'].nil?
246
238
 
247
239
  # form parameters
248
240
  form_params = {}