cybersource_rest_client 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/AuthenticationSDK/Cybersource.gemspec +23 -0
- data/AuthenticationSDK/authentication/http/GetSignatureParameter.rb +62 -0
- data/AuthenticationSDK/authentication/http/HttpSignatureHeader.rb +50 -0
- data/AuthenticationSDK/authentication/jwt/JwtToken.rb +62 -0
- data/AuthenticationSDK/authentication/payloadDigest/digest.rb +10 -0
- data/AuthenticationSDK/core/Authorization.rb +24 -0
- data/AuthenticationSDK/core/ITokenGeneration.rb +4 -0
- data/AuthenticationSDK/core/Logger.rb +26 -0
- data/AuthenticationSDK/core/MerchantConfig.rb +181 -0
- data/AuthenticationSDK/util/ApiException.rb +19 -0
- data/AuthenticationSDK/util/Cache.rb +36 -0
- data/AuthenticationSDK/util/Constants.rb +134 -0
- data/AuthenticationSDK/util/PropertiesUtil.rb +21 -0
- data/AuthenticationSDK/util/Utility.rb +31 -0
- data/lib/cyberSource_client.rb +286 -0
- data/lib/cyberSource_client/api/capture_api.rb +133 -0
- data/lib/cyberSource_client/api/credit_api.rb +127 -0
- data/lib/cyberSource_client/api/default_api.rb +75 -0
- data/lib/cyberSource_client/api/instrument_identifier_api.rb +393 -0
- data/lib/cyberSource_client/api/key_generation_api.rb +75 -0
- data/lib/cyberSource_client/api/payment_api.rb +127 -0
- data/lib/cyberSource_client/api/payment_instrument_api.rb +312 -0
- data/lib/cyberSource_client/api/refund_api.rb +191 -0
- data/lib/cyberSource_client/api/reversal_api.rb +133 -0
- data/lib/cyberSource_client/api/tokenization_api.rb +71 -0
- data/lib/cyberSource_client/api/void_api.rb +307 -0
- data/lib/cyberSource_client/api_client.rb +437 -0
- data/lib/cyberSource_client/api_error.rb +38 -0
- data/lib/cyberSource_client/configuration.rb +202 -0
- data/lib/cyberSource_client/models/auth_reversal_request.rb +219 -0
- data/lib/cyberSource_client/models/body.rb +295 -0
- data/lib/cyberSource_client/models/body_1.rb +183 -0
- data/lib/cyberSource_client/models/body_2.rb +331 -0
- data/lib/cyberSource_client/models/body_3.rb +331 -0
- data/lib/cyberSource_client/models/capture_payment_request.rb +267 -0
- data/lib/cyberSource_client/models/card_info.rb +214 -0
- data/lib/cyberSource_client/models/create_credit_request.rb +267 -0
- data/lib/cyberSource_client/models/create_payment_request.rb +285 -0
- data/lib/cyberSource_client/models/der_public_key.rb +205 -0
- data/lib/cyberSource_client/models/error.rb +192 -0
- data/lib/cyberSource_client/models/error_links.rb +205 -0
- data/lib/cyberSource_client/models/error_response.rb +192 -0
- data/lib/cyberSource_client/models/generate_public_key_request.rb +184 -0
- data/lib/cyberSource_client/models/inline_response_200.rb +202 -0
- data/lib/cyberSource_client/models/inline_response_200_1.rb +255 -0
- data/lib/cyberSource_client/models/inline_response_200_2.rb +377 -0
- data/lib/cyberSource_client/models/inline_response_200_2_buyer_information.rb +270 -0
- data/lib/cyberSource_client/models/inline_response_200_2_device_information.rb +219 -0
- data/lib/cyberSource_client/models/inline_response_200_2_merchant_information.rb +233 -0
- data/lib/cyberSource_client/models/inline_response_200_2_order_information.rb +230 -0
- data/lib/cyberSource_client/models/inline_response_200_2_order_information_amount_details.rb +385 -0
- data/lib/cyberSource_client/models/inline_response_200_2_order_information_bill_to.rb +459 -0
- data/lib/cyberSource_client/models/inline_response_200_2_order_information_invoice_details.rb +315 -0
- data/lib/cyberSource_client/models/inline_response_200_2_order_information_line_items.rb +564 -0
- data/lib/cyberSource_client/models/inline_response_200_2_order_information_ship_to.rb +429 -0
- data/lib/cyberSource_client/models/inline_response_200_2_payment_information.rb +192 -0
- data/lib/cyberSource_client/models/inline_response_200_2_payment_information_card.rb +274 -0
- data/lib/cyberSource_client/models/inline_response_200_2_payment_information_tokenized_card.rb +299 -0
- data/lib/cyberSource_client/models/inline_response_200_2_processing_information.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_200_2_processor_information.rb +227 -0
- data/lib/cyberSource_client/models/inline_response_200_2_processor_information_avs.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_200_2_processor_information_card_verification.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_200_3.rb +314 -0
- data/lib/cyberSource_client/models/inline_response_200_4.rb +350 -0
- data/lib/cyberSource_client/models/inline_response_200_4_device_information.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_200_4_order_information.rb +230 -0
- data/lib/cyberSource_client/models/inline_response_200_4_order_information_amount_details.rb +360 -0
- data/lib/cyberSource_client/models/inline_response_200_4_order_information_invoice_details.rb +305 -0
- data/lib/cyberSource_client/models/inline_response_200_4_order_information_ship_to.rb +249 -0
- data/lib/cyberSource_client/models/inline_response_200_4_processing_information.rb +208 -0
- data/lib/cyberSource_client/models/inline_response_200_4_processing_information_authorization_options.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_200_5.rb +305 -0
- data/lib/cyberSource_client/models/inline_response_200_6.rb +305 -0
- data/lib/cyberSource_client/models/inline_response_200_7.rb +295 -0
- data/lib/cyberSource_client/models/inline_response_200_8.rb +277 -0
- data/lib/cyberSource_client/models/inline_response_200_8__links.rb +219 -0
- data/lib/cyberSource_client/models/inline_response_200_8__links_first.rb +184 -0
- data/lib/cyberSource_client/models/inline_response_200_8__links_last.rb +184 -0
- data/lib/cyberSource_client/models/inline_response_200_8__links_next.rb +184 -0
- data/lib/cyberSource_client/models/inline_response_200_8__links_prev.rb +184 -0
- data/lib/cyberSource_client/models/inline_response_200_8__links_self.rb +184 -0
- data/lib/cyberSource_client/models/inline_response_200_der.rb +205 -0
- data/lib/cyberSource_client/models/inline_response_200_jwk.rb +225 -0
- data/lib/cyberSource_client/models/inline_response_201.rb +350 -0
- data/lib/cyberSource_client/models/inline_response_201_1.rb +332 -0
- data/lib/cyberSource_client/models/inline_response_201_1_authorization_information.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_1_processor_information.rb +324 -0
- data/lib/cyberSource_client/models/inline_response_201_1_reversal_amount_details.rb +249 -0
- data/lib/cyberSource_client/models/inline_response_201_2.rb +314 -0
- data/lib/cyberSource_client/models/inline_response_201_2__links.rb +201 -0
- data/lib/cyberSource_client/models/inline_response_201_2_order_information.rb +192 -0
- data/lib/cyberSource_client/models/inline_response_201_2_order_information_amount_details.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_2_processor_information.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_201_3.rb +323 -0
- data/lib/cyberSource_client/models/inline_response_201_3__links.rb +192 -0
- data/lib/cyberSource_client/models/inline_response_201_3_order_information.rb +183 -0
- data/lib/cyberSource_client/models/inline_response_201_3_processor_information.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_3_refund_amount_details.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_4.rb +323 -0
- data/lib/cyberSource_client/models/inline_response_201_4_credit_amount_details.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_5.rb +280 -0
- data/lib/cyberSource_client/models/inline_response_201_5_void_amount_details.rb +219 -0
- data/lib/cyberSource_client/models/inline_response_201_6.rb +331 -0
- data/lib/cyberSource_client/models/inline_response_201__embedded.rb +183 -0
- data/lib/cyberSource_client/models/inline_response_201__embedded_capture.rb +193 -0
- data/lib/cyberSource_client/models/inline_response_201__embedded_capture__links.rb +183 -0
- data/lib/cyberSource_client/models/inline_response_201__links.rb +201 -0
- data/lib/cyberSource_client/models/inline_response_201__links_self.rb +194 -0
- data/lib/cyberSource_client/models/inline_response_201_client_reference_information.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_201_error_information.rb +239 -0
- data/lib/cyberSource_client/models/inline_response_201_error_information_details.rb +228 -0
- data/lib/cyberSource_client/models/inline_response_201_order_information.rb +192 -0
- data/lib/cyberSource_client/models/inline_response_201_order_information_amount_details.rb +249 -0
- data/lib/cyberSource_client/models/inline_response_201_order_information_invoice_details.rb +184 -0
- data/lib/cyberSource_client/models/inline_response_201_payment_information.rb +201 -0
- data/lib/cyberSource_client/models/inline_response_201_payment_information_account_features.rb +623 -0
- data/lib/cyberSource_client/models/inline_response_201_payment_information_card.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_201_payment_information_tokenized_card.rb +349 -0
- data/lib/cyberSource_client/models/inline_response_201_point_of_sale_information.rb +208 -0
- data/lib/cyberSource_client/models/inline_response_201_point_of_sale_information_emv.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_201_processor_information.rb +642 -0
- data/lib/cyberSource_client/models/inline_response_201_processor_information_avs.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_processor_information_card_verification.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_processor_information_consumer_authentication_response.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_processor_information_customer.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_201_processor_information_electronic_verification_results.rb +474 -0
- data/lib/cyberSource_client/models/inline_response_201_processor_information_issuer.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_processor_information_merchant_advice.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_400.rb +271 -0
- data/lib/cyberSource_client/models/inline_response_400_1.rb +271 -0
- data/lib/cyberSource_client/models/inline_response_400_2.rb +271 -0
- data/lib/cyberSource_client/models/inline_response_400_3.rb +271 -0
- data/lib/cyberSource_client/models/inline_response_400_4.rb +271 -0
- data/lib/cyberSource_client/models/inline_response_400_5.rb +259 -0
- data/lib/cyberSource_client/models/inline_response_400_6.rb +202 -0
- data/lib/cyberSource_client/models/inline_response_409.rb +183 -0
- data/lib/cyberSource_client/models/inline_response_409__links.rb +183 -0
- data/lib/cyberSource_client/models/inline_response_409__links_payment_instruments.rb +183 -0
- data/lib/cyberSource_client/models/inline_response_502.rb +260 -0
- data/lib/cyberSource_client/models/inline_response_default.rb +192 -0
- data/lib/cyberSource_client/models/inline_response_default__links.rb +205 -0
- data/lib/cyberSource_client/models/inline_response_default__links_next.rb +204 -0
- data/lib/cyberSource_client/models/inline_response_default_response_status.rb +225 -0
- data/lib/cyberSource_client/models/inline_response_default_response_status_details.rb +194 -0
- data/lib/cyberSource_client/models/instrumentidentifiers__links.rb +201 -0
- data/lib/cyberSource_client/models/instrumentidentifiers__links_self.rb +183 -0
- data/lib/cyberSource_client/models/instrumentidentifiers_authorization_options_merchant_initiated_transaction.rb +184 -0
- data/lib/cyberSource_client/models/instrumentidentifiers_bank_account.rb +194 -0
- data/lib/cyberSource_client/models/instrumentidentifiers_card.rb +184 -0
- data/lib/cyberSource_client/models/instrumentidentifiers_details.rb +194 -0
- data/lib/cyberSource_client/models/instrumentidentifiers_metadata.rb +184 -0
- data/lib/cyberSource_client/models/instrumentidentifiers_processing_information.rb +183 -0
- data/lib/cyberSource_client/models/instrumentidentifiers_processing_information_authorization_options.rb +183 -0
- data/lib/cyberSource_client/models/instrumentidentifiers_processing_information_authorization_options_initiator.rb +183 -0
- data/lib/cyberSource_client/models/json_web_key.rb +225 -0
- data/lib/cyberSource_client/models/key_parameters.rb +184 -0
- data/lib/cyberSource_client/models/key_result.rb +202 -0
- data/lib/cyberSource_client/models/link.rb +204 -0
- data/lib/cyberSource_client/models/links.rb +205 -0
- data/lib/cyberSource_client/models/oct_create_payment_request.rb +237 -0
- data/lib/cyberSource_client/models/paymentinstruments_bank_account.rb +184 -0
- data/lib/cyberSource_client/models/paymentinstruments_bill_to.rb +284 -0
- data/lib/cyberSource_client/models/paymentinstruments_buyer_information.rb +215 -0
- data/lib/cyberSource_client/models/paymentinstruments_buyer_information_issued_by.rb +184 -0
- data/lib/cyberSource_client/models/paymentinstruments_buyer_information_personal_identification.rb +203 -0
- data/lib/cyberSource_client/models/paymentinstruments_card.rb +278 -0
- data/lib/cyberSource_client/models/paymentinstruments_instrument_identifier.rb +295 -0
- data/lib/cyberSource_client/models/paymentinstruments_merchant_information.rb +183 -0
- data/lib/cyberSource_client/models/paymentinstruments_merchant_information_merchant_descriptor.rb +184 -0
- data/lib/cyberSource_client/models/paymentinstruments_processing_information.rb +193 -0
- data/lib/cyberSource_client/models/paymentinstruments_processing_information_bank_transfer_options.rb +184 -0
- data/lib/cyberSource_client/models/paymentsflexv1tokens_card_info.rb +214 -0
- data/lib/cyberSource_client/models/refund_capture_request.rb +267 -0
- data/lib/cyberSource_client/models/refund_payment_request.rb +267 -0
- data/lib/cyberSource_client/models/response_status.rb +225 -0
- data/lib/cyberSource_client/models/response_status_details.rb +194 -0
- data/lib/cyberSource_client/models/tokenize_parameters.rb +193 -0
- data/lib/cyberSource_client/models/tokenize_request.rb +193 -0
- data/lib/cyberSource_client/models/tokenize_result.rb +255 -0
- data/lib/cyberSource_client/models/v2credits_point_of_sale_information.rb +183 -0
- data/lib/cyberSource_client/models/v2credits_point_of_sale_information_emv.rb +221 -0
- data/lib/cyberSource_client/models/v2credits_processing_information.rb +383 -0
- data/lib/cyberSource_client/models/v2payments_aggregator_information.rb +233 -0
- data/lib/cyberSource_client/models/v2payments_aggregator_information_sub_merchant.rb +424 -0
- data/lib/cyberSource_client/models/v2payments_buyer_information.rb +285 -0
- data/lib/cyberSource_client/models/v2payments_buyer_information_personal_identification.rb +252 -0
- data/lib/cyberSource_client/models/v2payments_client_reference_information.rb +219 -0
- data/lib/cyberSource_client/models/v2payments_consumer_authentication_information.rb +374 -0
- data/lib/cyberSource_client/models/v2payments_device_information.rb +249 -0
- data/lib/cyberSource_client/models/v2payments_merchant_defined_information.rb +224 -0
- data/lib/cyberSource_client/models/v2payments_merchant_information.rb +308 -0
- data/lib/cyberSource_client/models/v2payments_merchant_information_merchant_descriptor.rb +374 -0
- data/lib/cyberSource_client/models/v2payments_order_information.rb +230 -0
- data/lib/cyberSource_client/models/v2payments_order_information_amount_details.rb +605 -0
- data/lib/cyberSource_client/models/v2payments_order_information_amount_details_amex_additional_amounts.rb +224 -0
- data/lib/cyberSource_client/models/v2payments_order_information_amount_details_surcharge.rb +209 -0
- data/lib/cyberSource_client/models/v2payments_order_information_amount_details_tax_details.rb +328 -0
- data/lib/cyberSource_client/models/v2payments_order_information_bill_to.rb +618 -0
- data/lib/cyberSource_client/models/v2payments_order_information_invoice_details.rb +330 -0
- data/lib/cyberSource_client/models/v2payments_order_information_invoice_details_transaction_advice_addendum.rb +199 -0
- data/lib/cyberSource_client/models/v2payments_order_information_line_items.rb +649 -0
- data/lib/cyberSource_client/models/v2payments_order_information_ship_to.rb +474 -0
- data/lib/cyberSource_client/models/v2payments_order_information_shipping_details.rb +234 -0
- data/lib/cyberSource_client/models/v2payments_payment_information.rb +210 -0
- data/lib/cyberSource_client/models/v2payments_payment_information_card.rb +474 -0
- data/lib/cyberSource_client/models/v2payments_payment_information_customer.rb +202 -0
- data/lib/cyberSource_client/models/v2payments_payment_information_fluid_data.rb +259 -0
- data/lib/cyberSource_client/models/v2payments_payment_information_tokenized_card.rb +424 -0
- data/lib/cyberSource_client/models/v2payments_point_of_sale_information.rb +440 -0
- data/lib/cyberSource_client/models/v2payments_point_of_sale_information_emv.rb +256 -0
- data/lib/cyberSource_client/models/v2payments_processing_information.rb +432 -0
- data/lib/cyberSource_client/models/v2payments_processing_information_authorization_options.rb +361 -0
- data/lib/cyberSource_client/models/v2payments_processing_information_authorization_options_initiator.rb +247 -0
- data/lib/cyberSource_client/models/v2payments_processing_information_authorization_options_merchant_initiated_transaction.rb +224 -0
- data/lib/cyberSource_client/models/v2payments_processing_information_capture_options.rb +267 -0
- data/lib/cyberSource_client/models/v2payments_processing_information_issuer.rb +199 -0
- data/lib/cyberSource_client/models/v2payments_processing_information_recurring_options.rb +198 -0
- data/lib/cyberSource_client/models/v2payments_recipient_information.rb +249 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_aggregator_information.rb +233 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_aggregator_information_sub_merchant.rb +374 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_buyer_information.rb +224 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_merchant_information.rb +258 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information.rb +230 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_amount_details.rb +546 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_bill_to.rb +449 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_invoice_details.rb +320 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_ship_to.rb +249 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_shipping_details.rb +199 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_payment_information.rb +183 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_point_of_sale_information.rb +208 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_point_of_sale_information_emv.rb +211 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_processing_information.rb +351 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_processing_information_authorization_options.rb +249 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_processing_information_capture_options.rb +242 -0
- data/lib/cyberSource_client/models/v2paymentsidrefunds_merchant_information.rb +258 -0
- data/lib/cyberSource_client/models/v2paymentsidrefunds_order_information.rb +230 -0
- data/lib/cyberSource_client/models/v2paymentsidrefunds_order_information_line_items.rb +639 -0
- data/lib/cyberSource_client/models/v2paymentsidrefunds_payment_information.rb +183 -0
- data/lib/cyberSource_client/models/v2paymentsidrefunds_payment_information_card.rb +374 -0
- data/lib/cyberSource_client/models/v2paymentsidrefunds_point_of_sale_information.rb +183 -0
- data/lib/cyberSource_client/models/v2paymentsidrefunds_processing_information.rb +333 -0
- data/lib/cyberSource_client/models/v2paymentsidrefunds_processing_information_recurring_options.rb +186 -0
- data/lib/cyberSource_client/models/v2paymentsidreversals_client_reference_information.rb +209 -0
- data/lib/cyberSource_client/models/v2paymentsidreversals_order_information.rb +185 -0
- data/lib/cyberSource_client/models/v2paymentsidreversals_order_information_line_items.rb +233 -0
- data/lib/cyberSource_client/models/v2paymentsidreversals_point_of_sale_information.rb +183 -0
- data/lib/cyberSource_client/models/v2paymentsidreversals_processing_information.rb +308 -0
- data/lib/cyberSource_client/models/v2paymentsidreversals_reversal_information.rb +211 -0
- data/lib/cyberSource_client/models/v2paymentsidreversals_reversal_information_amount_details.rb +224 -0
- data/lib/cyberSource_client/models/v2payouts_merchant_information.rb +258 -0
- data/lib/cyberSource_client/models/v2payouts_merchant_information_merchant_descriptor.rb +324 -0
- data/lib/cyberSource_client/models/v2payouts_order_information.rb +192 -0
- data/lib/cyberSource_client/models/v2payouts_order_information_amount_details.rb +249 -0
- data/lib/cyberSource_client/models/v2payouts_order_information_bill_to.rb +443 -0
- data/lib/cyberSource_client/models/v2payouts_payment_information.rb +183 -0
- data/lib/cyberSource_client/models/v2payouts_payment_information_card.rb +299 -0
- data/lib/cyberSource_client/models/v2payouts_processing_information.rb +283 -0
- data/lib/cyberSource_client/models/v2payouts_processing_information_payouts_options.rb +274 -0
- data/lib/cyberSource_client/models/v2payouts_recipient_information.rb +433 -0
- data/lib/cyberSource_client/models/v2payouts_sender_information.rb +517 -0
- data/lib/cyberSource_client/models/v2payouts_sender_information_account.rb +233 -0
- data/lib/cyberSource_client/models/void_capture_request.rb +183 -0
- data/lib/cyberSource_client/models/void_credit_request.rb +183 -0
- data/lib/cyberSource_client/models/void_payment_request.rb +183 -0
- data/lib/cyberSource_client/models/void_refund_request.rb +183 -0
- data/lib/cyberSource_client/version.rb +15 -0
- metadata +572 -0
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#CyberSource Flex API
|
|
3
|
+
|
|
4
|
+
#Simple PAN tokenization service
|
|
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.2.3
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module CyberSource
|
|
16
|
+
class V2paymentsProcessingInformationAuthorizationOptions
|
|
17
|
+
# Authorization type. Possible values: - **AUTOCAPTURE**: automatic capture. - **STANDARDCAPTURE**: standard capture. - **VERBAL**: forced capture. Include it in the payment request for a forced capture. Include it in the capture request for a verbal payment. For processor-specific information, see the auth_type field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
|
18
|
+
attr_accessor :auth_type
|
|
19
|
+
|
|
20
|
+
# Authorization code. **Forced Capture** Use this field to send the authorization code you received from a payment that you authorized outside the CyberSource system. **Verbal Authorization** Use this field in CAPTURE API to send the verbally received authorization code. For processor-specific information, see the auth_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
|
21
|
+
attr_accessor :verbal_auth_code
|
|
22
|
+
|
|
23
|
+
# Transaction ID (TID).
|
|
24
|
+
attr_accessor :verbal_auth_transaction_id
|
|
25
|
+
|
|
26
|
+
# Flag that specifies the purpose of the authorization. Possible values: - **0**: Preauthorization - **1**: Final authorization For processor-specific information, see the auth_indicator field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
|
27
|
+
attr_accessor :auth_indicator
|
|
28
|
+
|
|
29
|
+
# Flag that indicates whether the transaction is enabled for partial authorization or not. When your request includes this field, this value overrides the information in your CyberSource account. For processor-specific information, see the auth_partial_auth_indicator field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
|
30
|
+
attr_accessor :partial_auth_indicator
|
|
31
|
+
|
|
32
|
+
# Flag that indicates whether to return balance information.
|
|
33
|
+
attr_accessor :balance_inquiry
|
|
34
|
+
|
|
35
|
+
# Flag that indicates whether to allow the capture service to run even when the payment receives an AVS decline.
|
|
36
|
+
attr_accessor :ignore_avs_result
|
|
37
|
+
|
|
38
|
+
# An array of AVS flags that cause the reply flag to be returned. `Important` To receive declines for the AVS code N, include the value N in the array.
|
|
39
|
+
attr_accessor :decline_avs_flags
|
|
40
|
+
|
|
41
|
+
# Flag that indicates whether to allow the capture service to run even when the payment receives a CVN decline.
|
|
42
|
+
attr_accessor :ignore_cv_result
|
|
43
|
+
|
|
44
|
+
attr_accessor :initiator
|
|
45
|
+
|
|
46
|
+
class EnumAttributeValidator
|
|
47
|
+
attr_reader :datatype
|
|
48
|
+
attr_reader :allowable_values
|
|
49
|
+
|
|
50
|
+
def initialize(datatype, allowable_values)
|
|
51
|
+
@allowable_values = allowable_values.map do |value|
|
|
52
|
+
case datatype.to_s
|
|
53
|
+
when /Integer/i
|
|
54
|
+
value.to_i
|
|
55
|
+
when /Float/i
|
|
56
|
+
value.to_f
|
|
57
|
+
else
|
|
58
|
+
value
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def valid?(value)
|
|
64
|
+
!value || allowable_values.include?(value)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
69
|
+
def self.attribute_map
|
|
70
|
+
{
|
|
71
|
+
:'auth_type' => :'authType',
|
|
72
|
+
:'verbal_auth_code' => :'verbalAuthCode',
|
|
73
|
+
:'verbal_auth_transaction_id' => :'verbalAuthTransactionId',
|
|
74
|
+
:'auth_indicator' => :'authIndicator',
|
|
75
|
+
:'partial_auth_indicator' => :'partialAuthIndicator',
|
|
76
|
+
:'balance_inquiry' => :'balanceInquiry',
|
|
77
|
+
:'ignore_avs_result' => :'ignoreAvsResult',
|
|
78
|
+
:'decline_avs_flags' => :'declineAvsFlags',
|
|
79
|
+
:'ignore_cv_result' => :'ignoreCvResult',
|
|
80
|
+
:'initiator' => :'initiator'
|
|
81
|
+
}
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Attribute type mapping.
|
|
85
|
+
def self.swagger_types
|
|
86
|
+
{
|
|
87
|
+
:'auth_type' => :'String',
|
|
88
|
+
:'verbal_auth_code' => :'String',
|
|
89
|
+
:'verbal_auth_transaction_id' => :'String',
|
|
90
|
+
:'auth_indicator' => :'String',
|
|
91
|
+
:'partial_auth_indicator' => :'BOOLEAN',
|
|
92
|
+
:'balance_inquiry' => :'BOOLEAN',
|
|
93
|
+
:'ignore_avs_result' => :'BOOLEAN',
|
|
94
|
+
:'decline_avs_flags' => :'Array<String>',
|
|
95
|
+
:'ignore_cv_result' => :'BOOLEAN',
|
|
96
|
+
:'initiator' => :'V2paymentsProcessingInformationAuthorizationOptionsInitiator'
|
|
97
|
+
}
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Initializes the object
|
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
102
|
+
def initialize(attributes = {})
|
|
103
|
+
return unless attributes.is_a?(Hash)
|
|
104
|
+
|
|
105
|
+
# convert string to symbol for hash key
|
|
106
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
107
|
+
|
|
108
|
+
if attributes.has_key?(:'authType')
|
|
109
|
+
self.auth_type = attributes[:'authType']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.has_key?(:'verbalAuthCode')
|
|
113
|
+
self.verbal_auth_code = attributes[:'verbalAuthCode']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.has_key?(:'verbalAuthTransactionId')
|
|
117
|
+
self.verbal_auth_transaction_id = attributes[:'verbalAuthTransactionId']
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.has_key?(:'authIndicator')
|
|
121
|
+
self.auth_indicator = attributes[:'authIndicator']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.has_key?(:'partialAuthIndicator')
|
|
125
|
+
self.partial_auth_indicator = attributes[:'partialAuthIndicator']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.has_key?(:'balanceInquiry')
|
|
129
|
+
self.balance_inquiry = attributes[:'balanceInquiry']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.has_key?(:'ignoreAvsResult')
|
|
133
|
+
self.ignore_avs_result = attributes[:'ignoreAvsResult']
|
|
134
|
+
else
|
|
135
|
+
self.ignore_avs_result = false
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if attributes.has_key?(:'declineAvsFlags')
|
|
139
|
+
if (value = attributes[:'declineAvsFlags']).is_a?(Array)
|
|
140
|
+
self.decline_avs_flags = value
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if attributes.has_key?(:'ignoreCvResult')
|
|
145
|
+
self.ignore_cv_result = attributes[:'ignoreCvResult']
|
|
146
|
+
else
|
|
147
|
+
self.ignore_cv_result = false
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if attributes.has_key?(:'initiator')
|
|
151
|
+
self.initiator = attributes[:'initiator']
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
156
|
+
# @return Array for valid properties with the reasons
|
|
157
|
+
def list_invalid_properties
|
|
158
|
+
invalid_properties = Array.new
|
|
159
|
+
if !@auth_type.nil? && @auth_type.to_s.length > 15
|
|
160
|
+
invalid_properties.push('invalid value for "auth_type", the character length must be smaller than or equal to 15.')
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if !@verbal_auth_code.nil? && @verbal_auth_code.to_s.length > 7
|
|
164
|
+
invalid_properties.push('invalid value for "verbal_auth_code", the character length must be smaller than or equal to 7.')
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if !@verbal_auth_transaction_id.nil? && @verbal_auth_transaction_id.to_s.length > 15
|
|
168
|
+
invalid_properties.push('invalid value for "verbal_auth_transaction_id", the character length must be smaller than or equal to 15.')
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if !@auth_indicator.nil? && @auth_indicator.to_s.length > 1
|
|
172
|
+
invalid_properties.push('invalid value for "auth_indicator", the character length must be smaller than or equal to 1.')
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
invalid_properties
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Check to see if the all the properties in the model are valid
|
|
179
|
+
# @return true if the model is valid
|
|
180
|
+
def valid?
|
|
181
|
+
return false if !@auth_type.nil? && @auth_type.to_s.length > 15
|
|
182
|
+
return false if !@verbal_auth_code.nil? && @verbal_auth_code.to_s.length > 7
|
|
183
|
+
return false if !@verbal_auth_transaction_id.nil? && @verbal_auth_transaction_id.to_s.length > 15
|
|
184
|
+
return false if !@auth_indicator.nil? && @auth_indicator.to_s.length > 1
|
|
185
|
+
true
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Custom attribute writer method with validation
|
|
189
|
+
# @param [Object] auth_type Value to be assigned
|
|
190
|
+
def auth_type=(auth_type)
|
|
191
|
+
if !auth_type.nil? && auth_type.to_s.length > 15
|
|
192
|
+
fail ArgumentError, 'invalid value for "auth_type", the character length must be smaller than or equal to 15.'
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
@auth_type = auth_type
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Custom attribute writer method with validation
|
|
199
|
+
# @param [Object] verbal_auth_code Value to be assigned
|
|
200
|
+
def verbal_auth_code=(verbal_auth_code)
|
|
201
|
+
if !verbal_auth_code.nil? && verbal_auth_code.to_s.length > 7
|
|
202
|
+
fail ArgumentError, 'invalid value for "verbal_auth_code", the character length must be smaller than or equal to 7.'
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
@verbal_auth_code = verbal_auth_code
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Custom attribute writer method with validation
|
|
209
|
+
# @param [Object] verbal_auth_transaction_id Value to be assigned
|
|
210
|
+
def verbal_auth_transaction_id=(verbal_auth_transaction_id)
|
|
211
|
+
if !verbal_auth_transaction_id.nil? && verbal_auth_transaction_id.to_s.length > 15
|
|
212
|
+
fail ArgumentError, 'invalid value for "verbal_auth_transaction_id", the character length must be smaller than or equal to 15.'
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
@verbal_auth_transaction_id = verbal_auth_transaction_id
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Custom attribute writer method with validation
|
|
219
|
+
# @param [Object] auth_indicator Value to be assigned
|
|
220
|
+
def auth_indicator=(auth_indicator)
|
|
221
|
+
if !auth_indicator.nil? && auth_indicator.to_s.length > 1
|
|
222
|
+
fail ArgumentError, 'invalid value for "auth_indicator", the character length must be smaller than or equal to 1.'
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
@auth_indicator = auth_indicator
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Checks equality by comparing each attribute.
|
|
229
|
+
# @param [Object] Object to be compared
|
|
230
|
+
def ==(o)
|
|
231
|
+
return true if self.equal?(o)
|
|
232
|
+
self.class == o.class &&
|
|
233
|
+
auth_type == o.auth_type &&
|
|
234
|
+
verbal_auth_code == o.verbal_auth_code &&
|
|
235
|
+
verbal_auth_transaction_id == o.verbal_auth_transaction_id &&
|
|
236
|
+
auth_indicator == o.auth_indicator &&
|
|
237
|
+
partial_auth_indicator == o.partial_auth_indicator &&
|
|
238
|
+
balance_inquiry == o.balance_inquiry &&
|
|
239
|
+
ignore_avs_result == o.ignore_avs_result &&
|
|
240
|
+
decline_avs_flags == o.decline_avs_flags &&
|
|
241
|
+
ignore_cv_result == o.ignore_cv_result &&
|
|
242
|
+
initiator == o.initiator
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# @see the `==` method
|
|
246
|
+
# @param [Object] Object to be compared
|
|
247
|
+
def eql?(o)
|
|
248
|
+
self == o
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Calculates hash code according to all attributes.
|
|
252
|
+
# @return [Fixnum] Hash code
|
|
253
|
+
def hash
|
|
254
|
+
[auth_type, verbal_auth_code, verbal_auth_transaction_id, auth_indicator, partial_auth_indicator, balance_inquiry, ignore_avs_result, decline_avs_flags, ignore_cv_result, initiator].hash
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# Builds the object from hash
|
|
258
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
259
|
+
# @return [Object] Returns the model itself
|
|
260
|
+
def build_from_hash(attributes)
|
|
261
|
+
return nil unless attributes.is_a?(Hash)
|
|
262
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
263
|
+
if type =~ /\AArray<(.*)>/i
|
|
264
|
+
# check to ensure the input is an array given that the the attribute
|
|
265
|
+
# is documented as an array but the input is not
|
|
266
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
267
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
268
|
+
end
|
|
269
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
270
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
271
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
self
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# Deserializes the data based on type
|
|
278
|
+
# @param string type Data type
|
|
279
|
+
# @param string value Value to be deserialized
|
|
280
|
+
# @return [Object] Deserialized data
|
|
281
|
+
def _deserialize(type, value)
|
|
282
|
+
case type.to_sym
|
|
283
|
+
when :DateTime
|
|
284
|
+
DateTime.parse(value)
|
|
285
|
+
when :Date
|
|
286
|
+
Date.parse(value)
|
|
287
|
+
when :String
|
|
288
|
+
value.to_s
|
|
289
|
+
when :Integer
|
|
290
|
+
value.to_i
|
|
291
|
+
when :Float
|
|
292
|
+
value.to_f
|
|
293
|
+
when :BOOLEAN
|
|
294
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
295
|
+
true
|
|
296
|
+
else
|
|
297
|
+
false
|
|
298
|
+
end
|
|
299
|
+
when :Object
|
|
300
|
+
# generic object (usually a Hash), return directly
|
|
301
|
+
value
|
|
302
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
303
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
304
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
305
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
306
|
+
k_type = Regexp.last_match[:k_type]
|
|
307
|
+
v_type = Regexp.last_match[:v_type]
|
|
308
|
+
{}.tap do |hash|
|
|
309
|
+
value.each do |k, v|
|
|
310
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
311
|
+
end
|
|
312
|
+
end
|
|
313
|
+
else # model
|
|
314
|
+
temp_model = CyberSource.const_get(type).new
|
|
315
|
+
temp_model.build_from_hash(value)
|
|
316
|
+
end
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Returns the string representation of the object
|
|
320
|
+
# @return [String] String presentation of the object
|
|
321
|
+
def to_s
|
|
322
|
+
to_hash.to_s
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
326
|
+
# @return [Hash] Returns the object in the form of hash
|
|
327
|
+
def to_body
|
|
328
|
+
to_hash
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
# Returns the object in the form of hash
|
|
332
|
+
# @return [Hash] Returns the object in the form of hash
|
|
333
|
+
def to_hash
|
|
334
|
+
hash = {}
|
|
335
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
336
|
+
value = self.send(attr)
|
|
337
|
+
next if value.nil?
|
|
338
|
+
hash[param] = _to_hash(value)
|
|
339
|
+
end
|
|
340
|
+
hash
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# Outputs non-array value in the form of hash
|
|
344
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
345
|
+
# @param [Object] value Any valid value
|
|
346
|
+
# @return [Hash] Returns the value in the form of hash
|
|
347
|
+
def _to_hash(value)
|
|
348
|
+
if value.is_a?(Array)
|
|
349
|
+
value.compact.map { |v| _to_hash(v) }
|
|
350
|
+
elsif value.is_a?(Hash)
|
|
351
|
+
{}.tap do |hash|
|
|
352
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
353
|
+
end
|
|
354
|
+
elsif value.respond_to? :to_hash
|
|
355
|
+
value.to_hash
|
|
356
|
+
else
|
|
357
|
+
value
|
|
358
|
+
end
|
|
359
|
+
end
|
|
360
|
+
end
|
|
361
|
+
end
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#CyberSource Flex API
|
|
3
|
+
|
|
4
|
+
#Simple PAN tokenization service
|
|
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.2.3
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module CyberSource
|
|
16
|
+
class V2paymentsProcessingInformationAuthorizationOptionsInitiator
|
|
17
|
+
# This field indicates whether the transaction is a merchant-initiated transaction or customer-initiated transaction.
|
|
18
|
+
attr_accessor :type
|
|
19
|
+
|
|
20
|
+
# Flag that indicates whether merchant is intend to use this transaction to store payment credential for follow-up merchant-initiated transactions or not.
|
|
21
|
+
attr_accessor :credential_stored_on_file
|
|
22
|
+
|
|
23
|
+
# Flag that indicates whether merchant is intend to use this transaction to store payment credential for follow-up merchant-initiated transactions or not.
|
|
24
|
+
attr_accessor :stored_credential_used
|
|
25
|
+
|
|
26
|
+
attr_accessor :merchant_initiated_transaction
|
|
27
|
+
|
|
28
|
+
class EnumAttributeValidator
|
|
29
|
+
attr_reader :datatype
|
|
30
|
+
attr_reader :allowable_values
|
|
31
|
+
|
|
32
|
+
def initialize(datatype, allowable_values)
|
|
33
|
+
@allowable_values = allowable_values.map do |value|
|
|
34
|
+
case datatype.to_s
|
|
35
|
+
when /Integer/i
|
|
36
|
+
value.to_i
|
|
37
|
+
when /Float/i
|
|
38
|
+
value.to_f
|
|
39
|
+
else
|
|
40
|
+
value
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def valid?(value)
|
|
46
|
+
!value || allowable_values.include?(value)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
51
|
+
def self.attribute_map
|
|
52
|
+
{
|
|
53
|
+
:'type' => :'type',
|
|
54
|
+
:'credential_stored_on_file' => :'credentialStoredOnFile',
|
|
55
|
+
:'stored_credential_used' => :'storedCredentialUsed',
|
|
56
|
+
:'merchant_initiated_transaction' => :'merchantInitiatedTransaction'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Attribute type mapping.
|
|
61
|
+
def self.swagger_types
|
|
62
|
+
{
|
|
63
|
+
:'type' => :'String',
|
|
64
|
+
:'credential_stored_on_file' => :'BOOLEAN',
|
|
65
|
+
:'stored_credential_used' => :'BOOLEAN',
|
|
66
|
+
:'merchant_initiated_transaction' => :'V2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Initializes the object
|
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
72
|
+
def initialize(attributes = {})
|
|
73
|
+
return unless attributes.is_a?(Hash)
|
|
74
|
+
|
|
75
|
+
# convert string to symbol for hash key
|
|
76
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
77
|
+
|
|
78
|
+
if attributes.has_key?(:'type')
|
|
79
|
+
self.type = attributes[:'type']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.has_key?(:'credentialStoredOnFile')
|
|
83
|
+
self.credential_stored_on_file = attributes[:'credentialStoredOnFile']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.has_key?(:'storedCredentialUsed')
|
|
87
|
+
self.stored_credential_used = attributes[:'storedCredentialUsed']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.has_key?(:'merchantInitiatedTransaction')
|
|
91
|
+
self.merchant_initiated_transaction = attributes[:'merchantInitiatedTransaction']
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
96
|
+
# @return Array for valid properties with the reasons
|
|
97
|
+
def list_invalid_properties
|
|
98
|
+
invalid_properties = Array.new
|
|
99
|
+
invalid_properties
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Check to see if the all the properties in the model are valid
|
|
103
|
+
# @return true if the model is valid
|
|
104
|
+
def valid?
|
|
105
|
+
type_validator = EnumAttributeValidator.new('String', ['customer', 'merchant'])
|
|
106
|
+
return false unless type_validator.valid?(@type)
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
111
|
+
# @param [Object] type Object to be assigned
|
|
112
|
+
def type=(type)
|
|
113
|
+
validator = EnumAttributeValidator.new('String', ['customer', 'merchant'])
|
|
114
|
+
unless validator.valid?(type)
|
|
115
|
+
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
|
116
|
+
end
|
|
117
|
+
@type = type
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Checks equality by comparing each attribute.
|
|
121
|
+
# @param [Object] Object to be compared
|
|
122
|
+
def ==(o)
|
|
123
|
+
return true if self.equal?(o)
|
|
124
|
+
self.class == o.class &&
|
|
125
|
+
type == o.type &&
|
|
126
|
+
credential_stored_on_file == o.credential_stored_on_file &&
|
|
127
|
+
stored_credential_used == o.stored_credential_used &&
|
|
128
|
+
merchant_initiated_transaction == o.merchant_initiated_transaction
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# @see the `==` method
|
|
132
|
+
# @param [Object] Object to be compared
|
|
133
|
+
def eql?(o)
|
|
134
|
+
self == o
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Calculates hash code according to all attributes.
|
|
138
|
+
# @return [Fixnum] Hash code
|
|
139
|
+
def hash
|
|
140
|
+
[type, credential_stored_on_file, stored_credential_used, merchant_initiated_transaction].hash
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Builds the object from hash
|
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
145
|
+
# @return [Object] Returns the model itself
|
|
146
|
+
def build_from_hash(attributes)
|
|
147
|
+
return nil unless attributes.is_a?(Hash)
|
|
148
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
149
|
+
if type =~ /\AArray<(.*)>/i
|
|
150
|
+
# check to ensure the input is an array given that the the attribute
|
|
151
|
+
# is documented as an array but the input is not
|
|
152
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
153
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
154
|
+
end
|
|
155
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
156
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
157
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
self
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Deserializes the data based on type
|
|
164
|
+
# @param string type Data type
|
|
165
|
+
# @param string value Value to be deserialized
|
|
166
|
+
# @return [Object] Deserialized data
|
|
167
|
+
def _deserialize(type, value)
|
|
168
|
+
case type.to_sym
|
|
169
|
+
when :DateTime
|
|
170
|
+
DateTime.parse(value)
|
|
171
|
+
when :Date
|
|
172
|
+
Date.parse(value)
|
|
173
|
+
when :String
|
|
174
|
+
value.to_s
|
|
175
|
+
when :Integer
|
|
176
|
+
value.to_i
|
|
177
|
+
when :Float
|
|
178
|
+
value.to_f
|
|
179
|
+
when :BOOLEAN
|
|
180
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
181
|
+
true
|
|
182
|
+
else
|
|
183
|
+
false
|
|
184
|
+
end
|
|
185
|
+
when :Object
|
|
186
|
+
# generic object (usually a Hash), return directly
|
|
187
|
+
value
|
|
188
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
189
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
190
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
191
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
192
|
+
k_type = Regexp.last_match[:k_type]
|
|
193
|
+
v_type = Regexp.last_match[:v_type]
|
|
194
|
+
{}.tap do |hash|
|
|
195
|
+
value.each do |k, v|
|
|
196
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
else # model
|
|
200
|
+
temp_model = CyberSource.const_get(type).new
|
|
201
|
+
temp_model.build_from_hash(value)
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Returns the string representation of the object
|
|
206
|
+
# @return [String] String presentation of the object
|
|
207
|
+
def to_s
|
|
208
|
+
to_hash.to_s
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
212
|
+
# @return [Hash] Returns the object in the form of hash
|
|
213
|
+
def to_body
|
|
214
|
+
to_hash
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Returns the object in the form of hash
|
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
|
219
|
+
def to_hash
|
|
220
|
+
hash = {}
|
|
221
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
222
|
+
value = self.send(attr)
|
|
223
|
+
next if value.nil?
|
|
224
|
+
hash[param] = _to_hash(value)
|
|
225
|
+
end
|
|
226
|
+
hash
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Outputs non-array value in the form of hash
|
|
230
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
231
|
+
# @param [Object] value Any valid value
|
|
232
|
+
# @return [Hash] Returns the value in the form of hash
|
|
233
|
+
def _to_hash(value)
|
|
234
|
+
if value.is_a?(Array)
|
|
235
|
+
value.compact.map { |v| _to_hash(v) }
|
|
236
|
+
elsif value.is_a?(Hash)
|
|
237
|
+
{}.tap do |hash|
|
|
238
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
239
|
+
end
|
|
240
|
+
elsif value.respond_to? :to_hash
|
|
241
|
+
value.to_hash
|
|
242
|
+
else
|
|
243
|
+
value
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
end
|