diff --git a/AuthenticationSDK/AuthenticationSDK-0.0.1.gem b/AuthenticationSDK/AuthenticationSDK-0.0.1.gem new file mode 100644 index 00000000..49e67fd1 Binary files /dev/null and b/AuthenticationSDK/AuthenticationSDK-0.0.1.gem differ diff --git a/docs/CaptureApi.md b/docs/CaptureApi.md index dcacbc48..218bbd6b 100644 --- a/docs/CaptureApi.md +++ b/docs/CaptureApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **capture_payment** -> InlineResponse2012 capture_payment(capture_payment_request, id) +> PtsV2PaymentsCapturesPost201Response capture_payment(capture_payment_request, id) Capture a Payment @@ -44,7 +44,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2012**](InlineResponse2012.md) +[**PtsV2PaymentsCapturesPost201Response**](PtsV2PaymentsCapturesPost201Response.md) ### Authorization diff --git a/docs/CreateSearchRequest.md b/docs/CreateSearchRequest.md deleted file mode 100644 index 8abf6d0b..00000000 --- a/docs/CreateSearchRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# CyberSource::CreateSearchRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**save** | **BOOLEAN** | save or not save. | [optional] -**name** | **String** | The description for this field is not available. | [optional] -**timezone** | **String** | Time Zone. | [optional] -**query** | **String** | transaction search query string. | [optional] -**offset** | **Integer** | offset. | [optional] -**limit** | **Integer** | limit on number of results. | [optional] -**sort** | **String** | A comma separated list of the following form - fieldName1 asc or desc, fieldName2 asc or desc, etc. | [optional] - - diff --git a/docs/CreditApi.md b/docs/CreditApi.md index 1a1807ae..c38641cf 100644 --- a/docs/CreditApi.md +++ b/docs/CreditApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **create_credit** -> InlineResponse2014 create_credit(create_credit_request) +> PtsV2CreditsPost201Response create_credit(create_credit_request) Process a Credit @@ -41,7 +41,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2014**](InlineResponse2014.md) +[**PtsV2CreditsPost201Response**](PtsV2CreditsPost201Response.md) ### Authorization diff --git a/docs/FlexTokenApi.md b/docs/FlexTokenApi.md index 66f529b4..bec75e72 100644 --- a/docs/FlexTokenApi.md +++ b/docs/FlexTokenApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **tokenize** -> InlineResponse2001 tokenize(opts) +> FlexV1TokensPost200Response tokenize(opts) Flex Tokenize card @@ -42,7 +42,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2001**](InlineResponse2001.md) +[**FlexV1TokensPost200Response**](FlexV1TokensPost200Response.md) ### Authorization diff --git a/docs/FlexV1KeysPost200Response.md b/docs/FlexV1KeysPost200Response.md new file mode 100644 index 00000000..3fda2fb8 --- /dev/null +++ b/docs/FlexV1KeysPost200Response.md @@ -0,0 +1,10 @@ +# CyberSource::FlexV1KeysPost200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key_id** | **String** | Unique identifier for the generated token. Used in the subsequent Tokenize Card request from your customer’s device or browser. | [optional] +**der** | [**FlexV1KeysPost200ResponseDer**](FlexV1KeysPost200ResponseDer.md) | | [optional] +**jwk** | [**FlexV1KeysPost200ResponseJwk**](FlexV1KeysPost200ResponseJwk.md) | | [optional] + + diff --git a/docs/FlexV1KeysPost200ResponseDer.md b/docs/FlexV1KeysPost200ResponseDer.md new file mode 100644 index 00000000..f6be4482 --- /dev/null +++ b/docs/FlexV1KeysPost200ResponseDer.md @@ -0,0 +1,10 @@ +# CyberSource::FlexV1KeysPost200ResponseDer + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**format** | **String** | Specifies the format of the public key; currently X.509. | [optional] +**algorithm** | **String** | Algorithm used to encrypt the public key. | [optional] +**public_key** | **String** | Base64 encoded public key value. | [optional] + + diff --git a/docs/FlexV1KeysPost200ResponseJwk.md b/docs/FlexV1KeysPost200ResponseJwk.md new file mode 100644 index 00000000..c33015f8 --- /dev/null +++ b/docs/FlexV1KeysPost200ResponseJwk.md @@ -0,0 +1,12 @@ +# CyberSource::FlexV1KeysPost200ResponseJwk + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**kty** | **String** | Algorithm used to encrypt the public key. | [optional] +**use** | **String** | Defines whether to use the key for encryption (enc) or verifying a signature (sig). Always returned as enc. | [optional] +**kid** | **String** | The key ID in JWK format. | [optional] +**n** | **String** | JWK RSA Modulus | [optional] +**e** | **String** | JWK RSA Exponent | [optional] + + diff --git a/docs/FlexV1TokensPost200Response.md b/docs/FlexV1TokensPost200Response.md new file mode 100644 index 00000000..adccb49e --- /dev/null +++ b/docs/FlexV1TokensPost200Response.md @@ -0,0 +1,15 @@ +# CyberSource::FlexV1TokensPost200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key_id** | **String** | The Key ID. | [optional] +**token** | **String** | The generated token. The token replaces card data and is used as the Subscription ID in the CyberSource Simple Order API or SCMP API. | [optional] +**masked_pan** | **String** | The masked card number displaying the first 6 digits and the last 4 digits. | [optional] +**card_type** | **String** | The card type. | [optional] +**timestamp** | **Integer** | The UTC date and time in milliseconds at which the signature was generated. | [optional] +**signed_fields** | **String** | Indicates which fields from the response make up the data that is used when verifying the response signature. See the [sample code] (https://github.com/CyberSource/cybersource-flex-samples/blob/master/java/spring-boot/src/main/java/com/cybersource/flex/application/CheckoutController.java) on how to verify the signature. | [optional] +**signature** | **String** | Flex-generated digital signature. To ensure the values have not been tampered with while passing through the client, verify this server-side using the public key generated from the /keys resource. | [optional] +**discoverable_services** | **Hash<String, Object>** | | [optional] + + diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md deleted file mode 100644 index 99d3d382..00000000 --- a/docs/InlineResponse200.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse200 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key_id** | **String** | Unique identifier for the generated token. Used in the subsequent Tokenize Card request from your customer’s device or browser. | [optional] -**der** | [**InlineResponse200Der**](InlineResponse200Der.md) | | [optional] -**jwk** | [**InlineResponse200Jwk**](InlineResponse200Jwk.md) | | [optional] - - diff --git a/docs/InlineResponse2001.md b/docs/InlineResponse2001.md deleted file mode 100644 index 88dfb153..00000000 --- a/docs/InlineResponse2001.md +++ /dev/null @@ -1,15 +0,0 @@ -# CyberSource::InlineResponse2001 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key_id** | **String** | The Key ID. | [optional] -**token** | **String** | The generated token. The token replaces card data and is used as the Subscription ID in the CyberSource Simple Order API or SCMP API. | [optional] -**masked_pan** | **String** | The masked card number displaying the first 6 digits and the last 4 digits. | [optional] -**card_type** | **String** | The card type. | [optional] -**timestamp** | **Integer** | The UTC date and time in milliseconds at which the signature was generated. | [optional] -**signed_fields** | **String** | Indicates which fields from the response make up the data that is used when verifying the response signature. See the [sample code] (https://github.com/CyberSource/cybersource-flex-samples/blob/master/java/spring-boot/src/main/java/com/cybersource/flex/application/CheckoutController.java) on how to verify the signature. | [optional] -**signature** | **String** | Flex-generated digital signature. To ensure the values have not been tampered with while passing through the client, verify this server-side using the public key generated from the /keys resource. | [optional] -**discoverable_services** | **Hash<String, Object>** | | [optional] - - diff --git a/docs/InlineResponse20010.md b/docs/InlineResponse20010.md deleted file mode 100644 index 04f9fa1c..00000000 --- a/docs/InlineResponse20010.md +++ /dev/null @@ -1,15 +0,0 @@ -# CyberSource::InlineResponse20010 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_links** | [**Tmsv1instrumentidentifiersLinks**](Tmsv1instrumentidentifiersLinks.md) | | [optional] -**id** | **String** | Unique identification number assigned by CyberSource to the submitted request. | [optional] -**object** | **String** | Describes type of token. For example: customer, paymentInstrument or instrumentIdentifier. | [optional] -**state** | **String** | Current state of the token. | [optional] -**card** | [**Tmsv1instrumentidentifiersCard**](Tmsv1instrumentidentifiersCard.md) | | [optional] -**bank_account** | [**Tmsv1instrumentidentifiersBankAccount**](Tmsv1instrumentidentifiersBankAccount.md) | | [optional] -**processing_information** | [**Tmsv1instrumentidentifiersProcessingInformation**](Tmsv1instrumentidentifiersProcessingInformation.md) | | [optional] -**metadata** | [**Tmsv1instrumentidentifiersMetadata**](Tmsv1instrumentidentifiersMetadata.md) | | [optional] - - diff --git a/docs/InlineResponse20011.md b/docs/InlineResponse20011.md deleted file mode 100644 index ef88227f..00000000 --- a/docs/InlineResponse20011.md +++ /dev/null @@ -1,14 +0,0 @@ -# CyberSource::InlineResponse20011 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_links** | [**InlineResponse20011Links**](InlineResponse20011Links.md) | | [optional] -**object** | **String** | Shows the response is a collection of objects. | [optional] -**offset** | **String** | The offset parameter supplied in the request. | [optional] -**limit** | **String** | The limit parameter supplied in the request. | [optional] -**count** | **String** | The number of Payment Instruments returned in the array. | [optional] -**total** | **String** | The total number of Payment Instruments associated with the Instrument Identifier in the zero-based dataset. | [optional] -**_embedded** | **Object** | Array of Payment Instruments returned for the supplied Instrument Identifier. | [optional] - - diff --git a/docs/InlineResponse20011Links.md b/docs/InlineResponse20011Links.md deleted file mode 100644 index 322c7926..00000000 --- a/docs/InlineResponse20011Links.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::InlineResponse20011Links - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_self** | [**InlineResponse20011LinksSelf**](InlineResponse20011LinksSelf.md) | | [optional] -**first** | [**InlineResponse20011LinksFirst**](InlineResponse20011LinksFirst.md) | | [optional] -**prev** | [**InlineResponse20011LinksPrev**](InlineResponse20011LinksPrev.md) | | [optional] -**_next** | [**InlineResponse20011LinksNext**](InlineResponse20011LinksNext.md) | | [optional] -**last** | [**InlineResponse20011LinksLast**](InlineResponse20011LinksLast.md) | | [optional] - - diff --git a/docs/InlineResponse20011LinksFirst.md b/docs/InlineResponse20011LinksFirst.md deleted file mode 100644 index 8fce130c..00000000 --- a/docs/InlineResponse20011LinksFirst.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse20011LinksFirst - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**href** | **String** | A link to the collection starting at offset zero for the supplied limit. | [optional] - - diff --git a/docs/InlineResponse20011LinksLast.md b/docs/InlineResponse20011LinksLast.md deleted file mode 100644 index c9adccd5..00000000 --- a/docs/InlineResponse20011LinksLast.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse20011LinksLast - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**href** | **String** | A link to the last collection containing the remaining objects. | [optional] - - diff --git a/docs/InlineResponse20011LinksNext.md b/docs/InlineResponse20011LinksNext.md deleted file mode 100644 index 52f19b61..00000000 --- a/docs/InlineResponse20011LinksNext.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse20011LinksNext - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**href** | **String** | A link to the next collection starting at the supplied offset plus the supplied limit. | [optional] - - diff --git a/docs/InlineResponse20011LinksPrev.md b/docs/InlineResponse20011LinksPrev.md deleted file mode 100644 index 52613212..00000000 --- a/docs/InlineResponse20011LinksPrev.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse20011LinksPrev - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**href** | **String** | | [optional] - - diff --git a/docs/InlineResponse20011LinksSelf.md b/docs/InlineResponse20011LinksSelf.md deleted file mode 100644 index 76b7b7b5..00000000 --- a/docs/InlineResponse20011LinksSelf.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse20011LinksSelf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**href** | **String** | A link to the current requested collection. | [optional] - - diff --git a/docs/InlineResponse20012.md b/docs/InlineResponse20012.md deleted file mode 100644 index 447f3863..00000000 --- a/docs/InlineResponse20012.md +++ /dev/null @@ -1,31 +0,0 @@ -# CyberSource::InlineResponse20012 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] -**root_id** | **String** | Payment Request Id | [optional] -**reconciliation_id** | **String** | The reconciliation id for the submitted transaction. This value is not returned for all processors. | [optional] -**merchant_id** | **String** | The description for this field is not available. | [optional] -**status** | **String** | The status of the submitted transaction. | [optional] -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] -**application_information** | [**InlineResponse20012ApplicationInformation**](InlineResponse20012ApplicationInformation.md) | | [optional] -**buyer_information** | [**InlineResponse20012BuyerInformation**](InlineResponse20012BuyerInformation.md) | | [optional] -**client_reference_information** | [**InlineResponse20012ClientReferenceInformation**](InlineResponse20012ClientReferenceInformation.md) | | [optional] -**consumer_authentication_information** | [**InlineResponse20012ConsumerAuthenticationInformation**](InlineResponse20012ConsumerAuthenticationInformation.md) | | [optional] -**device_information** | [**InlineResponse20012DeviceInformation**](InlineResponse20012DeviceInformation.md) | | [optional] -**error_information** | [**InlineResponse20012ErrorInformation**](InlineResponse20012ErrorInformation.md) | | [optional] -**installment_information** | [**InlineResponse20012InstallmentInformation**](InlineResponse20012InstallmentInformation.md) | | [optional] -**fraud_marking_information** | [**InlineResponse20012FraudMarkingInformation**](InlineResponse20012FraudMarkingInformation.md) | | [optional] -**merchant_defined_information** | [**Array<InlineResponse20012MerchantDefinedInformation>**](InlineResponse20012MerchantDefinedInformation.md) | The description for this field is not available. | [optional] -**merchant_information** | [**InlineResponse20012MerchantInformation**](InlineResponse20012MerchantInformation.md) | | [optional] -**order_information** | [**InlineResponse20012OrderInformation**](InlineResponse20012OrderInformation.md) | | [optional] -**payment_information** | [**InlineResponse20012PaymentInformation**](InlineResponse20012PaymentInformation.md) | | [optional] -**processing_information** | [**InlineResponse20012ProcessingInformation**](InlineResponse20012ProcessingInformation.md) | | [optional] -**processor_information** | [**InlineResponse20012ProcessorInformation**](InlineResponse20012ProcessorInformation.md) | | [optional] -**point_of_sale_information** | [**InlineResponse20012PointOfSaleInformation**](InlineResponse20012PointOfSaleInformation.md) | | [optional] -**risk_information** | [**InlineResponse20012RiskInformation**](InlineResponse20012RiskInformation.md) | | [optional] -**sender_information** | [**InlineResponse20012SenderInformation**](InlineResponse20012SenderInformation.md) | | [optional] -**_links** | [**InlineResponse2011Links**](InlineResponse2011Links.md) | | [optional] - - diff --git a/docs/InlineResponse20012ApplicationInformation.md b/docs/InlineResponse20012ApplicationInformation.md deleted file mode 100644 index f17a8689..00000000 --- a/docs/InlineResponse20012ApplicationInformation.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::InlineResponse20012ApplicationInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **String** | The status of the submitted transaction. | [optional] -**reason_code** | **String** | The description for this field is not available. | [optional] -**r_code** | **String** | The description for this field is not available. | [optional] -**r_flag** | **String** | The description for this field is not available. | [optional] -**applications** | [**Array<InlineResponse20012ApplicationInformationApplications>**](InlineResponse20012ApplicationInformationApplications.md) | | [optional] - - diff --git a/docs/InlineResponse20012ApplicationInformationApplications.md b/docs/InlineResponse20012ApplicationInformationApplications.md deleted file mode 100644 index 3349739b..00000000 --- a/docs/InlineResponse20012ApplicationInformationApplications.md +++ /dev/null @@ -1,15 +0,0 @@ -# CyberSource::InlineResponse20012ApplicationInformationApplications - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The description for this field is not available. | [optional] -**status** | **String** | The description for this field is not available. | [optional] -**reason_code** | **String** | The description for this field is not available. | [optional] -**r_code** | **String** | The description for this field is not available. | [optional] -**r_flag** | **String** | The description for this field is not available. | [optional] -**reconciliation_id** | **String** | The description for this field is not available. | [optional] -**r_message** | **String** | The description for this field is not available. | [optional] -**return_code** | **String** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse20012BuyerInformation.md b/docs/InlineResponse20012BuyerInformation.md deleted file mode 100644 index 5add5e64..00000000 --- a/docs/InlineResponse20012BuyerInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse20012BuyerInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**merchant_customer_id** | **String** | Your identifier for the customer. For processor-specific information, see the customer_account_id field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**hashed_password** | **String** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse20012ClientReferenceInformation.md b/docs/InlineResponse20012ClientReferenceInformation.md deleted file mode 100644 index ca2909b7..00000000 --- a/docs/InlineResponse20012ClientReferenceInformation.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::InlineResponse20012ClientReferenceInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **String** | Client-generated order reference or tracking number. CyberSource recommends that you send a unique value for each transaction so that you can perform meaningful searches for the transaction. | [optional] -**application_version** | **String** | The description for this field is not available. | [optional] -**application_name** | **String** | The application name of client which is used to submit the request. | [optional] -**application_user** | **String** | The description for this field is not available. | [optional] -**comments** | **String** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse20012ConsumerAuthenticationInformation.md b/docs/InlineResponse20012ConsumerAuthenticationInformation.md deleted file mode 100644 index 89e5b005..00000000 --- a/docs/InlineResponse20012ConsumerAuthenticationInformation.md +++ /dev/null @@ -1,11 +0,0 @@ -# CyberSource::InlineResponse20012ConsumerAuthenticationInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**eci_raw** | **String** | Raw electronic commerce indicator (ECI). | [optional] -**cavv** | **String** | Cardholder authentication verification value (CAVV). | [optional] -**xid** | **String** | Transaction identifier. | [optional] -**transaction_id** | **String** | Payer auth Transaction identifier. | [optional] - - diff --git a/docs/InlineResponse20012DeviceInformation.md b/docs/InlineResponse20012DeviceInformation.md deleted file mode 100644 index c155a9d1..00000000 --- a/docs/InlineResponse20012DeviceInformation.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse20012DeviceInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ip_address** | **String** | IP address of the customer. | [optional] -**host_name** | **String** | DNS resolved hostname from above _ipAddress_. | [optional] -**cookies_accepted** | **String** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse20012ErrorInformation.md b/docs/InlineResponse20012ErrorInformation.md deleted file mode 100644 index 984fa06c..00000000 --- a/docs/InlineResponse20012ErrorInformation.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse20012ErrorInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reason** | **String** | The description for this field is not available. | [optional] -**message** | **String** | The description for this field is not available. | [optional] -**details** | [**Array<InlineResponse201ErrorInformationDetails>**](InlineResponse201ErrorInformationDetails.md) | | [optional] - - diff --git a/docs/InlineResponse20012FraudMarkingInformation.md b/docs/InlineResponse20012FraudMarkingInformation.md deleted file mode 100644 index 8f90c68b..00000000 --- a/docs/InlineResponse20012FraudMarkingInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse20012FraudMarkingInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reason** | **String** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse20012InstallmentInformation.md b/docs/InlineResponse20012InstallmentInformation.md deleted file mode 100644 index 8114647e..00000000 --- a/docs/InlineResponse20012InstallmentInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse20012InstallmentInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**number_of_installments** | **String** | Number of Installments. | [optional] - - diff --git a/docs/InlineResponse20012MerchantDefinedInformation.md b/docs/InlineResponse20012MerchantDefinedInformation.md deleted file mode 100644 index b91649fc..00000000 --- a/docs/InlineResponse20012MerchantDefinedInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse20012MerchantDefinedInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **String** | The description for this field is not available. | [optional] -**value** | **String** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse20012MerchantInformation.md b/docs/InlineResponse20012MerchantInformation.md deleted file mode 100644 index 467bed62..00000000 --- a/docs/InlineResponse20012MerchantInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse20012MerchantInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**merchant_descriptor** | [**InlineResponse20012MerchantInformationMerchantDescriptor**](InlineResponse20012MerchantInformationMerchantDescriptor.md) | | [optional] - - diff --git a/docs/InlineResponse20012MerchantInformationMerchantDescriptor.md b/docs/InlineResponse20012MerchantInformationMerchantDescriptor.md deleted file mode 100644 index 2e906f24..00000000 --- a/docs/InlineResponse20012MerchantInformationMerchantDescriptor.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse20012MerchantInformationMerchantDescriptor - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | For the descriptions, used-by information, data types, and lengths for these fields, see Merchant Descriptors in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) For Payouts: * Paymentech (22) | [optional] - - diff --git a/docs/InlineResponse20012OrderInformation.md b/docs/InlineResponse20012OrderInformation.md deleted file mode 100644 index d1887831..00000000 --- a/docs/InlineResponse20012OrderInformation.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::InlineResponse20012OrderInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bill_to** | [**InlineResponse20012OrderInformationBillTo**](InlineResponse20012OrderInformationBillTo.md) | | [optional] -**ship_to** | [**InlineResponse20012OrderInformationShipTo**](InlineResponse20012OrderInformationShipTo.md) | | [optional] -**line_items** | [**Array<InlineResponse20012OrderInformationLineItems>**](InlineResponse20012OrderInformationLineItems.md) | Transaction Line Item data. | [optional] -**amount_details** | [**InlineResponse20012OrderInformationAmountDetails**](InlineResponse20012OrderInformationAmountDetails.md) | | [optional] -**shipping_details** | [**InlineResponse20012OrderInformationShippingDetails**](InlineResponse20012OrderInformationShippingDetails.md) | | [optional] - - diff --git a/docs/InlineResponse20012OrderInformationAmountDetails.md b/docs/InlineResponse20012OrderInformationAmountDetails.md deleted file mode 100644 index c025d293..00000000 --- a/docs/InlineResponse20012OrderInformationAmountDetails.md +++ /dev/null @@ -1,11 +0,0 @@ -# CyberSource::InlineResponse20012OrderInformationAmountDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total_amount** | **String** | Grand total for the order. You can include a decimal point (.), but no other special characters. CyberSource truncates the amount to the correct number of decimal places. * CTV, FDCCompass, Paymentech (<= 12) For processor-specific information, see the grand_total_amount field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**currency** | **String** | Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. | [optional] -**tax_amount** | **String** | Total tax amount for all the items in the order. For processor-specific information, see the total_tax_amount field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) | [optional] -**authorized_amount** | **String** | Amount that was authorized. | [optional] - - diff --git a/docs/InlineResponse20012OrderInformationBillTo.md b/docs/InlineResponse20012OrderInformationBillTo.md deleted file mode 100644 index 6f0d1ad1..00000000 --- a/docs/InlineResponse20012OrderInformationBillTo.md +++ /dev/null @@ -1,21 +0,0 @@ -# CyberSource::InlineResponse20012OrderInformationBillTo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**first_name** | **String** | Customer’s first name. This name must be the same as the name on the card. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the customer_firstname field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**last_name** | **String** | Customer’s last name. This name must be the same as the name on the card. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the customer_lastname field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**middel_name** | **String** | Customer’s middle name. | [optional] -**name_suffix** | **String** | Customer’s name suffix. | [optional] -**address1** | **String** | First line of the billing street address as it appears on the credit card issuer’s records. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_address1 field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**address2** | **String** | Additional address information. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_address2 field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**locality** | **String** | City of the billing address. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_city field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**administrative_area** | **String** | State or province of the billing address. Use the State, Province, and Territory Codes for the United States and Canada. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_state field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**postal_code** | **String** | Postal code for the billing address. The postal code must consist of 5 to 9 digits. When the billing country is the U.S., the 9-digit postal code must follow this format: [5 digits][dash][4 digits] Example 12345-6789 When the billing country is Canada, the 6-digit postal code must follow this format: [alpha][numeric][alpha][space][numeric][alpha][numeric] Example A1B 2C3 For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_zip field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**company** | **String** | Name of the customer’s company. For processor-specific information, see the company_name field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**email** | **String** | Customer's email address, including the full domain name. For processor-specific information, see the customer_email field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**country** | **String** | Country of the billing address. Use the two-character ISO Standard Country Codes. For processor-specific information, see the bill_country field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**title** | **String** | Title. | [optional] -**phone_number** | **String** | Customer’s phone number. For Payouts: This field may be sent only for FDC Compass. CyberSource recommends that you include the country code when the order is from outside the U.S. For processor-specific information, see the customer_phone field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] - - diff --git a/docs/InlineResponse20012OrderInformationLineItems.md b/docs/InlineResponse20012OrderInformationLineItems.md deleted file mode 100644 index 41a4eac2..00000000 --- a/docs/InlineResponse20012OrderInformationLineItems.md +++ /dev/null @@ -1,14 +0,0 @@ -# CyberSource::InlineResponse20012OrderInformationLineItems - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**product_code** | **String** | Type of product. This value is used to determine the category that the product is in: electronic, handling, physical, service, or shipping. The default value is **default**. For a payment, when you set this field to a value other than default or any of the values related to shipping and handling, below fields _quantity_, _productName_, and _productSKU_ are required. | [optional] -**product_name** | **String** | For PAYMENT and CAPTURE API, this field is required when above _productCode_ is not **default** or one of the values related to shipping and handling. | [optional] -**product_sku** | **String** | Identification code for the product. For PAYMENT and CAPTURE API, this field is required when above _productCode_ is not **default** or one of the values related to shipping and/or handling. | [optional] -**tax_amount** | **String** | Total tax to apply to the product. This value cannot be negative. The tax amount and the offer amount must be in the same currency. The tax amount field is additive. The following example uses a two-exponent currency such as USD: 1. You include each line item in your request. ..- 1st line item has amount=10.00, quantity=1, and taxAmount=0.80 ..- 2nd line item has amount=20.00, quantity=1, and taxAmount=1.60 2. The total amount authorized will be 32.40, not 30.00 with 2.40 of tax included. This field is frequently used for Level II and Level III transactions. | [optional] -**quantity** | **Float** | For a payment or capture, this field is required when _productCode_ is not **default** or one of the values related to shipping and handling. | [optional] -**unit_price** | **String** | Per-item price of the product. This value cannot be negative. You can include a decimal point (.), but you cannot include any other special characters. CyberSource truncates the amount to the correct number of decimal places. For processor-specific information, see the amount field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**fulfillment_type** | **String** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse20012OrderInformationShipTo.md b/docs/InlineResponse20012OrderInformationShipTo.md deleted file mode 100644 index aa0a096d..00000000 --- a/docs/InlineResponse20012OrderInformationShipTo.md +++ /dev/null @@ -1,17 +0,0 @@ -# CyberSource::InlineResponse20012OrderInformationShipTo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**first_name** | **String** | First name of the recipient. **Processor specific maximum length** - Litle: 25 - All other processors: 60 | [optional] -**last_name** | **String** | Last name of the recipient. **Processor specific maximum length** - Litle: 25 - All other processors: 60 | [optional] -**address1** | **String** | First line of the shipping address. | [optional] -**address2** | **String** | Second line of the shipping address. | [optional] -**locality** | **String** | City of the shipping address. | [optional] -**administrative_area** | **String** | State or province of the shipping address. Use the State, Province, and Territory Codes for the United States and Canada. | [optional] -**postal_code** | **String** | Postal code for the shipping address. The postal code must consist of 5 to 9 digits. When the billing country is the U.S., the 9-digit postal code must follow this format: [5 digits][dash][4 digits] Example 12345-6789 When the billing country is Canada, the 6-digit postal code must follow this format: [alpha][numeric][alpha][space][numeric][alpha][numeric] Example A1B 2C3 | [optional] -**company** | **String** | Name of the customer’s company. For processor-specific information, see the company_name field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**country** | **String** | Country of the shipping address. Use the two character ISO Standard Country Codes. | [optional] -**phone_number** | **String** | Phone number for the shipping address. | [optional] - - diff --git a/docs/InlineResponse20012OrderInformationShippingDetails.md b/docs/InlineResponse20012OrderInformationShippingDetails.md deleted file mode 100644 index c87f8022..00000000 --- a/docs/InlineResponse20012OrderInformationShippingDetails.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse20012OrderInformationShippingDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**gift_wrap** | **BOOLEAN** | The description for this field is not available. | [optional] -**shipping_method** | **String** | Shipping method for the product. Possible values: - lowcost: Lowest-cost service - sameday: Courier or same-day service - oneday: Next-day or overnight service - twoday: Two-day service - threeday: Three-day service - pickup: Store pick-up - other: Other shipping method - none: No shipping method because product is a service or subscription | [optional] - - diff --git a/docs/InlineResponse20012PaymentInformation.md b/docs/InlineResponse20012PaymentInformation.md deleted file mode 100644 index a54c407c..00000000 --- a/docs/InlineResponse20012PaymentInformation.md +++ /dev/null @@ -1,13 +0,0 @@ -# CyberSource::InlineResponse20012PaymentInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**payment_type** | [**InlineResponse20012PaymentInformationPaymentType**](InlineResponse20012PaymentInformationPaymentType.md) | | [optional] -**customer** | [**Ptsv2paymentsPaymentInformationCustomer**](Ptsv2paymentsPaymentInformationCustomer.md) | | [optional] -**card** | [**InlineResponse20012PaymentInformationCard**](InlineResponse20012PaymentInformationCard.md) | | [optional] -**invoice** | [**InlineResponse20012PaymentInformationInvoice**](InlineResponse20012PaymentInformationInvoice.md) | | [optional] -**bank** | [**InlineResponse20012PaymentInformationBank**](InlineResponse20012PaymentInformationBank.md) | | [optional] -**account_features** | [**InlineResponse20012PaymentInformationAccountFeatures**](InlineResponse20012PaymentInformationAccountFeatures.md) | | [optional] - - diff --git a/docs/InlineResponse20012PaymentInformationAccountFeatures.md b/docs/InlineResponse20012PaymentInformationAccountFeatures.md deleted file mode 100644 index 6051e179..00000000 --- a/docs/InlineResponse20012PaymentInformationAccountFeatures.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse20012PaymentInformationAccountFeatures - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**balance_amount** | **String** | Remaining balance on the account. | [optional] -**previous_balance_amount** | **String** | Remaining balance on the account. | [optional] -**currency** | **String** | Currency of the remaining balance on the account. For the possible values, see the ISO Standard Currency Codes. | [optional] - - diff --git a/docs/InlineResponse20012PaymentInformationBank.md b/docs/InlineResponse20012PaymentInformationBank.md deleted file mode 100644 index f3f0e231..00000000 --- a/docs/InlineResponse20012PaymentInformationBank.md +++ /dev/null @@ -1,14 +0,0 @@ -# CyberSource::InlineResponse20012PaymentInformationBank - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**routing_number** | **String** | The description for this field is not available. | [optional] -**branch_code** | **String** | The description for this field is not available. | [optional] -**swift_code** | **String** | The description for this field is not available. | [optional] -**bank_code** | **String** | The description for this field is not available. | [optional] -**iban** | **String** | The description for this field is not available. | [optional] -**account** | [**InlineResponse20012PaymentInformationBankAccount**](InlineResponse20012PaymentInformationBankAccount.md) | | [optional] -**mandate** | [**InlineResponse20012PaymentInformationBankMandate**](InlineResponse20012PaymentInformationBankMandate.md) | | [optional] - - diff --git a/docs/InlineResponse20012PaymentInformationBankAccount.md b/docs/InlineResponse20012PaymentInformationBankAccount.md deleted file mode 100644 index 8212073b..00000000 --- a/docs/InlineResponse20012PaymentInformationBankAccount.md +++ /dev/null @@ -1,14 +0,0 @@ -# CyberSource::InlineResponse20012PaymentInformationBankAccount - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**suffix** | **String** | The description for this field is not available. | [optional] -**prefix** | **String** | The description for this field is not available. | [optional] -**check_number** | **String** | The description for this field is not available. | [optional] -**type** | **String** | The description for this field is not available. | [optional] -**name** | **String** | The description for this field is not available. | [optional] -**check_digit** | **String** | The description for this field is not available. | [optional] -**encoder_id** | **String** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse20012PaymentInformationBankMandate.md b/docs/InlineResponse20012PaymentInformationBankMandate.md deleted file mode 100644 index a21a58b9..00000000 --- a/docs/InlineResponse20012PaymentInformationBankMandate.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse20012PaymentInformationBankMandate - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reference_number** | **String** | The description for this field is not available. | [optional] -**recurring_type** | **String** | The description for this field is not available. | [optional] -**id** | **String** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse20012PaymentInformationCard.md b/docs/InlineResponse20012PaymentInformationCard.md deleted file mode 100644 index 9ecc3d2f..00000000 --- a/docs/InlineResponse20012PaymentInformationCard.md +++ /dev/null @@ -1,17 +0,0 @@ -# CyberSource::InlineResponse20012PaymentInformationCard - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**suffix** | **String** | Last four digits of the cardholder’s account number. This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. | [optional] -**prefix** | **String** | The description for this field is not available. | [optional] -**expiration_month** | **String** | Two-digit month in which the credit card expires. `Format: MM`. Possible values: 01 through 12. **Encoded Account Numbers** For encoded account numbers (_type_=039), if there is no expiration date on the card, use 12. For processor-specific information, see the customer_cc_expmo field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**expiration_year** | **String** | Four-digit year in which the credit card expires. `Format: YYYY`. **Encoded Account Numbers** For encoded account numbers (_type_=039), if there is no expiration date on the card, use 2021. For processor-specific information, see the customer_cc_expyr field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**start_month** | **String** | Month of the start of the Maestro (UK Domestic) card validity period. Do not include the field, even with a blank value, if the card is not a Maestro (UK Domestic) card. `Format: MM`. Possible values: 01 through 12. The start date is not required for Maestro (UK Domestic) transactions. | [optional] -**start_year** | **String** | Year of the start of the Maestro (UK Domestic) card validity period. Do not include the field, even with a blank value, if the card is not a Maestro (UK Domestic) card. `Format: YYYY`. The start date is not required for Maestro (UK Domestic) transactions. | [optional] -**issue_number** | **String** | Number of times a Maestro (UK Domestic) card has been issued to the account holder. The card might or might not have an issue number. The number can consist of one or two digits, and the first digit might be a zero. When you include this value in your request, include exactly what is printed on the card. A value of 2 is different than a value of 02. Do not include the field, even with a blank value, if the card is not a Maestro (UK Domestic) card. The issue number is not required for Maestro (UK Domestic) transactions. | [optional] -**type** | **String** | Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover | [optional] -**account_encoder_id** | **String** | Identifier for the issuing bank that provided the customer’s encoded account number. Contact your processor for the bank’s ID. | [optional] -**use_as** | **String** | Flag that specifies the type of account associated with the card. The cardholder provides this information during the payment process. **Cielo** and **Comercio Latino** Possible values: - CREDIT: Credit card - DEBIT: Debit card This field is required for: - Debit transactions on Cielo and Comercio Latino. - Transactions with Brazilian-issued cards on CyberSource through VisaNet. | [optional] - - diff --git a/docs/InlineResponse20012PaymentInformationInvoice.md b/docs/InlineResponse20012PaymentInformationInvoice.md deleted file mode 100644 index adaf6f3b..00000000 --- a/docs/InlineResponse20012PaymentInformationInvoice.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse20012PaymentInformationInvoice - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**number** | **String** | Invoice Number. | [optional] -**barcode_number** | **String** | Barcode Number. | [optional] -**expiration_date** | **String** | Expiration Date. | [optional] - - diff --git a/docs/InlineResponse20012PaymentInformationPaymentType.md b/docs/InlineResponse20012PaymentInformationPaymentType.md deleted file mode 100644 index dcf1a4bb..00000000 --- a/docs/InlineResponse20012PaymentInformationPaymentType.md +++ /dev/null @@ -1,14 +0,0 @@ -# CyberSource::InlineResponse20012PaymentInformationPaymentType - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The description for this field is not available. | [optional] -**type** | **String** | The description for this field is not available. | [optional] -**sub_type** | **String** | The description for this field is not available. | [optional] -**method** | **String** | The description for this field is not available. | [optional] -**funding_source** | **String** | The description for this field is not available. | [optional] -**funding_source_affiliation** | **String** | The description for this field is not available. | [optional] -**credential** | **String** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse20012PointOfSaleInformation.md b/docs/InlineResponse20012PointOfSaleInformation.md deleted file mode 100644 index 069fbd6d..00000000 --- a/docs/InlineResponse20012PointOfSaleInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse20012PointOfSaleInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**entry_mode** | **String** | Method of entering credit card information into the POS terminal. Possible values: - contact: Read from direct contact with chip card. - contactless: Read from a contactless interface using chip data. - keyed: Manually keyed into POS terminal. - msd: Read from a contactless interface using magnetic stripe data (MSD). - swiped: Read from credit card magnetic stripe. The contact, contactless, and msd values are supported only for EMV transactions. * Applicable only for CTV for Payouts. | [optional] -**terminal_capability** | **Integer** | POS terminal’s capability. Possible values: - 1: Terminal has a magnetic stripe reader only. - 2: Terminal has a magnetic stripe reader and manual entry capability. - 3: Terminal has manual entry capability only. - 4: Terminal can read chip cards. - 5: Terminal can read contactless chip cards. The values of 4 and 5 are supported only for EMV transactions. * Applicable only for CTV for Payouts. | [optional] - - diff --git a/docs/InlineResponse20012ProcessingInformation.md b/docs/InlineResponse20012ProcessingInformation.md deleted file mode 100644 index 0b9eb815..00000000 --- a/docs/InlineResponse20012ProcessingInformation.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::InlineResponse20012ProcessingInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**payment_solution** | **String** | Type of digital payment solution that is being used for the transaction. Possible Values: - **visacheckout**: Visa Checkout. - **001**: Apple Pay. - **005**: Masterpass. Required for Masterpass transactions on OmniPay Direct. - **006**: Android Pay. - **008**: Samsung Pay. | [optional] -**commerce_indicator** | **String** | Type of transaction. Some payment card companies use this information when determining discount rates. When you omit this field for **Ingenico ePayments**, the processor uses the default transaction type they have on file for you instead of the default value listed here. | [optional] -**business_application_id** | **String** | The description for this field is not available. | [optional] -**authorization_options** | [**InlineResponse20012ProcessingInformationAuthorizationOptions**](InlineResponse20012ProcessingInformationAuthorizationOptions.md) | | [optional] -**bank_transfer_options** | [**InlineResponse20012ProcessingInformationBankTransferOptions**](InlineResponse20012ProcessingInformationBankTransferOptions.md) | | [optional] - - diff --git a/docs/InlineResponse20012ProcessingInformationAuthorizationOptions.md b/docs/InlineResponse20012ProcessingInformationAuthorizationOptions.md deleted file mode 100644 index 81bee547..00000000 --- a/docs/InlineResponse20012ProcessingInformationAuthorizationOptions.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse20012ProcessingInformationAuthorizationOptions - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**auth_type** | **String** | 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) | [optional] - - diff --git a/docs/InlineResponse20012ProcessingInformationBankTransferOptions.md b/docs/InlineResponse20012ProcessingInformationBankTransferOptions.md deleted file mode 100644 index 5422fec8..00000000 --- a/docs/InlineResponse20012ProcessingInformationBankTransferOptions.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse20012ProcessingInformationBankTransferOptions - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sec_code** | **String** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse20012ProcessorInformation.md b/docs/InlineResponse20012ProcessorInformation.md deleted file mode 100644 index 3fed232f..00000000 --- a/docs/InlineResponse20012ProcessorInformation.md +++ /dev/null @@ -1,18 +0,0 @@ -# CyberSource::InlineResponse20012ProcessorInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**processor** | [**InlineResponse20012ProcessorInformationProcessor**](InlineResponse20012ProcessorInformationProcessor.md) | | [optional] -**transaction_id** | **String** | Network transaction identifier (TID). You can use this value to identify a specific transaction when you are discussing the transaction with your processor. Not all processors provide this value. | [optional] -**network_transaction_id** | **String** | The description for this field is not available. | [optional] -**response_id** | **String** | The description for this field is not available. | [optional] -**provider_transaction_id** | **String** | The description for this field is not available. | [optional] -**approval_code** | **String** | Authorization code. Returned only when the processor returns this value. | [optional] -**response_code** | **String** | For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of the authorization. | [optional] -**avs** | [**InlineResponse201ProcessorInformationAvs**](InlineResponse201ProcessorInformationAvs.md) | | [optional] -**card_verification** | [**InlineResponse20012ProcessorInformationCardVerification**](InlineResponse20012ProcessorInformationCardVerification.md) | | [optional] -**ach_verification** | [**InlineResponse20012ProcessorInformationAchVerification**](InlineResponse20012ProcessorInformationAchVerification.md) | | [optional] -**electronic_verification_results** | [**InlineResponse20012ProcessorInformationElectronicVerificationResults**](InlineResponse20012ProcessorInformationElectronicVerificationResults.md) | | [optional] - - diff --git a/docs/InlineResponse20012ProcessorInformationAchVerification.md b/docs/InlineResponse20012ProcessorInformationAchVerification.md deleted file mode 100644 index f94bab7a..00000000 --- a/docs/InlineResponse20012ProcessorInformationAchVerification.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse20012ProcessorInformationAchVerification - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**result_code** | **String** | The description for this field is not available.. | [optional] -**result_code_raw** | **String** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse20012ProcessorInformationCardVerification.md b/docs/InlineResponse20012ProcessorInformationCardVerification.md deleted file mode 100644 index 5c578d2a..00000000 --- a/docs/InlineResponse20012ProcessorInformationCardVerification.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse20012ProcessorInformationCardVerification - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**result_code** | **String** | CVN result code. | [optional] - - diff --git a/docs/InlineResponse20012ProcessorInformationElectronicVerificationResults.md b/docs/InlineResponse20012ProcessorInformationElectronicVerificationResults.md deleted file mode 100644 index d847e3c9..00000000 --- a/docs/InlineResponse20012ProcessorInformationElectronicVerificationResults.md +++ /dev/null @@ -1,17 +0,0 @@ -# CyberSource::InlineResponse20012ProcessorInformationElectronicVerificationResults - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **String** | Mapped Electronic Verification response code for the customer’s email address. | [optional] -**email_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s email address. | [optional] -**name** | **String** | The description for this field is not available. | [optional] -**name_raw** | **String** | The description for this field is not available. | [optional] -**phone_number** | **String** | Mapped Electronic Verification response code for the customer’s phone number. | [optional] -**phone_number_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s phone number. | [optional] -**street** | **String** | Mapped Electronic Verification response code for the customer’s street address. | [optional] -**street_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s street address. | [optional] -**postal_code** | **String** | Mapped Electronic Verification response code for the customer’s postal code. | [optional] -**postal_code_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s postal code. | [optional] - - diff --git a/docs/InlineResponse20012ProcessorInformationProcessor.md b/docs/InlineResponse20012ProcessorInformationProcessor.md deleted file mode 100644 index cc9108c5..00000000 --- a/docs/InlineResponse20012ProcessorInformationProcessor.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse20012ProcessorInformationProcessor - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Name of the Processor. | [optional] - - diff --git a/docs/InlineResponse20012RiskInformation.md b/docs/InlineResponse20012RiskInformation.md deleted file mode 100644 index 3a20a6c0..00000000 --- a/docs/InlineResponse20012RiskInformation.md +++ /dev/null @@ -1,13 +0,0 @@ -# CyberSource::InlineResponse20012RiskInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**profile** | [**InlineResponse20012RiskInformationProfile**](InlineResponse20012RiskInformationProfile.md) | | [optional] -**rules** | [**Array<InlineResponse20012RiskInformationProfile>**](InlineResponse20012RiskInformationProfile.md) | | [optional] -**passive_profile** | [**InlineResponse20012RiskInformationProfile**](InlineResponse20012RiskInformationProfile.md) | | [optional] -**passive_rules** | [**Array<InlineResponse20012RiskInformationProfile>**](InlineResponse20012RiskInformationProfile.md) | | [optional] -**score** | [**InlineResponse20012RiskInformationScore**](InlineResponse20012RiskInformationScore.md) | | [optional] -**local_time** | **String** | Time that the transaction was submitted in local time.. | [optional] - - diff --git a/docs/InlineResponse20012RiskInformationProfile.md b/docs/InlineResponse20012RiskInformationProfile.md deleted file mode 100644 index 029f02f1..00000000 --- a/docs/InlineResponse20012RiskInformationProfile.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse20012RiskInformationProfile - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The description for this field is not available. | [optional] -**decision** | **String** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse20012RiskInformationScore.md b/docs/InlineResponse20012RiskInformationScore.md deleted file mode 100644 index d4221545..00000000 --- a/docs/InlineResponse20012RiskInformationScore.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse20012RiskInformationScore - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**factor_codes** | **Array<String>** | Array of factor codes. | [optional] -**result** | **Integer** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse20012SenderInformation.md b/docs/InlineResponse20012SenderInformation.md deleted file mode 100644 index b8eb6558..00000000 --- a/docs/InlineResponse20012SenderInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse20012SenderInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reference_number** | **String** | Reference number generated by you that uniquely identifies the sender. | [optional] - - diff --git a/docs/InlineResponse20013.md b/docs/InlineResponse20013.md deleted file mode 100644 index 7e4d9038..00000000 --- a/docs/InlineResponse20013.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse20013 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**users** | [**Array<InlineResponse20013Users>**](InlineResponse20013Users.md) | | [optional] - - diff --git a/docs/InlineResponse20013AccountInformation.md b/docs/InlineResponse20013AccountInformation.md deleted file mode 100644 index d71f1f6e..00000000 --- a/docs/InlineResponse20013AccountInformation.md +++ /dev/null @@ -1,15 +0,0 @@ -# CyberSource::InlineResponse20013AccountInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_name** | **String** | | [optional] -**role_id** | **String** | | [optional] -**permissions** | **Array<String>** | | [optional] -**status** | **String** | | [optional] -**created_time** | **DateTime** | | [optional] -**last_access_time** | **DateTime** | | [optional] -**language_preference** | **String** | | [optional] -**timezone** | **String** | | [optional] - - diff --git a/docs/InlineResponse20013ContactInformation.md b/docs/InlineResponse20013ContactInformation.md deleted file mode 100644 index 249d535c..00000000 --- a/docs/InlineResponse20013ContactInformation.md +++ /dev/null @@ -1,11 +0,0 @@ -# CyberSource::InlineResponse20013ContactInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **String** | | [optional] -**phone_number** | **String** | | [optional] -**first_name** | **String** | | [optional] -**last_name** | **String** | | [optional] - - diff --git a/docs/InlineResponse20013OrganizationInformation.md b/docs/InlineResponse20013OrganizationInformation.md deleted file mode 100644 index 86e5c639..00000000 --- a/docs/InlineResponse20013OrganizationInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse20013OrganizationInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_id** | **String** | | [optional] - - diff --git a/docs/InlineResponse20013Users.md b/docs/InlineResponse20013Users.md deleted file mode 100644 index 38b61ac1..00000000 --- a/docs/InlineResponse20013Users.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse20013Users - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_information** | [**InlineResponse20013AccountInformation**](InlineResponse20013AccountInformation.md) | | [optional] -**organization_information** | [**InlineResponse20013OrganizationInformation**](InlineResponse20013OrganizationInformation.md) | | [optional] -**contact_information** | [**InlineResponse20013ContactInformation**](InlineResponse20013ContactInformation.md) | | [optional] - - diff --git a/docs/InlineResponse2002.md b/docs/InlineResponse2002.md deleted file mode 100644 index 7315e0c1..00000000 --- a/docs/InlineResponse2002.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse2002 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transaction_batches** | [**Array<InlineResponse2002TransactionBatches>**](InlineResponse2002TransactionBatches.md) | | [optional] -**_links** | [**InlineResponse2002Links**](InlineResponse2002Links.md) | | [optional] -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] - - diff --git a/docs/InlineResponse2002Links.md b/docs/InlineResponse2002Links.md deleted file mode 100644 index 1b062a13..00000000 --- a/docs/InlineResponse2002Links.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2002Links - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_self** | [**InlineResponse2002LinksSelf**](InlineResponse2002LinksSelf.md) | | [optional] - - diff --git a/docs/InlineResponse2002LinksSelf.md b/docs/InlineResponse2002LinksSelf.md deleted file mode 100644 index bbeaff65..00000000 --- a/docs/InlineResponse2002LinksSelf.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse2002LinksSelf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**href** | **String** | | [optional] -**method** | **String** | | [optional] - - diff --git a/docs/InlineResponse2002TransactionBatches.md b/docs/InlineResponse2002TransactionBatches.md deleted file mode 100644 index 91a1b34e..00000000 --- a/docs/InlineResponse2002TransactionBatches.md +++ /dev/null @@ -1,14 +0,0 @@ -# CyberSource::InlineResponse2002TransactionBatches - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | Unique identifier assigned to the batch file. | [optional] -**upload_date** | **String** | Date when the batch template was update. | [optional] -**completion_date** | **String** | The date when the batch template processing completed. | [optional] -**transaction_count** | **Integer** | Number of transactions in the transaction. | [optional] -**accepted_transaction_count** | **Integer** | Number of transactions accepted. | [optional] -**rejected_transaction_count** | **String** | Number of transactions rejected. | [optional] -**status** | **String** | The status of you batch template processing. | [optional] - - diff --git a/docs/InlineResponse2003.md b/docs/InlineResponse2003.md deleted file mode 100644 index f5023c08..00000000 --- a/docs/InlineResponse2003.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2003 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**notification_of_changes** | [**Array<InlineResponse2003NotificationOfChanges>**](InlineResponse2003NotificationOfChanges.md) | List of Notification Of Change Info values | [optional] - - diff --git a/docs/InlineResponse2003NotificationOfChanges.md b/docs/InlineResponse2003NotificationOfChanges.md deleted file mode 100644 index aa67340f..00000000 --- a/docs/InlineResponse2003NotificationOfChanges.md +++ /dev/null @@ -1,15 +0,0 @@ -# CyberSource::InlineResponse2003NotificationOfChanges - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**merchant_reference_number** | **String** | Merchant Reference Number | [optional] -**transaction_reference_number** | **String** | Transaction Reference Number | [optional] -**time** | **DateTime** | Notification Of Change Date(ISO 8601 Extended) | [optional] -**code** | **String** | Merchant Reference Number | [optional] -**account_type** | **String** | Account Type | [optional] -**routing_number** | **String** | Routing Number | [optional] -**account_number** | **String** | Account Number | [optional] -**consumer_name** | **String** | Consumer Name | [optional] - - diff --git a/docs/InlineResponse2004.md b/docs/InlineResponse2004.md deleted file mode 100644 index d09eb5c4..00000000 --- a/docs/InlineResponse2004.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2004 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**report_definitions** | [**Array<InlineResponse2004ReportDefinitions>**](InlineResponse2004ReportDefinitions.md) | | [optional] - - diff --git a/docs/InlineResponse2004ReportDefinitions.md b/docs/InlineResponse2004ReportDefinitions.md deleted file mode 100644 index 9dbd0c3d..00000000 --- a/docs/InlineResponse2004ReportDefinitions.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::InlineResponse2004ReportDefinitions - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | | [optional] -**report_definition_id** | **Integer** | | [optional] -**report_defintion_name** | **String** | | [optional] -**supported_formats** | **Array<String>** | | [optional] -**description** | **String** | | [optional] - - diff --git a/docs/InlineResponse2005.md b/docs/InlineResponse2005.md deleted file mode 100644 index f8e5185e..00000000 --- a/docs/InlineResponse2005.md +++ /dev/null @@ -1,13 +0,0 @@ -# CyberSource::InlineResponse2005 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | | [optional] -**report_definition_id** | **Integer** | | [optional] -**report_defintion_name** | **String** | | [optional] -**attributes** | [**Array<InlineResponse2005Attributes>**](InlineResponse2005Attributes.md) | | [optional] -**supported_formats** | **Array<String>** | | [optional] -**description** | **String** | | [optional] - - diff --git a/docs/InlineResponse2005Attributes.md b/docs/InlineResponse2005Attributes.md deleted file mode 100644 index 3214f55f..00000000 --- a/docs/InlineResponse2005Attributes.md +++ /dev/null @@ -1,14 +0,0 @@ -# CyberSource::InlineResponse2005Attributes - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | [optional] -**name** | **String** | | [optional] -**description** | **String** | | [optional] -**filter_type** | **String** | | [optional] -**default** | **BOOLEAN** | | [optional] -**required** | **BOOLEAN** | | [optional] -**supported_type** | **String** | | [optional] - - diff --git a/docs/InlineResponse2006.md b/docs/InlineResponse2006.md deleted file mode 100644 index 92b123bc..00000000 --- a/docs/InlineResponse2006.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2006 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**subscriptions** | [**Array<InlineResponse2006Subscriptions>**](InlineResponse2006Subscriptions.md) | | [optional] - - diff --git a/docs/InlineResponse2006ReportPreferences.md b/docs/InlineResponse2006ReportPreferences.md deleted file mode 100644 index 04182217..00000000 --- a/docs/InlineResponse2006ReportPreferences.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse2006ReportPreferences - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**signed_amounts** | **BOOLEAN** | Indicator to determine whether negative sign infron of amount for all refunded transaction | [optional] -**field_name_convention** | **String** | Specify the field naming convention to be followed in reports (applicable to only csv report formats | [optional] - - diff --git a/docs/InlineResponse2006Subscriptions.md b/docs/InlineResponse2006Subscriptions.md deleted file mode 100644 index bab2b61e..00000000 --- a/docs/InlineResponse2006Subscriptions.md +++ /dev/null @@ -1,20 +0,0 @@ -# CyberSource::InlineResponse2006Subscriptions - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_id** | **String** | Organization Id | [optional] -**report_definition_id** | **String** | Report Definition Id | [optional] -**report_definition_name** | **String** | Report Definition | [optional] -**report_mime_type** | **String** | Report Format | [optional] -**report_frequency** | **String** | Report Frequency | [optional] -**report_name** | **String** | Report Name | [optional] -**timezone** | **String** | Time Zone | [optional] -**start_time** | **DateTime** | Start Time | [optional] -**start_day** | **Integer** | Start Day | [optional] -**report_fields** | **Array<String>** | List of all fields String values | [optional] -**report_filters** | **Array<String>** | List of filters to apply | [optional] -**report_preferences** | [**InlineResponse2006ReportPreferences**](InlineResponse2006ReportPreferences.md) | | [optional] -**selected_merchant_group_name** | **String** | Selected name of the group. | [optional] - - diff --git a/docs/InlineResponse2007.md b/docs/InlineResponse2007.md deleted file mode 100644 index e26ba91e..00000000 --- a/docs/InlineResponse2007.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2007 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reports** | [**Array<InlineResponse2007Reports>**](InlineResponse2007Reports.md) | | [optional] - - diff --git a/docs/InlineResponse2007Reports.md b/docs/InlineResponse2007Reports.md deleted file mode 100644 index 5279e8f9..00000000 --- a/docs/InlineResponse2007Reports.md +++ /dev/null @@ -1,21 +0,0 @@ -# CyberSource::InlineResponse2007Reports - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**report_definition_id** | **String** | Unique Report Identifier of each report type | [optional] -**report_name** | **String** | Name of the report specified by merchant while creating the report | [optional] -**report_mime_type** | **String** | Format of the report to get generated | [optional] -**report_frequency** | **String** | Frequency of the report to get generated | [optional] -**status** | **String** | Status of the report | [optional] -**report_start_time** | **DateTime** | Specifies the report start time in ISO 8601 format | [optional] -**report_end_time** | **DateTime** | Specifies the report end time in ISO 8601 format | [optional] -**timezone** | **String** | Time Zone | [optional] -**report_id** | **String** | Unique identifier generated for every reports | [optional] -**organization_id** | **String** | CyberSource Merchant Id | [optional] -**queued_time** | **DateTime** | Specifies the time of the report in queued in ISO 8601 format | [optional] -**report_generating_time** | **DateTime** | Specifies the time of the report started to generate in ISO 8601 format | [optional] -**report_completed_time** | **DateTime** | Specifies the time of the report completed the generation in ISO 8601 format | [optional] -**selected_merchant_group_name** | **String** | Selected name of the group | [optional] - - diff --git a/docs/InlineResponse2008.md b/docs/InlineResponse2008.md deleted file mode 100644 index 4d1ec63c..00000000 --- a/docs/InlineResponse2008.md +++ /dev/null @@ -1,21 +0,0 @@ -# CyberSource::InlineResponse2008 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_id** | **String** | CyberSource merchant id | [optional] -**report_id** | **String** | Report ID Value | [optional] -**report_definition_id** | **String** | Report definition Id | [optional] -**report_name** | **String** | Report Name | [optional] -**report_mime_type** | **String** | Report Format | [optional] -**report_frequency** | **String** | Report Frequency Value | [optional] -**report_fields** | **Array<String>** | List of Integer Values | [optional] -**report_status** | **String** | Report Status Value | [optional] -**report_start_time** | **DateTime** | Report Start Time Value | [optional] -**report_end_time** | **DateTime** | Report End Time Value | [optional] -**timezone** | **String** | Time Zone Value | [optional] -**report_filters** | **Hash<String, Array<String>>** | Report Filters | [optional] -**report_preferences** | [**InlineResponse2006ReportPreferences**](InlineResponse2006ReportPreferences.md) | | [optional] -**selected_merchant_group_name** | **String** | Selected Merchant Group name | [optional] - - diff --git a/docs/InlineResponse2009.md b/docs/InlineResponse2009.md deleted file mode 100644 index 8462c0cb..00000000 --- a/docs/InlineResponse2009.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse2009 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**file_details** | [**Array<InlineResponse2009FileDetails>**](InlineResponse2009FileDetails.md) | | [optional] -**_links** | [**InlineResponse2009Links**](InlineResponse2009Links.md) | | [optional] - - diff --git a/docs/InlineResponse2009FileDetails.md b/docs/InlineResponse2009FileDetails.md deleted file mode 100644 index 92339a80..00000000 --- a/docs/InlineResponse2009FileDetails.md +++ /dev/null @@ -1,14 +0,0 @@ -# CyberSource::InlineResponse2009FileDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**file_id** | **String** | Unique identifier of a file | [optional] -**name** | **String** | Name of the file | [optional] -**created_time** | **DateTime** | Date and time for the file in PST | [optional] -**last_modified_time** | **DateTime** | Date and time for the file in PST | [optional] -**date** | **Date** | Date and time for the file in PST | [optional] -**mime_type** | **String** | File extension | [optional] -**size** | **Integer** | Size of the file in bytes | [optional] - - diff --git a/docs/InlineResponse2009Links.md b/docs/InlineResponse2009Links.md deleted file mode 100644 index 04d56c94..00000000 --- a/docs/InlineResponse2009Links.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse2009Links - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_self** | [**InlineResponse2009LinksSelf**](InlineResponse2009LinksSelf.md) | | [optional] -**files** | [**Array<InlineResponse2009LinksFiles>**](InlineResponse2009LinksFiles.md) | | [optional] - - diff --git a/docs/InlineResponse2009LinksFiles.md b/docs/InlineResponse2009LinksFiles.md deleted file mode 100644 index 76d8b1fc..00000000 --- a/docs/InlineResponse2009LinksFiles.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse2009LinksFiles - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**file_id** | **String** | Unique identifier for each file | [optional] -**href** | **String** | | [optional] -**method** | **String** | | [optional] - - diff --git a/docs/InlineResponse2009LinksSelf.md b/docs/InlineResponse2009LinksSelf.md deleted file mode 100644 index bcc5f8e4..00000000 --- a/docs/InlineResponse2009LinksSelf.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse2009LinksSelf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**href** | **String** | | [optional] -**method** | **String** | | [optional] - - diff --git a/docs/InlineResponse200Der.md b/docs/InlineResponse200Der.md deleted file mode 100644 index a191e605..00000000 --- a/docs/InlineResponse200Der.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse200Der - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**format** | **String** | Specifies the format of the public key; currently X.509. | [optional] -**algorithm** | **String** | Algorithm used to encrypt the public key. | [optional] -**public_key** | **String** | Base64 encoded public key value. | [optional] - - diff --git a/docs/InlineResponse200Jwk.md b/docs/InlineResponse200Jwk.md deleted file mode 100644 index 87caf150..00000000 --- a/docs/InlineResponse200Jwk.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::InlineResponse200Jwk - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kty** | **String** | Algorithm used to encrypt the public key. | [optional] -**use** | **String** | Defines whether to use the key for encryption (enc) or verifying a signature (sig). Always returned as enc. | [optional] -**kid** | **String** | The key ID in JWK format. | [optional] -**n** | **String** | JWK RSA Modulus | [optional] -**e** | **String** | JWK RSA Exponent | [optional] - - diff --git a/docs/InlineResponse201.md b/docs/InlineResponse201.md deleted file mode 100644 index 32fe435c..00000000 --- a/docs/InlineResponse201.md +++ /dev/null @@ -1,18 +0,0 @@ -# CyberSource::InlineResponse201 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_links** | [**InlineResponse201Links**](InlineResponse201Links.md) | | [optional] -**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] -**status** | **String** | The status of the submitted transaction. | [optional] -**reconciliation_id** | **String** | The reconciliation id for the submitted transaction. This value is not returned for all processors. | [optional] -**error_information** | [**InlineResponse201ErrorInformation**](InlineResponse201ErrorInformation.md) | | [optional] -**client_reference_information** | [**InlineResponse201ClientReferenceInformation**](InlineResponse201ClientReferenceInformation.md) | | [optional] -**processor_information** | [**InlineResponse201ProcessorInformation**](InlineResponse201ProcessorInformation.md) | | [optional] -**payment_information** | [**InlineResponse201PaymentInformation**](InlineResponse201PaymentInformation.md) | | [optional] -**order_information** | [**InlineResponse201OrderInformation**](InlineResponse201OrderInformation.md) | | [optional] -**point_of_sale_information** | [**InlineResponse201PointOfSaleInformation**](InlineResponse201PointOfSaleInformation.md) | | [optional] - - diff --git a/docs/InlineResponse2011.md b/docs/InlineResponse2011.md deleted file mode 100644 index 6331dabc..00000000 --- a/docs/InlineResponse2011.md +++ /dev/null @@ -1,17 +0,0 @@ -# CyberSource::InlineResponse2011 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_links** | [**InlineResponse2011Links**](InlineResponse2011Links.md) | | [optional] -**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] -**status** | **String** | The status of the submitted transaction. | [optional] -**reconciliation_id** | **String** | The reconciliation id for the submitted transaction. This value is not returned for all processors. | [optional] -**client_reference_information** | [**InlineResponse201ClientReferenceInformation**](InlineResponse201ClientReferenceInformation.md) | | [optional] -**reversal_amount_details** | [**InlineResponse2011ReversalAmountDetails**](InlineResponse2011ReversalAmountDetails.md) | | [optional] -**processor_information** | [**InlineResponse2011ProcessorInformation**](InlineResponse2011ProcessorInformation.md) | | [optional] -**authorization_information** | [**InlineResponse2011AuthorizationInformation**](InlineResponse2011AuthorizationInformation.md) | | [optional] -**point_of_sale_information** | [**Ptsv2paymentsidreversalsPointOfSaleInformation**](Ptsv2paymentsidreversalsPointOfSaleInformation.md) | | [optional] - - diff --git a/docs/InlineResponse2011AuthorizationInformation.md b/docs/InlineResponse2011AuthorizationInformation.md deleted file mode 100644 index 1bd06bd4..00000000 --- a/docs/InlineResponse2011AuthorizationInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse2011AuthorizationInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**approval_code** | **String** | The authorization code returned by the processor. | [optional] -**reason_code** | **String** | Reply flag for the original transaction. | [optional] - - diff --git a/docs/InlineResponse2011Links.md b/docs/InlineResponse2011Links.md deleted file mode 100644 index c86e5fb5..00000000 --- a/docs/InlineResponse2011Links.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2011Links - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_self** | [**InlineResponse201LinksSelf**](InlineResponse201LinksSelf.md) | | [optional] - - diff --git a/docs/InlineResponse2011ProcessorInformation.md b/docs/InlineResponse2011ProcessorInformation.md deleted file mode 100644 index 9701d54a..00000000 --- a/docs/InlineResponse2011ProcessorInformation.md +++ /dev/null @@ -1,13 +0,0 @@ -# CyberSource::InlineResponse2011ProcessorInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transaction_id** | **String** | Processor transaction ID. This value identifies the transaction on a host system. This value is supported only for Moneris. It contains this information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003: - Terminal ID = 66012345 - Shift number = 001 - Batch number = 069 - Transaction number = 003 | [optional] -**response_code** | **String** | For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of the authorization. | [optional] -**response_category_code** | **String** | Processor-defined response category code. The associated detail error code is in the auth_auth_response field or the auth_reversal_auth_ response field depending on which service you requested. This field is supported only for: - Japanese issuers - Domestic transactions in Japan - Comercio Latino—processor transaction ID required for troubleshooting **Maximum length for processors**: - Comercio Latino: 32 - All other processors: 3 | [optional] -**forwarded_acquirer_code** | **String** | Name of the Japanese acquirer that processed the transaction. Returned only for CCS (CAFIS) and JCN Gateway. Please contact the CyberSource Japan Support Group for more information. | [optional] -**master_card_service_code** | **String** | Mastercard service that was used for the transaction. Mastercard provides this value to CyberSource. Possible value: - 53: Mastercard card-on-file token service | [optional] -**master_card_service_reply_code** | **String** | Result of the Mastercard card-on-file token service. Mastercard provides this value to CyberSource. Possible values: - **C**: Service completed successfully. - **F**: One of the following: - Incorrect Mastercard POS entry mode. The Mastercard POS entry mode should be 81 for an authorization or authorization reversal. - Incorrect Mastercard POS entry mode. The Mastercard POS entry mode should be 01 for a tokenized request. - Token requestor ID is missing or formatted incorrectly. - **I**: One of the following: - Invalid token requestor ID. - Suspended or deactivated token. - Invalid token (not in mapping table). - **T**: Invalid combination of token requestor ID and token. - **U**: Expired token. - **W**: Primary account number (PAN) listed in electronic warning bulletin. Note This field is returned only for **CyberSource through VisaNet**. | [optional] - - diff --git a/docs/InlineResponse2011ReversalAmountDetails.md b/docs/InlineResponse2011ReversalAmountDetails.md deleted file mode 100644 index ddd62902..00000000 --- a/docs/InlineResponse2011ReversalAmountDetails.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse2011ReversalAmountDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reversed_amount** | **String** | Total reversed amount. | [optional] -**original_transaction_amount** | **String** | Amount of the original transaction. | [optional] -**currency** | **String** | Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. | [optional] - - diff --git a/docs/InlineResponse2012.md b/docs/InlineResponse2012.md deleted file mode 100644 index 9f8daf48..00000000 --- a/docs/InlineResponse2012.md +++ /dev/null @@ -1,15 +0,0 @@ -# CyberSource::InlineResponse2012 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_links** | [**InlineResponse2012Links**](InlineResponse2012Links.md) | | [optional] -**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] -**status** | **String** | The status of the submitted transaction. | [optional] -**reconciliation_id** | **String** | The reconciliation id for the submitted transaction. This value is not returned for all processors. | [optional] -**client_reference_information** | [**InlineResponse201ClientReferenceInformation**](InlineResponse201ClientReferenceInformation.md) | | [optional] -**processor_information** | [**InlineResponse2012ProcessorInformation**](InlineResponse2012ProcessorInformation.md) | | [optional] -**order_information** | [**InlineResponse2012OrderInformation**](InlineResponse2012OrderInformation.md) | | [optional] - - diff --git a/docs/InlineResponse2012Links.md b/docs/InlineResponse2012Links.md deleted file mode 100644 index 9f84406e..00000000 --- a/docs/InlineResponse2012Links.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse2012Links - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_self** | [**InlineResponse201LinksSelf**](InlineResponse201LinksSelf.md) | | [optional] -**void** | [**InlineResponse201LinksSelf**](InlineResponse201LinksSelf.md) | | [optional] -**refund** | [**InlineResponse201LinksSelf**](InlineResponse201LinksSelf.md) | | [optional] - - diff --git a/docs/InlineResponse2012OrderInformation.md b/docs/InlineResponse2012OrderInformation.md deleted file mode 100644 index 0a1dbc31..00000000 --- a/docs/InlineResponse2012OrderInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse2012OrderInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount_details** | [**InlineResponse2012OrderInformationAmountDetails**](InlineResponse2012OrderInformationAmountDetails.md) | | [optional] -**invoice_details** | [**InlineResponse201OrderInformationInvoiceDetails**](InlineResponse201OrderInformationInvoiceDetails.md) | | [optional] - - diff --git a/docs/InlineResponse2012OrderInformationAmountDetails.md b/docs/InlineResponse2012OrderInformationAmountDetails.md deleted file mode 100644 index 27cc6c32..00000000 --- a/docs/InlineResponse2012OrderInformationAmountDetails.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse2012OrderInformationAmountDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total_amount** | **String** | Amount you requested for the capture. | [optional] -**currency** | **String** | Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. | [optional] - - diff --git a/docs/InlineResponse2012ProcessorInformation.md b/docs/InlineResponse2012ProcessorInformation.md deleted file mode 100644 index 7ecd43c4..00000000 --- a/docs/InlineResponse2012ProcessorInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2012ProcessorInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transaction_id** | **String** | Processor transaction ID. This value identifies the transaction on a host system. This value is supported only for Moneris. It contains this information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003: - Terminal ID = 66012345 - Shift number = 001 - Batch number = 069 - Transaction number = 003 | [optional] - - diff --git a/docs/InlineResponse2013.md b/docs/InlineResponse2013.md deleted file mode 100644 index 3e865476..00000000 --- a/docs/InlineResponse2013.md +++ /dev/null @@ -1,16 +0,0 @@ -# CyberSource::InlineResponse2013 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_links** | [**InlineResponse2013Links**](InlineResponse2013Links.md) | | [optional] -**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] -**status** | **String** | The status of the submitted transaction. | [optional] -**reconciliation_id** | **String** | The reconciliation id for the submitted transaction. This value is not returned for all processors. | [optional] -**client_reference_information** | [**InlineResponse201ClientReferenceInformation**](InlineResponse201ClientReferenceInformation.md) | | [optional] -**refund_amount_details** | [**InlineResponse2013RefundAmountDetails**](InlineResponse2013RefundAmountDetails.md) | | [optional] -**processor_information** | [**InlineResponse2013ProcessorInformation**](InlineResponse2013ProcessorInformation.md) | | [optional] -**order_information** | [**InlineResponse2013OrderInformation**](InlineResponse2013OrderInformation.md) | | [optional] - - diff --git a/docs/InlineResponse2013Links.md b/docs/InlineResponse2013Links.md deleted file mode 100644 index 37fd4378..00000000 --- a/docs/InlineResponse2013Links.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse2013Links - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_self** | [**InlineResponse201LinksSelf**](InlineResponse201LinksSelf.md) | | [optional] -**void** | [**InlineResponse201LinksSelf**](InlineResponse201LinksSelf.md) | | [optional] - - diff --git a/docs/InlineResponse2013OrderInformation.md b/docs/InlineResponse2013OrderInformation.md deleted file mode 100644 index 63dd86f6..00000000 --- a/docs/InlineResponse2013OrderInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2013OrderInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**invoice_details** | [**InlineResponse201OrderInformationInvoiceDetails**](InlineResponse201OrderInformationInvoiceDetails.md) | | [optional] - - diff --git a/docs/InlineResponse2013ProcessorInformation.md b/docs/InlineResponse2013ProcessorInformation.md deleted file mode 100644 index a0398d28..00000000 --- a/docs/InlineResponse2013ProcessorInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse2013ProcessorInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transaction_id** | **String** | Processor transaction ID. This value identifies the transaction on a host system. This value is supported only for Moneris. It contains this information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003: - Terminal ID = 66012345 - Shift number = 001 - Batch number = 069 - Transaction number = 003 | [optional] -**forwarded_acquirer_code** | **String** | Name of the Japanese acquirer that processed the transaction. Returned only for CCS (CAFIS) and JCN Gateway. Please contact the CyberSource Japan Support Group for more information. | [optional] - - diff --git a/docs/InlineResponse2013RefundAmountDetails.md b/docs/InlineResponse2013RefundAmountDetails.md deleted file mode 100644 index 39c95d9f..00000000 --- a/docs/InlineResponse2013RefundAmountDetails.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse2013RefundAmountDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**refund_amount** | **String** | Total amount of the refund. | [optional] -**currency** | **String** | Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. | [optional] - - diff --git a/docs/InlineResponse2014.md b/docs/InlineResponse2014.md deleted file mode 100644 index 7d3021dc..00000000 --- a/docs/InlineResponse2014.md +++ /dev/null @@ -1,16 +0,0 @@ -# CyberSource::InlineResponse2014 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_links** | [**InlineResponse2013Links**](InlineResponse2013Links.md) | | [optional] -**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] -**status** | **String** | The status of the submitted transaction. | [optional] -**reconciliation_id** | **String** | The reconciliation id for the submitted transaction. This value is not returned for all processors. | [optional] -**client_reference_information** | [**InlineResponse201ClientReferenceInformation**](InlineResponse201ClientReferenceInformation.md) | | [optional] -**credit_amount_details** | [**InlineResponse2014CreditAmountDetails**](InlineResponse2014CreditAmountDetails.md) | | [optional] -**processor_information** | [**InlineResponse2013ProcessorInformation**](InlineResponse2013ProcessorInformation.md) | | [optional] -**order_information** | [**InlineResponse2013OrderInformation**](InlineResponse2013OrderInformation.md) | | [optional] - - diff --git a/docs/InlineResponse2014CreditAmountDetails.md b/docs/InlineResponse2014CreditAmountDetails.md deleted file mode 100644 index 3c2a780d..00000000 --- a/docs/InlineResponse2014CreditAmountDetails.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse2014CreditAmountDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**credit_amount** | **String** | Total amount of the credit. | [optional] -**currency** | **String** | Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. | [optional] - - diff --git a/docs/InlineResponse2015.md b/docs/InlineResponse2015.md deleted file mode 100644 index 21a8a4c8..00000000 --- a/docs/InlineResponse2015.md +++ /dev/null @@ -1,13 +0,0 @@ -# CyberSource::InlineResponse2015 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_links** | [**InlineResponse2011Links**](InlineResponse2011Links.md) | | [optional] -**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] -**status** | **String** | The status of the submitted transaction. | [optional] -**client_reference_information** | [**InlineResponse201ClientReferenceInformation**](InlineResponse201ClientReferenceInformation.md) | | [optional] -**void_amount_details** | [**InlineResponse2015VoidAmountDetails**](InlineResponse2015VoidAmountDetails.md) | | [optional] - - diff --git a/docs/InlineResponse2015VoidAmountDetails.md b/docs/InlineResponse2015VoidAmountDetails.md deleted file mode 100644 index c4015009..00000000 --- a/docs/InlineResponse2015VoidAmountDetails.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse2015VoidAmountDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**void_amount** | **String** | Total amount of the void. | [optional] -**original_transaction_amount** | **String** | Amount of the original transaction. | [optional] -**currency** | **String** | Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. | [optional] - - diff --git a/docs/InlineResponse2016.md b/docs/InlineResponse2016.md deleted file mode 100644 index 055b6091..00000000 --- a/docs/InlineResponse2016.md +++ /dev/null @@ -1,19 +0,0 @@ -# CyberSource::InlineResponse2016 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_links** | [**Tmsv1instrumentidentifiersLinks**](Tmsv1instrumentidentifiersLinks.md) | | [optional] -**id** | **String** | Unique identification number assigned by CyberSource to the submitted request. | [optional] -**object** | **String** | Describes type of token. For example: customer, paymentInstrument or instrumentIdentifier. | [optional] -**state** | **String** | Current state of the token. | [optional] -**bank_account** | [**Tmsv1paymentinstrumentsBankAccount**](Tmsv1paymentinstrumentsBankAccount.md) | | [optional] -**card** | [**Tmsv1paymentinstrumentsCard**](Tmsv1paymentinstrumentsCard.md) | | [optional] -**buyer_information** | [**Tmsv1paymentinstrumentsBuyerInformation**](Tmsv1paymentinstrumentsBuyerInformation.md) | | [optional] -**bill_to** | [**Tmsv1paymentinstrumentsBillTo**](Tmsv1paymentinstrumentsBillTo.md) | | [optional] -**processing_information** | [**Tmsv1paymentinstrumentsProcessingInformation**](Tmsv1paymentinstrumentsProcessingInformation.md) | | [optional] -**merchant_information** | [**Tmsv1paymentinstrumentsMerchantInformation**](Tmsv1paymentinstrumentsMerchantInformation.md) | | [optional] -**meta_data** | [**Tmsv1instrumentidentifiersMetadata**](Tmsv1instrumentidentifiersMetadata.md) | | [optional] -**instrument_identifier** | [**Tmsv1paymentinstrumentsInstrumentIdentifier**](Tmsv1paymentinstrumentsInstrumentIdentifier.md) | | [optional] - - diff --git a/docs/InlineResponse2017.md b/docs/InlineResponse2017.md deleted file mode 100644 index 217d89bf..00000000 --- a/docs/InlineResponse2017.md +++ /dev/null @@ -1,20 +0,0 @@ -# CyberSource::InlineResponse2017 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] -**save** | **BOOLEAN** | save or not save. | [optional] -**name** | **String** | The description for this field is not available. | [optional] -**timezone** | **String** | Time Zone. | [optional] -**query** | **String** | transaction search query string. | [optional] -**offset** | **Integer** | offset. | [optional] -**limit** | **Integer** | limit on number of results. | [optional] -**sort** | **String** | A comma separated list of the following form - fieldName1 asc or desc, fieldName2 asc or desc, etc. | [optional] -**count** | **Integer** | Results for this page, this could be below the limit. | [optional] -**total_count** | **Integer** | total number of results. | [optional] -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] -**_embedded** | [**InlineResponse2017Embedded**](InlineResponse2017Embedded.md) | | [optional] -**_links** | [**InlineResponse2011Links**](InlineResponse2011Links.md) | | [optional] - - diff --git a/docs/InlineResponse2017Embedded.md b/docs/InlineResponse2017Embedded.md deleted file mode 100644 index d4c57c8c..00000000 --- a/docs/InlineResponse2017Embedded.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2017Embedded - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transaction_summaries** | [**Array<InlineResponse2017EmbeddedTransactionSummaries>**](InlineResponse2017EmbeddedTransactionSummaries.md) | transaction search summary | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedBuyerInformation.md b/docs/InlineResponse2017EmbeddedBuyerInformation.md deleted file mode 100644 index aede3941..00000000 --- a/docs/InlineResponse2017EmbeddedBuyerInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedBuyerInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**merchant_customer_id** | **String** | Your identifier for the customer. For processor-specific information, see the customer_account_id field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedClientReferenceInformation.md b/docs/InlineResponse2017EmbeddedClientReferenceInformation.md deleted file mode 100644 index 83b792ea..00000000 --- a/docs/InlineResponse2017EmbeddedClientReferenceInformation.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedClientReferenceInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **String** | Client-generated order reference or tracking number. CyberSource recommends that you send a unique value for each transaction so that you can perform meaningful searches for the transaction. | [optional] -**application_name** | **String** | The application name of client which is used to submit the request. | [optional] -**application_user** | **String** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedConsumerAuthenticationInformation.md b/docs/InlineResponse2017EmbeddedConsumerAuthenticationInformation.md deleted file mode 100644 index 21575395..00000000 --- a/docs/InlineResponse2017EmbeddedConsumerAuthenticationInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedConsumerAuthenticationInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**xid** | **String** | Transaction identifier. | [optional] -**transaction_id** | **String** | Payer auth Transaction identifier. | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedDeviceInformation.md b/docs/InlineResponse2017EmbeddedDeviceInformation.md deleted file mode 100644 index ac238818..00000000 --- a/docs/InlineResponse2017EmbeddedDeviceInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedDeviceInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ip_address** | **String** | IP address of the customer. | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedLinks.md b/docs/InlineResponse2017EmbeddedLinks.md deleted file mode 100644 index 720e5c6f..00000000 --- a/docs/InlineResponse2017EmbeddedLinks.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedLinks - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transaction_detail** | [**InlineResponse201LinksSelf**](InlineResponse201LinksSelf.md) | | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedMerchantInformation.md b/docs/InlineResponse2017EmbeddedMerchantInformation.md deleted file mode 100644 index 752087cc..00000000 --- a/docs/InlineResponse2017EmbeddedMerchantInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedMerchantInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reseller_id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedOrderInformation.md b/docs/InlineResponse2017EmbeddedOrderInformation.md deleted file mode 100644 index f4bb0055..00000000 --- a/docs/InlineResponse2017EmbeddedOrderInformation.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedOrderInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bill_to** | [**InlineResponse2017EmbeddedOrderInformationBillTo**](InlineResponse2017EmbeddedOrderInformationBillTo.md) | | [optional] -**ship_to** | [**InlineResponse2017EmbeddedOrderInformationShipTo**](InlineResponse2017EmbeddedOrderInformationShipTo.md) | | [optional] -**amount_details** | [**Ptsv2paymentsidreversalsReversalInformationAmountDetails**](Ptsv2paymentsidreversalsReversalInformationAmountDetails.md) | | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedOrderInformationBillTo.md b/docs/InlineResponse2017EmbeddedOrderInformationBillTo.md deleted file mode 100644 index 4abebaa5..00000000 --- a/docs/InlineResponse2017EmbeddedOrderInformationBillTo.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedOrderInformationBillTo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**first_name** | **String** | Customer’s first name. This name must be the same as the name on the card. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the customer_firstname field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**last_name** | **String** | Customer’s last name. This name must be the same as the name on the card. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the customer_lastname field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**email** | **String** | Customer's email address, including the full domain name. For processor-specific information, see the customer_email field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**country** | **String** | Country of the billing address. Use the two-character ISO Standard Country Codes. For processor-specific information, see the bill_country field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**phone_number** | **String** | Customer’s phone number. For Payouts: This field may be sent only for FDC Compass. CyberSource recommends that you include the country code when the order is from outside the U.S. For processor-specific information, see the customer_phone field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedOrderInformationShipTo.md b/docs/InlineResponse2017EmbeddedOrderInformationShipTo.md deleted file mode 100644 index f1ac6eb4..00000000 --- a/docs/InlineResponse2017EmbeddedOrderInformationShipTo.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedOrderInformationShipTo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**first_name** | **String** | First name of the recipient. **Processor specific maximum length** - Litle: 25 - All other processors: 60 | [optional] -**last_name** | **String** | Last name of the recipient. **Processor specific maximum length** - Litle: 25 - All other processors: 60 | [optional] -**address1** | **String** | First line of the shipping address. | [optional] -**country** | **String** | Country of the shipping address. Use the two character ISO Standard Country Codes. | [optional] -**phone_number** | **String** | Phone number for the shipping address. | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedPaymentInformation.md b/docs/InlineResponse2017EmbeddedPaymentInformation.md deleted file mode 100644 index f1ebbe83..00000000 --- a/docs/InlineResponse2017EmbeddedPaymentInformation.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedPaymentInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**payment_method** | [**InlineResponse2017EmbeddedPaymentInformationPaymentMethod**](InlineResponse2017EmbeddedPaymentInformationPaymentMethod.md) | | [optional] -**customer** | [**Ptsv2paymentsPaymentInformationCustomer**](Ptsv2paymentsPaymentInformationCustomer.md) | | [optional] -**card** | [**InlineResponse2017EmbeddedPaymentInformationCard**](InlineResponse2017EmbeddedPaymentInformationCard.md) | | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedPaymentInformationCard.md b/docs/InlineResponse2017EmbeddedPaymentInformationCard.md deleted file mode 100644 index 3098667c..00000000 --- a/docs/InlineResponse2017EmbeddedPaymentInformationCard.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedPaymentInformationCard - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**suffix** | **String** | Last four digits of the cardholder’s account number. This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. | [optional] -**prefix** | **String** | The description for this field is not available. | [optional] -**type** | **String** | Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedPaymentInformationPaymentMethod.md b/docs/InlineResponse2017EmbeddedPaymentInformationPaymentMethod.md deleted file mode 100644 index d3a9ef67..00000000 --- a/docs/InlineResponse2017EmbeddedPaymentInformationPaymentMethod.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedPaymentInformationPaymentMethod - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedPointOfSaleInformation.md b/docs/InlineResponse2017EmbeddedPointOfSaleInformation.md deleted file mode 100644 index 83bc3991..00000000 --- a/docs/InlineResponse2017EmbeddedPointOfSaleInformation.md +++ /dev/null @@ -1,11 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedPointOfSaleInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**terminal_id** | **String** | Identifier for the terminal at your retail location. You can define this value yourself, but consult the processor for requirements. For Payouts: This field is applicable for CtV. | [optional] -**terminal_serial_number** | **String** | The description for this field is not available. | [optional] -**device_id** | **String** | The description for this field is not available. | [optional] -**partner** | [**InlineResponse2017EmbeddedPointOfSaleInformationPartner**](InlineResponse2017EmbeddedPointOfSaleInformationPartner.md) | | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedPointOfSaleInformationPartner.md b/docs/InlineResponse2017EmbeddedPointOfSaleInformationPartner.md deleted file mode 100644 index a8bd0b73..00000000 --- a/docs/InlineResponse2017EmbeddedPointOfSaleInformationPartner.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedPointOfSaleInformationPartner - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**original_transaction_id** | **String** | Network transaction identifier (TID). You can use this value to identify a specific transaction when you are discussing the transaction with your processor. Not all processors provide this value. | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedProcessingInformation.md b/docs/InlineResponse2017EmbeddedProcessingInformation.md deleted file mode 100644 index f2d4fc79..00000000 --- a/docs/InlineResponse2017EmbeddedProcessingInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedProcessingInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**payment_solution** | **String** | Type of digital payment solution that is being used for the transaction. Possible Values: - **visacheckout**: Visa Checkout. - **001**: Apple Pay. - **005**: Masterpass. Required for Masterpass transactions on OmniPay Direct. - **006**: Android Pay. - **008**: Samsung Pay. | [optional] -**business_application_id** | **String** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedProcessorInformation.md b/docs/InlineResponse2017EmbeddedProcessorInformation.md deleted file mode 100644 index 8369141a..00000000 --- a/docs/InlineResponse2017EmbeddedProcessorInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedProcessorInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**processor** | [**InlineResponse20012ProcessorInformationProcessor**](InlineResponse20012ProcessorInformationProcessor.md) | | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedRiskInformation.md b/docs/InlineResponse2017EmbeddedRiskInformation.md deleted file mode 100644 index 3eed8e37..00000000 --- a/docs/InlineResponse2017EmbeddedRiskInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedRiskInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**providers** | [**InlineResponse2017EmbeddedRiskInformationProviders**](InlineResponse2017EmbeddedRiskInformationProviders.md) | | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedRiskInformationProviders.md b/docs/InlineResponse2017EmbeddedRiskInformationProviders.md deleted file mode 100644 index 96cbbec8..00000000 --- a/docs/InlineResponse2017EmbeddedRiskInformationProviders.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedRiskInformationProviders - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fingerprint** | [**InlineResponse2017EmbeddedRiskInformationProvidersFingerprint**](InlineResponse2017EmbeddedRiskInformationProvidersFingerprint.md) | | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedRiskInformationProvidersFingerprint.md b/docs/InlineResponse2017EmbeddedRiskInformationProvidersFingerprint.md deleted file mode 100644 index 2b338ae3..00000000 --- a/docs/InlineResponse2017EmbeddedRiskInformationProvidersFingerprint.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedRiskInformationProvidersFingerprint - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**true_ipaddress** | **String** | The description for this field is not available. | [optional] -**hash** | **String** | The description for this field is not available. | [optional] -**smart_id** | **String** | The description for this field is not available. | [optional] - - diff --git a/docs/InlineResponse2017EmbeddedTransactionSummaries.md b/docs/InlineResponse2017EmbeddedTransactionSummaries.md deleted file mode 100644 index 329d2470..00000000 --- a/docs/InlineResponse2017EmbeddedTransactionSummaries.md +++ /dev/null @@ -1,25 +0,0 @@ -# CyberSource::InlineResponse2017EmbeddedTransactionSummaries - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] -**merchant_id** | **String** | The description for this field is not available. | [optional] -**application_information** | [**InlineResponse20012ApplicationInformation**](InlineResponse20012ApplicationInformation.md) | | [optional] -**buyer_information** | [**InlineResponse2017EmbeddedBuyerInformation**](InlineResponse2017EmbeddedBuyerInformation.md) | | [optional] -**client_reference_information** | [**InlineResponse2017EmbeddedClientReferenceInformation**](InlineResponse2017EmbeddedClientReferenceInformation.md) | | [optional] -**consumer_authentication_information** | [**InlineResponse2017EmbeddedConsumerAuthenticationInformation**](InlineResponse2017EmbeddedConsumerAuthenticationInformation.md) | | [optional] -**device_information** | [**InlineResponse2017EmbeddedDeviceInformation**](InlineResponse2017EmbeddedDeviceInformation.md) | | [optional] -**fraud_marking_information** | [**InlineResponse20012FraudMarkingInformation**](InlineResponse20012FraudMarkingInformation.md) | | [optional] -**merchant_defined_information** | [**Array<InlineResponse20012MerchantDefinedInformation>**](InlineResponse20012MerchantDefinedInformation.md) | The description for this field is not available. | [optional] -**merchant_information** | [**InlineResponse2017EmbeddedMerchantInformation**](InlineResponse2017EmbeddedMerchantInformation.md) | | [optional] -**order_information** | [**InlineResponse2017EmbeddedOrderInformation**](InlineResponse2017EmbeddedOrderInformation.md) | | [optional] -**payment_information** | [**InlineResponse2017EmbeddedPaymentInformation**](InlineResponse2017EmbeddedPaymentInformation.md) | | [optional] -**processing_information** | [**InlineResponse2017EmbeddedProcessingInformation**](InlineResponse2017EmbeddedProcessingInformation.md) | | [optional] -**processor_information** | [**InlineResponse2017EmbeddedProcessorInformation**](InlineResponse2017EmbeddedProcessorInformation.md) | | [optional] -**point_of_sale_information** | [**InlineResponse2017EmbeddedPointOfSaleInformation**](InlineResponse2017EmbeddedPointOfSaleInformation.md) | | [optional] -**risk_information** | [**InlineResponse2017EmbeddedRiskInformation**](InlineResponse2017EmbeddedRiskInformation.md) | | [optional] -**_links** | [**InlineResponse2017EmbeddedLinks**](InlineResponse2017EmbeddedLinks.md) | | [optional] - - diff --git a/docs/InlineResponse201ClientReferenceInformation.md b/docs/InlineResponse201ClientReferenceInformation.md deleted file mode 100644 index 325dba08..00000000 --- a/docs/InlineResponse201ClientReferenceInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse201ClientReferenceInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **String** | Client-generated order reference or tracking number. CyberSource recommends that you send a unique value for each transaction so that you can perform meaningful searches for the transaction. | [optional] - - diff --git a/docs/InlineResponse201ErrorInformation.md b/docs/InlineResponse201ErrorInformation.md deleted file mode 100644 index cdb9fb05..00000000 --- a/docs/InlineResponse201ErrorInformation.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse201ErrorInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reason** | **String** | The reason of the status. | [optional] -**message** | **String** | The detail message related to the status and reason listed above. | [optional] -**details** | [**Array<InlineResponse201ErrorInformationDetails>**](InlineResponse201ErrorInformationDetails.md) | | [optional] - - diff --git a/docs/InlineResponse201ErrorInformationDetails.md b/docs/InlineResponse201ErrorInformationDetails.md deleted file mode 100644 index a11eeef4..00000000 --- a/docs/InlineResponse201ErrorInformationDetails.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse201ErrorInformationDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**field** | **String** | This is the flattened JSON object field name/path that is either missing or invalid. | [optional] -**reason** | **String** | Possible reasons for the error. | [optional] - - diff --git a/docs/InlineResponse201Links.md b/docs/InlineResponse201Links.md deleted file mode 100644 index 99b5f01a..00000000 --- a/docs/InlineResponse201Links.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse201Links - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_self** | [**InlineResponse201LinksSelf**](InlineResponse201LinksSelf.md) | | [optional] -**reversal** | [**InlineResponse201LinksSelf**](InlineResponse201LinksSelf.md) | | [optional] -**capture** | [**InlineResponse201LinksSelf**](InlineResponse201LinksSelf.md) | | [optional] - - diff --git a/docs/InlineResponse201LinksSelf.md b/docs/InlineResponse201LinksSelf.md deleted file mode 100644 index 83fddc86..00000000 --- a/docs/InlineResponse201LinksSelf.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse201LinksSelf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**href** | **String** | URL | [optional] -**method** | **String** | HTTP method applied to above URL | [optional] - - diff --git a/docs/InlineResponse201OrderInformation.md b/docs/InlineResponse201OrderInformation.md deleted file mode 100644 index cd77fbad..00000000 --- a/docs/InlineResponse201OrderInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse201OrderInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount_details** | [**InlineResponse201OrderInformationAmountDetails**](InlineResponse201OrderInformationAmountDetails.md) | | [optional] -**invoice_details** | [**InlineResponse201OrderInformationInvoiceDetails**](InlineResponse201OrderInformationInvoiceDetails.md) | | [optional] - - diff --git a/docs/InlineResponse201OrderInformationAmountDetails.md b/docs/InlineResponse201OrderInformationAmountDetails.md deleted file mode 100644 index 3ce92a99..00000000 --- a/docs/InlineResponse201OrderInformationAmountDetails.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse201OrderInformationAmountDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total_amount** | **String** | Amount you requested for the payment or capture. This value is returned for partial authorizations. | [optional] -**authorized_amount** | **String** | Amount that was authorized. | [optional] -**currency** | **String** | Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. | [optional] - - diff --git a/docs/InlineResponse201OrderInformationInvoiceDetails.md b/docs/InlineResponse201OrderInformationInvoiceDetails.md deleted file mode 100644 index 2bd31234..00000000 --- a/docs/InlineResponse201OrderInformationInvoiceDetails.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse201OrderInformationInvoiceDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**level3_transmission_status** | **BOOLEAN** | Indicates whether CyberSource sent the Level III information to the processor. The possible values are: If your account is not enabled for Level III data or if you did not include the purchasing level field in your request, CyberSource does not include the Level III data in the request sent to the processor. For processor-specific information, see the bill_purchasing_level3_enabled field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) | [optional] - - diff --git a/docs/InlineResponse201PaymentInformation.md b/docs/InlineResponse201PaymentInformation.md deleted file mode 100644 index 1857cda9..00000000 --- a/docs/InlineResponse201PaymentInformation.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse201PaymentInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**card** | [**InlineResponse201PaymentInformationCard**](InlineResponse201PaymentInformationCard.md) | | [optional] -**tokenized_card** | [**InlineResponse201PaymentInformationTokenizedCard**](InlineResponse201PaymentInformationTokenizedCard.md) | | [optional] -**account_features** | [**InlineResponse201PaymentInformationAccountFeatures**](InlineResponse201PaymentInformationAccountFeatures.md) | | [optional] - - diff --git a/docs/InlineResponse201PaymentInformationAccountFeatures.md b/docs/InlineResponse201PaymentInformationAccountFeatures.md deleted file mode 100644 index cdcaf103..00000000 --- a/docs/InlineResponse201PaymentInformationAccountFeatures.md +++ /dev/null @@ -1,24 +0,0 @@ -# CyberSource::InlineResponse201PaymentInformationAccountFeatures - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_type** | **String** | Type of account. This value is returned only if you requested a balance inquiry. Possible values: - **00**: Not applicable or not specified - **10**: Savings account - **20**: Checking account - **30**: Credit card account - **40**: Universal account | [optional] -**account_status** | **String** | Possible values: - **N**: Nonregulated - **R**: Regulated `Note` This field is returned only for CyberSource through VisaNet. | [optional] -**balance_amount** | **String** | Remaining balance on the account. | [optional] -**balance_amount_type** | **String** | Type of amount. This value is returned only if you requested a balance inquiry. The issuer determines the value that is returned. Possible values for deposit accounts: - **01**: Current ledger (posted) balance. - **02**: Current available balance, which is typically the ledger balance less outstanding authorizations. Some depository institutions also include pending deposits and the credit or overdraft line associated with the account. Possible values for credit card accounts: - **01**: Credit amount remaining for customer (open to buy). - **02**: Credit limit. | [optional] -**currency** | **String** | Currency of the remaining balance on the account. For the possible values, see the ISO Standard Currency Codes. | [optional] -**balance_sign** | **String** | Sign for the remaining balance on the account. Returned only when the processor returns this value. Possible values: | [optional] -**affluence_indicator** | **String** | **Chase Paymentech Solutions** Indicates whether a customer has high credit limits. This information enables you to market high cost items to these customers and to understand the kinds of cards that high income customers are using. This field is supported for Visa, Mastercard, Discover, and Diners Club. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown **Litle** Flag that indicates that a Visa cardholder or Mastercard cardholder is in one of the affluent categories. Possible values: - **AFFLUENT**: High income customer with high spending pattern (>100k USD annual income and >40k USD annual card usage). - **MASS AFFLUENT**: High income customer (>100k USD annual income). **Processor specific maximum length**: - Chase Paymentech Solutions: 1 - Litle: 13 | [optional] -**category** | **String** | **CyberSource through VisaNet** Visa product ID. **GPN** Visa or Mastercard product ID. **Litle** Type of card used in the transaction. The only possible value is: - PREPAID: Prepaid Card **RBS WorldPay Atlanta** Type of card used in the transaction. Possible values: - **B**: Business Card - **O**: Noncommercial Card - **R**: Corporate Card - **S**: Purchase Card - **Blank**: Purchase card not supported **Maximum length for processors**: - CyberSource through VisaNet: 3 - GPN: 3 - Litle: 7 - RBS WorldPay Atlanta: 1 | [optional] -**commercial** | **String** | Indicates whether the card is a commercial card, which enables you to include Level II data in your transaction requests. This field is supported for Visa and Mastercard on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown | [optional] -**group** | **String** | Type of commercial card. This field is supported only for CyberSource through VisaNet. Possible values: - **B**: Business card - **R**: Corporate card - **S**: Purchasing card - **0**: Noncommercial card | [optional] -**health_care** | **String** | Indicates whether the card is a healthcare card. This field is supported for Visa and Mastercard on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown | [optional] -**payroll** | **String** | Indicates whether the card is a payroll card. This field is supported for Visa, Discover, Diners Club, and JCB on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown | [optional] -**level3_eligible** | **String** | Indicates whether the card is eligible for Level III interchange fees, which enables you to include Level III data in your transaction requests. This field is supported for Visa and Mastercard on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown | [optional] -**pinless_debit** | **String** | Indicates whether the card is a PINless debit card. This field is supported for Visa and Mastercard on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown | [optional] -**signature_debit** | **String** | Indicates whether the card is a signature debit card. This information enables you to alter the way an order is processed. For example, you might not want to reauthorize a transaction for a signature debit card, or you might want to perform reversals promptly for a signature debit card. This field is supported for Visa, Mastercard, and Maestro (International) on Chase Paymentech Solutions. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown | [optional] -**prepaid** | **String** | Indicates whether the card is a prepaid card. This information enables you to determine when a gift card or prepaid card is presented for use when establishing a new recurring, installment, or deferred billing relationship. This field is supported for Visa, Mastercard, Discover, Diners Club, and JCB on Chase Paymentech Solutions. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown | [optional] -**regulated** | **String** | Indicates whether the card is regulated according to the Durbin Amendment. If the card is regulated, the card issuer is subject to price caps and interchange rules. This field is supported for Visa, Mastercard, Discover, Diners Club, and JCB on Chase Paymentech Solutions. Possible values: - **Y**: Yes (assets greater than 10B USD) - **N**: No (assets less than 10B USD) - **X**: Not applicable / Unknown | [optional] - - diff --git a/docs/InlineResponse201PaymentInformationCard.md b/docs/InlineResponse201PaymentInformationCard.md deleted file mode 100644 index cd356ae3..00000000 --- a/docs/InlineResponse201PaymentInformationCard.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse201PaymentInformationCard - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**suffix** | **String** | Last four digits of the cardholder’s account number. This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. | [optional] - - diff --git a/docs/InlineResponse201PaymentInformationTokenizedCard.md b/docs/InlineResponse201PaymentInformationTokenizedCard.md deleted file mode 100644 index cd625b16..00000000 --- a/docs/InlineResponse201PaymentInformationTokenizedCard.md +++ /dev/null @@ -1,14 +0,0 @@ -# CyberSource::InlineResponse201PaymentInformationTokenizedCard - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**prefix** | **String** | First six digits of token. CyberSource includes this field in the reply message when it decrypts the payment blob for the tokenized transaction. | [optional] -**suffix** | **String** | Last four digits of token. CyberSource includes this field in the reply message when it decrypts the payment blob for the tokenized transaction. | [optional] -**type** | **String** | Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover | [optional] -**assurance_level** | **String** | Confidence level of the tokenization. This value is assigned by the token service provider. `Note` This field is supported only for **CyberSource through VisaNet** and **FDC Nashville Global**. | [optional] -**expiration_month** | **String** | Two-digit month in which the payment network token expires. `Format: MM`. Possible values: 01 through 12. | [optional] -**expiration_year** | **String** | Four-digit year in which the payment network token expires. `Format: YYYY`. | [optional] -**requestor_id** | **String** | Value that identifies your business and indicates that the cardholder’s account number is tokenized. This value is assigned by the token service provider and is unique within the token service provider’s database. `Note` This field is supported only for **CyberSource through VisaNet** and **FDC Nashville Global**. | [optional] - - diff --git a/docs/InlineResponse201PointOfSaleInformation.md b/docs/InlineResponse201PointOfSaleInformation.md deleted file mode 100644 index 9f4bcfa9..00000000 --- a/docs/InlineResponse201PointOfSaleInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse201PointOfSaleInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**emv** | [**InlineResponse201PointOfSaleInformationEmv**](InlineResponse201PointOfSaleInformationEmv.md) | | [optional] -**amex_capn_data** | **String** | Point-of-sale details for the transaction. This value is returned only for **American Express Direct**. CyberSource generates this value, which consists of a series of codes that identify terminal capability, security data, and specific conditions present at the time the transaction occurred. To comply with the CAPN requirements, this value must be included in all subsequent follow-on requests, such as captures and follow-on credits. When you perform authorizations, captures, and credits through CyberSource, CyberSource passes this value from the authorization service to the subsequent services for you. However, when you perform authorizations through CyberSource and perform subsequent services through other financial institutions, you must ensure that your requests for captures and credits include this value. | [optional] - - diff --git a/docs/InlineResponse201PointOfSaleInformationEmv.md b/docs/InlineResponse201PointOfSaleInformationEmv.md deleted file mode 100644 index a6d76ce7..00000000 --- a/docs/InlineResponse201PointOfSaleInformationEmv.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse201PointOfSaleInformationEmv - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tags** | **String** | EMV data that is transmitted from the chip card to the issuer, and from the issuer to the chip card. The EMV data is in the tag-length-value format and includes chip card tags, terminal tags, and transaction detail tags. `Important` The following tags contain sensitive information and **must not** be included in this field: - **56**: Track 1 equivalent data - **57**: Track 2 equivalent data - **5A**: Application PAN - **5F20**: Cardholder name - **5F24**: Application expiration date (This sensitivity has been relaxed for cmcic, amexdirect, fdiglobal, opdfde, six) - **99**: Transaction PIN - **9F0B**: Cardholder name (extended) - **9F1F**: Track 1 discretionary data - **9F20**: Track 2 discretionary data For captures, this field is required for contact EMV transactions. Otherwise, it is optional. For credits, this field is required for contact EMV stand-alone credits and contactless EMV stand-alone credits. Otherwise, it is optional. `Important` For contact EMV captures, contact EMV stand-alone credits, and contactless EMV stand-alone credits, you must include the following tags in this field. For all other types of EMV transactions, the following tags are optional. - **95**: Terminal verification results - **9F10**: Issuer application data - **9F26**: Application cryptogram | [optional] - - diff --git a/docs/InlineResponse201ProcessorInformation.md b/docs/InlineResponse201ProcessorInformation.md deleted file mode 100644 index aa9d750f..00000000 --- a/docs/InlineResponse201ProcessorInformation.md +++ /dev/null @@ -1,32 +0,0 @@ -# CyberSource::InlineResponse201ProcessorInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**approval_code** | **String** | Authorization code. Returned only when the processor returns this value. | [optional] -**transaction_id** | **String** | Network transaction identifier (TID). You can use this value to identify a specific transaction when you are discussing the transaction with your processor. Not all processors provide this value. | [optional] -**network_transaction_id** | **String** | Description of this field is not available. | [optional] -**provider_transaction_id** | **String** | Description of this field is not available. | [optional] -**response_code** | **String** | For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of the authorization. | [optional] -**response_code_source** | **String** | Used by Visa only and contains the response source/reason code that identifies the source of the response decision. | [optional] -**response_details** | **String** | This field might contain information about a decline. This field is supported only for **CyberSource through VisaNet**. | [optional] -**response_category_code** | **String** | Processor-defined response category code. The associated detail error code is in the auth_auth_response field or the auth_reversal_auth_ response field depending on which service you requested. This field is supported only for: - Japanese issuers - Domestic transactions in Japan - Comercio Latino—processor transaction ID required for troubleshooting **Maximum length for processors**: - Comercio Latino: 32 - All other processors: 3 | [optional] -**forwarded_acquirer_code** | **String** | Name of the Japanese acquirer that processed the transaction. Returned only for CCS (CAFIS) and JCN Gateway. Please contact the CyberSource Japan Support Group for more information. | [optional] -**avs** | [**InlineResponse201ProcessorInformationAvs**](InlineResponse201ProcessorInformationAvs.md) | | [optional] -**card_verification** | [**InlineResponse201ProcessorInformationCardVerification**](InlineResponse201ProcessorInformationCardVerification.md) | | [optional] -**merchant_advice** | [**InlineResponse201ProcessorInformationMerchantAdvice**](InlineResponse201ProcessorInformationMerchantAdvice.md) | | [optional] -**electronic_verification_results** | [**InlineResponse201ProcessorInformationElectronicVerificationResults**](InlineResponse201ProcessorInformationElectronicVerificationResults.md) | | [optional] -**customer** | [**InlineResponse201ProcessorInformationCustomer**](InlineResponse201ProcessorInformationCustomer.md) | | [optional] -**consumer_authentication_response** | [**InlineResponse201ProcessorInformationConsumerAuthenticationResponse**](InlineResponse201ProcessorInformationConsumerAuthenticationResponse.md) | | [optional] -**issuer** | [**InlineResponse201ProcessorInformationIssuer**](InlineResponse201ProcessorInformationIssuer.md) | | [optional] -**system_trace_audit_number** | **String** | This field is returned only for **American Express Direct** and **CyberSource through VisaNet**. **American Express Direct** System trace audit number (STAN). This value identifies the transaction and is useful when investigating a chargeback dispute. **CyberSource through VisaNet** System trace number that must be printed on the customer’s receipt. | [optional] -**payment_account_reference_number** | **String** | Visa-generated reference number that identifies a card-present transaction for which youprovided one of the following: - Visa primary account number (PAN) - Visa-generated token for a PAN This reference number serves as a link to the cardholder account and to all transactions for that account. | [optional] -**transaction_integrity_code** | **String** | Transaction integrity classification provided by Mastercard. This value specifies Mastercard’s evaluation of the transaction’s safety and security. This field is returned only for **CyberSource through VisaNet**. For card-present transactions, possible values: - **A1**: EMV or token in a secure, trusted environment - **B1**: EMV or chip equivalent - **C1**: Magnetic stripe - **E1**: Key entered - **U0**: Unclassified For card-not-present transactions, possible values: - **A2**: Digital transactions - **B2**: Authenticated checkout - **C2**: Transaction validation - **D2**: Enhanced data - **E2**: Generic messaging - **U0**: Unclassified For information about these values, contact Mastercard or your acquirer. | [optional] -**amex_verbal_auth_reference_number** | **String** | Referral response number for a verbal authorization with FDMS Nashville when using an American Express card. Give this number to American Express when you call them for the verbal authorization. | [optional] -**sales_slip_number** | **Float** | Transaction identifier that CyberSource generates. You have the option of printing the sales slip number on the receipt. This field is supported only for **JCN Gateway**. | [optional] -**master_card_service_code** | **String** | Mastercard service that was used for the transaction. Mastercard provides this value to CyberSource. Possible value: - 53: Mastercard card-on-file token service | [optional] -**master_card_service_reply_code** | **String** | Result of the Mastercard card-on-file token service. Mastercard provides this value to CyberSource. Possible values: - **C**: Service completed successfully. - **F**: One of the following: - Incorrect Mastercard POS entry mode. The Mastercard POS entry mode should be 81 for an authorization or authorization reversal. - Incorrect Mastercard POS entry mode. The Mastercard POS entry mode should be 01 for a tokenized request. - Token requestor ID is missing or formatted incorrectly. - **I**: One of the following: - Invalid token requestor ID. - Suspended or deactivated token. - Invalid token (not in mapping table). - **T**: Invalid combination of token requestor ID and token. - **U**: Expired token. - **W**: Primary account number (PAN) listed in electronic warning bulletin. Note This field is returned only for **CyberSource through VisaNet**. | [optional] -**master_card_authentication_type** | **String** | Type of authentication for which the transaction qualifies as determined by the Mastercard authentication service, which confirms the identity of the cardholder. Mastercard provides this value to CyberSource. Possible values: - **1**: Transaction qualifies for Mastercard authentication type 1. - **2**: Transaction qualifies for Mastercard authentication type 2. | [optional] -**name** | **String** | Name of the Processor. | [optional] - - diff --git a/docs/InlineResponse201ProcessorInformationAvs.md b/docs/InlineResponse201ProcessorInformationAvs.md deleted file mode 100644 index eff2029c..00000000 --- a/docs/InlineResponse201ProcessorInformationAvs.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse201ProcessorInformationAvs - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **String** | AVS result code. | [optional] -**code_raw** | **String** | AVS result code sent directly from the processor. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of AVS. Use for debugging purposes only. | [optional] - - diff --git a/docs/InlineResponse201ProcessorInformationCardVerification.md b/docs/InlineResponse201ProcessorInformationCardVerification.md deleted file mode 100644 index ded4ec79..00000000 --- a/docs/InlineResponse201ProcessorInformationCardVerification.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse201ProcessorInformationCardVerification - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**result_code** | **String** | CVN result code. | [optional] -**result_code_raw** | **String** | CVN result code sent directly from the processor. Returned only when the processor returns this value. `Important` Do not use this field to evaluate the result of card verification. Use for debugging purposes only. | [optional] - - diff --git a/docs/InlineResponse201ProcessorInformationConsumerAuthenticationResponse.md b/docs/InlineResponse201ProcessorInformationConsumerAuthenticationResponse.md deleted file mode 100644 index 6a76e070..00000000 --- a/docs/InlineResponse201ProcessorInformationConsumerAuthenticationResponse.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse201ProcessorInformationConsumerAuthenticationResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **String** | Mapped response code for Verified by Visa and American Express SafeKey: | [optional] -**code_raw** | **String** | Raw response code sent directly from the processor for Verified by Visa and American Express SafeKey: | [optional] - - diff --git a/docs/InlineResponse201ProcessorInformationCustomer.md b/docs/InlineResponse201ProcessorInformationCustomer.md deleted file mode 100644 index 3bc80553..00000000 --- a/docs/InlineResponse201ProcessorInformationCustomer.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse201ProcessorInformationCustomer - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**personal_id_result** | **String** | Personal identifier result. This field is supported only for Redecard in Brazil for CyberSource Latin American Processing. If you included _buyerInformation.personalIdentification[].ID_ in the request, this value indicates whether or not _buyerInformation.personalIdentification[].ID_ matched a value in a record on file. Returned only when the personal ID result is returned by the processor. Possible values: - **Y**: Match - **N**: No match - **K**: Not supported - **U**: Unknown - **Z**: No response returned | [optional] - - diff --git a/docs/InlineResponse201ProcessorInformationElectronicVerificationResults.md b/docs/InlineResponse201ProcessorInformationElectronicVerificationResults.md deleted file mode 100644 index 385b5675..00000000 --- a/docs/InlineResponse201ProcessorInformationElectronicVerificationResults.md +++ /dev/null @@ -1,19 +0,0 @@ -# CyberSource::InlineResponse201ProcessorInformationElectronicVerificationResults - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **String** | Mapped Electronic Verification response code for the customer’s name. | [optional] -**code_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s last name | [optional] -**email** | **String** | Mapped Electronic Verification response code for the customer’s email address. | [optional] -**email_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s email address. | [optional] -**phone_number** | **String** | Mapped Electronic Verification response code for the customer’s phone number. | [optional] -**phone_number_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s phone number. | [optional] -**postal_code** | **String** | Mapped Electronic Verification response code for the customer’s postal code. | [optional] -**postal_code_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s postal code. | [optional] -**street** | **String** | Mapped Electronic Verification response code for the customer’s street address. | [optional] -**street_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s street address. | [optional] -**name** | **String** | TODO | [optional] -**name_raw** | **String** | TODO | [optional] - - diff --git a/docs/InlineResponse201ProcessorInformationIssuer.md b/docs/InlineResponse201ProcessorInformationIssuer.md deleted file mode 100644 index 0c457119..00000000 --- a/docs/InlineResponse201ProcessorInformationIssuer.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse201ProcessorInformationIssuer - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**country** | **String** | Country in which the card was issued. This information enables you to determine whether the card was issued domestically or internationally. Use the two-character ISO Standard Country Codes. This field is supported for Visa, Mastercard, Discover, Diners Club, JCB, and Maestro (International) on Chase Paymentech Solutions. | [optional] -**discretionary_data** | **String** | Data defined by the issuer. The value for this reply field will probably be the same as the value that you submitted in the authorization request, but it is possible for the processor, issuer, or acquirer to modify the value. This field is supported only for Visa transactions on **CyberSource through VisaNet**. | [optional] - - diff --git a/docs/InlineResponse201ProcessorInformationMerchantAdvice.md b/docs/InlineResponse201ProcessorInformationMerchantAdvice.md deleted file mode 100644 index 8e4c120f..00000000 --- a/docs/InlineResponse201ProcessorInformationMerchantAdvice.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse201ProcessorInformationMerchantAdvice - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **String** | Reason the recurring payment transaction was declined. For some processors, this field is used only for Mastercard. For other processors, this field is used for Visa and Mastercard. And for other processors, this field is not implemented. Possible values: - **00**: Response not provided. - **01**: New account information is available. Obtain the new information. - **02**: Try again later. - **03**: Do not try again. Obtain another type of payment from the customer. - **04**: Problem with a token or a partial shipment indicator. - **21**: Recurring payment cancellation service. - **99**: An unknown value was returned from the processor. | [optional] -**code_raw** | **String** | Raw merchant advice code sent directly from the processor. This field is used only for Mastercard. For processor-specific information, see the auth_merchant_advice_code_raw field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] - - diff --git a/docs/InlineResponse400.md b/docs/InlineResponse400.md index bba042b5..9054f28b 100644 --- a/docs/InlineResponse400.md +++ b/docs/InlineResponse400.md @@ -3,10 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] -**status** | **String** | The status of the submitted transaction. | [optional] -**reason** | **String** | The reason of the status. | [optional] -**message** | **String** | The detail message related to the status and reason listed above. | [optional] -**details** | [**Array<InlineResponse201ErrorInformationDetails>**](InlineResponse201ErrorInformationDetails.md) | | [optional] +**type** | **String** | | [optional] +**message** | **String** | The detailed message related to the type stated above. | [optional] +**details** | [**Tmsv1instrumentidentifiersDetails**](Tmsv1instrumentidentifiersDetails.md) | | [optional] diff --git a/docs/InlineResponse4001.md b/docs/InlineResponse4001.md deleted file mode 100644 index eed9e055..00000000 --- a/docs/InlineResponse4001.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::InlineResponse4001 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] -**status** | **String** | The status of the submitted transaction. | [optional] -**reason** | **String** | The reason of the status. | [optional] -**message** | **String** | The detail message related to the status and reason listed above. | [optional] -**details** | [**Array<InlineResponse201ErrorInformationDetails>**](InlineResponse201ErrorInformationDetails.md) | | [optional] - - diff --git a/docs/InlineResponse4002.md b/docs/InlineResponse4002.md deleted file mode 100644 index 1a1f5900..00000000 --- a/docs/InlineResponse4002.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::InlineResponse4002 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] -**status** | **String** | The status of the submitted transaction. | [optional] -**reason** | **String** | The reason of the status. | [optional] -**message** | **String** | The detail message related to the status and reason listed above. | [optional] -**details** | [**Array<InlineResponse201ErrorInformationDetails>**](InlineResponse201ErrorInformationDetails.md) | | [optional] - - diff --git a/docs/InlineResponse4003.md b/docs/InlineResponse4003.md deleted file mode 100644 index d093a9ca..00000000 --- a/docs/InlineResponse4003.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::InlineResponse4003 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] -**status** | **String** | The status of the submitted transaction. | [optional] -**reason** | **String** | The reason of the status. | [optional] -**message** | **String** | The detail message related to the status and reason listed above. | [optional] -**details** | [**Array<InlineResponse201ErrorInformationDetails>**](InlineResponse201ErrorInformationDetails.md) | | [optional] - - diff --git a/docs/InlineResponse4004.md b/docs/InlineResponse4004.md deleted file mode 100644 index 2528909e..00000000 --- a/docs/InlineResponse4004.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::InlineResponse4004 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] -**status** | **String** | The status of the submitted transaction. | [optional] -**reason** | **String** | The reason of the status. | [optional] -**message** | **String** | The detail message related to the status and reason listed above. | [optional] -**details** | [**Array<InlineResponse201ErrorInformationDetails>**](InlineResponse201ErrorInformationDetails.md) | | [optional] - - diff --git a/docs/InlineResponse4005.md b/docs/InlineResponse4005.md deleted file mode 100644 index 602f28cc..00000000 --- a/docs/InlineResponse4005.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse4005 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_information** | [**InlineResponse4005ErrorInformation**](InlineResponse4005ErrorInformation.md) | | [optional] -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] - - diff --git a/docs/InlineResponse4005ErrorInformation.md b/docs/InlineResponse4005ErrorInformation.md deleted file mode 100644 index 82c9f5f2..00000000 --- a/docs/InlineResponse4005ErrorInformation.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse4005ErrorInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reason** | **String** | | [optional] -**message** | **String** | | [optional] -**details** | [**Array<InlineResponse4005ErrorInformationDetails>**](InlineResponse4005ErrorInformationDetails.md) | | [optional] - - diff --git a/docs/InlineResponse4005ErrorInformationDetails.md b/docs/InlineResponse4005ErrorInformationDetails.md deleted file mode 100644 index 523db669..00000000 --- a/docs/InlineResponse4005ErrorInformationDetails.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse4005ErrorInformationDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**field** | **String** | This is the flattened JSON object field name/path that is either missing or invalid. | [optional] -**message** | **String** | The detailed message related to the status and reason listed above. | [optional] - - diff --git a/docs/InlineResponse4006.md b/docs/InlineResponse4006.md deleted file mode 100644 index 348056c2..00000000 --- a/docs/InlineResponse4006.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::InlineResponse4006 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] -**status** | **String** | The status of the submitted transaction. | [optional] -**reason** | **String** | The reason of the status. | [optional] -**message** | **String** | The detail message related to the status and reason listed above. Possible value is: - Your aggregator or acquirer is not accepting transactions from you at this time. - Your aggregator or acquirer is not accepting this transaction. - CyberSource declined the request because the credit card has expired. You might also receive this value if the expiration date you provided does not match the date the issuing bank has on file. - The bank declined the transaction. - The merchant reference number for this authorization request matches the merchant reference number of another authorization request that you sent within the past 15 minutes. Resend the request with a unique merchant reference number. - The credit card number did not pass CyberSource basic checks. - Data provided is not consistent with the request. For example, you requested a product with negative cost. - The request is missing a required field. | [optional] -**details** | [**Array<InlineResponse201ErrorInformationDetails>**](InlineResponse201ErrorInformationDetails.md) | | [optional] - - diff --git a/docs/InlineResponse4007.md b/docs/InlineResponse4007.md deleted file mode 100644 index 4f0a209c..00000000 --- a/docs/InlineResponse4007.md +++ /dev/null @@ -1,13 +0,0 @@ -# CyberSource::InlineResponse4007 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **String** | Error code | -**message** | **String** | Error message | -**localization_key** | **String** | Localization Key Name | [optional] -**correlation_id** | **String** | Correlation Id | [optional] -**detail** | **String** | Error Detail | [optional] -**fields** | [**Array<InlineResponse4007Fields>**](InlineResponse4007Fields.md) | Error fields List | [optional] - - diff --git a/docs/InlineResponse4007Fields.md b/docs/InlineResponse4007Fields.md deleted file mode 100644 index cb4f06e1..00000000 --- a/docs/InlineResponse4007Fields.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse4007Fields - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**path** | **String** | Path of the failed property | [optional] -**message** | **String** | Error description about validation failed field | [optional] -**localization_key** | **String** | Localized Key Name | [optional] - - diff --git a/docs/InlineResponse4008.md b/docs/InlineResponse4008.md deleted file mode 100644 index 76ff53ac..00000000 --- a/docs/InlineResponse4008.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse4008 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | | [optional] -**message** | **String** | The detailed message related to the type stated above. | [optional] -**details** | [**Tmsv1instrumentidentifiersDetails**](Tmsv1instrumentidentifiersDetails.md) | | [optional] - - diff --git a/docs/InlineResponse4009.md b/docs/InlineResponse4009.md deleted file mode 100644 index 67df1180..00000000 --- a/docs/InlineResponse4009.md +++ /dev/null @@ -1,11 +0,0 @@ -# CyberSource::InlineResponse4009 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] -**status** | **String** | The status of the submitted transaction. | [optional] -**message** | **String** | The detail message related to the status and reason listed above. | [optional] -**details** | [**Array<InlineResponse201ErrorInformationDetails>**](InlineResponse201ErrorInformationDetails.md) | | [optional] - - diff --git a/docs/InlineResponse409.md b/docs/InlineResponse409.md deleted file mode 100644 index d47fc01a..00000000 --- a/docs/InlineResponse409.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse409 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_links** | [**InlineResponse409Links**](InlineResponse409Links.md) | | [optional] - - diff --git a/docs/InlineResponse409Links.md b/docs/InlineResponse409Links.md deleted file mode 100644 index bd63d63e..00000000 --- a/docs/InlineResponse409Links.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse409Links - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**payment_instruments** | [**InlineResponse409LinksPaymentInstruments**](InlineResponse409LinksPaymentInstruments.md) | | [optional] - - diff --git a/docs/InlineResponse409LinksPaymentInstruments.md b/docs/InlineResponse409LinksPaymentInstruments.md deleted file mode 100644 index 63774c70..00000000 --- a/docs/InlineResponse409LinksPaymentInstruments.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse409LinksPaymentInstruments - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**href** | **String** | | [optional] - - diff --git a/docs/InlineResponse500.md b/docs/InlineResponse500.md deleted file mode 100644 index 58086aef..00000000 --- a/docs/InlineResponse500.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse500 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_information** | [**InlineResponse500ErrorInformation**](InlineResponse500ErrorInformation.md) | | [optional] -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] - - diff --git a/docs/InlineResponse500ErrorInformation.md b/docs/InlineResponse500ErrorInformation.md deleted file mode 100644 index 16a91e1b..00000000 --- a/docs/InlineResponse500ErrorInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse500ErrorInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reason** | **String** | The reason of status | [optional] -**message** | **String** | The detailed message related to the status and reason listed above. | [optional] - - diff --git a/docs/InlineResponse502.md b/docs/InlineResponse502.md deleted file mode 100644 index 6d0857b9..00000000 --- a/docs/InlineResponse502.md +++ /dev/null @@ -1,11 +0,0 @@ -# CyberSource::InlineResponse502 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] -**status** | **String** | The status of the submitted transaction. | [optional] -**reason** | **String** | The reason of the status. | [optional] -**message** | **String** | The detail message related to the status and reason listed above. | [optional] - - diff --git a/docs/InstrumentIdentifierApi.md b/docs/InstrumentIdentifierApi.md index 76d2d62d..6272a37f 100644 --- a/docs/InstrumentIdentifierApi.md +++ b/docs/InstrumentIdentifierApi.md @@ -57,7 +57,7 @@ No authorization required # **tms_v1_instrumentidentifiers_token_id_get** -> InlineResponse20010 tms_v1_instrumentidentifiers_token_id_get(profile_id, token_id) +> TmsV1InstrumentidentifiersPost200Response tms_v1_instrumentidentifiers_token_id_get(profile_id, token_id) Retrieve an Instrument Identifier @@ -91,7 +91,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20010**](InlineResponse20010.md) +[**TmsV1InstrumentidentifiersPost200Response**](TmsV1InstrumentidentifiersPost200Response.md) ### Authorization @@ -105,7 +105,7 @@ No authorization required # **tms_v1_instrumentidentifiers_token_id_patch** -> InlineResponse20010 tms_v1_instrumentidentifiers_token_id_patch(profile_id, token_id, body) +> TmsV1InstrumentidentifiersPost200Response tms_v1_instrumentidentifiers_token_id_patch(profile_id, token_id, body) Update a Instrument Identifier @@ -142,7 +142,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20010**](InlineResponse20010.md) +[**TmsV1InstrumentidentifiersPost200Response**](TmsV1InstrumentidentifiersPost200Response.md) ### Authorization diff --git a/docs/InstrumentIdentifiersApi.md b/docs/InstrumentIdentifiersApi.md index da012ad7..d62c9bb1 100644 --- a/docs/InstrumentIdentifiersApi.md +++ b/docs/InstrumentIdentifiersApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **tms_v1_instrumentidentifiers_post** -> InlineResponse20010 tms_v1_instrumentidentifiers_post(profile_id, body) +> TmsV1InstrumentidentifiersPost200Response tms_v1_instrumentidentifiers_post(profile_id, body) Create an Instrument Identifier @@ -42,7 +42,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20010**](InlineResponse20010.md) +[**TmsV1InstrumentidentifiersPost200Response**](TmsV1InstrumentidentifiersPost200Response.md) ### Authorization diff --git a/docs/KeyGenerationApi.md b/docs/KeyGenerationApi.md index 3c5f87f5..f03221d7 100644 --- a/docs/KeyGenerationApi.md +++ b/docs/KeyGenerationApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **generate_public_key** -> InlineResponse200 generate_public_key(opts) +> FlexV1KeysPost200Response generate_public_key(opts) Generate Key @@ -42,7 +42,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse200**](InlineResponse200.md) +[**FlexV1KeysPost200Response**](FlexV1KeysPost200Response.md) ### Authorization diff --git a/docs/KeyResult.md b/docs/KeyResult.md index 4ee64e99..7846f01a 100644 --- a/docs/KeyResult.md +++ b/docs/KeyResult.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **key_id** | **String** | Unique identifier for the generated token. Used in the subsequent Tokenize Card request from your customer’s device or browser. | [optional] -**der** | [**InlineResponse200Der**](InlineResponse200Der.md) | | [optional] -**jwk** | [**InlineResponse200Jwk**](InlineResponse200Jwk.md) | | [optional] +**der** | [**FlexV1KeysPost200ResponseDer**](FlexV1KeysPost200ResponseDer.md) | | [optional] +**jwk** | [**FlexV1KeysPost200ResponseJwk**](FlexV1KeysPost200ResponseJwk.md) | | [optional] diff --git a/docs/NotificationOfChangesApi.md b/docs/NotificationOfChangesApi.md index 922a1150..b5684744 100644 --- a/docs/NotificationOfChangesApi.md +++ b/docs/NotificationOfChangesApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **get_notification_of_change_report** -> InlineResponse2003 get_notification_of_change_report(start_time, end_time) +> ReportingV3NotificationofChangesGet200Response get_notification_of_change_report(start_time, end_time) Get Notification Of Changes @@ -44,7 +44,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2003**](InlineResponse2003.md) +[**ReportingV3NotificationofChangesGet200Response**](ReportingV3NotificationofChangesGet200Response.md) ### Authorization diff --git a/docs/OctCreatePaymentRequest.md b/docs/OctCreatePaymentRequest.md deleted file mode 100644 index e01b9e56..00000000 --- a/docs/OctCreatePaymentRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# CyberSource::OctCreatePaymentRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_reference_information** | [**InlineResponse201ClientReferenceInformation**](InlineResponse201ClientReferenceInformation.md) | | [optional] -**order_information** | [**Ptsv2payoutsOrderInformation**](Ptsv2payoutsOrderInformation.md) | | [optional] -**merchant_information** | [**Ptsv2payoutsMerchantInformation**](Ptsv2payoutsMerchantInformation.md) | | [optional] -**recipient_information** | [**Ptsv2payoutsRecipientInformation**](Ptsv2payoutsRecipientInformation.md) | | [optional] -**sender_information** | [**Ptsv2payoutsSenderInformation**](Ptsv2payoutsSenderInformation.md) | | [optional] -**processing_information** | [**Ptsv2payoutsProcessingInformation**](Ptsv2payoutsProcessingInformation.md) | | [optional] -**payment_information** | [**Ptsv2payoutsPaymentInformation**](Ptsv2payoutsPaymentInformation.md) | | [optional] - - diff --git a/docs/PaymentInstrumentsApi.md b/docs/PaymentInstrumentsApi.md index f600de44..681e3e0b 100644 --- a/docs/PaymentInstrumentsApi.md +++ b/docs/PaymentInstrumentsApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description # **tms_v1_instrumentidentifiers_token_id_paymentinstruments_get** -> InlineResponse20011 tms_v1_instrumentidentifiers_token_id_paymentinstruments_get(profile_id, token_id, opts) +> TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response tms_v1_instrumentidentifiers_token_id_paymentinstruments_get(profile_id, token_id, opts) Retrieve all Payment Instruments associated with an Instrument Identifier @@ -52,7 +52,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20011**](InlineResponse20011.md) +[**TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response**](TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response.md) ### Authorization @@ -66,7 +66,7 @@ No authorization required # **tms_v1_paymentinstruments_post** -> InlineResponse2016 tms_v1_paymentinstruments_post(profile_id, body) +> TmsV1PaymentinstrumentsPost201Response tms_v1_paymentinstruments_post(profile_id, body) Create a Payment Instrument @@ -100,7 +100,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2016**](InlineResponse2016.md) +[**TmsV1PaymentinstrumentsPost201Response**](TmsV1PaymentinstrumentsPost201Response.md) ### Authorization @@ -161,7 +161,7 @@ No authorization required # **tms_v1_paymentinstruments_token_id_get** -> InlineResponse2016 tms_v1_paymentinstruments_token_id_get(profile_id, token_id) +> TmsV1PaymentinstrumentsPost201Response tms_v1_paymentinstruments_token_id_get(profile_id, token_id) Retrieve a Payment Instrument @@ -195,7 +195,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2016**](InlineResponse2016.md) +[**TmsV1PaymentinstrumentsPost201Response**](TmsV1PaymentinstrumentsPost201Response.md) ### Authorization @@ -209,7 +209,7 @@ No authorization required # **tms_v1_paymentinstruments_token_id_patch** -> InlineResponse2016 tms_v1_paymentinstruments_token_id_patch(profile_id, token_id, body) +> TmsV1PaymentinstrumentsPost201Response tms_v1_paymentinstruments_token_id_patch(profile_id, token_id, body) Update a Payment Instrument @@ -246,7 +246,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2016**](InlineResponse2016.md) +[**TmsV1PaymentinstrumentsPost201Response**](TmsV1PaymentinstrumentsPost201Response.md) ### Authorization diff --git a/docs/PaymentsApi.md b/docs/PaymentsApi.md index 871ca840..50b393b5 100644 --- a/docs/PaymentsApi.md +++ b/docs/PaymentsApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **create_payment** -> InlineResponse201 create_payment(create_payment_request) +> PtsV2PaymentsPost201Response create_payment(create_payment_request) Process a Payment @@ -41,7 +41,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse201**](InlineResponse201.md) +[**PtsV2PaymentsPost201Response**](PtsV2PaymentsPost201Response.md) ### Authorization diff --git a/docs/ProcessAPayoutApi.md b/docs/ProcessAPayoutApi.md index a07d5e29..f48c7626 100644 --- a/docs/ProcessAPayoutApi.md +++ b/docs/ProcessAPayoutApi.md @@ -21,7 +21,7 @@ require 'cybersource_rest_client' api_instance = CyberSource::ProcessAPayoutApi.new -oct_create_payment_request = CyberSource::OctCreatePaymentRequest.new # OctCreatePaymentRequest | +oct_create_payment_request = CyberSource::PtsV2PayoutsPostResponse.new # PtsV2PayoutsPostResponse | begin @@ -36,7 +36,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **oct_create_payment_request** | [**OctCreatePaymentRequest**](OctCreatePaymentRequest.md)| | + **oct_create_payment_request** | [**PtsV2PayoutsPostResponse**](PtsV2PayoutsPostResponse.md)| | ### Return type diff --git a/docs/PtsV1TransactionBatchesGet200Response.md b/docs/PtsV1TransactionBatchesGet200Response.md new file mode 100644 index 00000000..8f9155fc --- /dev/null +++ b/docs/PtsV1TransactionBatchesGet200Response.md @@ -0,0 +1,10 @@ +# CyberSource::PtsV1TransactionBatchesGet200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_batches** | [**Array<PtsV1TransactionBatchesGet200ResponseTransactionBatches>**](PtsV1TransactionBatchesGet200ResponseTransactionBatches.md) | | [optional] +**_links** | [**PtsV1TransactionBatchesGet200ResponseLinks**](PtsV1TransactionBatchesGet200ResponseLinks.md) | | [optional] +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] + + diff --git a/docs/PtsV1TransactionBatchesGet200ResponseLinks.md b/docs/PtsV1TransactionBatchesGet200ResponseLinks.md new file mode 100644 index 00000000..2516cce9 --- /dev/null +++ b/docs/PtsV1TransactionBatchesGet200ResponseLinks.md @@ -0,0 +1,8 @@ +# CyberSource::PtsV1TransactionBatchesGet200ResponseLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_self** | [**PtsV1TransactionBatchesGet200ResponseLinksSelf**](PtsV1TransactionBatchesGet200ResponseLinksSelf.md) | | [optional] + + diff --git a/docs/PtsV1TransactionBatchesGet200ResponseLinksSelf.md b/docs/PtsV1TransactionBatchesGet200ResponseLinksSelf.md new file mode 100644 index 00000000..4185ef15 --- /dev/null +++ b/docs/PtsV1TransactionBatchesGet200ResponseLinksSelf.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV1TransactionBatchesGet200ResponseLinksSelf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | | [optional] +**method** | **String** | | [optional] + + diff --git a/docs/PtsV1TransactionBatchesGet200ResponseTransactionBatches.md b/docs/PtsV1TransactionBatchesGet200ResponseTransactionBatches.md new file mode 100644 index 00000000..cba1fcb0 --- /dev/null +++ b/docs/PtsV1TransactionBatchesGet200ResponseTransactionBatches.md @@ -0,0 +1,14 @@ +# CyberSource::PtsV1TransactionBatchesGet200ResponseTransactionBatches + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Unique identifier assigned to the batch file. | [optional] +**upload_date** | **String** | Date when the batch template was update. | [optional] +**completion_date** | **String** | The date when the batch template processing completed. | [optional] +**transaction_count** | **Integer** | Number of transactions in the transaction. | [optional] +**accepted_transaction_count** | **Integer** | Number of transactions accepted. | [optional] +**rejected_transaction_count** | **String** | Number of transactions rejected. | [optional] +**status** | **String** | The status of you batch template processing. | [optional] + + diff --git a/docs/PtsV1TransactionBatchesGet400Response.md b/docs/PtsV1TransactionBatchesGet400Response.md new file mode 100644 index 00000000..50535087 --- /dev/null +++ b/docs/PtsV1TransactionBatchesGet400Response.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV1TransactionBatchesGet400Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error_information** | [**PtsV1TransactionBatchesGet400ResponseErrorInformation**](PtsV1TransactionBatchesGet400ResponseErrorInformation.md) | | [optional] +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] + + diff --git a/docs/PtsV1TransactionBatchesGet400ResponseErrorInformation.md b/docs/PtsV1TransactionBatchesGet400ResponseErrorInformation.md new file mode 100644 index 00000000..9b5d6e29 --- /dev/null +++ b/docs/PtsV1TransactionBatchesGet400ResponseErrorInformation.md @@ -0,0 +1,10 @@ +# CyberSource::PtsV1TransactionBatchesGet400ResponseErrorInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason** | **String** | | [optional] +**message** | **String** | | [optional] +**details** | [**Array<PtsV1TransactionBatchesGet400ResponseErrorInformationDetails>**](PtsV1TransactionBatchesGet400ResponseErrorInformationDetails.md) | | [optional] + + diff --git a/docs/PtsV1TransactionBatchesGet400ResponseErrorInformationDetails.md b/docs/PtsV1TransactionBatchesGet400ResponseErrorInformationDetails.md new file mode 100644 index 00000000..c130f88f --- /dev/null +++ b/docs/PtsV1TransactionBatchesGet400ResponseErrorInformationDetails.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV1TransactionBatchesGet400ResponseErrorInformationDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field** | **String** | This is the flattened JSON object field name/path that is either missing or invalid. | [optional] +**message** | **String** | The detailed message related to the status and reason listed above. | [optional] + + diff --git a/docs/PtsV1TransactionBatchesGet500Response.md b/docs/PtsV1TransactionBatchesGet500Response.md new file mode 100644 index 00000000..8a83153e --- /dev/null +++ b/docs/PtsV1TransactionBatchesGet500Response.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV1TransactionBatchesGet500Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error_information** | [**PtsV1TransactionBatchesGet500ResponseErrorInformation**](PtsV1TransactionBatchesGet500ResponseErrorInformation.md) | | [optional] +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] + + diff --git a/docs/PtsV1TransactionBatchesGet500ResponseErrorInformation.md b/docs/PtsV1TransactionBatchesGet500ResponseErrorInformation.md new file mode 100644 index 00000000..41b3c055 --- /dev/null +++ b/docs/PtsV1TransactionBatchesGet500ResponseErrorInformation.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV1TransactionBatchesGet500ResponseErrorInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason** | **String** | The reason of status | [optional] +**message** | **String** | The detailed message related to the status and reason listed above. | [optional] + + diff --git a/docs/PtsV2CreditsPost201Response.md b/docs/PtsV2CreditsPost201Response.md new file mode 100644 index 00000000..04e8e5be --- /dev/null +++ b/docs/PtsV2CreditsPost201Response.md @@ -0,0 +1,16 @@ +# CyberSource::PtsV2CreditsPost201Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**PtsV2PaymentsRefundPost201ResponseLinks**](PtsV2PaymentsRefundPost201ResponseLinks.md) | | [optional] +**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] +**status** | **String** | The status of the submitted transaction. | [optional] +**reconciliation_id** | **String** | The reconciliation id for the submitted transaction. This value is not returned for all processors. | [optional] +**client_reference_information** | [**PtsV2PaymentsPost201ResponseClientReferenceInformation**](PtsV2PaymentsPost201ResponseClientReferenceInformation.md) | | [optional] +**credit_amount_details** | [**PtsV2CreditsPost201ResponseCreditAmountDetails**](PtsV2CreditsPost201ResponseCreditAmountDetails.md) | | [optional] +**processor_information** | [**PtsV2PaymentsRefundPost201ResponseProcessorInformation**](PtsV2PaymentsRefundPost201ResponseProcessorInformation.md) | | [optional] +**order_information** | [**PtsV2PaymentsRefundPost201ResponseOrderInformation**](PtsV2PaymentsRefundPost201ResponseOrderInformation.md) | | [optional] + + diff --git a/docs/PtsV2CreditsPost201ResponseCreditAmountDetails.md b/docs/PtsV2CreditsPost201ResponseCreditAmountDetails.md new file mode 100644 index 00000000..09f43acc --- /dev/null +++ b/docs/PtsV2CreditsPost201ResponseCreditAmountDetails.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV2CreditsPost201ResponseCreditAmountDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**credit_amount** | **String** | Total amount of the credit. | [optional] +**currency** | **String** | Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. | [optional] + + diff --git a/docs/PtsV2PaymentsCapturesPost201Response.md b/docs/PtsV2PaymentsCapturesPost201Response.md new file mode 100644 index 00000000..9e29046b --- /dev/null +++ b/docs/PtsV2PaymentsCapturesPost201Response.md @@ -0,0 +1,15 @@ +# CyberSource::PtsV2PaymentsCapturesPost201Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**PtsV2PaymentsCapturesPost201ResponseLinks**](PtsV2PaymentsCapturesPost201ResponseLinks.md) | | [optional] +**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] +**status** | **String** | The status of the submitted transaction. | [optional] +**reconciliation_id** | **String** | The reconciliation id for the submitted transaction. This value is not returned for all processors. | [optional] +**client_reference_information** | [**PtsV2PaymentsPost201ResponseClientReferenceInformation**](PtsV2PaymentsPost201ResponseClientReferenceInformation.md) | | [optional] +**processor_information** | [**PtsV2PaymentsCapturesPost201ResponseProcessorInformation**](PtsV2PaymentsCapturesPost201ResponseProcessorInformation.md) | | [optional] +**order_information** | [**PtsV2PaymentsCapturesPost201ResponseOrderInformation**](PtsV2PaymentsCapturesPost201ResponseOrderInformation.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsCapturesPost201ResponseLinks.md b/docs/PtsV2PaymentsCapturesPost201ResponseLinks.md new file mode 100644 index 00000000..6c209896 --- /dev/null +++ b/docs/PtsV2PaymentsCapturesPost201ResponseLinks.md @@ -0,0 +1,10 @@ +# CyberSource::PtsV2PaymentsCapturesPost201ResponseLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_self** | [**PtsV2PaymentsPost201ResponseLinksSelf**](PtsV2PaymentsPost201ResponseLinksSelf.md) | | [optional] +**void** | [**PtsV2PaymentsPost201ResponseLinksSelf**](PtsV2PaymentsPost201ResponseLinksSelf.md) | | [optional] +**refund** | [**PtsV2PaymentsPost201ResponseLinksSelf**](PtsV2PaymentsPost201ResponseLinksSelf.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsCapturesPost201ResponseOrderInformation.md b/docs/PtsV2PaymentsCapturesPost201ResponseOrderInformation.md new file mode 100644 index 00000000..99617094 --- /dev/null +++ b/docs/PtsV2PaymentsCapturesPost201ResponseOrderInformation.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV2PaymentsCapturesPost201ResponseOrderInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount_details** | [**PtsV2PaymentsCapturesPost201ResponseOrderInformationAmountDetails**](PtsV2PaymentsCapturesPost201ResponseOrderInformationAmountDetails.md) | | [optional] +**invoice_details** | [**PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails**](PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsCapturesPost201ResponseOrderInformationAmountDetails.md b/docs/PtsV2PaymentsCapturesPost201ResponseOrderInformationAmountDetails.md new file mode 100644 index 00000000..76aea651 --- /dev/null +++ b/docs/PtsV2PaymentsCapturesPost201ResponseOrderInformationAmountDetails.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV2PaymentsCapturesPost201ResponseOrderInformationAmountDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_amount** | **String** | Amount you requested for the capture. | [optional] +**currency** | **String** | Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. | [optional] + + diff --git a/docs/PtsV2PaymentsCapturesPost201ResponseProcessorInformation.md b/docs/PtsV2PaymentsCapturesPost201ResponseProcessorInformation.md new file mode 100644 index 00000000..39f0fc65 --- /dev/null +++ b/docs/PtsV2PaymentsCapturesPost201ResponseProcessorInformation.md @@ -0,0 +1,8 @@ +# CyberSource::PtsV2PaymentsCapturesPost201ResponseProcessorInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_id** | **String** | Processor transaction ID. This value identifies the transaction on a host system. This value is supported only for Moneris. It contains this information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003: - Terminal ID = 66012345 - Shift number = 001 - Batch number = 069 - Transaction number = 003 | [optional] + + diff --git a/docs/PtsV2PaymentsCapturesPost400Response.md b/docs/PtsV2PaymentsCapturesPost400Response.md new file mode 100644 index 00000000..c72c0343 --- /dev/null +++ b/docs/PtsV2PaymentsCapturesPost400Response.md @@ -0,0 +1,12 @@ +# CyberSource::PtsV2PaymentsCapturesPost400Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] +**status** | **String** | The status of the submitted transaction. | [optional] +**reason** | **String** | The reason of the status. | [optional] +**message** | **String** | The detail message related to the status and reason listed above. | [optional] +**details** | [**Array<PtsV2PaymentsPost201ResponseErrorInformationDetails>**](PtsV2PaymentsPost201ResponseErrorInformationDetails.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsPost201Response.md b/docs/PtsV2PaymentsPost201Response.md new file mode 100644 index 00000000..1918b528 --- /dev/null +++ b/docs/PtsV2PaymentsPost201Response.md @@ -0,0 +1,18 @@ +# CyberSource::PtsV2PaymentsPost201Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**PtsV2PaymentsPost201ResponseLinks**](PtsV2PaymentsPost201ResponseLinks.md) | | [optional] +**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] +**status** | **String** | The status of the submitted transaction. | [optional] +**reconciliation_id** | **String** | The reconciliation id for the submitted transaction. This value is not returned for all processors. | [optional] +**error_information** | [**PtsV2PaymentsPost201ResponseErrorInformation**](PtsV2PaymentsPost201ResponseErrorInformation.md) | | [optional] +**client_reference_information** | [**PtsV2PaymentsPost201ResponseClientReferenceInformation**](PtsV2PaymentsPost201ResponseClientReferenceInformation.md) | | [optional] +**processor_information** | [**PtsV2PaymentsPost201ResponseProcessorInformation**](PtsV2PaymentsPost201ResponseProcessorInformation.md) | | [optional] +**payment_information** | [**PtsV2PaymentsPost201ResponsePaymentInformation**](PtsV2PaymentsPost201ResponsePaymentInformation.md) | | [optional] +**order_information** | [**PtsV2PaymentsPost201ResponseOrderInformation**](PtsV2PaymentsPost201ResponseOrderInformation.md) | | [optional] +**point_of_sale_information** | [**PtsV2PaymentsPost201ResponsePointOfSaleInformation**](PtsV2PaymentsPost201ResponsePointOfSaleInformation.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponseClientReferenceInformation.md b/docs/PtsV2PaymentsPost201ResponseClientReferenceInformation.md new file mode 100644 index 00000000..31f7f651 --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponseClientReferenceInformation.md @@ -0,0 +1,8 @@ +# CyberSource::PtsV2PaymentsPost201ResponseClientReferenceInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **String** | Client-generated order reference or tracking number. CyberSource recommends that you send a unique value for each transaction so that you can perform meaningful searches for the transaction. | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponseErrorInformation.md b/docs/PtsV2PaymentsPost201ResponseErrorInformation.md new file mode 100644 index 00000000..5ea39aea --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponseErrorInformation.md @@ -0,0 +1,10 @@ +# CyberSource::PtsV2PaymentsPost201ResponseErrorInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason** | **String** | The reason of the status. | [optional] +**message** | **String** | The detail message related to the status and reason listed above. | [optional] +**details** | [**Array<PtsV2PaymentsPost201ResponseErrorInformationDetails>**](PtsV2PaymentsPost201ResponseErrorInformationDetails.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponseErrorInformationDetails.md b/docs/PtsV2PaymentsPost201ResponseErrorInformationDetails.md new file mode 100644 index 00000000..e9003f6e --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponseErrorInformationDetails.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV2PaymentsPost201ResponseErrorInformationDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field** | **String** | This is the flattened JSON object field name/path that is either missing or invalid. | [optional] +**reason** | **String** | Possible reasons for the error. | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponseLinks.md b/docs/PtsV2PaymentsPost201ResponseLinks.md new file mode 100644 index 00000000..cea52588 --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponseLinks.md @@ -0,0 +1,10 @@ +# CyberSource::PtsV2PaymentsPost201ResponseLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_self** | [**PtsV2PaymentsPost201ResponseLinksSelf**](PtsV2PaymentsPost201ResponseLinksSelf.md) | | [optional] +**reversal** | [**PtsV2PaymentsPost201ResponseLinksSelf**](PtsV2PaymentsPost201ResponseLinksSelf.md) | | [optional] +**capture** | [**PtsV2PaymentsPost201ResponseLinksSelf**](PtsV2PaymentsPost201ResponseLinksSelf.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponseLinksSelf.md b/docs/PtsV2PaymentsPost201ResponseLinksSelf.md new file mode 100644 index 00000000..ba52dda1 --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponseLinksSelf.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV2PaymentsPost201ResponseLinksSelf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL | [optional] +**method** | **String** | HTTP method applied to above URL | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponseOrderInformation.md b/docs/PtsV2PaymentsPost201ResponseOrderInformation.md new file mode 100644 index 00000000..c24af180 --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponseOrderInformation.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV2PaymentsPost201ResponseOrderInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount_details** | [**PtsV2PaymentsPost201ResponseOrderInformationAmountDetails**](PtsV2PaymentsPost201ResponseOrderInformationAmountDetails.md) | | [optional] +**invoice_details** | [**PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails**](PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponseOrderInformationAmountDetails.md b/docs/PtsV2PaymentsPost201ResponseOrderInformationAmountDetails.md new file mode 100644 index 00000000..d27059cd --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponseOrderInformationAmountDetails.md @@ -0,0 +1,10 @@ +# CyberSource::PtsV2PaymentsPost201ResponseOrderInformationAmountDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_amount** | **String** | Amount you requested for the payment or capture. This value is returned for partial authorizations. | [optional] +**authorized_amount** | **String** | Amount that was authorized. | [optional] +**currency** | **String** | Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails.md b/docs/PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails.md new file mode 100644 index 00000000..0fc71d13 --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails.md @@ -0,0 +1,8 @@ +# CyberSource::PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**level3_transmission_status** | **BOOLEAN** | Indicates whether CyberSource sent the Level III information to the processor. The possible values are: If your account is not enabled for Level III data or if you did not include the purchasing level field in your request, CyberSource does not include the Level III data in the request sent to the processor. For processor-specific information, see the bill_purchasing_level3_enabled field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponsePaymentInformation.md b/docs/PtsV2PaymentsPost201ResponsePaymentInformation.md new file mode 100644 index 00000000..2a84bbdd --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponsePaymentInformation.md @@ -0,0 +1,10 @@ +# CyberSource::PtsV2PaymentsPost201ResponsePaymentInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**card** | [**PtsV2PaymentsPost201ResponsePaymentInformationCard**](PtsV2PaymentsPost201ResponsePaymentInformationCard.md) | | [optional] +**tokenized_card** | [**PtsV2PaymentsPost201ResponsePaymentInformationTokenizedCard**](PtsV2PaymentsPost201ResponsePaymentInformationTokenizedCard.md) | | [optional] +**account_features** | [**PtsV2PaymentsPost201ResponsePaymentInformationAccountFeatures**](PtsV2PaymentsPost201ResponsePaymentInformationAccountFeatures.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponsePaymentInformationAccountFeatures.md b/docs/PtsV2PaymentsPost201ResponsePaymentInformationAccountFeatures.md new file mode 100644 index 00000000..c9c9ab75 --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponsePaymentInformationAccountFeatures.md @@ -0,0 +1,24 @@ +# CyberSource::PtsV2PaymentsPost201ResponsePaymentInformationAccountFeatures + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_type** | **String** | Type of account. This value is returned only if you requested a balance inquiry. Possible values: - **00**: Not applicable or not specified - **10**: Savings account - **20**: Checking account - **30**: Credit card account - **40**: Universal account | [optional] +**account_status** | **String** | Possible values: - **N**: Nonregulated - **R**: Regulated `Note` This field is returned only for CyberSource through VisaNet. | [optional] +**balance_amount** | **String** | Remaining balance on the account. | [optional] +**balance_amount_type** | **String** | Type of amount. This value is returned only if you requested a balance inquiry. The issuer determines the value that is returned. Possible values for deposit accounts: - **01**: Current ledger (posted) balance. - **02**: Current available balance, which is typically the ledger balance less outstanding authorizations. Some depository institutions also include pending deposits and the credit or overdraft line associated with the account. Possible values for credit card accounts: - **01**: Credit amount remaining for customer (open to buy). - **02**: Credit limit. | [optional] +**currency** | **String** | Currency of the remaining balance on the account. For the possible values, see the ISO Standard Currency Codes. | [optional] +**balance_sign** | **String** | Sign for the remaining balance on the account. Returned only when the processor returns this value. Possible values: | [optional] +**affluence_indicator** | **String** | **Chase Paymentech Solutions** Indicates whether a customer has high credit limits. This information enables you to market high cost items to these customers and to understand the kinds of cards that high income customers are using. This field is supported for Visa, Mastercard, Discover, and Diners Club. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown **Litle** Flag that indicates that a Visa cardholder or Mastercard cardholder is in one of the affluent categories. Possible values: - **AFFLUENT**: High income customer with high spending pattern (>100k USD annual income and >40k USD annual card usage). - **MASS AFFLUENT**: High income customer (>100k USD annual income). **Processor specific maximum length**: - Chase Paymentech Solutions: 1 - Litle: 13 | [optional] +**category** | **String** | **CyberSource through VisaNet** Visa product ID. **GPN** Visa or Mastercard product ID. **Litle** Type of card used in the transaction. The only possible value is: - PREPAID: Prepaid Card **RBS WorldPay Atlanta** Type of card used in the transaction. Possible values: - **B**: Business Card - **O**: Noncommercial Card - **R**: Corporate Card - **S**: Purchase Card - **Blank**: Purchase card not supported **Maximum length for processors**: - CyberSource through VisaNet: 3 - GPN: 3 - Litle: 7 - RBS WorldPay Atlanta: 1 | [optional] +**commercial** | **String** | Indicates whether the card is a commercial card, which enables you to include Level II data in your transaction requests. This field is supported for Visa and Mastercard on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown | [optional] +**group** | **String** | Type of commercial card. This field is supported only for CyberSource through VisaNet. Possible values: - **B**: Business card - **R**: Corporate card - **S**: Purchasing card - **0**: Noncommercial card | [optional] +**health_care** | **String** | Indicates whether the card is a healthcare card. This field is supported for Visa and Mastercard on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown | [optional] +**payroll** | **String** | Indicates whether the card is a payroll card. This field is supported for Visa, Discover, Diners Club, and JCB on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown | [optional] +**level3_eligible** | **String** | Indicates whether the card is eligible for Level III interchange fees, which enables you to include Level III data in your transaction requests. This field is supported for Visa and Mastercard on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown | [optional] +**pinless_debit** | **String** | Indicates whether the card is a PINless debit card. This field is supported for Visa and Mastercard on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown | [optional] +**signature_debit** | **String** | Indicates whether the card is a signature debit card. This information enables you to alter the way an order is processed. For example, you might not want to reauthorize a transaction for a signature debit card, or you might want to perform reversals promptly for a signature debit card. This field is supported for Visa, Mastercard, and Maestro (International) on Chase Paymentech Solutions. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown | [optional] +**prepaid** | **String** | Indicates whether the card is a prepaid card. This information enables you to determine when a gift card or prepaid card is presented for use when establishing a new recurring, installment, or deferred billing relationship. This field is supported for Visa, Mastercard, Discover, Diners Club, and JCB on Chase Paymentech Solutions. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown | [optional] +**regulated** | **String** | Indicates whether the card is regulated according to the Durbin Amendment. If the card is regulated, the card issuer is subject to price caps and interchange rules. This field is supported for Visa, Mastercard, Discover, Diners Club, and JCB on Chase Paymentech Solutions. Possible values: - **Y**: Yes (assets greater than 10B USD) - **N**: No (assets less than 10B USD) - **X**: Not applicable / Unknown | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponsePaymentInformationCard.md b/docs/PtsV2PaymentsPost201ResponsePaymentInformationCard.md new file mode 100644 index 00000000..82811a9f --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponsePaymentInformationCard.md @@ -0,0 +1,8 @@ +# CyberSource::PtsV2PaymentsPost201ResponsePaymentInformationCard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**suffix** | **String** | Last four digits of the cardholder’s account number. This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponsePaymentInformationTokenizedCard.md b/docs/PtsV2PaymentsPost201ResponsePaymentInformationTokenizedCard.md new file mode 100644 index 00000000..e93e191b --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponsePaymentInformationTokenizedCard.md @@ -0,0 +1,14 @@ +# CyberSource::PtsV2PaymentsPost201ResponsePaymentInformationTokenizedCard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**prefix** | **String** | First six digits of token. CyberSource includes this field in the reply message when it decrypts the payment blob for the tokenized transaction. | [optional] +**suffix** | **String** | Last four digits of token. CyberSource includes this field in the reply message when it decrypts the payment blob for the tokenized transaction. | [optional] +**type** | **String** | Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover | [optional] +**assurance_level** | **String** | Confidence level of the tokenization. This value is assigned by the token service provider. `Note` This field is supported only for **CyberSource through VisaNet** and **FDC Nashville Global**. | [optional] +**expiration_month** | **String** | Two-digit month in which the payment network token expires. `Format: MM`. Possible values: 01 through 12. | [optional] +**expiration_year** | **String** | Four-digit year in which the payment network token expires. `Format: YYYY`. | [optional] +**requestor_id** | **String** | Value that identifies your business and indicates that the cardholder’s account number is tokenized. This value is assigned by the token service provider and is unique within the token service provider’s database. `Note` This field is supported only for **CyberSource through VisaNet** and **FDC Nashville Global**. | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponsePointOfSaleInformation.md b/docs/PtsV2PaymentsPost201ResponsePointOfSaleInformation.md new file mode 100644 index 00000000..670701aa --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponsePointOfSaleInformation.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV2PaymentsPost201ResponsePointOfSaleInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emv** | [**PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv**](PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv.md) | | [optional] +**amex_capn_data** | **String** | Point-of-sale details for the transaction. This value is returned only for **American Express Direct**. CyberSource generates this value, which consists of a series of codes that identify terminal capability, security data, and specific conditions present at the time the transaction occurred. To comply with the CAPN requirements, this value must be included in all subsequent follow-on requests, such as captures and follow-on credits. When you perform authorizations, captures, and credits through CyberSource, CyberSource passes this value from the authorization service to the subsequent services for you. However, when you perform authorizations through CyberSource and perform subsequent services through other financial institutions, you must ensure that your requests for captures and credits include this value. | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv.md b/docs/PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv.md new file mode 100644 index 00000000..71e54802 --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv.md @@ -0,0 +1,8 @@ +# CyberSource::PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tags** | **String** | EMV data that is transmitted from the chip card to the issuer, and from the issuer to the chip card. The EMV data is in the tag-length-value format and includes chip card tags, terminal tags, and transaction detail tags. `Important` The following tags contain sensitive information and **must not** be included in this field: - **56**: Track 1 equivalent data - **57**: Track 2 equivalent data - **5A**: Application PAN - **5F20**: Cardholder name - **5F24**: Application expiration date (This sensitivity has been relaxed for cmcic, amexdirect, fdiglobal, opdfde, six) - **99**: Transaction PIN - **9F0B**: Cardholder name (extended) - **9F1F**: Track 1 discretionary data - **9F20**: Track 2 discretionary data For captures, this field is required for contact EMV transactions. Otherwise, it is optional. For credits, this field is required for contact EMV stand-alone credits and contactless EMV stand-alone credits. Otherwise, it is optional. `Important` For contact EMV captures, contact EMV stand-alone credits, and contactless EMV stand-alone credits, you must include the following tags in this field. For all other types of EMV transactions, the following tags are optional. - **95**: Terminal verification results - **9F10**: Issuer application data - **9F26**: Application cryptogram | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponseProcessorInformation.md b/docs/PtsV2PaymentsPost201ResponseProcessorInformation.md new file mode 100644 index 00000000..e3d919ef --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponseProcessorInformation.md @@ -0,0 +1,32 @@ +# CyberSource::PtsV2PaymentsPost201ResponseProcessorInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**approval_code** | **String** | Authorization code. Returned only when the processor returns this value. | [optional] +**transaction_id** | **String** | Network transaction identifier (TID). You can use this value to identify a specific transaction when you are discussing the transaction with your processor. Not all processors provide this value. | [optional] +**network_transaction_id** | **String** | Description of this field is not available. | [optional] +**provider_transaction_id** | **String** | Description of this field is not available. | [optional] +**response_code** | **String** | For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of the authorization. | [optional] +**response_code_source** | **String** | Used by Visa only and contains the response source/reason code that identifies the source of the response decision. | [optional] +**response_details** | **String** | This field might contain information about a decline. This field is supported only for **CyberSource through VisaNet**. | [optional] +**response_category_code** | **String** | Processor-defined response category code. The associated detail error code is in the auth_auth_response field or the auth_reversal_auth_ response field depending on which service you requested. This field is supported only for: - Japanese issuers - Domestic transactions in Japan - Comercio Latino—processor transaction ID required for troubleshooting **Maximum length for processors**: - Comercio Latino: 32 - All other processors: 3 | [optional] +**forwarded_acquirer_code** | **String** | Name of the Japanese acquirer that processed the transaction. Returned only for CCS (CAFIS) and JCN Gateway. Please contact the CyberSource Japan Support Group for more information. | [optional] +**avs** | [**PtsV2PaymentsPost201ResponseProcessorInformationAvs**](PtsV2PaymentsPost201ResponseProcessorInformationAvs.md) | | [optional] +**card_verification** | [**PtsV2PaymentsPost201ResponseProcessorInformationCardVerification**](PtsV2PaymentsPost201ResponseProcessorInformationCardVerification.md) | | [optional] +**merchant_advice** | [**PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdvice**](PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdvice.md) | | [optional] +**electronic_verification_results** | [**PtsV2PaymentsPost201ResponseProcessorInformationElectronicVerificationResults**](PtsV2PaymentsPost201ResponseProcessorInformationElectronicVerificationResults.md) | | [optional] +**customer** | [**PtsV2PaymentsPost201ResponseProcessorInformationCustomer**](PtsV2PaymentsPost201ResponseProcessorInformationCustomer.md) | | [optional] +**consumer_authentication_response** | [**PtsV2PaymentsPost201ResponseProcessorInformationConsumerAuthenticationResponse**](PtsV2PaymentsPost201ResponseProcessorInformationConsumerAuthenticationResponse.md) | | [optional] +**issuer** | [**PtsV2PaymentsPost201ResponseProcessorInformationIssuer**](PtsV2PaymentsPost201ResponseProcessorInformationIssuer.md) | | [optional] +**system_trace_audit_number** | **String** | This field is returned only for **American Express Direct** and **CyberSource through VisaNet**. **American Express Direct** System trace audit number (STAN). This value identifies the transaction and is useful when investigating a chargeback dispute. **CyberSource through VisaNet** System trace number that must be printed on the customer’s receipt. | [optional] +**payment_account_reference_number** | **String** | Visa-generated reference number that identifies a card-present transaction for which youprovided one of the following: - Visa primary account number (PAN) - Visa-generated token for a PAN This reference number serves as a link to the cardholder account and to all transactions for that account. | [optional] +**transaction_integrity_code** | **String** | Transaction integrity classification provided by Mastercard. This value specifies Mastercard’s evaluation of the transaction’s safety and security. This field is returned only for **CyberSource through VisaNet**. For card-present transactions, possible values: - **A1**: EMV or token in a secure, trusted environment - **B1**: EMV or chip equivalent - **C1**: Magnetic stripe - **E1**: Key entered - **U0**: Unclassified For card-not-present transactions, possible values: - **A2**: Digital transactions - **B2**: Authenticated checkout - **C2**: Transaction validation - **D2**: Enhanced data - **E2**: Generic messaging - **U0**: Unclassified For information about these values, contact Mastercard or your acquirer. | [optional] +**amex_verbal_auth_reference_number** | **String** | Referral response number for a verbal authorization with FDMS Nashville when using an American Express card. Give this number to American Express when you call them for the verbal authorization. | [optional] +**sales_slip_number** | **Float** | Transaction identifier that CyberSource generates. You have the option of printing the sales slip number on the receipt. This field is supported only for **JCN Gateway**. | [optional] +**master_card_service_code** | **String** | Mastercard service that was used for the transaction. Mastercard provides this value to CyberSource. Possible value: - 53: Mastercard card-on-file token service | [optional] +**master_card_service_reply_code** | **String** | Result of the Mastercard card-on-file token service. Mastercard provides this value to CyberSource. Possible values: - **C**: Service completed successfully. - **F**: One of the following: - Incorrect Mastercard POS entry mode. The Mastercard POS entry mode should be 81 for an authorization or authorization reversal. - Incorrect Mastercard POS entry mode. The Mastercard POS entry mode should be 01 for a tokenized request. - Token requestor ID is missing or formatted incorrectly. - **I**: One of the following: - Invalid token requestor ID. - Suspended or deactivated token. - Invalid token (not in mapping table). - **T**: Invalid combination of token requestor ID and token. - **U**: Expired token. - **W**: Primary account number (PAN) listed in electronic warning bulletin. Note This field is returned only for **CyberSource through VisaNet**. | [optional] +**master_card_authentication_type** | **String** | Type of authentication for which the transaction qualifies as determined by the Mastercard authentication service, which confirms the identity of the cardholder. Mastercard provides this value to CyberSource. Possible values: - **1**: Transaction qualifies for Mastercard authentication type 1. - **2**: Transaction qualifies for Mastercard authentication type 2. | [optional] +**name** | **String** | Name of the Processor. | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponseProcessorInformationAvs.md b/docs/PtsV2PaymentsPost201ResponseProcessorInformationAvs.md new file mode 100644 index 00000000..f7bc017d --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponseProcessorInformationAvs.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationAvs + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **String** | AVS result code. | [optional] +**code_raw** | **String** | AVS result code sent directly from the processor. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of AVS. Use for debugging purposes only. | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponseProcessorInformationCardVerification.md b/docs/PtsV2PaymentsPost201ResponseProcessorInformationCardVerification.md new file mode 100644 index 00000000..dc7d6198 --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponseProcessorInformationCardVerification.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationCardVerification + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result_code** | **String** | CVN result code. | [optional] +**result_code_raw** | **String** | CVN result code sent directly from the processor. Returned only when the processor returns this value. `Important` Do not use this field to evaluate the result of card verification. Use for debugging purposes only. | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponseProcessorInformationConsumerAuthenticationResponse.md b/docs/PtsV2PaymentsPost201ResponseProcessorInformationConsumerAuthenticationResponse.md new file mode 100644 index 00000000..31e05f68 --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponseProcessorInformationConsumerAuthenticationResponse.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationConsumerAuthenticationResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **String** | Mapped response code for Verified by Visa and American Express SafeKey: | [optional] +**code_raw** | **String** | Raw response code sent directly from the processor for Verified by Visa and American Express SafeKey: | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponseProcessorInformationCustomer.md b/docs/PtsV2PaymentsPost201ResponseProcessorInformationCustomer.md new file mode 100644 index 00000000..bb7ae846 --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponseProcessorInformationCustomer.md @@ -0,0 +1,8 @@ +# CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationCustomer + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**personal_id_result** | **String** | Personal identifier result. This field is supported only for Redecard in Brazil for CyberSource Latin American Processing. If you included _buyerInformation.personalIdentification[].ID_ in the request, this value indicates whether or not _buyerInformation.personalIdentification[].ID_ matched a value in a record on file. Returned only when the personal ID result is returned by the processor. Possible values: - **Y**: Match - **N**: No match - **K**: Not supported - **U**: Unknown - **Z**: No response returned | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponseProcessorInformationElectronicVerificationResults.md b/docs/PtsV2PaymentsPost201ResponseProcessorInformationElectronicVerificationResults.md new file mode 100644 index 00000000..abb2bfbb --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponseProcessorInformationElectronicVerificationResults.md @@ -0,0 +1,19 @@ +# CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationElectronicVerificationResults + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **String** | Mapped Electronic Verification response code for the customer’s name. | [optional] +**code_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s last name | [optional] +**email** | **String** | Mapped Electronic Verification response code for the customer’s email address. | [optional] +**email_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s email address. | [optional] +**phone_number** | **String** | Mapped Electronic Verification response code for the customer’s phone number. | [optional] +**phone_number_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s phone number. | [optional] +**postal_code** | **String** | Mapped Electronic Verification response code for the customer’s postal code. | [optional] +**postal_code_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s postal code. | [optional] +**street** | **String** | Mapped Electronic Verification response code for the customer’s street address. | [optional] +**street_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s street address. | [optional] +**name** | **String** | TODO | [optional] +**name_raw** | **String** | TODO | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponseProcessorInformationIssuer.md b/docs/PtsV2PaymentsPost201ResponseProcessorInformationIssuer.md new file mode 100644 index 00000000..6eaf0cbe --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponseProcessorInformationIssuer.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationIssuer + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country** | **String** | Country in which the card was issued. This information enables you to determine whether the card was issued domestically or internationally. Use the two-character ISO Standard Country Codes. This field is supported for Visa, Mastercard, Discover, Diners Club, JCB, and Maestro (International) on Chase Paymentech Solutions. | [optional] +**discretionary_data** | **String** | Data defined by the issuer. The value for this reply field will probably be the same as the value that you submitted in the authorization request, but it is possible for the processor, issuer, or acquirer to modify the value. This field is supported only for Visa transactions on **CyberSource through VisaNet**. | [optional] + + diff --git a/docs/PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdvice.md b/docs/PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdvice.md new file mode 100644 index 00000000..b1992e11 --- /dev/null +++ b/docs/PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdvice.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdvice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **String** | Reason the recurring payment transaction was declined. For some processors, this field is used only for Mastercard. For other processors, this field is used for Visa and Mastercard. And for other processors, this field is not implemented. Possible values: - **00**: Response not provided. - **01**: New account information is available. Obtain the new information. - **02**: Try again later. - **03**: Do not try again. Obtain another type of payment from the customer. - **04**: Problem with a token or a partial shipment indicator. - **21**: Recurring payment cancellation service. - **99**: An unknown value was returned from the processor. | [optional] +**code_raw** | **String** | Raw merchant advice code sent directly from the processor. This field is used only for Mastercard. For processor-specific information, see the auth_merchant_advice_code_raw field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] + + diff --git a/docs/PtsV2PaymentsPost400Response.md b/docs/PtsV2PaymentsPost400Response.md new file mode 100644 index 00000000..7e5c4103 --- /dev/null +++ b/docs/PtsV2PaymentsPost400Response.md @@ -0,0 +1,12 @@ +# CyberSource::PtsV2PaymentsPost400Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] +**status** | **String** | The status of the submitted transaction. | [optional] +**reason** | **String** | The reason of the status. | [optional] +**message** | **String** | The detail message related to the status and reason listed above. | [optional] +**details** | [**Array<PtsV2PaymentsPost201ResponseErrorInformationDetails>**](PtsV2PaymentsPost201ResponseErrorInformationDetails.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsPost502Response.md b/docs/PtsV2PaymentsPost502Response.md new file mode 100644 index 00000000..f4d692a5 --- /dev/null +++ b/docs/PtsV2PaymentsPost502Response.md @@ -0,0 +1,11 @@ +# CyberSource::PtsV2PaymentsPost502Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] +**status** | **String** | The status of the submitted transaction. | [optional] +**reason** | **String** | The reason of the status. | [optional] +**message** | **String** | The detail message related to the status and reason listed above. | [optional] + + diff --git a/docs/PtsV2PaymentsRefundPost201Response.md b/docs/PtsV2PaymentsRefundPost201Response.md new file mode 100644 index 00000000..30634dd7 --- /dev/null +++ b/docs/PtsV2PaymentsRefundPost201Response.md @@ -0,0 +1,16 @@ +# CyberSource::PtsV2PaymentsRefundPost201Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**PtsV2PaymentsRefundPost201ResponseLinks**](PtsV2PaymentsRefundPost201ResponseLinks.md) | | [optional] +**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] +**status** | **String** | The status of the submitted transaction. | [optional] +**reconciliation_id** | **String** | The reconciliation id for the submitted transaction. This value is not returned for all processors. | [optional] +**client_reference_information** | [**PtsV2PaymentsPost201ResponseClientReferenceInformation**](PtsV2PaymentsPost201ResponseClientReferenceInformation.md) | | [optional] +**refund_amount_details** | [**PtsV2PaymentsRefundPost201ResponseRefundAmountDetails**](PtsV2PaymentsRefundPost201ResponseRefundAmountDetails.md) | | [optional] +**processor_information** | [**PtsV2PaymentsRefundPost201ResponseProcessorInformation**](PtsV2PaymentsRefundPost201ResponseProcessorInformation.md) | | [optional] +**order_information** | [**PtsV2PaymentsRefundPost201ResponseOrderInformation**](PtsV2PaymentsRefundPost201ResponseOrderInformation.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsRefundPost201ResponseLinks.md b/docs/PtsV2PaymentsRefundPost201ResponseLinks.md new file mode 100644 index 00000000..2de60920 --- /dev/null +++ b/docs/PtsV2PaymentsRefundPost201ResponseLinks.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV2PaymentsRefundPost201ResponseLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_self** | [**PtsV2PaymentsPost201ResponseLinksSelf**](PtsV2PaymentsPost201ResponseLinksSelf.md) | | [optional] +**void** | [**PtsV2PaymentsPost201ResponseLinksSelf**](PtsV2PaymentsPost201ResponseLinksSelf.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsRefundPost201ResponseOrderInformation.md b/docs/PtsV2PaymentsRefundPost201ResponseOrderInformation.md new file mode 100644 index 00000000..4fe33503 --- /dev/null +++ b/docs/PtsV2PaymentsRefundPost201ResponseOrderInformation.md @@ -0,0 +1,8 @@ +# CyberSource::PtsV2PaymentsRefundPost201ResponseOrderInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invoice_details** | [**PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails**](PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsRefundPost201ResponseProcessorInformation.md b/docs/PtsV2PaymentsRefundPost201ResponseProcessorInformation.md new file mode 100644 index 00000000..ac911b5e --- /dev/null +++ b/docs/PtsV2PaymentsRefundPost201ResponseProcessorInformation.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV2PaymentsRefundPost201ResponseProcessorInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_id** | **String** | Processor transaction ID. This value identifies the transaction on a host system. This value is supported only for Moneris. It contains this information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003: - Terminal ID = 66012345 - Shift number = 001 - Batch number = 069 - Transaction number = 003 | [optional] +**forwarded_acquirer_code** | **String** | Name of the Japanese acquirer that processed the transaction. Returned only for CCS (CAFIS) and JCN Gateway. Please contact the CyberSource Japan Support Group for more information. | [optional] + + diff --git a/docs/PtsV2PaymentsRefundPost201ResponseRefundAmountDetails.md b/docs/PtsV2PaymentsRefundPost201ResponseRefundAmountDetails.md new file mode 100644 index 00000000..176258a7 --- /dev/null +++ b/docs/PtsV2PaymentsRefundPost201ResponseRefundAmountDetails.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV2PaymentsRefundPost201ResponseRefundAmountDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**refund_amount** | **String** | Total amount of the refund. | [optional] +**currency** | **String** | Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. | [optional] + + diff --git a/docs/PtsV2PaymentsRefundPost400Response.md b/docs/PtsV2PaymentsRefundPost400Response.md new file mode 100644 index 00000000..786ff875 --- /dev/null +++ b/docs/PtsV2PaymentsRefundPost400Response.md @@ -0,0 +1,12 @@ +# CyberSource::PtsV2PaymentsRefundPost400Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] +**status** | **String** | The status of the submitted transaction. | [optional] +**reason** | **String** | The reason of the status. | [optional] +**message** | **String** | The detail message related to the status and reason listed above. | [optional] +**details** | [**Array<PtsV2PaymentsPost201ResponseErrorInformationDetails>**](PtsV2PaymentsPost201ResponseErrorInformationDetails.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsReversalsPost201Response.md b/docs/PtsV2PaymentsReversalsPost201Response.md new file mode 100644 index 00000000..03b01f7a --- /dev/null +++ b/docs/PtsV2PaymentsReversalsPost201Response.md @@ -0,0 +1,17 @@ +# CyberSource::PtsV2PaymentsReversalsPost201Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**PtsV2PaymentsReversalsPost201ResponseLinks**](PtsV2PaymentsReversalsPost201ResponseLinks.md) | | [optional] +**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] +**status** | **String** | The status of the submitted transaction. | [optional] +**reconciliation_id** | **String** | The reconciliation id for the submitted transaction. This value is not returned for all processors. | [optional] +**client_reference_information** | [**PtsV2PaymentsPost201ResponseClientReferenceInformation**](PtsV2PaymentsPost201ResponseClientReferenceInformation.md) | | [optional] +**reversal_amount_details** | [**PtsV2PaymentsReversalsPost201ResponseReversalAmountDetails**](PtsV2PaymentsReversalsPost201ResponseReversalAmountDetails.md) | | [optional] +**processor_information** | [**PtsV2PaymentsReversalsPost201ResponseProcessorInformation**](PtsV2PaymentsReversalsPost201ResponseProcessorInformation.md) | | [optional] +**authorization_information** | [**PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation**](PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation.md) | | [optional] +**point_of_sale_information** | [**Ptsv2paymentsidreversalsPointOfSaleInformation**](Ptsv2paymentsidreversalsPointOfSaleInformation.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation.md b/docs/PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation.md new file mode 100644 index 00000000..db21e84a --- /dev/null +++ b/docs/PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation.md @@ -0,0 +1,9 @@ +# CyberSource::PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**approval_code** | **String** | The authorization code returned by the processor. | [optional] +**reason_code** | **String** | Reply flag for the original transaction. | [optional] + + diff --git a/docs/PtsV2PaymentsReversalsPost201ResponseLinks.md b/docs/PtsV2PaymentsReversalsPost201ResponseLinks.md new file mode 100644 index 00000000..648002b8 --- /dev/null +++ b/docs/PtsV2PaymentsReversalsPost201ResponseLinks.md @@ -0,0 +1,8 @@ +# CyberSource::PtsV2PaymentsReversalsPost201ResponseLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_self** | [**PtsV2PaymentsPost201ResponseLinksSelf**](PtsV2PaymentsPost201ResponseLinksSelf.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsReversalsPost201ResponseProcessorInformation.md b/docs/PtsV2PaymentsReversalsPost201ResponseProcessorInformation.md new file mode 100644 index 00000000..10187d28 --- /dev/null +++ b/docs/PtsV2PaymentsReversalsPost201ResponseProcessorInformation.md @@ -0,0 +1,13 @@ +# CyberSource::PtsV2PaymentsReversalsPost201ResponseProcessorInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_id** | **String** | Processor transaction ID. This value identifies the transaction on a host system. This value is supported only for Moneris. It contains this information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003: - Terminal ID = 66012345 - Shift number = 001 - Batch number = 069 - Transaction number = 003 | [optional] +**response_code** | **String** | For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of the authorization. | [optional] +**response_category_code** | **String** | Processor-defined response category code. The associated detail error code is in the auth_auth_response field or the auth_reversal_auth_ response field depending on which service you requested. This field is supported only for: - Japanese issuers - Domestic transactions in Japan - Comercio Latino—processor transaction ID required for troubleshooting **Maximum length for processors**: - Comercio Latino: 32 - All other processors: 3 | [optional] +**forwarded_acquirer_code** | **String** | Name of the Japanese acquirer that processed the transaction. Returned only for CCS (CAFIS) and JCN Gateway. Please contact the CyberSource Japan Support Group for more information. | [optional] +**master_card_service_code** | **String** | Mastercard service that was used for the transaction. Mastercard provides this value to CyberSource. Possible value: - 53: Mastercard card-on-file token service | [optional] +**master_card_service_reply_code** | **String** | Result of the Mastercard card-on-file token service. Mastercard provides this value to CyberSource. Possible values: - **C**: Service completed successfully. - **F**: One of the following: - Incorrect Mastercard POS entry mode. The Mastercard POS entry mode should be 81 for an authorization or authorization reversal. - Incorrect Mastercard POS entry mode. The Mastercard POS entry mode should be 01 for a tokenized request. - Token requestor ID is missing or formatted incorrectly. - **I**: One of the following: - Invalid token requestor ID. - Suspended or deactivated token. - Invalid token (not in mapping table). - **T**: Invalid combination of token requestor ID and token. - **U**: Expired token. - **W**: Primary account number (PAN) listed in electronic warning bulletin. Note This field is returned only for **CyberSource through VisaNet**. | [optional] + + diff --git a/docs/PtsV2PaymentsReversalsPost201ResponseReversalAmountDetails.md b/docs/PtsV2PaymentsReversalsPost201ResponseReversalAmountDetails.md new file mode 100644 index 00000000..68d12548 --- /dev/null +++ b/docs/PtsV2PaymentsReversalsPost201ResponseReversalAmountDetails.md @@ -0,0 +1,10 @@ +# CyberSource::PtsV2PaymentsReversalsPost201ResponseReversalAmountDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reversed_amount** | **String** | Total reversed amount. | [optional] +**original_transaction_amount** | **String** | Amount of the original transaction. | [optional] +**currency** | **String** | Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. | [optional] + + diff --git a/docs/PtsV2PaymentsReversalsPost400Response.md b/docs/PtsV2PaymentsReversalsPost400Response.md new file mode 100644 index 00000000..bceff065 --- /dev/null +++ b/docs/PtsV2PaymentsReversalsPost400Response.md @@ -0,0 +1,12 @@ +# CyberSource::PtsV2PaymentsReversalsPost400Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] +**status** | **String** | The status of the submitted transaction. | [optional] +**reason** | **String** | The reason of the status. | [optional] +**message** | **String** | The detail message related to the status and reason listed above. | [optional] +**details** | [**Array<PtsV2PaymentsPost201ResponseErrorInformationDetails>**](PtsV2PaymentsPost201ResponseErrorInformationDetails.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsVoidsPost201Response.md b/docs/PtsV2PaymentsVoidsPost201Response.md new file mode 100644 index 00000000..ac3cb3f1 --- /dev/null +++ b/docs/PtsV2PaymentsVoidsPost201Response.md @@ -0,0 +1,13 @@ +# CyberSource::PtsV2PaymentsVoidsPost201Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**PtsV2PaymentsReversalsPost201ResponseLinks**](PtsV2PaymentsReversalsPost201ResponseLinks.md) | | [optional] +**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] +**status** | **String** | The status of the submitted transaction. | [optional] +**client_reference_information** | [**PtsV2PaymentsPost201ResponseClientReferenceInformation**](PtsV2PaymentsPost201ResponseClientReferenceInformation.md) | | [optional] +**void_amount_details** | [**PtsV2PaymentsVoidsPost201ResponseVoidAmountDetails**](PtsV2PaymentsVoidsPost201ResponseVoidAmountDetails.md) | | [optional] + + diff --git a/docs/PtsV2PaymentsVoidsPost201ResponseVoidAmountDetails.md b/docs/PtsV2PaymentsVoidsPost201ResponseVoidAmountDetails.md new file mode 100644 index 00000000..5198ab0c --- /dev/null +++ b/docs/PtsV2PaymentsVoidsPost201ResponseVoidAmountDetails.md @@ -0,0 +1,10 @@ +# CyberSource::PtsV2PaymentsVoidsPost201ResponseVoidAmountDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**void_amount** | **String** | Total amount of the void. | [optional] +**original_transaction_amount** | **String** | Amount of the original transaction. | [optional] +**currency** | **String** | Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. | [optional] + + diff --git a/docs/PtsV2PaymentsVoidsPost400Response.md b/docs/PtsV2PaymentsVoidsPost400Response.md new file mode 100644 index 00000000..ce2bd2ff --- /dev/null +++ b/docs/PtsV2PaymentsVoidsPost400Response.md @@ -0,0 +1,12 @@ +# CyberSource::PtsV2PaymentsVoidsPost400Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] +**status** | **String** | The status of the submitted transaction. | [optional] +**reason** | **String** | The reason of the status. | [optional] +**message** | **String** | The detail message related to the status and reason listed above. | [optional] +**details** | [**Array<PtsV2PaymentsPost201ResponseErrorInformationDetails>**](PtsV2PaymentsPost201ResponseErrorInformationDetails.md) | | [optional] + + diff --git a/docs/PtsV2PayoutsPost400Response.md b/docs/PtsV2PayoutsPost400Response.md new file mode 100644 index 00000000..92c31615 --- /dev/null +++ b/docs/PtsV2PayoutsPost400Response.md @@ -0,0 +1,12 @@ +# CyberSource::PtsV2PayoutsPost400Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] +**status** | **String** | The status of the submitted transaction. | [optional] +**reason** | **String** | The reason of the status. | [optional] +**message** | **String** | The detail message related to the status and reason listed above. Possible value is: - Your aggregator or acquirer is not accepting transactions from you at this time. - Your aggregator or acquirer is not accepting this transaction. - CyberSource declined the request because the credit card has expired. You might also receive this value if the expiration date you provided does not match the date the issuing bank has on file. - The bank declined the transaction. - The merchant reference number for this authorization request matches the merchant reference number of another authorization request that you sent within the past 15 minutes. Resend the request with a unique merchant reference number. - The credit card number did not pass CyberSource basic checks. - Data provided is not consistent with the request. For example, you requested a product with negative cost. - The request is missing a required field. | [optional] +**details** | [**Array<PtsV2PaymentsPost201ResponseErrorInformationDetails>**](PtsV2PaymentsPost201ResponseErrorInformationDetails.md) | | [optional] + + diff --git a/docs/PtsV2PayoutsPostResponse.md b/docs/PtsV2PayoutsPostResponse.md new file mode 100644 index 00000000..76d3f921 --- /dev/null +++ b/docs/PtsV2PayoutsPostResponse.md @@ -0,0 +1,14 @@ +# CyberSource::PtsV2PayoutsPostResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_reference_information** | [**PtsV2PaymentsPost201ResponseClientReferenceInformation**](PtsV2PaymentsPost201ResponseClientReferenceInformation.md) | | [optional] +**order_information** | [**Ptsv2payoutsOrderInformation**](Ptsv2payoutsOrderInformation.md) | | [optional] +**merchant_information** | [**Ptsv2payoutsMerchantInformation**](Ptsv2payoutsMerchantInformation.md) | | [optional] +**recipient_information** | [**Ptsv2payoutsRecipientInformation**](Ptsv2payoutsRecipientInformation.md) | | [optional] +**sender_information** | [**Ptsv2payoutsSenderInformation**](Ptsv2payoutsSenderInformation.md) | | [optional] +**processing_information** | [**Ptsv2payoutsProcessingInformation**](Ptsv2payoutsProcessingInformation.md) | | [optional] +**payment_information** | [**Ptsv2payoutsPaymentInformation**](Ptsv2payoutsPaymentInformation.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsidreversalsPointOfSaleInformation.md b/docs/Ptsv2paymentsidreversalsPointOfSaleInformation.md index 3948fed8..62afb518 100644 --- a/docs/Ptsv2paymentsidreversalsPointOfSaleInformation.md +++ b/docs/Ptsv2paymentsidreversalsPointOfSaleInformation.md @@ -3,6 +3,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**emv** | [**InlineResponse201PointOfSaleInformationEmv**](InlineResponse201PointOfSaleInformationEmv.md) | | [optional] +**emv** | [**PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv**](PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv.md) | | [optional] diff --git a/docs/RefundApi.md b/docs/RefundApi.md index d38bcc55..a7c92567 100644 --- a/docs/RefundApi.md +++ b/docs/RefundApi.md @@ -9,7 +9,7 @@ Method | HTTP request | Description # **refund_capture** -> InlineResponse2013 refund_capture(refund_capture_request, id) +> PtsV2PaymentsRefundPost201Response refund_capture(refund_capture_request, id) Refund a Capture @@ -45,7 +45,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2013**](InlineResponse2013.md) +[**PtsV2PaymentsRefundPost201Response**](PtsV2PaymentsRefundPost201Response.md) ### Authorization @@ -59,7 +59,7 @@ No authorization required # **refund_payment** -> InlineResponse2013 refund_payment(refund_payment_request, id) +> PtsV2PaymentsRefundPost201Response refund_payment(refund_payment_request, id) Refund a Payment @@ -95,7 +95,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2013**](InlineResponse2013.md) +[**PtsV2PaymentsRefundPost201Response**](PtsV2PaymentsRefundPost201Response.md) ### Authorization diff --git a/docs/ReportDefinitionsApi.md b/docs/ReportDefinitionsApi.md index e9d24338..aa6c357e 100644 --- a/docs/ReportDefinitionsApi.md +++ b/docs/ReportDefinitionsApi.md @@ -9,7 +9,7 @@ Method | HTTP request | Description # **get_resource_info_by_report_definition** -> InlineResponse2005 get_resource_info_by_report_definition(report_definition_name, opts) +> ReportingV3ReportDefinitionsNameGet200Response get_resource_info_by_report_definition(report_definition_name, opts) Get a single report definition information @@ -46,7 +46,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2005**](InlineResponse2005.md) +[**ReportingV3ReportDefinitionsNameGet200Response**](ReportingV3ReportDefinitionsNameGet200Response.md) ### Authorization @@ -60,7 +60,7 @@ No authorization required # **get_resource_v2_info** -> InlineResponse2004 get_resource_v2_info(opts) +> ReportingV3ReportDefinitionsGet200Response get_resource_v2_info(opts) Get reporting resource information @@ -94,7 +94,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2004**](InlineResponse2004.md) +[**ReportingV3ReportDefinitionsGet200Response**](ReportingV3ReportDefinitionsGet200Response.md) ### Authorization diff --git a/docs/ReportSubscriptionsApi.md b/docs/ReportSubscriptionsApi.md index e7e3671d..286b6195 100644 --- a/docs/ReportSubscriptionsApi.md +++ b/docs/ReportSubscriptionsApi.md @@ -106,7 +106,7 @@ No authorization required # **get_all_subscriptions** -> InlineResponse2006 get_all_subscriptions +> ReportingV3ReportSubscriptionsGet200Response get_all_subscriptions Retrieve all subscriptions by organization @@ -133,7 +133,7 @@ This endpoint does not need any parameter. ### Return type -[**InlineResponse2006**](InlineResponse2006.md) +[**ReportingV3ReportSubscriptionsGet200Response**](ReportingV3ReportSubscriptionsGet200Response.md) ### Authorization @@ -147,7 +147,7 @@ No authorization required # **get_subscription** -> InlineResponse2006Subscriptions get_subscription(report_name) +> ReportingV3ReportSubscriptionsGet200ResponseSubscriptions get_subscription(report_name) Retrieve subscription for a report name by organization @@ -180,7 +180,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2006Subscriptions**](InlineResponse2006Subscriptions.md) +[**ReportingV3ReportSubscriptionsGet200ResponseSubscriptions**](ReportingV3ReportSubscriptionsGet200ResponseSubscriptions.md) ### Authorization diff --git a/docs/ReportingV3NotificationofChangesGet200Response.md b/docs/ReportingV3NotificationofChangesGet200Response.md new file mode 100644 index 00000000..852992df --- /dev/null +++ b/docs/ReportingV3NotificationofChangesGet200Response.md @@ -0,0 +1,8 @@ +# CyberSource::ReportingV3NotificationofChangesGet200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**notification_of_changes** | [**Array<ReportingV3NotificationofChangesGet200ResponseNotificationOfChanges>**](ReportingV3NotificationofChangesGet200ResponseNotificationOfChanges.md) | List of Notification Of Change Info values | [optional] + + diff --git a/docs/ReportingV3NotificationofChangesGet200ResponseNotificationOfChanges.md b/docs/ReportingV3NotificationofChangesGet200ResponseNotificationOfChanges.md new file mode 100644 index 00000000..ee11308c --- /dev/null +++ b/docs/ReportingV3NotificationofChangesGet200ResponseNotificationOfChanges.md @@ -0,0 +1,15 @@ +# CyberSource::ReportingV3NotificationofChangesGet200ResponseNotificationOfChanges + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**merchant_reference_number** | **String** | Merchant Reference Number | [optional] +**transaction_reference_number** | **String** | Transaction Reference Number | [optional] +**time** | **DateTime** | Notification Of Change Date(ISO 8601 Extended) | [optional] +**code** | **String** | Merchant Reference Number | [optional] +**account_type** | **String** | Account Type | [optional] +**routing_number** | **String** | Routing Number | [optional] +**account_number** | **String** | Account Number | [optional] +**consumer_name** | **String** | Consumer Name | [optional] + + diff --git a/docs/ReportingV3NotificationofChangesGet400Response.md b/docs/ReportingV3NotificationofChangesGet400Response.md new file mode 100644 index 00000000..b74cbf83 --- /dev/null +++ b/docs/ReportingV3NotificationofChangesGet400Response.md @@ -0,0 +1,13 @@ +# CyberSource::ReportingV3NotificationofChangesGet400Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **String** | Error code | +**message** | **String** | Error message | +**localization_key** | **String** | Localization Key Name | [optional] +**correlation_id** | **String** | Correlation Id | [optional] +**detail** | **String** | Error Detail | [optional] +**fields** | [**Array<ReportingV3NotificationofChangesGet400ResponseFields>**](ReportingV3NotificationofChangesGet400ResponseFields.md) | Error fields List | [optional] + + diff --git a/docs/ReportingV3NotificationofChangesGet400ResponseFields.md b/docs/ReportingV3NotificationofChangesGet400ResponseFields.md new file mode 100644 index 00000000..6de65f16 --- /dev/null +++ b/docs/ReportingV3NotificationofChangesGet400ResponseFields.md @@ -0,0 +1,10 @@ +# CyberSource::ReportingV3NotificationofChangesGet400ResponseFields + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path** | **String** | Path of the failed property | [optional] +**message** | **String** | Error description about validation failed field | [optional] +**localization_key** | **String** | Localized Key Name | [optional] + + diff --git a/docs/ReportingV3ReportDefinitionsGet200Response.md b/docs/ReportingV3ReportDefinitionsGet200Response.md new file mode 100644 index 00000000..b17284cb --- /dev/null +++ b/docs/ReportingV3ReportDefinitionsGet200Response.md @@ -0,0 +1,8 @@ +# CyberSource::ReportingV3ReportDefinitionsGet200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**report_definitions** | [**Array<ReportingV3ReportDefinitionsGet200ResponseReportDefinitions>**](ReportingV3ReportDefinitionsGet200ResponseReportDefinitions.md) | | [optional] + + diff --git a/docs/ReportingV3ReportDefinitionsGet200ResponseReportDefinitions.md b/docs/ReportingV3ReportDefinitionsGet200ResponseReportDefinitions.md new file mode 100644 index 00000000..4cf9103a --- /dev/null +++ b/docs/ReportingV3ReportDefinitionsGet200ResponseReportDefinitions.md @@ -0,0 +1,12 @@ +# CyberSource::ReportingV3ReportDefinitionsGet200ResponseReportDefinitions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**report_definition_id** | **Integer** | | [optional] +**report_defintion_name** | **String** | | [optional] +**supported_formats** | **Array<String>** | | [optional] +**description** | **String** | | [optional] + + diff --git a/docs/ReportingV3ReportDefinitionsNameGet200Response.md b/docs/ReportingV3ReportDefinitionsNameGet200Response.md new file mode 100644 index 00000000..98ba427f --- /dev/null +++ b/docs/ReportingV3ReportDefinitionsNameGet200Response.md @@ -0,0 +1,13 @@ +# CyberSource::ReportingV3ReportDefinitionsNameGet200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**report_definition_id** | **Integer** | | [optional] +**report_defintion_name** | **String** | | [optional] +**attributes** | [**Array<ReportingV3ReportDefinitionsNameGet200ResponseAttributes>**](ReportingV3ReportDefinitionsNameGet200ResponseAttributes.md) | | [optional] +**supported_formats** | **Array<String>** | | [optional] +**description** | **String** | | [optional] + + diff --git a/docs/ReportingV3ReportDefinitionsNameGet200ResponseAttributes.md b/docs/ReportingV3ReportDefinitionsNameGet200ResponseAttributes.md new file mode 100644 index 00000000..c87776ac --- /dev/null +++ b/docs/ReportingV3ReportDefinitionsNameGet200ResponseAttributes.md @@ -0,0 +1,14 @@ +# CyberSource::ReportingV3ReportDefinitionsNameGet200ResponseAttributes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**name** | **String** | | [optional] +**description** | **String** | | [optional] +**filter_type** | **String** | | [optional] +**default** | **BOOLEAN** | | [optional] +**required** | **BOOLEAN** | | [optional] +**supported_type** | **String** | | [optional] + + diff --git a/docs/ReportingV3ReportSubscriptionsGet200Response.md b/docs/ReportingV3ReportSubscriptionsGet200Response.md new file mode 100644 index 00000000..a734a370 --- /dev/null +++ b/docs/ReportingV3ReportSubscriptionsGet200Response.md @@ -0,0 +1,8 @@ +# CyberSource::ReportingV3ReportSubscriptionsGet200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subscriptions** | [**Array<ReportingV3ReportSubscriptionsGet200ResponseSubscriptions>**](ReportingV3ReportSubscriptionsGet200ResponseSubscriptions.md) | | [optional] + + diff --git a/docs/ReportingV3ReportSubscriptionsGet200ResponseReportPreferences.md b/docs/ReportingV3ReportSubscriptionsGet200ResponseReportPreferences.md new file mode 100644 index 00000000..60000af1 --- /dev/null +++ b/docs/ReportingV3ReportSubscriptionsGet200ResponseReportPreferences.md @@ -0,0 +1,9 @@ +# CyberSource::ReportingV3ReportSubscriptionsGet200ResponseReportPreferences + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**signed_amounts** | **BOOLEAN** | Indicator to determine whether negative sign infron of amount for all refunded transaction | [optional] +**field_name_convention** | **String** | Specify the field naming convention to be followed in reports (applicable to only csv report formats | [optional] + + diff --git a/docs/ReportingV3ReportSubscriptionsGet200ResponseSubscriptions.md b/docs/ReportingV3ReportSubscriptionsGet200ResponseSubscriptions.md new file mode 100644 index 00000000..e9493679 --- /dev/null +++ b/docs/ReportingV3ReportSubscriptionsGet200ResponseSubscriptions.md @@ -0,0 +1,20 @@ +# CyberSource::ReportingV3ReportSubscriptionsGet200ResponseSubscriptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_id** | **String** | Organization Id | [optional] +**report_definition_id** | **String** | Report Definition Id | [optional] +**report_definition_name** | **String** | Report Definition | [optional] +**report_mime_type** | **String** | Report Format | [optional] +**report_frequency** | **String** | Report Frequency | [optional] +**report_name** | **String** | Report Name | [optional] +**timezone** | **String** | Time Zone | [optional] +**start_time** | **DateTime** | Start Time | [optional] +**start_day** | **Integer** | Start Day | [optional] +**report_fields** | **Array<String>** | List of all fields String values | [optional] +**report_filters** | **Array<String>** | List of filters to apply | [optional] +**report_preferences** | [**ReportingV3ReportSubscriptionsGet200ResponseReportPreferences**](ReportingV3ReportSubscriptionsGet200ResponseReportPreferences.md) | | [optional] +**selected_merchant_group_name** | **String** | Selected name of the group. | [optional] + + diff --git a/docs/ReportingV3ReportsGet200Response.md b/docs/ReportingV3ReportsGet200Response.md new file mode 100644 index 00000000..4c72f93f --- /dev/null +++ b/docs/ReportingV3ReportsGet200Response.md @@ -0,0 +1,8 @@ +# CyberSource::ReportingV3ReportsGet200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reports** | [**Array<ReportingV3ReportsGet200ResponseReports>**](ReportingV3ReportsGet200ResponseReports.md) | | [optional] + + diff --git a/docs/ReportingV3ReportsGet200ResponseReports.md b/docs/ReportingV3ReportsGet200ResponseReports.md new file mode 100644 index 00000000..ab4e4018 --- /dev/null +++ b/docs/ReportingV3ReportsGet200ResponseReports.md @@ -0,0 +1,21 @@ +# CyberSource::ReportingV3ReportsGet200ResponseReports + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**report_definition_id** | **String** | Unique Report Identifier of each report type | [optional] +**report_name** | **String** | Name of the report specified by merchant while creating the report | [optional] +**report_mime_type** | **String** | Format of the report to get generated | [optional] +**report_frequency** | **String** | Frequency of the report to get generated | [optional] +**status** | **String** | Status of the report | [optional] +**report_start_time** | **DateTime** | Specifies the report start time in ISO 8601 format | [optional] +**report_end_time** | **DateTime** | Specifies the report end time in ISO 8601 format | [optional] +**timezone** | **String** | Time Zone | [optional] +**report_id** | **String** | Unique identifier generated for every reports | [optional] +**organization_id** | **String** | CyberSource Merchant Id | [optional] +**queued_time** | **DateTime** | Specifies the time of the report in queued in ISO 8601 format | [optional] +**report_generating_time** | **DateTime** | Specifies the time of the report started to generate in ISO 8601 format | [optional] +**report_completed_time** | **DateTime** | Specifies the time of the report completed the generation in ISO 8601 format | [optional] +**selected_merchant_group_name** | **String** | Selected name of the group | [optional] + + diff --git a/docs/ReportingV3ReportsIdGet200Response.md b/docs/ReportingV3ReportsIdGet200Response.md new file mode 100644 index 00000000..920ba1ea --- /dev/null +++ b/docs/ReportingV3ReportsIdGet200Response.md @@ -0,0 +1,21 @@ +# CyberSource::ReportingV3ReportsIdGet200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_id** | **String** | CyberSource merchant id | [optional] +**report_id** | **String** | Report ID Value | [optional] +**report_definition_id** | **String** | Report definition Id | [optional] +**report_name** | **String** | Report Name | [optional] +**report_mime_type** | **String** | Report Format | [optional] +**report_frequency** | **String** | Report Frequency Value | [optional] +**report_fields** | **Array<String>** | List of Integer Values | [optional] +**report_status** | **String** | Report Status Value | [optional] +**report_start_time** | **DateTime** | Report Start Time Value | [optional] +**report_end_time** | **DateTime** | Report End Time Value | [optional] +**timezone** | **String** | Time Zone Value | [optional] +**report_filters** | **Hash<String, Array<String>>** | Report Filters | [optional] +**report_preferences** | [**ReportingV3ReportSubscriptionsGet200ResponseReportPreferences**](ReportingV3ReportSubscriptionsGet200ResponseReportPreferences.md) | | [optional] +**selected_merchant_group_name** | **String** | Selected Merchant Group name | [optional] + + diff --git a/docs/ReportsApi.md b/docs/ReportsApi.md index 13410c65..80036561 100644 --- a/docs/ReportsApi.md +++ b/docs/ReportsApi.md @@ -56,7 +56,7 @@ No authorization required # **get_report_by_report_id** -> InlineResponse2008 get_report_by_report_id(report_id, opts) +> ReportingV3ReportsIdGet200Response get_report_by_report_id(report_id, opts) Get Report based on reportId @@ -93,7 +93,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2008**](InlineResponse2008.md) +[**ReportingV3ReportsIdGet200Response**](ReportingV3ReportsIdGet200Response.md) ### Authorization @@ -107,7 +107,7 @@ No authorization required # **search_reports** -> InlineResponse2007 search_reports(start_time, end_time, time_query_type, opts) +> ReportingV3ReportsGet200Response search_reports(start_time, end_time, time_query_type, opts) Retrieve available reports @@ -160,7 +160,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2007**](InlineResponse2007.md) +[**ReportingV3ReportsGet200Response**](ReportingV3ReportsGet200Response.md) ### Authorization diff --git a/docs/RequestBody.md b/docs/RequestBody.md index f81f19d9..2be775d5 100644 --- a/docs/RequestBody.md +++ b/docs/RequestBody.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **start_time** | **DateTime** | | [optional] **start_day** | **Integer** | | [optional] **report_filters** | **Hash<String, Array<String>>** | | [optional] -**report_preferences** | [**InlineResponse2006ReportPreferences**](InlineResponse2006ReportPreferences.md) | | [optional] +**report_preferences** | [**ReportingV3ReportSubscriptionsGet200ResponseReportPreferences**](ReportingV3ReportSubscriptionsGet200ResponseReportPreferences.md) | | [optional] **selected_merchant_group_name** | **String** | | [optional] diff --git a/docs/RequestBody1.md b/docs/RequestBody1.md index 2a1f43c3..352fbb5b 100644 --- a/docs/RequestBody1.md +++ b/docs/RequestBody1.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **report_start_time** | **DateTime** | Start time of the report | [optional] **report_end_time** | **DateTime** | End time of the report | [optional] **report_filters** | **Hash<String, Array<String>>** | | [optional] -**report_preferences** | [**InlineResponse2006ReportPreferences**](InlineResponse2006ReportPreferences.md) | | [optional] +**report_preferences** | [**ReportingV3ReportSubscriptionsGet200ResponseReportPreferences**](ReportingV3ReportSubscriptionsGet200ResponseReportPreferences.md) | | [optional] **selected_merchant_group_name** | **String** | Specifies the group name | [optional] diff --git a/docs/ReversalApi.md b/docs/ReversalApi.md index d77b0d1e..c3e280b6 100644 --- a/docs/ReversalApi.md +++ b/docs/ReversalApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **auth_reversal** -> InlineResponse2011 auth_reversal(id, auth_reversal_request) +> PtsV2PaymentsReversalsPost201Response auth_reversal(id, auth_reversal_request) Process an Authorization Reversal @@ -44,7 +44,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2011**](InlineResponse2011.md) +[**PtsV2PaymentsReversalsPost201Response**](PtsV2PaymentsReversalsPost201Response.md) ### Authorization diff --git a/docs/SearchTransactionsApi.md b/docs/SearchTransactionsApi.md index 5f6a7734..c05a821b 100644 --- a/docs/SearchTransactionsApi.md +++ b/docs/SearchTransactionsApi.md @@ -9,7 +9,7 @@ Method | HTTP request | Description # **create_search** -> InlineResponse2017 create_search(create_search_request) +> TssV2TransactionsPost201Response create_search(create_search_request) Create a search request @@ -22,7 +22,7 @@ require 'cybersource_rest_client' api_instance = CyberSource::SearchTransactionsApi.new -create_search_request = CyberSource::CreateSearchRequest.new # CreateSearchRequest | +create_search_request = CyberSource::TssV2TransactionsPostResponse.new # TssV2TransactionsPostResponse | begin @@ -38,11 +38,11 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **create_search_request** | [**CreateSearchRequest**](CreateSearchRequest.md)| | + **create_search_request** | [**TssV2TransactionsPostResponse**](TssV2TransactionsPostResponse.md)| | ### Return type -[**InlineResponse2017**](InlineResponse2017.md) +[**TssV2TransactionsPost201Response**](TssV2TransactionsPost201Response.md) ### Authorization @@ -56,7 +56,7 @@ No authorization required # **get_search** -> InlineResponse2017 get_search(id) +> TssV2TransactionsPost201Response get_search(id) Get Search results @@ -89,7 +89,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2017**](InlineResponse2017.md) +[**TssV2TransactionsPost201Response**](TssV2TransactionsPost201Response.md) ### Authorization diff --git a/docs/SecureFileShareApi.md b/docs/SecureFileShareApi.md index fa4c310b..c74fbb50 100644 --- a/docs/SecureFileShareApi.md +++ b/docs/SecureFileShareApi.md @@ -59,7 +59,7 @@ No authorization required # **get_file_details** -> InlineResponse2009 get_file_details(start_date, end_date, opts) +> V1FileDetailsGet200Response get_file_details(start_date, end_date, opts) Get list of files @@ -99,7 +99,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2009**](InlineResponse2009.md) +[**V1FileDetailsGet200Response**](V1FileDetailsGet200Response.md) ### Authorization diff --git a/docs/TmsV1InstrumentidentifiersDelete409Response.md b/docs/TmsV1InstrumentidentifiersDelete409Response.md new file mode 100644 index 00000000..d4ca0919 --- /dev/null +++ b/docs/TmsV1InstrumentidentifiersDelete409Response.md @@ -0,0 +1,8 @@ +# CyberSource::TmsV1InstrumentidentifiersDelete409Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**TmsV1InstrumentidentifiersDelete409ResponseLinks**](TmsV1InstrumentidentifiersDelete409ResponseLinks.md) | | [optional] + + diff --git a/docs/TmsV1InstrumentidentifiersDelete409ResponseLinks.md b/docs/TmsV1InstrumentidentifiersDelete409ResponseLinks.md new file mode 100644 index 00000000..efbc1e7d --- /dev/null +++ b/docs/TmsV1InstrumentidentifiersDelete409ResponseLinks.md @@ -0,0 +1,8 @@ +# CyberSource::TmsV1InstrumentidentifiersDelete409ResponseLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payment_instruments** | [**TmsV1InstrumentidentifiersDelete409ResponseLinksPaymentInstruments**](TmsV1InstrumentidentifiersDelete409ResponseLinksPaymentInstruments.md) | | [optional] + + diff --git a/docs/TmsV1InstrumentidentifiersDelete409ResponseLinksPaymentInstruments.md b/docs/TmsV1InstrumentidentifiersDelete409ResponseLinksPaymentInstruments.md new file mode 100644 index 00000000..2d5d1ba4 --- /dev/null +++ b/docs/TmsV1InstrumentidentifiersDelete409ResponseLinksPaymentInstruments.md @@ -0,0 +1,8 @@ +# CyberSource::TmsV1InstrumentidentifiersDelete409ResponseLinksPaymentInstruments + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | | [optional] + + diff --git a/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response.md b/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response.md new file mode 100644 index 00000000..129c432e --- /dev/null +++ b/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response.md @@ -0,0 +1,14 @@ +# CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinks**](TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinks.md) | | [optional] +**object** | **String** | Shows the response is a collection of objects. | [optional] +**offset** | **String** | The offset parameter supplied in the request. | [optional] +**limit** | **String** | The limit parameter supplied in the request. | [optional] +**count** | **String** | The number of Payment Instruments returned in the array. | [optional] +**total** | **String** | The total number of Payment Instruments associated with the Instrument Identifier in the zero-based dataset. | [optional] +**_embedded** | **Object** | Array of Payment Instruments returned for the supplied Instrument Identifier. | [optional] + + diff --git a/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinks.md b/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinks.md new file mode 100644 index 00000000..a4116c7c --- /dev/null +++ b/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinks.md @@ -0,0 +1,12 @@ +# CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_self** | [**TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksSelf**](TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksSelf.md) | | [optional] +**first** | [**TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksFirst**](TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksFirst.md) | | [optional] +**prev** | [**TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksPrev**](TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksPrev.md) | | [optional] +**_next** | [**TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksNext**](TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksNext.md) | | [optional] +**last** | [**TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksLast**](TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksLast.md) | | [optional] + + diff --git a/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksFirst.md b/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksFirst.md new file mode 100644 index 00000000..b45077bc --- /dev/null +++ b/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksFirst.md @@ -0,0 +1,8 @@ +# CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | A link to the collection starting at offset zero for the supplied limit. | [optional] + + diff --git a/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksLast.md b/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksLast.md new file mode 100644 index 00000000..2ab0008a --- /dev/null +++ b/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksLast.md @@ -0,0 +1,8 @@ +# CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksLast + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | A link to the last collection containing the remaining objects. | [optional] + + diff --git a/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksNext.md b/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksNext.md new file mode 100644 index 00000000..97909a5a --- /dev/null +++ b/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksNext.md @@ -0,0 +1,8 @@ +# CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksNext + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | A link to the next collection starting at the supplied offset plus the supplied limit. | [optional] + + diff --git a/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksPrev.md b/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksPrev.md new file mode 100644 index 00000000..8ceff623 --- /dev/null +++ b/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksPrev.md @@ -0,0 +1,8 @@ +# CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksPrev + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | | [optional] + + diff --git a/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksSelf.md b/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksSelf.md new file mode 100644 index 00000000..850dabdb --- /dev/null +++ b/docs/TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksSelf.md @@ -0,0 +1,8 @@ +# CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksSelf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | A link to the current requested collection. | [optional] + + diff --git a/docs/TmsV1InstrumentidentifiersPost200Response.md b/docs/TmsV1InstrumentidentifiersPost200Response.md new file mode 100644 index 00000000..30dc6f81 --- /dev/null +++ b/docs/TmsV1InstrumentidentifiersPost200Response.md @@ -0,0 +1,15 @@ +# CyberSource::TmsV1InstrumentidentifiersPost200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**Tmsv1instrumentidentifiersLinks**](Tmsv1instrumentidentifiersLinks.md) | | [optional] +**id** | **String** | Unique identification number assigned by CyberSource to the submitted request. | [optional] +**object** | **String** | Describes type of token. For example: customer, paymentInstrument or instrumentIdentifier. | [optional] +**state** | **String** | Current state of the token. | [optional] +**card** | [**Tmsv1instrumentidentifiersCard**](Tmsv1instrumentidentifiersCard.md) | | [optional] +**bank_account** | [**Tmsv1instrumentidentifiersBankAccount**](Tmsv1instrumentidentifiersBankAccount.md) | | [optional] +**processing_information** | [**Tmsv1instrumentidentifiersProcessingInformation**](Tmsv1instrumentidentifiersProcessingInformation.md) | | [optional] +**metadata** | [**Tmsv1instrumentidentifiersMetadata**](Tmsv1instrumentidentifiersMetadata.md) | | [optional] + + diff --git a/docs/TmsV1PaymentinstrumentsPost201Response.md b/docs/TmsV1PaymentinstrumentsPost201Response.md new file mode 100644 index 00000000..72776cd0 --- /dev/null +++ b/docs/TmsV1PaymentinstrumentsPost201Response.md @@ -0,0 +1,19 @@ +# CyberSource::TmsV1PaymentinstrumentsPost201Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**Tmsv1instrumentidentifiersLinks**](Tmsv1instrumentidentifiersLinks.md) | | [optional] +**id** | **String** | Unique identification number assigned by CyberSource to the submitted request. | [optional] +**object** | **String** | Describes type of token. For example: customer, paymentInstrument or instrumentIdentifier. | [optional] +**state** | **String** | Current state of the token. | [optional] +**bank_account** | [**Tmsv1paymentinstrumentsBankAccount**](Tmsv1paymentinstrumentsBankAccount.md) | | [optional] +**card** | [**Tmsv1paymentinstrumentsCard**](Tmsv1paymentinstrumentsCard.md) | | [optional] +**buyer_information** | [**Tmsv1paymentinstrumentsBuyerInformation**](Tmsv1paymentinstrumentsBuyerInformation.md) | | [optional] +**bill_to** | [**Tmsv1paymentinstrumentsBillTo**](Tmsv1paymentinstrumentsBillTo.md) | | [optional] +**processing_information** | [**Tmsv1paymentinstrumentsProcessingInformation**](Tmsv1paymentinstrumentsProcessingInformation.md) | | [optional] +**merchant_information** | [**Tmsv1paymentinstrumentsMerchantInformation**](Tmsv1paymentinstrumentsMerchantInformation.md) | | [optional] +**meta_data** | [**Tmsv1instrumentidentifiersMetadata**](Tmsv1instrumentidentifiersMetadata.md) | | [optional] +**instrument_identifier** | [**Tmsv1paymentinstrumentsInstrumentIdentifier**](Tmsv1paymentinstrumentsInstrumentIdentifier.md) | | [optional] + + diff --git a/docs/Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.md b/docs/Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.md index 31268f86..549ff547 100644 --- a/docs/Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.md +++ b/docs/Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.md @@ -3,6 +3,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**merchant_initiated_transaction** | [**Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction**](Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction.md) | | [optional] +**merchant_initiated_transaction** | [**Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator**](Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.md) | | [optional] diff --git a/docs/Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md b/docs/Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md index bc09773f..eba37a82 100644 --- a/docs/Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md +++ b/docs/Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md @@ -1,4 +1,4 @@ -# CyberSource::Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction +# CyberSource::Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator ## Properties Name | Type | Description | Notes diff --git a/docs/TransactionBatchesApi.md b/docs/TransactionBatchesApi.md index b183bc5f..51c23c46 100644 --- a/docs/TransactionBatchesApi.md +++ b/docs/TransactionBatchesApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **pts_v1_transaction_batches_get** -> InlineResponse2002 pts_v1_transaction_batches_get(start_time, end_time) +> PtsV1TransactionBatchesGet200Response pts_v1_transaction_batches_get(start_time, end_time) Get a list of batch files processed through the Offline Transaction Submission Services @@ -44,7 +44,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2002**](InlineResponse2002.md) +[**PtsV1TransactionBatchesGet200Response**](PtsV1TransactionBatchesGet200Response.md) ### Authorization diff --git a/docs/TransactionDetailsApi.md b/docs/TransactionDetailsApi.md index 00538826..aab53776 100644 --- a/docs/TransactionDetailsApi.md +++ b/docs/TransactionDetailsApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **get_transaction** -> InlineResponse20012 get_transaction(id) +> TssV2TransactionsGet200Response get_transaction(id) Retrieve a Transaction @@ -41,7 +41,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20012**](InlineResponse20012.md) +[**TssV2TransactionsGet200Response**](TssV2TransactionsGet200Response.md) ### Authorization diff --git a/docs/TssV2TransactionsGet200Response.md b/docs/TssV2TransactionsGet200Response.md new file mode 100644 index 00000000..57f9e693 --- /dev/null +++ b/docs/TssV2TransactionsGet200Response.md @@ -0,0 +1,31 @@ +# CyberSource::TssV2TransactionsGet200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] +**root_id** | **String** | Payment Request Id | [optional] +**reconciliation_id** | **String** | The reconciliation id for the submitted transaction. This value is not returned for all processors. | [optional] +**merchant_id** | **String** | The description for this field is not available. | [optional] +**status** | **String** | The status of the submitted transaction. | [optional] +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] +**application_information** | [**TssV2TransactionsGet200ResponseApplicationInformation**](TssV2TransactionsGet200ResponseApplicationInformation.md) | | [optional] +**buyer_information** | [**TssV2TransactionsGet200ResponseBuyerInformation**](TssV2TransactionsGet200ResponseBuyerInformation.md) | | [optional] +**client_reference_information** | [**TssV2TransactionsGet200ResponseClientReferenceInformation**](TssV2TransactionsGet200ResponseClientReferenceInformation.md) | | [optional] +**consumer_authentication_information** | [**TssV2TransactionsGet200ResponseConsumerAuthenticationInformation**](TssV2TransactionsGet200ResponseConsumerAuthenticationInformation.md) | | [optional] +**device_information** | [**TssV2TransactionsGet200ResponseDeviceInformation**](TssV2TransactionsGet200ResponseDeviceInformation.md) | | [optional] +**error_information** | [**TssV2TransactionsGet200ResponseErrorInformation**](TssV2TransactionsGet200ResponseErrorInformation.md) | | [optional] +**installment_information** | [**TssV2TransactionsGet200ResponseInstallmentInformation**](TssV2TransactionsGet200ResponseInstallmentInformation.md) | | [optional] +**fraud_marking_information** | [**TssV2TransactionsGet200ResponseFraudMarkingInformation**](TssV2TransactionsGet200ResponseFraudMarkingInformation.md) | | [optional] +**merchant_defined_information** | [**Array<TssV2TransactionsGet200ResponseMerchantDefinedInformation>**](TssV2TransactionsGet200ResponseMerchantDefinedInformation.md) | The description for this field is not available. | [optional] +**merchant_information** | [**TssV2TransactionsGet200ResponseMerchantInformation**](TssV2TransactionsGet200ResponseMerchantInformation.md) | | [optional] +**order_information** | [**TssV2TransactionsGet200ResponseOrderInformation**](TssV2TransactionsGet200ResponseOrderInformation.md) | | [optional] +**payment_information** | [**TssV2TransactionsGet200ResponsePaymentInformation**](TssV2TransactionsGet200ResponsePaymentInformation.md) | | [optional] +**processing_information** | [**TssV2TransactionsGet200ResponseProcessingInformation**](TssV2TransactionsGet200ResponseProcessingInformation.md) | | [optional] +**processor_information** | [**TssV2TransactionsGet200ResponseProcessorInformation**](TssV2TransactionsGet200ResponseProcessorInformation.md) | | [optional] +**point_of_sale_information** | [**TssV2TransactionsGet200ResponsePointOfSaleInformation**](TssV2TransactionsGet200ResponsePointOfSaleInformation.md) | | [optional] +**risk_information** | [**TssV2TransactionsGet200ResponseRiskInformation**](TssV2TransactionsGet200ResponseRiskInformation.md) | | [optional] +**sender_information** | [**TssV2TransactionsGet200ResponseSenderInformation**](TssV2TransactionsGet200ResponseSenderInformation.md) | | [optional] +**_links** | [**PtsV2PaymentsReversalsPost201ResponseLinks**](PtsV2PaymentsReversalsPost201ResponseLinks.md) | | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseApplicationInformation.md b/docs/TssV2TransactionsGet200ResponseApplicationInformation.md new file mode 100644 index 00000000..ad004711 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseApplicationInformation.md @@ -0,0 +1,12 @@ +# CyberSource::TssV2TransactionsGet200ResponseApplicationInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **String** | The status of the submitted transaction. | [optional] +**reason_code** | **String** | The description for this field is not available. | [optional] +**r_code** | **String** | The description for this field is not available. | [optional] +**r_flag** | **String** | The description for this field is not available. | [optional] +**applications** | [**Array<TssV2TransactionsGet200ResponseApplicationInformationApplications>**](TssV2TransactionsGet200ResponseApplicationInformationApplications.md) | | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseApplicationInformationApplications.md b/docs/TssV2TransactionsGet200ResponseApplicationInformationApplications.md new file mode 100644 index 00000000..0d5df016 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseApplicationInformationApplications.md @@ -0,0 +1,15 @@ +# CyberSource::TssV2TransactionsGet200ResponseApplicationInformationApplications + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | The description for this field is not available. | [optional] +**status** | **String** | The description for this field is not available. | [optional] +**reason_code** | **String** | The description for this field is not available. | [optional] +**r_code** | **String** | The description for this field is not available. | [optional] +**r_flag** | **String** | The description for this field is not available. | [optional] +**reconciliation_id** | **String** | The description for this field is not available. | [optional] +**r_message** | **String** | The description for this field is not available. | [optional] +**return_code** | **String** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseBuyerInformation.md b/docs/TssV2TransactionsGet200ResponseBuyerInformation.md new file mode 100644 index 00000000..d4005e63 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseBuyerInformation.md @@ -0,0 +1,9 @@ +# CyberSource::TssV2TransactionsGet200ResponseBuyerInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**merchant_customer_id** | **String** | Your identifier for the customer. For processor-specific information, see the customer_account_id field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**hashed_password** | **String** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseClientReferenceInformation.md b/docs/TssV2TransactionsGet200ResponseClientReferenceInformation.md new file mode 100644 index 00000000..d1efa333 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseClientReferenceInformation.md @@ -0,0 +1,12 @@ +# CyberSource::TssV2TransactionsGet200ResponseClientReferenceInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **String** | Client-generated order reference or tracking number. CyberSource recommends that you send a unique value for each transaction so that you can perform meaningful searches for the transaction. | [optional] +**application_version** | **String** | The description for this field is not available. | [optional] +**application_name** | **String** | The application name of client which is used to submit the request. | [optional] +**application_user** | **String** | The description for this field is not available. | [optional] +**comments** | **String** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseConsumerAuthenticationInformation.md b/docs/TssV2TransactionsGet200ResponseConsumerAuthenticationInformation.md new file mode 100644 index 00000000..2aaba1f6 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseConsumerAuthenticationInformation.md @@ -0,0 +1,11 @@ +# CyberSource::TssV2TransactionsGet200ResponseConsumerAuthenticationInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**eci_raw** | **String** | Raw electronic commerce indicator (ECI). | [optional] +**cavv** | **String** | Cardholder authentication verification value (CAVV). | [optional] +**xid** | **String** | Transaction identifier. | [optional] +**transaction_id** | **String** | Payer auth Transaction identifier. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseDeviceInformation.md b/docs/TssV2TransactionsGet200ResponseDeviceInformation.md new file mode 100644 index 00000000..d6bbbc74 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseDeviceInformation.md @@ -0,0 +1,10 @@ +# CyberSource::TssV2TransactionsGet200ResponseDeviceInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip_address** | **String** | IP address of the customer. | [optional] +**host_name** | **String** | DNS resolved hostname from above _ipAddress_. | [optional] +**cookies_accepted** | **String** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseErrorInformation.md b/docs/TssV2TransactionsGet200ResponseErrorInformation.md new file mode 100644 index 00000000..079f09f4 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseErrorInformation.md @@ -0,0 +1,10 @@ +# CyberSource::TssV2TransactionsGet200ResponseErrorInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason** | **String** | The description for this field is not available. | [optional] +**message** | **String** | The description for this field is not available. | [optional] +**details** | [**Array<PtsV2PaymentsPost201ResponseErrorInformationDetails>**](PtsV2PaymentsPost201ResponseErrorInformationDetails.md) | | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseFraudMarkingInformation.md b/docs/TssV2TransactionsGet200ResponseFraudMarkingInformation.md new file mode 100644 index 00000000..a3ffac22 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseFraudMarkingInformation.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsGet200ResponseFraudMarkingInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason** | **String** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseInstallmentInformation.md b/docs/TssV2TransactionsGet200ResponseInstallmentInformation.md new file mode 100644 index 00000000..983c25d9 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseInstallmentInformation.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsGet200ResponseInstallmentInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number_of_installments** | **String** | Number of Installments. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseMerchantDefinedInformation.md b/docs/TssV2TransactionsGet200ResponseMerchantDefinedInformation.md new file mode 100644 index 00000000..06efc5f1 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseMerchantDefinedInformation.md @@ -0,0 +1,9 @@ +# CyberSource::TssV2TransactionsGet200ResponseMerchantDefinedInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **String** | The description for this field is not available. | [optional] +**value** | **String** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseMerchantInformation.md b/docs/TssV2TransactionsGet200ResponseMerchantInformation.md new file mode 100644 index 00000000..3c0bbfdc --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseMerchantInformation.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsGet200ResponseMerchantInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**merchant_descriptor** | [**TssV2TransactionsGet200ResponseMerchantInformationMerchantDescriptor**](TssV2TransactionsGet200ResponseMerchantInformationMerchantDescriptor.md) | | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseMerchantInformationMerchantDescriptor.md b/docs/TssV2TransactionsGet200ResponseMerchantInformationMerchantDescriptor.md new file mode 100644 index 00000000..1d1cc5de --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseMerchantInformationMerchantDescriptor.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsGet200ResponseMerchantInformationMerchantDescriptor + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | For the descriptions, used-by information, data types, and lengths for these fields, see Merchant Descriptors in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) For Payouts: * Paymentech (22) | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseOrderInformation.md b/docs/TssV2TransactionsGet200ResponseOrderInformation.md new file mode 100644 index 00000000..c3f17cf1 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseOrderInformation.md @@ -0,0 +1,12 @@ +# CyberSource::TssV2TransactionsGet200ResponseOrderInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bill_to** | [**TssV2TransactionsGet200ResponseOrderInformationBillTo**](TssV2TransactionsGet200ResponseOrderInformationBillTo.md) | | [optional] +**ship_to** | [**TssV2TransactionsGet200ResponseOrderInformationShipTo**](TssV2TransactionsGet200ResponseOrderInformationShipTo.md) | | [optional] +**line_items** | [**Array<TssV2TransactionsGet200ResponseOrderInformationLineItems>**](TssV2TransactionsGet200ResponseOrderInformationLineItems.md) | Transaction Line Item data. | [optional] +**amount_details** | [**TssV2TransactionsGet200ResponseOrderInformationAmountDetails**](TssV2TransactionsGet200ResponseOrderInformationAmountDetails.md) | | [optional] +**shipping_details** | [**TssV2TransactionsGet200ResponseOrderInformationShippingDetails**](TssV2TransactionsGet200ResponseOrderInformationShippingDetails.md) | | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseOrderInformationAmountDetails.md b/docs/TssV2TransactionsGet200ResponseOrderInformationAmountDetails.md new file mode 100644 index 00000000..e62f81dd --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseOrderInformationAmountDetails.md @@ -0,0 +1,11 @@ +# CyberSource::TssV2TransactionsGet200ResponseOrderInformationAmountDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_amount** | **String** | Grand total for the order. You can include a decimal point (.), but no other special characters. CyberSource truncates the amount to the correct number of decimal places. * CTV, FDCCompass, Paymentech (<= 12) For processor-specific information, see the grand_total_amount field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**currency** | **String** | Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. | [optional] +**tax_amount** | **String** | Total tax amount for all the items in the order. For processor-specific information, see the total_tax_amount field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) | [optional] +**authorized_amount** | **String** | Amount that was authorized. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseOrderInformationBillTo.md b/docs/TssV2TransactionsGet200ResponseOrderInformationBillTo.md new file mode 100644 index 00000000..ef796c87 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseOrderInformationBillTo.md @@ -0,0 +1,21 @@ +# CyberSource::TssV2TransactionsGet200ResponseOrderInformationBillTo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**first_name** | **String** | Customer’s first name. This name must be the same as the name on the card. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the customer_firstname field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**last_name** | **String** | Customer’s last name. This name must be the same as the name on the card. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the customer_lastname field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**middel_name** | **String** | Customer’s middle name. | [optional] +**name_suffix** | **String** | Customer’s name suffix. | [optional] +**address1** | **String** | First line of the billing street address as it appears on the credit card issuer’s records. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_address1 field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**address2** | **String** | Additional address information. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_address2 field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**locality** | **String** | City of the billing address. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_city field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**administrative_area** | **String** | State or province of the billing address. Use the State, Province, and Territory Codes for the United States and Canada. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_state field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**postal_code** | **String** | Postal code for the billing address. The postal code must consist of 5 to 9 digits. When the billing country is the U.S., the 9-digit postal code must follow this format: [5 digits][dash][4 digits] Example 12345-6789 When the billing country is Canada, the 6-digit postal code must follow this format: [alpha][numeric][alpha][space][numeric][alpha][numeric] Example A1B 2C3 For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_zip field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**company** | **String** | Name of the customer’s company. For processor-specific information, see the company_name field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**email** | **String** | Customer's email address, including the full domain name. For processor-specific information, see the customer_email field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**country** | **String** | Country of the billing address. Use the two-character ISO Standard Country Codes. For processor-specific information, see the bill_country field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**title** | **String** | Title. | [optional] +**phone_number** | **String** | Customer’s phone number. For Payouts: This field may be sent only for FDC Compass. CyberSource recommends that you include the country code when the order is from outside the U.S. For processor-specific information, see the customer_phone field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseOrderInformationLineItems.md b/docs/TssV2TransactionsGet200ResponseOrderInformationLineItems.md new file mode 100644 index 00000000..a52a2378 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseOrderInformationLineItems.md @@ -0,0 +1,14 @@ +# CyberSource::TssV2TransactionsGet200ResponseOrderInformationLineItems + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_code** | **String** | Type of product. This value is used to determine the category that the product is in: electronic, handling, physical, service, or shipping. The default value is **default**. For a payment, when you set this field to a value other than default or any of the values related to shipping and handling, below fields _quantity_, _productName_, and _productSKU_ are required. | [optional] +**product_name** | **String** | For PAYMENT and CAPTURE API, this field is required when above _productCode_ is not **default** or one of the values related to shipping and handling. | [optional] +**product_sku** | **String** | Identification code for the product. For PAYMENT and CAPTURE API, this field is required when above _productCode_ is not **default** or one of the values related to shipping and/or handling. | [optional] +**tax_amount** | **String** | Total tax to apply to the product. This value cannot be negative. The tax amount and the offer amount must be in the same currency. The tax amount field is additive. The following example uses a two-exponent currency such as USD: 1. You include each line item in your request. ..- 1st line item has amount=10.00, quantity=1, and taxAmount=0.80 ..- 2nd line item has amount=20.00, quantity=1, and taxAmount=1.60 2. The total amount authorized will be 32.40, not 30.00 with 2.40 of tax included. This field is frequently used for Level II and Level III transactions. | [optional] +**quantity** | **Float** | For a payment or capture, this field is required when _productCode_ is not **default** or one of the values related to shipping and handling. | [optional] +**unit_price** | **String** | Per-item price of the product. This value cannot be negative. You can include a decimal point (.), but you cannot include any other special characters. CyberSource truncates the amount to the correct number of decimal places. For processor-specific information, see the amount field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**fulfillment_type** | **String** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseOrderInformationShipTo.md b/docs/TssV2TransactionsGet200ResponseOrderInformationShipTo.md new file mode 100644 index 00000000..34cc94d1 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseOrderInformationShipTo.md @@ -0,0 +1,17 @@ +# CyberSource::TssV2TransactionsGet200ResponseOrderInformationShipTo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**first_name** | **String** | First name of the recipient. **Processor specific maximum length** - Litle: 25 - All other processors: 60 | [optional] +**last_name** | **String** | Last name of the recipient. **Processor specific maximum length** - Litle: 25 - All other processors: 60 | [optional] +**address1** | **String** | First line of the shipping address. | [optional] +**address2** | **String** | Second line of the shipping address. | [optional] +**locality** | **String** | City of the shipping address. | [optional] +**administrative_area** | **String** | State or province of the shipping address. Use the State, Province, and Territory Codes for the United States and Canada. | [optional] +**postal_code** | **String** | Postal code for the shipping address. The postal code must consist of 5 to 9 digits. When the billing country is the U.S., the 9-digit postal code must follow this format: [5 digits][dash][4 digits] Example 12345-6789 When the billing country is Canada, the 6-digit postal code must follow this format: [alpha][numeric][alpha][space][numeric][alpha][numeric] Example A1B 2C3 | [optional] +**company** | **String** | Name of the customer’s company. For processor-specific information, see the company_name field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**country** | **String** | Country of the shipping address. Use the two character ISO Standard Country Codes. | [optional] +**phone_number** | **String** | Phone number for the shipping address. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseOrderInformationShippingDetails.md b/docs/TssV2TransactionsGet200ResponseOrderInformationShippingDetails.md new file mode 100644 index 00000000..bfb6ddc0 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseOrderInformationShippingDetails.md @@ -0,0 +1,9 @@ +# CyberSource::TssV2TransactionsGet200ResponseOrderInformationShippingDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**gift_wrap** | **BOOLEAN** | The description for this field is not available. | [optional] +**shipping_method** | **String** | Shipping method for the product. Possible values: - lowcost: Lowest-cost service - sameday: Courier or same-day service - oneday: Next-day or overnight service - twoday: Two-day service - threeday: Three-day service - pickup: Store pick-up - other: Other shipping method - none: No shipping method because product is a service or subscription | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponsePaymentInformation.md b/docs/TssV2TransactionsGet200ResponsePaymentInformation.md new file mode 100644 index 00000000..63112369 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponsePaymentInformation.md @@ -0,0 +1,13 @@ +# CyberSource::TssV2TransactionsGet200ResponsePaymentInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payment_type** | [**TssV2TransactionsGet200ResponsePaymentInformationPaymentType**](TssV2TransactionsGet200ResponsePaymentInformationPaymentType.md) | | [optional] +**customer** | [**Ptsv2paymentsPaymentInformationCustomer**](Ptsv2paymentsPaymentInformationCustomer.md) | | [optional] +**card** | [**TssV2TransactionsGet200ResponsePaymentInformationCard**](TssV2TransactionsGet200ResponsePaymentInformationCard.md) | | [optional] +**invoice** | [**TssV2TransactionsGet200ResponsePaymentInformationInvoice**](TssV2TransactionsGet200ResponsePaymentInformationInvoice.md) | | [optional] +**bank** | [**TssV2TransactionsGet200ResponsePaymentInformationBank**](TssV2TransactionsGet200ResponsePaymentInformationBank.md) | | [optional] +**account_features** | [**TssV2TransactionsGet200ResponsePaymentInformationAccountFeatures**](TssV2TransactionsGet200ResponsePaymentInformationAccountFeatures.md) | | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponsePaymentInformationAccountFeatures.md b/docs/TssV2TransactionsGet200ResponsePaymentInformationAccountFeatures.md new file mode 100644 index 00000000..45dafe45 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponsePaymentInformationAccountFeatures.md @@ -0,0 +1,10 @@ +# CyberSource::TssV2TransactionsGet200ResponsePaymentInformationAccountFeatures + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**balance_amount** | **String** | Remaining balance on the account. | [optional] +**previous_balance_amount** | **String** | Remaining balance on the account. | [optional] +**currency** | **String** | Currency of the remaining balance on the account. For the possible values, see the ISO Standard Currency Codes. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponsePaymentInformationBank.md b/docs/TssV2TransactionsGet200ResponsePaymentInformationBank.md new file mode 100644 index 00000000..7c92c718 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponsePaymentInformationBank.md @@ -0,0 +1,14 @@ +# CyberSource::TssV2TransactionsGet200ResponsePaymentInformationBank + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**routing_number** | **String** | The description for this field is not available. | [optional] +**branch_code** | **String** | The description for this field is not available. | [optional] +**swift_code** | **String** | The description for this field is not available. | [optional] +**bank_code** | **String** | The description for this field is not available. | [optional] +**iban** | **String** | The description for this field is not available. | [optional] +**account** | [**TssV2TransactionsGet200ResponsePaymentInformationBankAccount**](TssV2TransactionsGet200ResponsePaymentInformationBankAccount.md) | | [optional] +**mandate** | [**TssV2TransactionsGet200ResponsePaymentInformationBankMandate**](TssV2TransactionsGet200ResponsePaymentInformationBankMandate.md) | | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponsePaymentInformationBankAccount.md b/docs/TssV2TransactionsGet200ResponsePaymentInformationBankAccount.md new file mode 100644 index 00000000..1baf94d2 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponsePaymentInformationBankAccount.md @@ -0,0 +1,14 @@ +# CyberSource::TssV2TransactionsGet200ResponsePaymentInformationBankAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**suffix** | **String** | The description for this field is not available. | [optional] +**prefix** | **String** | The description for this field is not available. | [optional] +**check_number** | **String** | The description for this field is not available. | [optional] +**type** | **String** | The description for this field is not available. | [optional] +**name** | **String** | The description for this field is not available. | [optional] +**check_digit** | **String** | The description for this field is not available. | [optional] +**encoder_id** | **String** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponsePaymentInformationBankMandate.md b/docs/TssV2TransactionsGet200ResponsePaymentInformationBankMandate.md new file mode 100644 index 00000000..c4e117d4 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponsePaymentInformationBankMandate.md @@ -0,0 +1,10 @@ +# CyberSource::TssV2TransactionsGet200ResponsePaymentInformationBankMandate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reference_number** | **String** | The description for this field is not available. | [optional] +**recurring_type** | **String** | The description for this field is not available. | [optional] +**id** | **String** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponsePaymentInformationCard.md b/docs/TssV2TransactionsGet200ResponsePaymentInformationCard.md new file mode 100644 index 00000000..df4b3319 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponsePaymentInformationCard.md @@ -0,0 +1,17 @@ +# CyberSource::TssV2TransactionsGet200ResponsePaymentInformationCard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**suffix** | **String** | Last four digits of the cardholder’s account number. This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. | [optional] +**prefix** | **String** | The description for this field is not available. | [optional] +**expiration_month** | **String** | Two-digit month in which the credit card expires. `Format: MM`. Possible values: 01 through 12. **Encoded Account Numbers** For encoded account numbers (_type_=039), if there is no expiration date on the card, use 12. For processor-specific information, see the customer_cc_expmo field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**expiration_year** | **String** | Four-digit year in which the credit card expires. `Format: YYYY`. **Encoded Account Numbers** For encoded account numbers (_type_=039), if there is no expiration date on the card, use 2021. For processor-specific information, see the customer_cc_expyr field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**start_month** | **String** | Month of the start of the Maestro (UK Domestic) card validity period. Do not include the field, even with a blank value, if the card is not a Maestro (UK Domestic) card. `Format: MM`. Possible values: 01 through 12. The start date is not required for Maestro (UK Domestic) transactions. | [optional] +**start_year** | **String** | Year of the start of the Maestro (UK Domestic) card validity period. Do not include the field, even with a blank value, if the card is not a Maestro (UK Domestic) card. `Format: YYYY`. The start date is not required for Maestro (UK Domestic) transactions. | [optional] +**issue_number** | **String** | Number of times a Maestro (UK Domestic) card has been issued to the account holder. The card might or might not have an issue number. The number can consist of one or two digits, and the first digit might be a zero. When you include this value in your request, include exactly what is printed on the card. A value of 2 is different than a value of 02. Do not include the field, even with a blank value, if the card is not a Maestro (UK Domestic) card. The issue number is not required for Maestro (UK Domestic) transactions. | [optional] +**type** | **String** | Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover | [optional] +**account_encoder_id** | **String** | Identifier for the issuing bank that provided the customer’s encoded account number. Contact your processor for the bank’s ID. | [optional] +**use_as** | **String** | Flag that specifies the type of account associated with the card. The cardholder provides this information during the payment process. **Cielo** and **Comercio Latino** Possible values: - CREDIT: Credit card - DEBIT: Debit card This field is required for: - Debit transactions on Cielo and Comercio Latino. - Transactions with Brazilian-issued cards on CyberSource through VisaNet. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponsePaymentInformationInvoice.md b/docs/TssV2TransactionsGet200ResponsePaymentInformationInvoice.md new file mode 100644 index 00000000..a670af12 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponsePaymentInformationInvoice.md @@ -0,0 +1,10 @@ +# CyberSource::TssV2TransactionsGet200ResponsePaymentInformationInvoice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number** | **String** | Invoice Number. | [optional] +**barcode_number** | **String** | Barcode Number. | [optional] +**expiration_date** | **String** | Expiration Date. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponsePaymentInformationPaymentType.md b/docs/TssV2TransactionsGet200ResponsePaymentInformationPaymentType.md new file mode 100644 index 00000000..ea0d2cce --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponsePaymentInformationPaymentType.md @@ -0,0 +1,14 @@ +# CyberSource::TssV2TransactionsGet200ResponsePaymentInformationPaymentType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | The description for this field is not available. | [optional] +**type** | **String** | The description for this field is not available. | [optional] +**sub_type** | **String** | The description for this field is not available. | [optional] +**method** | **String** | The description for this field is not available. | [optional] +**funding_source** | **String** | The description for this field is not available. | [optional] +**funding_source_affiliation** | **String** | The description for this field is not available. | [optional] +**credential** | **String** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponsePointOfSaleInformation.md b/docs/TssV2TransactionsGet200ResponsePointOfSaleInformation.md new file mode 100644 index 00000000..2e14a647 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponsePointOfSaleInformation.md @@ -0,0 +1,9 @@ +# CyberSource::TssV2TransactionsGet200ResponsePointOfSaleInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**entry_mode** | **String** | Method of entering credit card information into the POS terminal. Possible values: - contact: Read from direct contact with chip card. - contactless: Read from a contactless interface using chip data. - keyed: Manually keyed into POS terminal. - msd: Read from a contactless interface using magnetic stripe data (MSD). - swiped: Read from credit card magnetic stripe. The contact, contactless, and msd values are supported only for EMV transactions. * Applicable only for CTV for Payouts. | [optional] +**terminal_capability** | **Integer** | POS terminal’s capability. Possible values: - 1: Terminal has a magnetic stripe reader only. - 2: Terminal has a magnetic stripe reader and manual entry capability. - 3: Terminal has manual entry capability only. - 4: Terminal can read chip cards. - 5: Terminal can read contactless chip cards. The values of 4 and 5 are supported only for EMV transactions. * Applicable only for CTV for Payouts. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseProcessingInformation.md b/docs/TssV2TransactionsGet200ResponseProcessingInformation.md new file mode 100644 index 00000000..01ed9bf9 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseProcessingInformation.md @@ -0,0 +1,12 @@ +# CyberSource::TssV2TransactionsGet200ResponseProcessingInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payment_solution** | **String** | Type of digital payment solution that is being used for the transaction. Possible Values: - **visacheckout**: Visa Checkout. - **001**: Apple Pay. - **005**: Masterpass. Required for Masterpass transactions on OmniPay Direct. - **006**: Android Pay. - **008**: Samsung Pay. | [optional] +**commerce_indicator** | **String** | Type of transaction. Some payment card companies use this information when determining discount rates. When you omit this field for **Ingenico ePayments**, the processor uses the default transaction type they have on file for you instead of the default value listed here. | [optional] +**business_application_id** | **String** | The description for this field is not available. | [optional] +**authorization_options** | [**TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions**](TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions.md) | | [optional] +**bank_transfer_options** | [**TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions**](TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions.md) | | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions.md b/docs/TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions.md new file mode 100644 index 00000000..e1023252 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_type** | **String** | 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) | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions.md b/docs/TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions.md new file mode 100644 index 00000000..3040c963 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sec_code** | **String** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseProcessorInformation.md b/docs/TssV2TransactionsGet200ResponseProcessorInformation.md new file mode 100644 index 00000000..361e79b9 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseProcessorInformation.md @@ -0,0 +1,18 @@ +# CyberSource::TssV2TransactionsGet200ResponseProcessorInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**processor** | [**TssV2TransactionsGet200ResponseProcessorInformationProcessor**](TssV2TransactionsGet200ResponseProcessorInformationProcessor.md) | | [optional] +**transaction_id** | **String** | Network transaction identifier (TID). You can use this value to identify a specific transaction when you are discussing the transaction with your processor. Not all processors provide this value. | [optional] +**network_transaction_id** | **String** | The description for this field is not available. | [optional] +**response_id** | **String** | The description for this field is not available. | [optional] +**provider_transaction_id** | **String** | The description for this field is not available. | [optional] +**approval_code** | **String** | Authorization code. Returned only when the processor returns this value. | [optional] +**response_code** | **String** | For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of the authorization. | [optional] +**avs** | [**PtsV2PaymentsPost201ResponseProcessorInformationAvs**](PtsV2PaymentsPost201ResponseProcessorInformationAvs.md) | | [optional] +**card_verification** | [**TssV2TransactionsGet200ResponseProcessorInformationCardVerification**](TssV2TransactionsGet200ResponseProcessorInformationCardVerification.md) | | [optional] +**ach_verification** | [**TssV2TransactionsGet200ResponseProcessorInformationAchVerification**](TssV2TransactionsGet200ResponseProcessorInformationAchVerification.md) | | [optional] +**electronic_verification_results** | [**TssV2TransactionsGet200ResponseProcessorInformationElectronicVerificationResults**](TssV2TransactionsGet200ResponseProcessorInformationElectronicVerificationResults.md) | | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseProcessorInformationAchVerification.md b/docs/TssV2TransactionsGet200ResponseProcessorInformationAchVerification.md new file mode 100644 index 00000000..32c5af2a --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseProcessorInformationAchVerification.md @@ -0,0 +1,9 @@ +# CyberSource::TssV2TransactionsGet200ResponseProcessorInformationAchVerification + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result_code** | **String** | The description for this field is not available.. | [optional] +**result_code_raw** | **String** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseProcessorInformationCardVerification.md b/docs/TssV2TransactionsGet200ResponseProcessorInformationCardVerification.md new file mode 100644 index 00000000..dd3fd084 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseProcessorInformationCardVerification.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsGet200ResponseProcessorInformationCardVerification + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result_code** | **String** | CVN result code. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseProcessorInformationElectronicVerificationResults.md b/docs/TssV2TransactionsGet200ResponseProcessorInformationElectronicVerificationResults.md new file mode 100644 index 00000000..6502e6bb --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseProcessorInformationElectronicVerificationResults.md @@ -0,0 +1,17 @@ +# CyberSource::TssV2TransactionsGet200ResponseProcessorInformationElectronicVerificationResults + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | Mapped Electronic Verification response code for the customer’s email address. | [optional] +**email_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s email address. | [optional] +**name** | **String** | The description for this field is not available. | [optional] +**name_raw** | **String** | The description for this field is not available. | [optional] +**phone_number** | **String** | Mapped Electronic Verification response code for the customer’s phone number. | [optional] +**phone_number_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s phone number. | [optional] +**street** | **String** | Mapped Electronic Verification response code for the customer’s street address. | [optional] +**street_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s street address. | [optional] +**postal_code** | **String** | Mapped Electronic Verification response code for the customer’s postal code. | [optional] +**postal_code_raw** | **String** | Raw Electronic Verification response code from the processor for the customer’s postal code. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseProcessorInformationProcessor.md b/docs/TssV2TransactionsGet200ResponseProcessorInformationProcessor.md new file mode 100644 index 00000000..18fbc7c0 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseProcessorInformationProcessor.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsGet200ResponseProcessorInformationProcessor + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of the Processor. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseRiskInformation.md b/docs/TssV2TransactionsGet200ResponseRiskInformation.md new file mode 100644 index 00000000..0f3b5f8e --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseRiskInformation.md @@ -0,0 +1,13 @@ +# CyberSource::TssV2TransactionsGet200ResponseRiskInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**profile** | [**TssV2TransactionsGet200ResponseRiskInformationProfile**](TssV2TransactionsGet200ResponseRiskInformationProfile.md) | | [optional] +**rules** | [**Array<TssV2TransactionsGet200ResponseRiskInformationProfile>**](TssV2TransactionsGet200ResponseRiskInformationProfile.md) | | [optional] +**passive_profile** | [**TssV2TransactionsGet200ResponseRiskInformationProfile**](TssV2TransactionsGet200ResponseRiskInformationProfile.md) | | [optional] +**passive_rules** | [**Array<TssV2TransactionsGet200ResponseRiskInformationProfile>**](TssV2TransactionsGet200ResponseRiskInformationProfile.md) | | [optional] +**score** | [**TssV2TransactionsGet200ResponseRiskInformationScore**](TssV2TransactionsGet200ResponseRiskInformationScore.md) | | [optional] +**local_time** | **String** | Time that the transaction was submitted in local time.. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseRiskInformationProfile.md b/docs/TssV2TransactionsGet200ResponseRiskInformationProfile.md new file mode 100644 index 00000000..2743fee9 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseRiskInformationProfile.md @@ -0,0 +1,9 @@ +# CyberSource::TssV2TransactionsGet200ResponseRiskInformationProfile + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | The description for this field is not available. | [optional] +**decision** | **String** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseRiskInformationScore.md b/docs/TssV2TransactionsGet200ResponseRiskInformationScore.md new file mode 100644 index 00000000..d6b3f361 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseRiskInformationScore.md @@ -0,0 +1,9 @@ +# CyberSource::TssV2TransactionsGet200ResponseRiskInformationScore + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**factor_codes** | **Array<String>** | Array of factor codes. | [optional] +**result** | **Integer** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsGet200ResponseSenderInformation.md b/docs/TssV2TransactionsGet200ResponseSenderInformation.md new file mode 100644 index 00000000..ee0092c1 --- /dev/null +++ b/docs/TssV2TransactionsGet200ResponseSenderInformation.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsGet200ResponseSenderInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reference_number** | **String** | Reference number generated by you that uniquely identifies the sender. | [optional] + + diff --git a/docs/TssV2TransactionsPost201Response.md b/docs/TssV2TransactionsPost201Response.md new file mode 100644 index 00000000..abcc859b --- /dev/null +++ b/docs/TssV2TransactionsPost201Response.md @@ -0,0 +1,20 @@ +# CyberSource::TssV2TransactionsPost201Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] +**save** | **BOOLEAN** | save or not save. | [optional] +**name** | **String** | The description for this field is not available. | [optional] +**timezone** | **String** | Time Zone. | [optional] +**query** | **String** | transaction search query string. | [optional] +**offset** | **Integer** | offset. | [optional] +**limit** | **Integer** | limit on number of results. | [optional] +**sort** | **String** | A comma separated list of the following form - fieldName1 asc or desc, fieldName2 asc or desc, etc. | [optional] +**count** | **Integer** | Results for this page, this could be below the limit. | [optional] +**total_count** | **Integer** | total number of results. | [optional] +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] +**_embedded** | [**TssV2TransactionsPost201ResponseEmbedded**](TssV2TransactionsPost201ResponseEmbedded.md) | | [optional] +**_links** | [**PtsV2PaymentsReversalsPost201ResponseLinks**](PtsV2PaymentsReversalsPost201ResponseLinks.md) | | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbedded.md b/docs/TssV2TransactionsPost201ResponseEmbedded.md new file mode 100644 index 00000000..f875dab6 --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbedded.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbedded + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_summaries** | [**Array<TssV2TransactionsPost201ResponseEmbeddedTransactionSummaries>**](TssV2TransactionsPost201ResponseEmbeddedTransactionSummaries.md) | transaction search summary | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedBuyerInformation.md b/docs/TssV2TransactionsPost201ResponseEmbeddedBuyerInformation.md new file mode 100644 index 00000000..20035fe9 --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedBuyerInformation.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedBuyerInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**merchant_customer_id** | **String** | Your identifier for the customer. For processor-specific information, see the customer_account_id field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedClientReferenceInformation.md b/docs/TssV2TransactionsPost201ResponseEmbeddedClientReferenceInformation.md new file mode 100644 index 00000000..c7d87446 --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedClientReferenceInformation.md @@ -0,0 +1,10 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedClientReferenceInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **String** | Client-generated order reference or tracking number. CyberSource recommends that you send a unique value for each transaction so that you can perform meaningful searches for the transaction. | [optional] +**application_name** | **String** | The application name of client which is used to submit the request. | [optional] +**application_user** | **String** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedConsumerAuthenticationInformation.md b/docs/TssV2TransactionsPost201ResponseEmbeddedConsumerAuthenticationInformation.md new file mode 100644 index 00000000..de9ce557 --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedConsumerAuthenticationInformation.md @@ -0,0 +1,9 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedConsumerAuthenticationInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**xid** | **String** | Transaction identifier. | [optional] +**transaction_id** | **String** | Payer auth Transaction identifier. | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedDeviceInformation.md b/docs/TssV2TransactionsPost201ResponseEmbeddedDeviceInformation.md new file mode 100644 index 00000000..f5928294 --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedDeviceInformation.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedDeviceInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip_address** | **String** | IP address of the customer. | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedLinks.md b/docs/TssV2TransactionsPost201ResponseEmbeddedLinks.md new file mode 100644 index 00000000..76b65b9a --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedLinks.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_detail** | [**PtsV2PaymentsPost201ResponseLinksSelf**](PtsV2PaymentsPost201ResponseLinksSelf.md) | | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedMerchantInformation.md b/docs/TssV2TransactionsPost201ResponseEmbeddedMerchantInformation.md new file mode 100644 index 00000000..87c69199 --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedMerchantInformation.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedMerchantInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reseller_id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedOrderInformation.md b/docs/TssV2TransactionsPost201ResponseEmbeddedOrderInformation.md new file mode 100644 index 00000000..8c62c2d6 --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedOrderInformation.md @@ -0,0 +1,10 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedOrderInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bill_to** | [**TssV2TransactionsPost201ResponseEmbeddedOrderInformationBillTo**](TssV2TransactionsPost201ResponseEmbeddedOrderInformationBillTo.md) | | [optional] +**ship_to** | [**TssV2TransactionsPost201ResponseEmbeddedOrderInformationShipTo**](TssV2TransactionsPost201ResponseEmbeddedOrderInformationShipTo.md) | | [optional] +**amount_details** | [**Ptsv2paymentsidreversalsReversalInformationAmountDetails**](Ptsv2paymentsidreversalsReversalInformationAmountDetails.md) | | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedOrderInformationBillTo.md b/docs/TssV2TransactionsPost201ResponseEmbeddedOrderInformationBillTo.md new file mode 100644 index 00000000..954b32f6 --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedOrderInformationBillTo.md @@ -0,0 +1,12 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedOrderInformationBillTo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**first_name** | **String** | Customer’s first name. This name must be the same as the name on the card. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the customer_firstname field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**last_name** | **String** | Customer’s last name. This name must be the same as the name on the card. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the customer_lastname field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**email** | **String** | Customer's email address, including the full domain name. For processor-specific information, see the customer_email field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**country** | **String** | Country of the billing address. Use the two-character ISO Standard Country Codes. For processor-specific information, see the bill_country field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**phone_number** | **String** | Customer’s phone number. For Payouts: This field may be sent only for FDC Compass. CyberSource recommends that you include the country code when the order is from outside the U.S. For processor-specific information, see the customer_phone field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedOrderInformationShipTo.md b/docs/TssV2TransactionsPost201ResponseEmbeddedOrderInformationShipTo.md new file mode 100644 index 00000000..bf1c5ab2 --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedOrderInformationShipTo.md @@ -0,0 +1,12 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedOrderInformationShipTo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**first_name** | **String** | First name of the recipient. **Processor specific maximum length** - Litle: 25 - All other processors: 60 | [optional] +**last_name** | **String** | Last name of the recipient. **Processor specific maximum length** - Litle: 25 - All other processors: 60 | [optional] +**address1** | **String** | First line of the shipping address. | [optional] +**country** | **String** | Country of the shipping address. Use the two character ISO Standard Country Codes. | [optional] +**phone_number** | **String** | Phone number for the shipping address. | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedPaymentInformation.md b/docs/TssV2TransactionsPost201ResponseEmbeddedPaymentInformation.md new file mode 100644 index 00000000..89ef2875 --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedPaymentInformation.md @@ -0,0 +1,10 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedPaymentInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payment_method** | [**TssV2TransactionsPost201ResponseEmbeddedPaymentInformationPaymentMethod**](TssV2TransactionsPost201ResponseEmbeddedPaymentInformationPaymentMethod.md) | | [optional] +**customer** | [**Ptsv2paymentsPaymentInformationCustomer**](Ptsv2paymentsPaymentInformationCustomer.md) | | [optional] +**card** | [**TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCard**](TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCard.md) | | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCard.md b/docs/TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCard.md new file mode 100644 index 00000000..f38cb1fb --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCard.md @@ -0,0 +1,10 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**suffix** | **String** | Last four digits of the cardholder’s account number. This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. | [optional] +**prefix** | **String** | The description for this field is not available. | [optional] +**type** | **String** | Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedPaymentInformationPaymentMethod.md b/docs/TssV2TransactionsPost201ResponseEmbeddedPaymentInformationPaymentMethod.md new file mode 100644 index 00000000..99cf695a --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedPaymentInformationPaymentMethod.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedPaymentInformationPaymentMethod + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformation.md b/docs/TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformation.md new file mode 100644 index 00000000..2eaa8496 --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformation.md @@ -0,0 +1,11 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**terminal_id** | **String** | Identifier for the terminal at your retail location. You can define this value yourself, but consult the processor for requirements. For Payouts: This field is applicable for CtV. | [optional] +**terminal_serial_number** | **String** | The description for this field is not available. | [optional] +**device_id** | **String** | The description for this field is not available. | [optional] +**partner** | [**TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformationPartner**](TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformationPartner.md) | | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformationPartner.md b/docs/TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformationPartner.md new file mode 100644 index 00000000..98ecc6c0 --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformationPartner.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformationPartner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**original_transaction_id** | **String** | Network transaction identifier (TID). You can use this value to identify a specific transaction when you are discussing the transaction with your processor. Not all processors provide this value. | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedProcessingInformation.md b/docs/TssV2TransactionsPost201ResponseEmbeddedProcessingInformation.md new file mode 100644 index 00000000..1fa7dd56 --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedProcessingInformation.md @@ -0,0 +1,9 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedProcessingInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payment_solution** | **String** | Type of digital payment solution that is being used for the transaction. Possible Values: - **visacheckout**: Visa Checkout. - **001**: Apple Pay. - **005**: Masterpass. Required for Masterpass transactions on OmniPay Direct. - **006**: Android Pay. - **008**: Samsung Pay. | [optional] +**business_application_id** | **String** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedProcessorInformation.md b/docs/TssV2TransactionsPost201ResponseEmbeddedProcessorInformation.md new file mode 100644 index 00000000..30b3390f --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedProcessorInformation.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedProcessorInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**processor** | [**TssV2TransactionsGet200ResponseProcessorInformationProcessor**](TssV2TransactionsGet200ResponseProcessorInformationProcessor.md) | | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedRiskInformation.md b/docs/TssV2TransactionsPost201ResponseEmbeddedRiskInformation.md new file mode 100644 index 00000000..d91a8a04 --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedRiskInformation.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedRiskInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**providers** | [**TssV2TransactionsPost201ResponseEmbeddedRiskInformationProviders**](TssV2TransactionsPost201ResponseEmbeddedRiskInformationProviders.md) | | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedRiskInformationProviders.md b/docs/TssV2TransactionsPost201ResponseEmbeddedRiskInformationProviders.md new file mode 100644 index 00000000..f47d9b9c --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedRiskInformationProviders.md @@ -0,0 +1,8 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedRiskInformationProviders + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fingerprint** | [**TssV2TransactionsPost201ResponseEmbeddedRiskInformationProvidersFingerprint**](TssV2TransactionsPost201ResponseEmbeddedRiskInformationProvidersFingerprint.md) | | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedRiskInformationProvidersFingerprint.md b/docs/TssV2TransactionsPost201ResponseEmbeddedRiskInformationProvidersFingerprint.md new file mode 100644 index 00000000..81e739ac --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedRiskInformationProvidersFingerprint.md @@ -0,0 +1,10 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedRiskInformationProvidersFingerprint + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**true_ipaddress** | **String** | The description for this field is not available. | [optional] +**hash** | **String** | The description for this field is not available. | [optional] +**smart_id** | **String** | The description for this field is not available. | [optional] + + diff --git a/docs/TssV2TransactionsPost201ResponseEmbeddedTransactionSummaries.md b/docs/TssV2TransactionsPost201ResponseEmbeddedTransactionSummaries.md new file mode 100644 index 00000000..b6b7f481 --- /dev/null +++ b/docs/TssV2TransactionsPost201ResponseEmbeddedTransactionSummaries.md @@ -0,0 +1,25 @@ +# CyberSource::TssV2TransactionsPost201ResponseEmbeddedTransactionSummaries + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] +**merchant_id** | **String** | The description for this field is not available. | [optional] +**application_information** | [**TssV2TransactionsGet200ResponseApplicationInformation**](TssV2TransactionsGet200ResponseApplicationInformation.md) | | [optional] +**buyer_information** | [**TssV2TransactionsPost201ResponseEmbeddedBuyerInformation**](TssV2TransactionsPost201ResponseEmbeddedBuyerInformation.md) | | [optional] +**client_reference_information** | [**TssV2TransactionsPost201ResponseEmbeddedClientReferenceInformation**](TssV2TransactionsPost201ResponseEmbeddedClientReferenceInformation.md) | | [optional] +**consumer_authentication_information** | [**TssV2TransactionsPost201ResponseEmbeddedConsumerAuthenticationInformation**](TssV2TransactionsPost201ResponseEmbeddedConsumerAuthenticationInformation.md) | | [optional] +**device_information** | [**TssV2TransactionsPost201ResponseEmbeddedDeviceInformation**](TssV2TransactionsPost201ResponseEmbeddedDeviceInformation.md) | | [optional] +**fraud_marking_information** | [**TssV2TransactionsGet200ResponseFraudMarkingInformation**](TssV2TransactionsGet200ResponseFraudMarkingInformation.md) | | [optional] +**merchant_defined_information** | [**Array<TssV2TransactionsGet200ResponseMerchantDefinedInformation>**](TssV2TransactionsGet200ResponseMerchantDefinedInformation.md) | The description for this field is not available. | [optional] +**merchant_information** | [**TssV2TransactionsPost201ResponseEmbeddedMerchantInformation**](TssV2TransactionsPost201ResponseEmbeddedMerchantInformation.md) | | [optional] +**order_information** | [**TssV2TransactionsPost201ResponseEmbeddedOrderInformation**](TssV2TransactionsPost201ResponseEmbeddedOrderInformation.md) | | [optional] +**payment_information** | [**TssV2TransactionsPost201ResponseEmbeddedPaymentInformation**](TssV2TransactionsPost201ResponseEmbeddedPaymentInformation.md) | | [optional] +**processing_information** | [**TssV2TransactionsPost201ResponseEmbeddedProcessingInformation**](TssV2TransactionsPost201ResponseEmbeddedProcessingInformation.md) | | [optional] +**processor_information** | [**TssV2TransactionsPost201ResponseEmbeddedProcessorInformation**](TssV2TransactionsPost201ResponseEmbeddedProcessorInformation.md) | | [optional] +**point_of_sale_information** | [**TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformation**](TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformation.md) | | [optional] +**risk_information** | [**TssV2TransactionsPost201ResponseEmbeddedRiskInformation**](TssV2TransactionsPost201ResponseEmbeddedRiskInformation.md) | | [optional] +**_links** | [**TssV2TransactionsPost201ResponseEmbeddedLinks**](TssV2TransactionsPost201ResponseEmbeddedLinks.md) | | [optional] + + diff --git a/docs/TssV2TransactionsPost400Response.md b/docs/TssV2TransactionsPost400Response.md new file mode 100644 index 00000000..4ec44214 --- /dev/null +++ b/docs/TssV2TransactionsPost400Response.md @@ -0,0 +1,11 @@ +# CyberSource::TssV2TransactionsPost400Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**submit_time_utc** | **String** | Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. | [optional] +**status** | **String** | The status of the submitted transaction. | [optional] +**message** | **String** | The detail message related to the status and reason listed above. | [optional] +**details** | [**Array<PtsV2PaymentsPost201ResponseErrorInformationDetails>**](PtsV2PaymentsPost201ResponseErrorInformationDetails.md) | | [optional] + + diff --git a/docs/TssV2TransactionsPostResponse.md b/docs/TssV2TransactionsPostResponse.md new file mode 100644 index 00000000..b2998416 --- /dev/null +++ b/docs/TssV2TransactionsPostResponse.md @@ -0,0 +1,14 @@ +# CyberSource::TssV2TransactionsPostResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**save** | **BOOLEAN** | save or not save. | [optional] +**name** | **String** | The description for this field is not available. | [optional] +**timezone** | **String** | Time Zone. | [optional] +**query** | **String** | transaction search query string. | [optional] +**offset** | **Integer** | offset. | [optional] +**limit** | **Integer** | limit on number of results. | [optional] +**sort** | **String** | A comma separated list of the following form - fieldName1 asc or desc, fieldName2 asc or desc, etc. | [optional] + + diff --git a/docs/UmsV1UsersGet200Response.md b/docs/UmsV1UsersGet200Response.md new file mode 100644 index 00000000..5b1ce658 --- /dev/null +++ b/docs/UmsV1UsersGet200Response.md @@ -0,0 +1,8 @@ +# CyberSource::UmsV1UsersGet200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**Array<UmsV1UsersGet200ResponseUsers>**](UmsV1UsersGet200ResponseUsers.md) | | [optional] + + diff --git a/docs/UmsV1UsersGet200ResponseAccountInformation.md b/docs/UmsV1UsersGet200ResponseAccountInformation.md new file mode 100644 index 00000000..1d6f499a --- /dev/null +++ b/docs/UmsV1UsersGet200ResponseAccountInformation.md @@ -0,0 +1,15 @@ +# CyberSource::UmsV1UsersGet200ResponseAccountInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_name** | **String** | | [optional] +**role_id** | **String** | | [optional] +**permissions** | **Array<String>** | | [optional] +**status** | **String** | | [optional] +**created_time** | **DateTime** | | [optional] +**last_access_time** | **DateTime** | | [optional] +**language_preference** | **String** | | [optional] +**timezone** | **String** | | [optional] + + diff --git a/docs/UmsV1UsersGet200ResponseContactInformation.md b/docs/UmsV1UsersGet200ResponseContactInformation.md new file mode 100644 index 00000000..9497c9cf --- /dev/null +++ b/docs/UmsV1UsersGet200ResponseContactInformation.md @@ -0,0 +1,11 @@ +# CyberSource::UmsV1UsersGet200ResponseContactInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | | [optional] +**phone_number** | **String** | | [optional] +**first_name** | **String** | | [optional] +**last_name** | **String** | | [optional] + + diff --git a/docs/UmsV1UsersGet200ResponseOrganizationInformation.md b/docs/UmsV1UsersGet200ResponseOrganizationInformation.md new file mode 100644 index 00000000..56492e08 --- /dev/null +++ b/docs/UmsV1UsersGet200ResponseOrganizationInformation.md @@ -0,0 +1,8 @@ +# CyberSource::UmsV1UsersGet200ResponseOrganizationInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_id** | **String** | | [optional] + + diff --git a/docs/UmsV1UsersGet200ResponseUsers.md b/docs/UmsV1UsersGet200ResponseUsers.md new file mode 100644 index 00000000..af8f70aa --- /dev/null +++ b/docs/UmsV1UsersGet200ResponseUsers.md @@ -0,0 +1,10 @@ +# CyberSource::UmsV1UsersGet200ResponseUsers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_information** | [**UmsV1UsersGet200ResponseAccountInformation**](UmsV1UsersGet200ResponseAccountInformation.md) | | [optional] +**organization_information** | [**UmsV1UsersGet200ResponseOrganizationInformation**](UmsV1UsersGet200ResponseOrganizationInformation.md) | | [optional] +**contact_information** | [**UmsV1UsersGet200ResponseContactInformation**](UmsV1UsersGet200ResponseContactInformation.md) | | [optional] + + diff --git a/docs/UserManagementApi.md b/docs/UserManagementApi.md index 89b60cc6..65d8fc03 100644 --- a/docs/UserManagementApi.md +++ b/docs/UserManagementApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **get_users** -> InlineResponse20013 get_users(opts) +> UmsV1UsersGet200Response get_users(opts) Get user based on organization Id, username, permission and role @@ -48,7 +48,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20013**](InlineResponse20013.md) +[**UmsV1UsersGet200Response**](UmsV1UsersGet200Response.md) ### Authorization diff --git a/docs/V1FileDetailsGet200Response.md b/docs/V1FileDetailsGet200Response.md new file mode 100644 index 00000000..bd4abe15 --- /dev/null +++ b/docs/V1FileDetailsGet200Response.md @@ -0,0 +1,9 @@ +# CyberSource::V1FileDetailsGet200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file_details** | [**Array<V1FileDetailsGet200ResponseFileDetails>**](V1FileDetailsGet200ResponseFileDetails.md) | | [optional] +**_links** | [**V1FileDetailsGet200ResponseLinks**](V1FileDetailsGet200ResponseLinks.md) | | [optional] + + diff --git a/docs/V1FileDetailsGet200ResponseFileDetails.md b/docs/V1FileDetailsGet200ResponseFileDetails.md new file mode 100644 index 00000000..08e6747b --- /dev/null +++ b/docs/V1FileDetailsGet200ResponseFileDetails.md @@ -0,0 +1,14 @@ +# CyberSource::V1FileDetailsGet200ResponseFileDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file_id** | **String** | Unique identifier of a file | [optional] +**name** | **String** | Name of the file | [optional] +**created_time** | **DateTime** | Date and time for the file in PST | [optional] +**last_modified_time** | **DateTime** | Date and time for the file in PST | [optional] +**date** | **Date** | Date and time for the file in PST | [optional] +**mime_type** | **String** | File extension | [optional] +**size** | **Integer** | Size of the file in bytes | [optional] + + diff --git a/docs/V1FileDetailsGet200ResponseLinks.md b/docs/V1FileDetailsGet200ResponseLinks.md new file mode 100644 index 00000000..406b317f --- /dev/null +++ b/docs/V1FileDetailsGet200ResponseLinks.md @@ -0,0 +1,9 @@ +# CyberSource::V1FileDetailsGet200ResponseLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_self** | [**V1FileDetailsGet200ResponseLinksSelf**](V1FileDetailsGet200ResponseLinksSelf.md) | | [optional] +**files** | [**Array<V1FileDetailsGet200ResponseLinksFiles>**](V1FileDetailsGet200ResponseLinksFiles.md) | | [optional] + + diff --git a/docs/V1FileDetailsGet200ResponseLinksFiles.md b/docs/V1FileDetailsGet200ResponseLinksFiles.md new file mode 100644 index 00000000..c6ca05f7 --- /dev/null +++ b/docs/V1FileDetailsGet200ResponseLinksFiles.md @@ -0,0 +1,10 @@ +# CyberSource::V1FileDetailsGet200ResponseLinksFiles + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file_id** | **String** | Unique identifier for each file | [optional] +**href** | **String** | | [optional] +**method** | **String** | | [optional] + + diff --git a/docs/V1FileDetailsGet200ResponseLinksSelf.md b/docs/V1FileDetailsGet200ResponseLinksSelf.md new file mode 100644 index 00000000..efca2461 --- /dev/null +++ b/docs/V1FileDetailsGet200ResponseLinksSelf.md @@ -0,0 +1,9 @@ +# CyberSource::V1FileDetailsGet200ResponseLinksSelf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | | [optional] +**method** | **String** | | [optional] + + diff --git a/docs/VoidApi.md b/docs/VoidApi.md index 63d3835c..348ef500 100644 --- a/docs/VoidApi.md +++ b/docs/VoidApi.md @@ -11,7 +11,7 @@ Method | HTTP request | Description # **void_capture** -> InlineResponse2015 void_capture(void_capture_request, id) +> PtsV2PaymentsVoidsPost201Response void_capture(void_capture_request, id) Void a Capture @@ -47,7 +47,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2015**](InlineResponse2015.md) +[**PtsV2PaymentsVoidsPost201Response**](PtsV2PaymentsVoidsPost201Response.md) ### Authorization @@ -61,7 +61,7 @@ No authorization required # **void_credit** -> InlineResponse2015 void_credit(void_credit_request, id) +> PtsV2PaymentsVoidsPost201Response void_credit(void_credit_request, id) Void a Credit @@ -97,7 +97,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2015**](InlineResponse2015.md) +[**PtsV2PaymentsVoidsPost201Response**](PtsV2PaymentsVoidsPost201Response.md) ### Authorization @@ -111,7 +111,7 @@ No authorization required # **void_payment** -> InlineResponse2015 void_payment(void_payment_request, id) +> PtsV2PaymentsVoidsPost201Response void_payment(void_payment_request, id) Void a Payment @@ -147,7 +147,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2015**](InlineResponse2015.md) +[**PtsV2PaymentsVoidsPost201Response**](PtsV2PaymentsVoidsPost201Response.md) ### Authorization @@ -161,7 +161,7 @@ No authorization required # **void_refund** -> InlineResponse2015 void_refund(void_refund_request, id) +> PtsV2PaymentsVoidsPost201Response void_refund(void_refund_request, id) Void a Refund @@ -197,7 +197,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2015**](InlineResponse2015.md) +[**PtsV2PaymentsVoidsPost201Response**](PtsV2PaymentsVoidsPost201Response.md) ### Authorization diff --git a/lib/cybersource_rest_client.rb b/lib/cybersource_rest_client.rb index a2fac215..d89ca723 100644 --- a/lib/cybersource_rest_client.rb +++ b/lib/cybersource_rest_client.rb @@ -26,175 +26,17 @@ require 'cybersource_rest_client/models/card_info' require 'cybersource_rest_client/models/create_credit_request' require 'cybersource_rest_client/models/create_payment_request' -require 'cybersource_rest_client/models/create_search_request' require 'cybersource_rest_client/models/der_public_key' require 'cybersource_rest_client/models/error' require 'cybersource_rest_client/models/error_links' require 'cybersource_rest_client/models/error_response' +require 'cybersource_rest_client/models/flex_v1_keys_post200_response' +require 'cybersource_rest_client/models/flex_v1_keys_post200_response_der' +require 'cybersource_rest_client/models/flex_v1_keys_post200_response_jwk' +require 'cybersource_rest_client/models/flex_v1_tokens_post200_response' require 'cybersource_rest_client/models/flexv1tokens_card_info' require 'cybersource_rest_client/models/generate_public_key_request' -require 'cybersource_rest_client/models/inline_response_200' -require 'cybersource_rest_client/models/inline_response_200_1' -require 'cybersource_rest_client/models/inline_response_200_10' -require 'cybersource_rest_client/models/inline_response_200_11' -require 'cybersource_rest_client/models/inline_response_200_11__links' -require 'cybersource_rest_client/models/inline_response_200_11__links_first' -require 'cybersource_rest_client/models/inline_response_200_11__links_last' -require 'cybersource_rest_client/models/inline_response_200_11__links_next' -require 'cybersource_rest_client/models/inline_response_200_11__links_prev' -require 'cybersource_rest_client/models/inline_response_200_11__links_self' -require 'cybersource_rest_client/models/inline_response_200_12' -require 'cybersource_rest_client/models/inline_response_200_12_application_information' -require 'cybersource_rest_client/models/inline_response_200_12_application_information_applications' -require 'cybersource_rest_client/models/inline_response_200_12_buyer_information' -require 'cybersource_rest_client/models/inline_response_200_12_client_reference_information' -require 'cybersource_rest_client/models/inline_response_200_12_consumer_authentication_information' -require 'cybersource_rest_client/models/inline_response_200_12_device_information' -require 'cybersource_rest_client/models/inline_response_200_12_error_information' -require 'cybersource_rest_client/models/inline_response_200_12_fraud_marking_information' -require 'cybersource_rest_client/models/inline_response_200_12_installment_information' -require 'cybersource_rest_client/models/inline_response_200_12_merchant_defined_information' -require 'cybersource_rest_client/models/inline_response_200_12_merchant_information' -require 'cybersource_rest_client/models/inline_response_200_12_merchant_information_merchant_descriptor' -require 'cybersource_rest_client/models/inline_response_200_12_order_information' -require 'cybersource_rest_client/models/inline_response_200_12_order_information_amount_details' -require 'cybersource_rest_client/models/inline_response_200_12_order_information_bill_to' -require 'cybersource_rest_client/models/inline_response_200_12_order_information_line_items' -require 'cybersource_rest_client/models/inline_response_200_12_order_information_ship_to' -require 'cybersource_rest_client/models/inline_response_200_12_order_information_shipping_details' -require 'cybersource_rest_client/models/inline_response_200_12_payment_information' -require 'cybersource_rest_client/models/inline_response_200_12_payment_information_account_features' -require 'cybersource_rest_client/models/inline_response_200_12_payment_information_bank' -require 'cybersource_rest_client/models/inline_response_200_12_payment_information_bank_account' -require 'cybersource_rest_client/models/inline_response_200_12_payment_information_bank_mandate' -require 'cybersource_rest_client/models/inline_response_200_12_payment_information_card' -require 'cybersource_rest_client/models/inline_response_200_12_payment_information_invoice' -require 'cybersource_rest_client/models/inline_response_200_12_payment_information_payment_type' -require 'cybersource_rest_client/models/inline_response_200_12_point_of_sale_information' -require 'cybersource_rest_client/models/inline_response_200_12_processing_information' -require 'cybersource_rest_client/models/inline_response_200_12_processing_information_authorization_options' -require 'cybersource_rest_client/models/inline_response_200_12_processing_information_bank_transfer_options' -require 'cybersource_rest_client/models/inline_response_200_12_processor_information' -require 'cybersource_rest_client/models/inline_response_200_12_processor_information_ach_verification' -require 'cybersource_rest_client/models/inline_response_200_12_processor_information_card_verification' -require 'cybersource_rest_client/models/inline_response_200_12_processor_information_electronic_verification_results' -require 'cybersource_rest_client/models/inline_response_200_12_processor_information_processor' -require 'cybersource_rest_client/models/inline_response_200_12_risk_information' -require 'cybersource_rest_client/models/inline_response_200_12_risk_information_profile' -require 'cybersource_rest_client/models/inline_response_200_12_risk_information_score' -require 'cybersource_rest_client/models/inline_response_200_12_sender_information' -require 'cybersource_rest_client/models/inline_response_200_13' -require 'cybersource_rest_client/models/inline_response_200_13_account_information' -require 'cybersource_rest_client/models/inline_response_200_13_contact_information' -require 'cybersource_rest_client/models/inline_response_200_13_organization_information' -require 'cybersource_rest_client/models/inline_response_200_13_users' -require 'cybersource_rest_client/models/inline_response_200_2' -require 'cybersource_rest_client/models/inline_response_200_2__links' -require 'cybersource_rest_client/models/inline_response_200_2__links_self' -require 'cybersource_rest_client/models/inline_response_200_2_transaction_batches' -require 'cybersource_rest_client/models/inline_response_200_3' -require 'cybersource_rest_client/models/inline_response_200_3_notification_of_changes' -require 'cybersource_rest_client/models/inline_response_200_4' -require 'cybersource_rest_client/models/inline_response_200_4_report_definitions' -require 'cybersource_rest_client/models/inline_response_200_5' -require 'cybersource_rest_client/models/inline_response_200_5_attributes' -require 'cybersource_rest_client/models/inline_response_200_6' -require 'cybersource_rest_client/models/inline_response_200_6_report_preferences' -require 'cybersource_rest_client/models/inline_response_200_6_subscriptions' -require 'cybersource_rest_client/models/inline_response_200_7' -require 'cybersource_rest_client/models/inline_response_200_7_reports' -require 'cybersource_rest_client/models/inline_response_200_8' -require 'cybersource_rest_client/models/inline_response_200_9' -require 'cybersource_rest_client/models/inline_response_200_9_file_details' -require 'cybersource_rest_client/models/inline_response_200_9__links' -require 'cybersource_rest_client/models/inline_response_200_9__links_files' -require 'cybersource_rest_client/models/inline_response_200_9__links_self' -require 'cybersource_rest_client/models/inline_response_200_der' -require 'cybersource_rest_client/models/inline_response_200_jwk' -require 'cybersource_rest_client/models/inline_response_201' -require 'cybersource_rest_client/models/inline_response_201_1' -require 'cybersource_rest_client/models/inline_response_201_1_authorization_information' -require 'cybersource_rest_client/models/inline_response_201_1__links' -require 'cybersource_rest_client/models/inline_response_201_1_processor_information' -require 'cybersource_rest_client/models/inline_response_201_1_reversal_amount_details' -require 'cybersource_rest_client/models/inline_response_201_2' -require 'cybersource_rest_client/models/inline_response_201_2__links' -require 'cybersource_rest_client/models/inline_response_201_2_order_information' -require 'cybersource_rest_client/models/inline_response_201_2_order_information_amount_details' -require 'cybersource_rest_client/models/inline_response_201_2_processor_information' -require 'cybersource_rest_client/models/inline_response_201_3' -require 'cybersource_rest_client/models/inline_response_201_3__links' -require 'cybersource_rest_client/models/inline_response_201_3_order_information' -require 'cybersource_rest_client/models/inline_response_201_3_processor_information' -require 'cybersource_rest_client/models/inline_response_201_3_refund_amount_details' -require 'cybersource_rest_client/models/inline_response_201_4' -require 'cybersource_rest_client/models/inline_response_201_4_credit_amount_details' -require 'cybersource_rest_client/models/inline_response_201_5' -require 'cybersource_rest_client/models/inline_response_201_5_void_amount_details' -require 'cybersource_rest_client/models/inline_response_201_6' -require 'cybersource_rest_client/models/inline_response_201_7' -require 'cybersource_rest_client/models/inline_response_201_7__embedded' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_buyer_information' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_client_reference_information' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_consumer_authentication_information' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_device_information' -require 'cybersource_rest_client/models/inline_response_201_7__embedded__links' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_merchant_information' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_order_information' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_order_information_bill_to' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_order_information_ship_to' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_payment_information' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_payment_information_card' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_payment_information_payment_method' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_point_of_sale_information' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_point_of_sale_information_partner' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_processing_information' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_processor_information' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_risk_information' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_risk_information_providers' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_risk_information_providers_fingerprint' -require 'cybersource_rest_client/models/inline_response_201_7__embedded_transaction_summaries' -require 'cybersource_rest_client/models/inline_response_201_client_reference_information' -require 'cybersource_rest_client/models/inline_response_201_error_information' -require 'cybersource_rest_client/models/inline_response_201_error_information_details' -require 'cybersource_rest_client/models/inline_response_201__links' -require 'cybersource_rest_client/models/inline_response_201__links_self' -require 'cybersource_rest_client/models/inline_response_201_order_information' -require 'cybersource_rest_client/models/inline_response_201_order_information_amount_details' -require 'cybersource_rest_client/models/inline_response_201_order_information_invoice_details' -require 'cybersource_rest_client/models/inline_response_201_payment_information' -require 'cybersource_rest_client/models/inline_response_201_payment_information_account_features' -require 'cybersource_rest_client/models/inline_response_201_payment_information_card' -require 'cybersource_rest_client/models/inline_response_201_payment_information_tokenized_card' -require 'cybersource_rest_client/models/inline_response_201_point_of_sale_information' -require 'cybersource_rest_client/models/inline_response_201_point_of_sale_information_emv' -require 'cybersource_rest_client/models/inline_response_201_processor_information' -require 'cybersource_rest_client/models/inline_response_201_processor_information_avs' -require 'cybersource_rest_client/models/inline_response_201_processor_information_card_verification' -require 'cybersource_rest_client/models/inline_response_201_processor_information_consumer_authentication_response' -require 'cybersource_rest_client/models/inline_response_201_processor_information_customer' -require 'cybersource_rest_client/models/inline_response_201_processor_information_electronic_verification_results' -require 'cybersource_rest_client/models/inline_response_201_processor_information_issuer' -require 'cybersource_rest_client/models/inline_response_201_processor_information_merchant_advice' require 'cybersource_rest_client/models/inline_response_400' -require 'cybersource_rest_client/models/inline_response_400_1' -require 'cybersource_rest_client/models/inline_response_400_2' -require 'cybersource_rest_client/models/inline_response_400_3' -require 'cybersource_rest_client/models/inline_response_400_4' -require 'cybersource_rest_client/models/inline_response_400_5' -require 'cybersource_rest_client/models/inline_response_400_5_error_information' -require 'cybersource_rest_client/models/inline_response_400_5_error_information_details' -require 'cybersource_rest_client/models/inline_response_400_6' -require 'cybersource_rest_client/models/inline_response_400_7' -require 'cybersource_rest_client/models/inline_response_400_7_fields' -require 'cybersource_rest_client/models/inline_response_400_8' -require 'cybersource_rest_client/models/inline_response_400_9' -require 'cybersource_rest_client/models/inline_response_409' -require 'cybersource_rest_client/models/inline_response_409__links' -require 'cybersource_rest_client/models/inline_response_409__links_payment_instruments' -require 'cybersource_rest_client/models/inline_response_500' -require 'cybersource_rest_client/models/inline_response_500_error_information' -require 'cybersource_rest_client/models/inline_response_502' require 'cybersource_rest_client/models/inline_response_default' require 'cybersource_rest_client/models/inline_response_default__links' require 'cybersource_rest_client/models/inline_response_default__links_next' @@ -205,7 +47,65 @@ require 'cybersource_rest_client/models/key_result' require 'cybersource_rest_client/models/link' require 'cybersource_rest_client/models/links' -require 'cybersource_rest_client/models/oct_create_payment_request' +require 'cybersource_rest_client/models/pts_v1_transaction_batches_get200_response' +require 'cybersource_rest_client/models/pts_v1_transaction_batches_get200_response__links' +require 'cybersource_rest_client/models/pts_v1_transaction_batches_get200_response__links_self' +require 'cybersource_rest_client/models/pts_v1_transaction_batches_get200_response_transaction_batches' +require 'cybersource_rest_client/models/pts_v1_transaction_batches_get400_response' +require 'cybersource_rest_client/models/pts_v1_transaction_batches_get400_response_error_information' +require 'cybersource_rest_client/models/pts_v1_transaction_batches_get400_response_error_information_details' +require 'cybersource_rest_client/models/pts_v1_transaction_batches_get500_response' +require 'cybersource_rest_client/models/pts_v1_transaction_batches_get500_response_error_information' +require 'cybersource_rest_client/models/pts_v2_credits_post201_response' +require 'cybersource_rest_client/models/pts_v2_credits_post201_response_credit_amount_details' +require 'cybersource_rest_client/models/pts_v2_payments_captures_post201_response' +require 'cybersource_rest_client/models/pts_v2_payments_captures_post201_response__links' +require 'cybersource_rest_client/models/pts_v2_payments_captures_post201_response_order_information' +require 'cybersource_rest_client/models/pts_v2_payments_captures_post201_response_order_information_amount_details' +require 'cybersource_rest_client/models/pts_v2_payments_captures_post201_response_processor_information' +require 'cybersource_rest_client/models/pts_v2_payments_captures_post400_response' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_client_reference_information' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_error_information' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_error_information_details' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response__links' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response__links_self' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_order_information' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_amount_details' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_invoice_details' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_account_features' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_card' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_point_of_sale_information' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_point_of_sale_information_emv' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_avs' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_card_verification' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_consumer_authentication_response' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_customer' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_electronic_verification_results' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_issuer' +require 'cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_merchant_advice' +require 'cybersource_rest_client/models/pts_v2_payments_post400_response' +require 'cybersource_rest_client/models/pts_v2_payments_post502_response' +require 'cybersource_rest_client/models/pts_v2_payments_refund_post201_response' +require 'cybersource_rest_client/models/pts_v2_payments_refund_post201_response__links' +require 'cybersource_rest_client/models/pts_v2_payments_refund_post201_response_order_information' +require 'cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information' +require 'cybersource_rest_client/models/pts_v2_payments_refund_post201_response_refund_amount_details' +require 'cybersource_rest_client/models/pts_v2_payments_refund_post400_response' +require 'cybersource_rest_client/models/pts_v2_payments_reversals_post201_response' +require 'cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_authorization_information' +require 'cybersource_rest_client/models/pts_v2_payments_reversals_post201_response__links' +require 'cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_processor_information' +require 'cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_reversal_amount_details' +require 'cybersource_rest_client/models/pts_v2_payments_reversals_post400_response' +require 'cybersource_rest_client/models/pts_v2_payments_voids_post201_response' +require 'cybersource_rest_client/models/pts_v2_payments_voids_post201_response_void_amount_details' +require 'cybersource_rest_client/models/pts_v2_payments_voids_post400_response' +require 'cybersource_rest_client/models/pts_v2_payouts_post400_response' +require 'cybersource_rest_client/models/pts_v2_payouts_post_response' require 'cybersource_rest_client/models/ptsv2credits_point_of_sale_information' require 'cybersource_rest_client/models/ptsv2credits_point_of_sale_information_emv' require 'cybersource_rest_client/models/ptsv2credits_processing_information' @@ -291,10 +191,36 @@ require 'cybersource_rest_client/models/ptsv2payouts_sender_information_account' require 'cybersource_rest_client/models/refund_capture_request' require 'cybersource_rest_client/models/refund_payment_request' +require 'cybersource_rest_client/models/reporting_v3_notificationof_changes_get200_response' +require 'cybersource_rest_client/models/reporting_v3_notificationof_changes_get200_response_notification_of_changes' +require 'cybersource_rest_client/models/reporting_v3_notificationof_changes_get400_response' +require 'cybersource_rest_client/models/reporting_v3_notificationof_changes_get400_response_fields' +require 'cybersource_rest_client/models/reporting_v3_report_definitions_get200_response' +require 'cybersource_rest_client/models/reporting_v3_report_definitions_get200_response_report_definitions' +require 'cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response' +require 'cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response_attributes' +require 'cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response' +require 'cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response_report_preferences' +require 'cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response_subscriptions' +require 'cybersource_rest_client/models/reporting_v3_reports_get200_response' +require 'cybersource_rest_client/models/reporting_v3_reports_get200_response_reports' +require 'cybersource_rest_client/models/reporting_v3_reports_id_get200_response' require 'cybersource_rest_client/models/request_body' require 'cybersource_rest_client/models/request_body_1' require 'cybersource_rest_client/models/response_status' require 'cybersource_rest_client/models/response_status_details' +require 'cybersource_rest_client/models/tms_v1_instrumentidentifiers_delete409_response' +require 'cybersource_rest_client/models/tms_v1_instrumentidentifiers_delete409_response__links' +require 'cybersource_rest_client/models/tms_v1_instrumentidentifiers_delete409_response__links_payment_instruments' +require 'cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response' +require 'cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links' +require 'cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_first' +require 'cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_last' +require 'cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_next' +require 'cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_prev' +require 'cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_self' +require 'cybersource_rest_client/models/tms_v1_instrumentidentifiers_post200_response' +require 'cybersource_rest_client/models/tms_v1_paymentinstruments_post201_response' require 'cybersource_rest_client/models/tmsv1instrumentidentifiers_bank_account' require 'cybersource_rest_client/models/tmsv1instrumentidentifiers_card' require 'cybersource_rest_client/models/tmsv1instrumentidentifiers_details' @@ -319,6 +245,80 @@ require 'cybersource_rest_client/models/tokenize_parameters' require 'cybersource_rest_client/models/tokenize_request' require 'cybersource_rest_client/models/tokenize_result' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_application_information' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_application_information_applications' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_buyer_information' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_client_reference_information' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_consumer_authentication_information' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_device_information' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_error_information' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_fraud_marking_information' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_installment_information' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_merchant_defined_information' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_merchant_information' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_merchant_information_merchant_descriptor' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_amount_details' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_bill_to' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_line_items' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_ship_to' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_shipping_details' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_account_features' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank_account' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank_mandate' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_card' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_invoice' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_payment_type' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_point_of_sale_information' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_authorization_options' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_bank_transfer_options' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_ach_verification' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_card_verification' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_electronic_verification_results' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_processor' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_risk_information' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_risk_information_profile' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_risk_information_score' +require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_sender_information' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_buyer_information' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_client_reference_information' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_consumer_authentication_information' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_device_information' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded__links' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_merchant_information' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information_bill_to' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information_ship_to' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_card' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_payment_method' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information_partner' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processing_information' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processor_information' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_risk_information' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_risk_information_providers' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_risk_information_providers_fingerprint' +require 'cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_transaction_summaries' +require 'cybersource_rest_client/models/tss_v2_transactions_post400_response' +require 'cybersource_rest_client/models/tss_v2_transactions_post_response' +require 'cybersource_rest_client/models/ums_v1_users_get200_response' +require 'cybersource_rest_client/models/ums_v1_users_get200_response_account_information' +require 'cybersource_rest_client/models/ums_v1_users_get200_response_contact_information' +require 'cybersource_rest_client/models/ums_v1_users_get200_response_organization_information' +require 'cybersource_rest_client/models/ums_v1_users_get200_response_users' +require 'cybersource_rest_client/models/v1_file_details_get200_response' +require 'cybersource_rest_client/models/v1_file_details_get200_response_file_details' +require 'cybersource_rest_client/models/v1_file_details_get200_response__links' +require 'cybersource_rest_client/models/v1_file_details_get200_response__links_files' +require 'cybersource_rest_client/models/v1_file_details_get200_response__links_self' require 'cybersource_rest_client/models/void_capture_request' require 'cybersource_rest_client/models/void_credit_request' require 'cybersource_rest_client/models/void_payment_request' diff --git a/lib/cybersource_rest_client/api/capture_api.rb b/lib/cybersource_rest_client/api/capture_api.rb index 3858ddde..8b514301 100644 --- a/lib/cybersource_rest_client/api/capture_api.rb +++ b/lib/cybersource_rest_client/api/capture_api.rb @@ -25,7 +25,7 @@ def initialize(api_client = ApiClient.default, config) # @param capture_payment_request # @param id The payment ID returned from a previous payment request. This ID links the capture to the payment. # @param [Hash] opts the optional parameters - # @return [InlineResponse2012] + # @return [PtsV2PaymentsCapturesPost201Response] def capture_payment(capture_payment_request, id, opts = {}) data, _status_code, _headers = capture_payment_with_http_info(capture_payment_request, id, opts) return data, _status_code, _headers @@ -36,7 +36,7 @@ def capture_payment(capture_payment_request, id, opts = {}) # @param capture_payment_request # @param id The payment ID returned from a previous payment request. This ID links the capture to the payment. # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2012, Fixnum, Hash)>] InlineResponse2012 data, response status code and response headers + # @return [Array<(PtsV2PaymentsCapturesPost201Response, Fixnum, Hash)>] PtsV2PaymentsCapturesPost201Response data, response status code and response headers def capture_payment_with_http_info(capture_payment_request, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaptureApi.capture_payment ...' @@ -74,7 +74,7 @@ def capture_payment_with_http_info(capture_payment_request, id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2012') + :return_type => 'PtsV2PaymentsCapturesPost201Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: CaptureApi#capture_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/credit_api.rb b/lib/cybersource_rest_client/api/credit_api.rb index 72b1405d..65caae33 100644 --- a/lib/cybersource_rest_client/api/credit_api.rb +++ b/lib/cybersource_rest_client/api/credit_api.rb @@ -24,7 +24,7 @@ def initialize(api_client = ApiClient.default, config) # POST to the credit resource to credit funds to a specified credit card. # @param create_credit_request # @param [Hash] opts the optional parameters - # @return [InlineResponse2014] + # @return [PtsV2CreditsPost201Response] def create_credit(create_credit_request, opts = {}) data, _status_code, _headers = create_credit_with_http_info(create_credit_request, opts) return data, _status_code, _headers @@ -34,7 +34,7 @@ def create_credit(create_credit_request, opts = {}) # POST to the credit resource to credit funds to a specified credit card. # @param create_credit_request # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2014, Fixnum, Hash)>] InlineResponse2014 data, response status code and response headers + # @return [Array<(PtsV2CreditsPost201Response, Fixnum, Hash)>] PtsV2CreditsPost201Response data, response status code and response headers def create_credit_with_http_info(create_credit_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CreditApi.create_credit ...' @@ -68,7 +68,7 @@ def create_credit_with_http_info(create_credit_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2014') + :return_type => 'PtsV2CreditsPost201Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: CreditApi#create_credit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/flex_token_api.rb b/lib/cybersource_rest_client/api/flex_token_api.rb index acf478c2..2a782eb4 100644 --- a/lib/cybersource_rest_client/api/flex_token_api.rb +++ b/lib/cybersource_rest_client/api/flex_token_api.rb @@ -24,7 +24,7 @@ def initialize(api_client = ApiClient.default, config) # Returns a token representing the supplied card details. The token replaces card data and can be used as the Subscription ID in the CyberSource Simple Order API or SCMP API. This is an unauthenticated call that you should initiate from your customer’s device or browser. # @param [Hash] opts the optional parameters # @option opts [TokenizeRequest] :tokenize_request - # @return [InlineResponse2001] + # @return [FlexV1TokensPost200Response] def tokenize(opts = {}) data, _status_code, _headers = tokenize_with_http_info(opts) return data, _status_code, _headers @@ -34,7 +34,7 @@ def tokenize(opts = {}) # Returns a token representing the supplied card details. The token replaces card data and can be used as the Subscription ID in the CyberSource Simple Order API or SCMP API. This is an unauthenticated call that you should initiate from your customer’s device or browser. # @param [Hash] opts the optional parameters # @option opts [TokenizeRequest] :tokenize_request - # @return [Array<(InlineResponse2001, Fixnum, Hash)>] InlineResponse2001 data, response status code and response headers + # @return [Array<(FlexV1TokensPost200Response, Fixnum, Hash)>] FlexV1TokensPost200Response data, response status code and response headers def tokenize_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FlexTokenApi.tokenize ...' @@ -64,7 +64,7 @@ def tokenize_with_http_info(opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2001') + :return_type => 'FlexV1TokensPost200Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: FlexTokenApi#tokenize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/instrument_identifier_api.rb b/lib/cybersource_rest_client/api/instrument_identifier_api.rb index 5a6e4cf8..a239cd41 100644 --- a/lib/cybersource_rest_client/api/instrument_identifier_api.rb +++ b/lib/cybersource_rest_client/api/instrument_identifier_api.rb @@ -51,10 +51,10 @@ def tms_v1_instrumentidentifiers_token_id_delete_with_http_info(profile_id, toke # fail ArgumentError, 'invalid value for "profile_id" when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_delete, must be greater than or equal to 36.' # end - # # verify the required parameter 'token_id' is set - # if @api_client.config.client_side_validation && token_id.nil? - # fail ArgumentError, "Missing the required parameter 'token_id' when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_delete" - # end + # verify the required parameter 'token_id' is set + if @api_client.config.client_side_validation && token_id.nil? + fail ArgumentError, "Missing the required parameter 'token_id' when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_delete" + end # if @api_client.config.client_side_validation && token_id > 32 # fail ArgumentError, 'invalid value for "token_id" when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_delete, must be smaller than or equal to 32.' # end @@ -98,7 +98,7 @@ def tms_v1_instrumentidentifiers_token_id_delete_with_http_info(profile_id, toke # @param profile_id The id of a profile containing user specific TMS configuration. # @param token_id The TokenId of an Instrument Identifier. # @param [Hash] opts the optional parameters - # @return [InlineResponse20010] + # @return [TmsV1InstrumentidentifiersPost200Response] def tms_v1_instrumentidentifiers_token_id_get(profile_id, token_id, opts = {}) data, _status_code, _headers = tms_v1_instrumentidentifiers_token_id_get_with_http_info(profile_id, token_id, opts) return data, _status_code, _headers @@ -108,7 +108,7 @@ def tms_v1_instrumentidentifiers_token_id_get(profile_id, token_id, opts = {}) # @param profile_id The id of a profile containing user specific TMS configuration. # @param token_id The TokenId of an Instrument Identifier. # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse20010, Fixnum, Hash)>] InlineResponse20010 data, response status code and response headers + # @return [Array<(TmsV1InstrumentidentifiersPost200Response, Fixnum, Hash)>] TmsV1InstrumentidentifiersPost200Response data, response status code and response headers def tms_v1_instrumentidentifiers_token_id_get_with_http_info(profile_id, token_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_get ...' @@ -125,7 +125,7 @@ def tms_v1_instrumentidentifiers_token_id_get_with_http_info(profile_id, token_i # fail ArgumentError, 'invalid value for "profile_id" when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_get, must be greater than or equal to 36.' # end - # # verify the required parameter 'token_id' is set + # verify the required parameter 'token_id' is set if @api_client.config.client_side_validation && token_id.nil? fail ArgumentError, "Missing the required parameter 'token_id' when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_get" end @@ -163,7 +163,7 @@ def tms_v1_instrumentidentifiers_token_id_get_with_http_info(profile_id, token_i :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse20010') + :return_type => 'TmsV1InstrumentidentifiersPost200Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: InstrumentIdentifierApi#tms_v1_instrumentidentifiers_token_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end @@ -174,7 +174,7 @@ def tms_v1_instrumentidentifiers_token_id_get_with_http_info(profile_id, token_i # @param token_id The TokenId of an Instrument Identifier. # @param body Please specify the previous transaction Id to update. # @param [Hash] opts the optional parameters - # @return [InlineResponse20010] + # @return [TmsV1InstrumentidentifiersPost200Response] def tms_v1_instrumentidentifiers_token_id_patch(profile_id, token_id, body, opts = {}) data, _status_code, _headers = tms_v1_instrumentidentifiers_token_id_patch_with_http_info(profile_id, token_id, body, opts) return data, _status_code, _headers @@ -185,7 +185,7 @@ def tms_v1_instrumentidentifiers_token_id_patch(profile_id, token_id, body, opts # @param token_id The TokenId of an Instrument Identifier. # @param body Please specify the previous transaction Id to update. # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse20010, Fixnum, Hash)>] InlineResponse20010 data, response status code and response headers + # @return [Array<(TmsV1InstrumentidentifiersPost200Response, Fixnum, Hash)>] TmsV1InstrumentidentifiersPost200Response data, response status code and response headers def tms_v1_instrumentidentifiers_token_id_patch_with_http_info(profile_id, token_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_patch ...' @@ -202,7 +202,7 @@ def tms_v1_instrumentidentifiers_token_id_patch_with_http_info(profile_id, token # fail ArgumentError, 'invalid value for "profile_id" when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_patch, must be greater than or equal to 36.' # end - # # verify the required parameter 'token_id' is set + # verify the required parameter 'token_id' is set if @api_client.config.client_side_validation && token_id.nil? fail ArgumentError, "Missing the required parameter 'token_id' when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_patch" end @@ -244,7 +244,7 @@ def tms_v1_instrumentidentifiers_token_id_patch_with_http_info(profile_id, token :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse20010') + :return_type => 'TmsV1InstrumentidentifiersPost200Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: InstrumentIdentifierApi#tms_v1_instrumentidentifiers_token_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/instrument_identifiers_api.rb b/lib/cybersource_rest_client/api/instrument_identifiers_api.rb index b13e3131..7ebdb06e 100644 --- a/lib/cybersource_rest_client/api/instrument_identifiers_api.rb +++ b/lib/cybersource_rest_client/api/instrument_identifiers_api.rb @@ -24,7 +24,7 @@ def initialize(api_client = ApiClient.default, config) # @param profile_id The id of a profile containing user specific TMS configuration. # @param body Please specify either a Card or Bank Account. # @param [Hash] opts the optional parameters - # @return [InlineResponse20010] + # @return [TmsV1InstrumentidentifiersPost200Response] def tms_v1_instrumentidentifiers_post(profile_id, body, opts = {}) data, _status_code, _headers = tms_v1_instrumentidentifiers_post_with_http_info(profile_id, body, opts) return data, _status_code, _headers @@ -34,7 +34,7 @@ def tms_v1_instrumentidentifiers_post(profile_id, body, opts = {}) # @param profile_id The id of a profile containing user specific TMS configuration. # @param body Please specify either a Card or Bank Account. # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse20010, Fixnum, Hash)>] InlineResponse20010 data, response status code and response headers + # @return [Array<(TmsV1InstrumentidentifiersPost200Response, Fixnum, Hash)>] TmsV1InstrumentidentifiersPost200Response data, response status code and response headers def tms_v1_instrumentidentifiers_post_with_http_info(profile_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InstrumentIdentifiersApi.tms_v1_instrumentidentifiers_post ...' @@ -81,7 +81,7 @@ def tms_v1_instrumentidentifiers_post_with_http_info(profile_id, body, opts = {} :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse20010') + :return_type => 'TmsV1InstrumentidentifiersPost200Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: InstrumentIdentifiersApi#tms_v1_instrumentidentifiers_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/key_generation_api.rb b/lib/cybersource_rest_client/api/key_generation_api.rb index f5702829..96a2fab7 100644 --- a/lib/cybersource_rest_client/api/key_generation_api.rb +++ b/lib/cybersource_rest_client/api/key_generation_api.rb @@ -24,7 +24,7 @@ def initialize(api_client = ApiClient.default, config) # Generate a one-time use public key and key ID to encrypt the card number in the follow-on Tokenize Card request. The key used to encrypt the card number on the cardholder’s device or browser is valid for 15 minutes and must be used to verify the signature in the response message. CyberSource recommends creating a new key for each order. Generating a key is an authenticated request initiated from your servers, prior to requesting to tokenize the card data from your customer’s device or browser. # @param [Hash] opts the optional parameters # @option opts [GeneratePublicKeyRequest] :generate_public_key_request - # @return [InlineResponse200] + # @return [FlexV1KeysPost200Response] def generate_public_key(opts = {}) data, _status_code, _headers = generate_public_key_with_http_info(opts) return data, _status_code, _headers @@ -34,7 +34,7 @@ def generate_public_key(opts = {}) # Generate a one-time use public key and key ID to encrypt the card number in the follow-on Tokenize Card request. The key used to encrypt the card number on the cardholder’s device or browser is valid for 15 minutes and must be used to verify the signature in the response message. CyberSource recommends creating a new key for each order. Generating a key is an authenticated request initiated from your servers, prior to requesting to tokenize the card data from your customer’s device or browser. # @param [Hash] opts the optional parameters # @option opts [GeneratePublicKeyRequest] :generate_public_key_request - # @return [Array<(InlineResponse200, Fixnum, Hash)>] InlineResponse200 data, response status code and response headers + # @return [Array<(FlexV1KeysPost200Response, Fixnum, Hash)>] FlexV1KeysPost200Response data, response status code and response headers def generate_public_key_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: KeyGenerationApi.generate_public_key ...' @@ -64,7 +64,7 @@ def generate_public_key_with_http_info(opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse200') + :return_type => 'FlexV1KeysPost200Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: KeyGenerationApi#generate_public_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/notification_of_changes_api.rb b/lib/cybersource_rest_client/api/notification_of_changes_api.rb index 62f9be0f..b7a88c37 100644 --- a/lib/cybersource_rest_client/api/notification_of_changes_api.rb +++ b/lib/cybersource_rest_client/api/notification_of_changes_api.rb @@ -25,7 +25,7 @@ def initialize(api_client = ApiClient.default, config) # @param start_time Valid report Start Time in **ISO 8601 format** Please refer the following link to know more about ISO 8601 format. - https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14 **Example date format:** - yyyy-MM-dd'T'HH:mm:ssXXX # @param end_time Valid report End Time in **ISO 8601 format** Please refer the following link to know more about ISO 8601 format. - https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14 **Example date format:** - yyyy-MM-dd'T'HH:mm:ssXXX # @param [Hash] opts the optional parameters - # @return [InlineResponse2003] + # @return [ReportingV3NotificationofChangesGet200Response] def get_notification_of_change_report(start_time, end_time, opts = {}) data, _status_code, _headers = get_notification_of_change_report_with_http_info(start_time, end_time, opts) return data, _status_code, _headers @@ -36,7 +36,7 @@ def get_notification_of_change_report(start_time, end_time, opts = {}) # @param start_time Valid report Start Time in **ISO 8601 format** Please refer the following link to know more about ISO 8601 format. - https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14 **Example date format:** - yyyy-MM-dd'T'HH:mm:ssXXX # @param end_time Valid report End Time in **ISO 8601 format** Please refer the following link to know more about ISO 8601 format. - https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14 **Example date format:** - yyyy-MM-dd'T'HH:mm:ssXXX # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2003, Fixnum, Hash)>] InlineResponse2003 data, response status code and response headers + # @return [Array<(ReportingV3NotificationofChangesGet200Response, Fixnum, Hash)>] ReportingV3NotificationofChangesGet200Response data, response status code and response headers def get_notification_of_change_report_with_http_info(start_time, end_time, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotificationOfChangesApi.get_notification_of_change_report ...' @@ -76,7 +76,7 @@ def get_notification_of_change_report_with_http_info(start_time, end_time, opts :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2003') + :return_type => 'ReportingV3NotificationofChangesGet200Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationOfChangesApi#get_notification_of_change_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/payment_instruments_api.rb b/lib/cybersource_rest_client/api/payment_instruments_api.rb index 8cecec31..674e9dd0 100644 --- a/lib/cybersource_rest_client/api/payment_instruments_api.rb +++ b/lib/cybersource_rest_client/api/payment_instruments_api.rb @@ -26,7 +26,7 @@ def initialize(api_client = ApiClient.default, config) # @param [Hash] opts the optional parameters # @option opts [String] :offset Starting Payment Instrument record in zero-based dataset that should be returned as the first object in the array. Default is 0. # @option opts [String] :limit The maximum number of Payment Instruments that can be returned in the array starting from the offset record in zero-based dataset. Default is 20, maximum is 100. (default to 20) - # @return [InlineResponse20011] + # @return [TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response] def tms_v1_instrumentidentifiers_token_id_paymentinstruments_get(profile_id, token_id, opts = {}) data, _status_code, _headers = tms_v1_instrumentidentifiers_token_id_paymentinstruments_get_with_http_info(profile_id, token_id, opts) return data, _status_code, _headers @@ -38,7 +38,7 @@ def tms_v1_instrumentidentifiers_token_id_paymentinstruments_get(profile_id, tok # @param [Hash] opts the optional parameters # @option opts [String] :offset Starting Payment Instrument record in zero-based dataset that should be returned as the first object in the array. Default is 0. # @option opts [String] :limit The maximum number of Payment Instruments that can be returned in the array starting from the offset record in zero-based dataset. Default is 20, maximum is 100. - # @return [Array<(InlineResponse20011, Fixnum, Hash)>] InlineResponse20011 data, response status code and response headers + # @return [Array<(TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response, Fixnum, Hash)>] TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response data, response status code and response headers def tms_v1_instrumentidentifiers_token_id_paymentinstruments_get_with_http_info(profile_id, token_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PaymentInstrumentsApi.tms_v1_instrumentidentifiers_token_id_paymentinstruments_get ...' @@ -55,10 +55,10 @@ def tms_v1_instrumentidentifiers_token_id_paymentinstruments_get_with_http_info( # fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentsApi.tms_v1_instrumentidentifiers_token_id_paymentinstruments_get, must be greater than or equal to 36.' # end - # # verify the required parameter 'token_id' is set - # if @api_client.config.client_side_validation && token_id.nil? - # fail ArgumentError, "Missing the required parameter 'token_id' when calling PaymentInstrumentsApi.tms_v1_instrumentidentifiers_token_id_paymentinstruments_get" - # end + # verify the required parameter 'token_id' is set + if @api_client.config.client_side_validation && token_id.nil? + fail ArgumentError, "Missing the required parameter 'token_id' when calling PaymentInstrumentsApi.tms_v1_instrumentidentifiers_token_id_paymentinstruments_get" + end # if @api_client.config.client_side_validation && token_id > 32 # fail ArgumentError, 'invalid value for "token_id" when calling PaymentInstrumentsApi.tms_v1_instrumentidentifiers_token_id_paymentinstruments_get, must be smaller than or equal to 32.' # end @@ -107,7 +107,7 @@ def tms_v1_instrumentidentifiers_token_id_paymentinstruments_get_with_http_info( :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse20011') + :return_type => 'TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: PaymentInstrumentsApi#tms_v1_instrumentidentifiers_token_id_paymentinstruments_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end @@ -117,7 +117,7 @@ def tms_v1_instrumentidentifiers_token_id_paymentinstruments_get_with_http_info( # @param profile_id The id of a profile containing user specific TMS configuration. # @param body Please specify the customers payment details for card or bank account. # @param [Hash] opts the optional parameters - # @return [InlineResponse2016] + # @return [TmsV1PaymentinstrumentsPost201Response] def tms_v1_paymentinstruments_post(profile_id, body, opts = {}) data, _status_code, _headers = tms_v1_paymentinstruments_post_with_http_info(profile_id, body, opts) return data, _status_code, _headers @@ -127,7 +127,7 @@ def tms_v1_paymentinstruments_post(profile_id, body, opts = {}) # @param profile_id The id of a profile containing user specific TMS configuration. # @param body Please specify the customers payment details for card or bank account. # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2016, Fixnum, Hash)>] InlineResponse2016 data, response status code and response headers + # @return [Array<(TmsV1PaymentinstrumentsPost201Response, Fixnum, Hash)>] TmsV1PaymentinstrumentsPost201Response data, response status code and response headers def tms_v1_paymentinstruments_post_with_http_info(profile_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PaymentInstrumentsApi.tms_v1_paymentinstruments_post ...' @@ -174,7 +174,7 @@ def tms_v1_paymentinstruments_post_with_http_info(profile_id, body, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2016') + :return_type => 'TmsV1PaymentinstrumentsPost201Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: PaymentInstrumentsApi#tms_v1_paymentinstruments_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end @@ -186,8 +186,8 @@ def tms_v1_paymentinstruments_post_with_http_info(profile_id, body, opts = {}) # @param [Hash] opts the optional parameters # @return [nil] def tms_v1_paymentinstruments_token_id_delete(profile_id, token_id, opts = {}) - data, _status_code, _headers = tms_v1_paymentinstruments_token_id_delete_with_http_info(profile_id, token_id, opts) - return data, _status_code, _headers + data, status_code, headers = tms_v1_paymentinstruments_token_id_delete_with_http_info(profile_id, token_id, opts) + return data, status_code, headers end # Delete a Payment Instrument @@ -258,7 +258,7 @@ def tms_v1_paymentinstruments_token_id_delete_with_http_info(profile_id, token_i # @param profile_id The id of a profile containing user specific TMS configuration. # @param token_id The TokenId of a Payment Instrument. # @param [Hash] opts the optional parameters - # @return [InlineResponse2016] + # @return [TmsV1PaymentinstrumentsPost201Response] def tms_v1_paymentinstruments_token_id_get(profile_id, token_id, opts = {}) data, _status_code, _headers = tms_v1_paymentinstruments_token_id_get_with_http_info(profile_id, token_id, opts) return data, _status_code, _headers @@ -268,7 +268,7 @@ def tms_v1_paymentinstruments_token_id_get(profile_id, token_id, opts = {}) # @param profile_id The id of a profile containing user specific TMS configuration. # @param token_id The TokenId of a Payment Instrument. # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2016, Fixnum, Hash)>] InlineResponse2016 data, response status code and response headers + # @return [Array<(TmsV1PaymentinstrumentsPost201Response, Fixnum, Hash)>] TmsV1PaymentinstrumentsPost201Response data, response status code and response headers def tms_v1_paymentinstruments_token_id_get_with_http_info(profile_id, token_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_get ...' @@ -323,7 +323,7 @@ def tms_v1_paymentinstruments_token_id_get_with_http_info(profile_id, token_id, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2016') + :return_type => 'TmsV1PaymentinstrumentsPost201Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: PaymentInstrumentsApi#tms_v1_paymentinstruments_token_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end @@ -334,7 +334,7 @@ def tms_v1_paymentinstruments_token_id_get_with_http_info(profile_id, token_id, # @param token_id The TokenId of a Payment Instrument. # @param body Please specify the customers payment details. # @param [Hash] opts the optional parameters - # @return [InlineResponse2016] + # @return [TmsV1PaymentinstrumentsPost201Response] def tms_v1_paymentinstruments_token_id_patch(profile_id, token_id, body, opts = {}) data, _status_code, _headers = tms_v1_paymentinstruments_token_id_patch_with_http_info(profile_id, token_id, body, opts) return data, _status_code, _headers @@ -345,7 +345,7 @@ def tms_v1_paymentinstruments_token_id_patch(profile_id, token_id, body, opts = # @param token_id The TokenId of a Payment Instrument. # @param body Please specify the customers payment details. # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2016, Fixnum, Hash)>] InlineResponse2016 data, response status code and response headers + # @return [Array<(TmsV1PaymentinstrumentsPost201Response, Fixnum, Hash)>] TmsV1PaymentinstrumentsPost201Response data, response status code and response headers def tms_v1_paymentinstruments_token_id_patch_with_http_info(profile_id, token_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_patch ...' @@ -404,7 +404,7 @@ def tms_v1_paymentinstruments_token_id_patch_with_http_info(profile_id, token_id :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2016') + :return_type => 'TmsV1PaymentinstrumentsPost201Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: PaymentInstrumentsApi#tms_v1_paymentinstruments_token_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/payments_api.rb b/lib/cybersource_rest_client/api/payments_api.rb index 11fe2a84..95e7eebf 100644 --- a/lib/cybersource_rest_client/api/payments_api.rb +++ b/lib/cybersource_rest_client/api/payments_api.rb @@ -18,13 +18,13 @@ class PaymentsApi def initialize(api_client = ApiClient.default, config) @api_client = api_client - api_client.set_configuration(config) + @api_client.set_configuration(config) end # Process a Payment # Authorize the payment for the transaction. # @param create_payment_request # @param [Hash] opts the optional parameters - # @return [InlineResponse201] + # @return [PtsV2PaymentsPost201Response] def create_payment(create_payment_request, opts = {}) data, _status_code, _headers = create_payment_with_http_info(create_payment_request, opts) return data, _status_code, _headers @@ -34,7 +34,7 @@ def create_payment(create_payment_request, opts = {}) # Authorize the payment for the transaction. # @param create_payment_request # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse201, Fixnum, Hash)>] InlineResponse201 data, response status code and response headers + # @return [Array<(PtsV2PaymentsPost201Response, Fixnum, Hash)>] PtsV2PaymentsPost201Response data, response status code and response headers def create_payment_with_http_info(create_payment_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PaymentsApi.create_payment ...' @@ -68,7 +68,7 @@ def create_payment_with_http_info(create_payment_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse201') + :return_type => 'PtsV2PaymentsPost201Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: PaymentsApi#create_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/process_a_payout_api.rb b/lib/cybersource_rest_client/api/process_a_payout_api.rb index 0094d630..4d4c09cc 100644 --- a/lib/cybersource_rest_client/api/process_a_payout_api.rb +++ b/lib/cybersource_rest_client/api/process_a_payout_api.rb @@ -26,8 +26,8 @@ def initialize(api_client = ApiClient.default, config) # @param [Hash] opts the optional parameters # @return [nil] def oct_create_payment(oct_create_payment_request, opts = {}) - data, _status_code, _headers = oct_create_payment_with_http_info(oct_create_payment_request, opts) - return data, _status_code, _headers + data, status_code, headers = oct_create_payment_with_http_info(oct_create_payment_request, opts) + return data, status_code, headers end # Process a Payout diff --git a/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb b/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb index 518b624b..16c753d9 100644 --- a/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb +++ b/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb @@ -33,8 +33,8 @@ def initialize(api_client = ApiClient.default, config) # @option opts [Integer] :limit Results count per page. Range(1-2000) (default to 2000) # @return [nil] def get_purchase_and_refund_details(start_time, end_time, opts = {}) - data, _status_code, _headers = get_purchase_and_refund_details_with_http_info(start_time, end_time, opts) - return data, _status_code, _headers + data, status_code, headers = get_purchase_and_refund_details_with_http_info(start_time, end_time, opts) + return data, status_code, headers end # Get Purchase and Refund details diff --git a/lib/cybersource_rest_client/api/refund_api.rb b/lib/cybersource_rest_client/api/refund_api.rb index dd7342cf..fe291321 100644 --- a/lib/cybersource_rest_client/api/refund_api.rb +++ b/lib/cybersource_rest_client/api/refund_api.rb @@ -25,7 +25,7 @@ def initialize(api_client = ApiClient.default, config) # @param refund_capture_request # @param id The capture ID. This ID is returned from a previous capture request. # @param [Hash] opts the optional parameters - # @return [InlineResponse2013] + # @return [PtsV2PaymentsRefundPost201Response] def refund_capture(refund_capture_request, id, opts = {}) data, _status_code, _headers = refund_capture_with_http_info(refund_capture_request, id, opts) return data, _status_code, _headers @@ -36,7 +36,7 @@ def refund_capture(refund_capture_request, id, opts = {}) # @param refund_capture_request # @param id The capture ID. This ID is returned from a previous capture request. # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2013, Fixnum, Hash)>] InlineResponse2013 data, response status code and response headers + # @return [Array<(PtsV2PaymentsRefundPost201Response, Fixnum, Hash)>] PtsV2PaymentsRefundPost201Response data, response status code and response headers def refund_capture_with_http_info(refund_capture_request, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RefundApi.refund_capture ...' @@ -74,7 +74,7 @@ def refund_capture_with_http_info(refund_capture_request, id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2013') + :return_type => 'PtsV2PaymentsRefundPost201Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: RefundApi#refund_capture\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end @@ -85,7 +85,7 @@ def refund_capture_with_http_info(refund_capture_request, id, opts = {}) # @param refund_payment_request # @param id The payment ID. This ID is returned from a previous payment request. # @param [Hash] opts the optional parameters - # @return [InlineResponse2013] + # @return [PtsV2PaymentsRefundPost201Response] def refund_payment(refund_payment_request, id, opts = {}) data, _status_code, _headers = refund_payment_with_http_info(refund_payment_request, id, opts) return data, _status_code, _headers @@ -96,7 +96,7 @@ def refund_payment(refund_payment_request, id, opts = {}) # @param refund_payment_request # @param id The payment ID. This ID is returned from a previous payment request. # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2013, Fixnum, Hash)>] InlineResponse2013 data, response status code and response headers + # @return [Array<(PtsV2PaymentsRefundPost201Response, Fixnum, Hash)>] PtsV2PaymentsRefundPost201Response data, response status code and response headers def refund_payment_with_http_info(refund_payment_request, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RefundApi.refund_payment ...' @@ -134,7 +134,7 @@ def refund_payment_with_http_info(refund_payment_request, id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2013') + :return_type => 'PtsV2PaymentsRefundPost201Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: RefundApi#refund_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/report_definitions_api.rb b/lib/cybersource_rest_client/api/report_definitions_api.rb index efc99b58..e5f1e764 100644 --- a/lib/cybersource_rest_client/api/report_definitions_api.rb +++ b/lib/cybersource_rest_client/api/report_definitions_api.rb @@ -25,7 +25,7 @@ def initialize(api_client = ApiClient.default, config) # @param report_definition_name Name of the Report definition to retrieve # @param [Hash] opts the optional parameters # @option opts [String] :organization_id Valid Cybersource Organization Id - # @return [InlineResponse2005] + # @return [ReportingV3ReportDefinitionsNameGet200Response] def get_resource_info_by_report_definition(report_definition_name, opts = {}) data, _status_code, _headers = get_resource_info_by_report_definition_with_http_info(report_definition_name, opts) return data, _status_code, _headers @@ -36,7 +36,7 @@ def get_resource_info_by_report_definition(report_definition_name, opts = {}) # @param report_definition_name Name of the Report definition to retrieve # @param [Hash] opts the optional parameters # @option opts [String] :organization_id Valid Cybersource Organization Id - # @return [Array<(InlineResponse2005, Fixnum, Hash)>] InlineResponse2005 data, response status code and response headers + # @return [Array<(ReportingV3ReportDefinitionsNameGet200Response, Fixnum, Hash)>] ReportingV3ReportDefinitionsNameGet200Response data, response status code and response headers def get_resource_info_by_report_definition_with_http_info(report_definition_name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportDefinitionsApi.get_resource_info_by_report_definition ...' @@ -83,7 +83,7 @@ def get_resource_info_by_report_definition_with_http_info(report_definition_name :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2005') + :return_type => 'ReportingV3ReportDefinitionsNameGet200Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportDefinitionsApi#get_resource_info_by_report_definition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end @@ -93,7 +93,7 @@ def get_resource_info_by_report_definition_with_http_info(report_definition_name # # @param [Hash] opts the optional parameters # @option opts [String] :organization_id Valid Cybersource Organization Id - # @return [InlineResponse2004] + # @return [ReportingV3ReportDefinitionsGet200Response] def get_resource_v2_info(opts = {}) data, _status_code, _headers = get_resource_v2_info_with_http_info(opts) return data, _status_code, _headers @@ -103,7 +103,7 @@ def get_resource_v2_info(opts = {}) # # @param [Hash] opts the optional parameters # @option opts [String] :organization_id Valid Cybersource Organization Id - # @return [Array<(InlineResponse2004, Fixnum, Hash)>] InlineResponse2004 data, response status code and response headers + # @return [Array<(ReportingV3ReportDefinitionsGet200Response, Fixnum, Hash)>] ReportingV3ReportDefinitionsGet200Response data, response status code and response headers def get_resource_v2_info_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportDefinitionsApi.get_resource_v2_info ...' @@ -146,7 +146,7 @@ def get_resource_v2_info_with_http_info(opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2004') + :return_type => 'ReportingV3ReportDefinitionsGet200Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportDefinitionsApi#get_resource_v2_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/report_subscriptions_api.rb b/lib/cybersource_rest_client/api/report_subscriptions_api.rb index 5670dc63..ba372918 100644 --- a/lib/cybersource_rest_client/api/report_subscriptions_api.rb +++ b/lib/cybersource_rest_client/api/report_subscriptions_api.rb @@ -60,7 +60,7 @@ def create_subscription_with_http_info(request_body, opts = {}) # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} @@ -147,7 +147,7 @@ def delete_subscription_with_http_info(report_name, opts = {}) # Retrieve all subscriptions by organization # # @param [Hash] opts the optional parameters - # @return [InlineResponse2006] + # @return [ReportingV3ReportSubscriptionsGet200Response] def get_all_subscriptions(opts = {}) data, _status_code, _headers = get_all_subscriptions_with_http_info(opts) return data, _status_code, _headers @@ -156,7 +156,7 @@ def get_all_subscriptions(opts = {}) # Retrieve all subscriptions by organization # # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2006, Fixnum, Hash)>] InlineResponse2006 data, response status code and response headers + # @return [Array<(ReportingV3ReportSubscriptionsGet200Response, Fixnum, Hash)>] ReportingV3ReportSubscriptionsGet200Response data, response status code and response headers def get_all_subscriptions_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportSubscriptionsApi.get_all_subscriptions ...' @@ -186,7 +186,7 @@ def get_all_subscriptions_with_http_info(opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2006') + :return_type => 'ReportingV3ReportSubscriptionsGet200Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportSubscriptionsApi#get_all_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end @@ -196,7 +196,7 @@ def get_all_subscriptions_with_http_info(opts = {}) # # @param report_name Name of the Report to Retrieve # @param [Hash] opts the optional parameters - # @return [InlineResponse2006Subscriptions] + # @return [ReportingV3ReportSubscriptionsGet200ResponseSubscriptions] def get_subscription(report_name, opts = {}) data, _status_code, _headers = get_subscription_with_http_info(report_name, opts) return data, _status_code, _headers @@ -206,7 +206,7 @@ def get_subscription(report_name, opts = {}) # # @param report_name Name of the Report to Retrieve # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2006Subscriptions, Fixnum, Hash)>] InlineResponse2006Subscriptions data, response status code and response headers + # @return [Array<(ReportingV3ReportSubscriptionsGet200ResponseSubscriptions, Fixnum, Hash)>] ReportingV3ReportSubscriptionsGet200ResponseSubscriptions data, response status code and response headers def get_subscription_with_http_info(report_name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportSubscriptionsApi.get_subscription ...' @@ -252,7 +252,7 @@ def get_subscription_with_http_info(report_name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2006Subscriptions') + :return_type => 'ReportingV3ReportSubscriptionsGet200ResponseSubscriptions') if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportSubscriptionsApi#get_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/reports_api.rb b/lib/cybersource_rest_client/api/reports_api.rb index fd324dad..eae44bd4 100644 --- a/lib/cybersource_rest_client/api/reports_api.rb +++ b/lib/cybersource_rest_client/api/reports_api.rb @@ -48,6 +48,7 @@ def create_report_with_http_info(request_body, opts = {}) # query parameters query_params = {} + # header parameters header_params = {} # HTTP header 'Accept' (if needed) @@ -77,7 +78,7 @@ def create_report_with_http_info(request_body, opts = {}) # @param report_id Valid Report Id # @param [Hash] opts the optional parameters # @option opts [String] :organization_id Valid Cybersource Organization Id - # @return [InlineResponse2008] + # @return [ReportingV3ReportsIdGet200Response] def get_report_by_report_id(report_id, opts = {}) data, _status_code, _headers = get_report_by_report_id_with_http_info(report_id, opts) return data, _status_code, _headers @@ -88,7 +89,7 @@ def get_report_by_report_id(report_id, opts = {}) # @param report_id Valid Report Id # @param [Hash] opts the optional parameters # @option opts [String] :organization_id Valid Cybersource Organization Id - # @return [Array<(InlineResponse2008, Fixnum, Hash)>] InlineResponse2008 data, response status code and response headers + # @return [Array<(ReportingV3ReportsIdGet200Response, Fixnum, Hash)>] ReportingV3ReportsIdGet200Response data, response status code and response headers def get_report_by_report_id_with_http_info(report_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportsApi.get_report_by_report_id ...' @@ -135,7 +136,7 @@ def get_report_by_report_id_with_http_info(report_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2008') + :return_type => 'ReportingV3ReportsIdGet200Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportsApi#get_report_by_report_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end @@ -153,7 +154,7 @@ def get_report_by_report_id_with_http_info(report_id, opts = {}) # @option opts [String] :report_name Valid Report Name # @option opts [Integer] :report_definition_id Valid Report Definition Id # @option opts [String] :report_status Valid Report Status - # @return [InlineResponse2007] + # @return [ReportingV3ReportsGet200Response] def search_reports(start_time, end_time, time_query_type, opts = {}) data, _status_code, _headers = search_reports_with_http_info(start_time, end_time, time_query_type, opts) return data, _status_code, _headers @@ -171,7 +172,7 @@ def search_reports(start_time, end_time, time_query_type, opts = {}) # @option opts [String] :report_name Valid Report Name # @option opts [Integer] :report_definition_id Valid Report Definition Id # @option opts [String] :report_status Valid Report Status - # @return [Array<(InlineResponse2007, Fixnum, Hash)>] InlineResponse2007 data, response status code and response headers + # @return [Array<(ReportingV3ReportsGet200Response, Fixnum, Hash)>] ReportingV3ReportsGet200Response data, response status code and response headers def search_reports_with_http_info(start_time, end_time, time_query_type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportsApi.search_reports ...' @@ -247,7 +248,7 @@ def search_reports_with_http_info(start_time, end_time, time_query_type, opts = :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2007') + :return_type => 'ReportingV3ReportsGet200Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportsApi#search_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/reversal_api.rb b/lib/cybersource_rest_client/api/reversal_api.rb index e265d99b..4c3e5634 100644 --- a/lib/cybersource_rest_client/api/reversal_api.rb +++ b/lib/cybersource_rest_client/api/reversal_api.rb @@ -25,7 +25,7 @@ def initialize(api_client = ApiClient.default, config) # @param id The payment ID returned from a previous payment request. # @param auth_reversal_request # @param [Hash] opts the optional parameters - # @return [InlineResponse2011] + # @return [PtsV2PaymentsReversalsPost201Response] def auth_reversal(id, auth_reversal_request, opts = {}) data, _status_code, _headers = auth_reversal_with_http_info(id, auth_reversal_request, opts) return data, _status_code, _headers @@ -36,7 +36,7 @@ def auth_reversal(id, auth_reversal_request, opts = {}) # @param id The payment ID returned from a previous payment request. # @param auth_reversal_request # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2011, Fixnum, Hash)>] InlineResponse2011 data, response status code and response headers + # @return [Array<(PtsV2PaymentsReversalsPost201Response, Fixnum, Hash)>] PtsV2PaymentsReversalsPost201Response data, response status code and response headers def auth_reversal_with_http_info(id, auth_reversal_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReversalApi.auth_reversal ...' @@ -60,7 +60,7 @@ def auth_reversal_with_http_info(id, auth_reversal_request, opts = {}) # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) # HTTP header 'Content-Type' - # header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} @@ -74,7 +74,7 @@ def auth_reversal_with_http_info(id, auth_reversal_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2011') + :return_type => 'PtsV2PaymentsReversalsPost201Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: ReversalApi#auth_reversal\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/search_transactions_api.rb b/lib/cybersource_rest_client/api/search_transactions_api.rb index 1bc208a4..ba30f391 100644 --- a/lib/cybersource_rest_client/api/search_transactions_api.rb +++ b/lib/cybersource_rest_client/api/search_transactions_api.rb @@ -24,7 +24,7 @@ def initialize(api_client = ApiClient.default, config) # Create a search request. # @param create_search_request # @param [Hash] opts the optional parameters - # @return [InlineResponse2017] + # @return [TssV2TransactionsPost201Response] def create_search(create_search_request, opts = {}) data, _status_code, _headers = create_search_with_http_info(create_search_request, opts) return data, _status_code, _headers @@ -34,7 +34,7 @@ def create_search(create_search_request, opts = {}) # Create a search request. # @param create_search_request # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2017, Fixnum, Hash)>] InlineResponse2017 data, response status code and response headers + # @return [Array<(TssV2TransactionsPost201Response, Fixnum, Hash)>] TssV2TransactionsPost201Response data, response status code and response headers def create_search_with_http_info(create_search_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SearchTransactionsApi.create_search ...' @@ -68,7 +68,7 @@ def create_search_with_http_info(create_search_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2017') + :return_type => 'TssV2TransactionsPost201Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: SearchTransactionsApi#create_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end @@ -78,7 +78,7 @@ def create_search_with_http_info(create_search_request, opts = {}) # Include the Search ID in the GET request to retrieve the search results. # @param id Search ID. # @param [Hash] opts the optional parameters - # @return [InlineResponse2017] + # @return [TssV2TransactionsPost201Response] def get_search(id, opts = {}) data, _status_code, _headers = get_search_with_http_info(id, opts) return data, _status_code, _headers @@ -88,7 +88,7 @@ def get_search(id, opts = {}) # Include the Search ID in the GET request to retrieve the search results. # @param id Search ID. # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2017, Fixnum, Hash)>] InlineResponse2017 data, response status code and response headers + # @return [Array<(TssV2TransactionsPost201Response, Fixnum, Hash)>] TssV2TransactionsPost201Response data, response status code and response headers def get_search_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SearchTransactionsApi.get_search ...' @@ -122,7 +122,7 @@ def get_search_with_http_info(id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2017') + :return_type => 'TssV2TransactionsPost201Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: SearchTransactionsApi#get_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/secure_file_share_api.rb b/lib/cybersource_rest_client/api/secure_file_share_api.rb index cd2e77f3..3a89e8f0 100644 --- a/lib/cybersource_rest_client/api/secure_file_share_api.rb +++ b/lib/cybersource_rest_client/api/secure_file_share_api.rb @@ -94,7 +94,7 @@ def get_file_with_http_info(file_id, opts = {}) # @param end_date Valid end date in **ISO 8601 format** Please refer the following link to know more about ISO 8601 format. - https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14 **Example date format:** - yyyy-MM-dd # @param [Hash] opts the optional parameters # @option opts [String] :organization_id Valid Cybersource Organization Id - # @return [InlineResponse2009] + # @return [V1FileDetailsGet200Response] def get_file_details(start_date, end_date, opts = {}) data, _status_code, _headers = get_file_details_with_http_info(start_date, end_date, opts) return data, _status_code, _headers @@ -106,7 +106,7 @@ def get_file_details(start_date, end_date, opts = {}) # @param end_date Valid end date in **ISO 8601 format** Please refer the following link to know more about ISO 8601 format. - https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14 **Example date format:** - yyyy-MM-dd # @param [Hash] opts the optional parameters # @option opts [String] :organization_id Valid Cybersource Organization Id - # @return [Array<(InlineResponse2009, Fixnum, Hash)>] InlineResponse2009 data, response status code and response headers + # @return [Array<(V1FileDetailsGet200Response, Fixnum, Hash)>] V1FileDetailsGet200Response data, response status code and response headers def get_file_details_with_http_info(start_date, end_date, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SecureFileShareApi.get_file_details ...' @@ -159,7 +159,7 @@ def get_file_details_with_http_info(start_date, end_date, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2009') + :return_type => 'V1FileDetailsGet200Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecureFileShareApi#get_file_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/transaction_batches_api.rb b/lib/cybersource_rest_client/api/transaction_batches_api.rb index edd506b3..a20bc51a 100644 --- a/lib/cybersource_rest_client/api/transaction_batches_api.rb +++ b/lib/cybersource_rest_client/api/transaction_batches_api.rb @@ -25,7 +25,7 @@ def initialize(api_client = ApiClient.default, config) # @param start_time Valid report Start Time in **ISO 8601 format** Please refer the following link to know more about ISO 8601 format. - https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14 **Example date format:** - yyyy-MM-dd'T'HH:mm:ss.SSSZZ # @param end_time Valid report End Time in **ISO 8601 format** Please refer the following link to know more about ISO 8601 format. - https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14 **Example date format:** - yyyy-MM-dd'T'HH:mm:ss.SSSZZ # @param [Hash] opts the optional parameters - # @return [InlineResponse2002] + # @return [PtsV1TransactionBatchesGet200Response] def pts_v1_transaction_batches_get(start_time, end_time, opts = {}) data, _status_code, _headers = pts_v1_transaction_batches_get_with_http_info(start_time, end_time, opts) return data, _status_code, _headers @@ -36,7 +36,7 @@ def pts_v1_transaction_batches_get(start_time, end_time, opts = {}) # @param start_time Valid report Start Time in **ISO 8601 format** Please refer the following link to know more about ISO 8601 format. - https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14 **Example date format:** - yyyy-MM-dd'T'HH:mm:ss.SSSZZ # @param end_time Valid report End Time in **ISO 8601 format** Please refer the following link to know more about ISO 8601 format. - https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14 **Example date format:** - yyyy-MM-dd'T'HH:mm:ss.SSSZZ # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2002, Fixnum, Hash)>] InlineResponse2002 data, response status code and response headers + # @return [Array<(PtsV1TransactionBatchesGet200Response, Fixnum, Hash)>] PtsV1TransactionBatchesGet200Response data, response status code and response headers def pts_v1_transaction_batches_get_with_http_info(start_time, end_time, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionBatchesApi.pts_v1_transaction_batches_get ...' @@ -50,7 +50,7 @@ def pts_v1_transaction_batches_get_with_http_info(start_time, end_time, opts = { fail ArgumentError, "Missing the required parameter 'end_time' when calling TransactionBatchesApi.pts_v1_transaction_batches_get" end # resource path - local_var_path = 'pts/v1/transaction-batches/' + local_var_path = 'pts/v1/transaction-batches' # query parameters query_params = {} @@ -76,7 +76,7 @@ def pts_v1_transaction_batches_get_with_http_info(start_time, end_time, opts = { :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2002') + :return_type => 'PtsV1TransactionBatchesGet200Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionBatchesApi#pts_v1_transaction_batches_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/transaction_details_api.rb b/lib/cybersource_rest_client/api/transaction_details_api.rb index 977cdc1f..8f900193 100644 --- a/lib/cybersource_rest_client/api/transaction_details_api.rb +++ b/lib/cybersource_rest_client/api/transaction_details_api.rb @@ -24,7 +24,7 @@ def initialize(api_client = ApiClient.default, config) # Include the Request ID in the GET request to retrieve the transaction details. # @param id Request ID. # @param [Hash] opts the optional parameters - # @return [InlineResponse20012] + # @return [TssV2TransactionsGet200Response] def get_transaction(id, opts = {}) data, _status_code, _headers = get_transaction_with_http_info(id, opts) return data, _status_code, _headers @@ -34,7 +34,7 @@ def get_transaction(id, opts = {}) # Include the Request ID in the GET request to retrieve the transaction details. # @param id Request ID. # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse20012, Fixnum, Hash)>] InlineResponse20012 data, response status code and response headers + # @return [Array<(TssV2TransactionsGet200Response, Fixnum, Hash)>] TssV2TransactionsGet200Response data, response status code and response headers def get_transaction_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionDetailsApi.get_transaction ...' @@ -68,7 +68,7 @@ def get_transaction_with_http_info(id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse20012') + :return_type => 'TssV2TransactionsGet200Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionDetailsApi#get_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/user_management_api.rb b/lib/cybersource_rest_client/api/user_management_api.rb index a11494d0..1fc44b50 100644 --- a/lib/cybersource_rest_client/api/user_management_api.rb +++ b/lib/cybersource_rest_client/api/user_management_api.rb @@ -16,7 +16,7 @@ module CyberSource class UserManagementApi attr_accessor :api_client - def initialize(api_client = ApiClient.default,config) + def initialize(api_client = ApiClient.default, config) @api_client = api_client @api_client.set_configuration(config) end @@ -27,7 +27,7 @@ def initialize(api_client = ApiClient.default,config) # @option opts [String] :user_name User ID of the user you want to get details on. # @option opts [String] :permission_id permission that you are trying to search user on. # @option opts [String] :role_id role of the user you are trying to search on. - # @return [InlineResponse20013] + # @return [UmsV1UsersGet200Response] def get_users(opts = {}) data, _status_code, _headers = get_users_with_http_info(opts) return data, _status_code, _headers @@ -40,7 +40,7 @@ def get_users(opts = {}) # @option opts [String] :user_name User ID of the user you want to get details on. # @option opts [String] :permission_id permission that you are trying to search user on. # @option opts [String] :role_id role of the user you are trying to search on. - # @return [Array<(InlineResponse20013, Fixnum, Hash)>] InlineResponse20013 data, response status code and response headers + # @return [Array<(UmsV1UsersGet200Response, Fixnum, Hash)>] UmsV1UsersGet200Response data, response status code and response headers def get_users_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserManagementApi.get_users ...' @@ -74,7 +74,7 @@ def get_users_with_http_info(opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse20013') + :return_type => 'UmsV1UsersGet200Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: UserManagementApi#get_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api/void_api.rb b/lib/cybersource_rest_client/api/void_api.rb index 5f735d1e..db6ad62f 100644 --- a/lib/cybersource_rest_client/api/void_api.rb +++ b/lib/cybersource_rest_client/api/void_api.rb @@ -25,7 +25,7 @@ def initialize(api_client = ApiClient.default, config) # @param void_capture_request # @param id The capture ID returned from a previous capture request. # @param [Hash] opts the optional parameters - # @return [InlineResponse2015] + # @return [PtsV2PaymentsVoidsPost201Response] def void_capture(void_capture_request, id, opts = {}) data, _status_code, _headers = void_capture_with_http_info(void_capture_request, id, opts) return data, _status_code, _headers @@ -36,7 +36,7 @@ def void_capture(void_capture_request, id, opts = {}) # @param void_capture_request # @param id The capture ID returned from a previous capture request. # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2015, Fixnum, Hash)>] InlineResponse2015 data, response status code and response headers + # @return [Array<(PtsV2PaymentsVoidsPost201Response, Fixnum, Hash)>] PtsV2PaymentsVoidsPost201Response data, response status code and response headers def void_capture_with_http_info(void_capture_request, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VoidApi.void_capture ...' @@ -74,7 +74,7 @@ def void_capture_with_http_info(void_capture_request, id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2015') + :return_type => 'PtsV2PaymentsVoidsPost201Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: VoidApi#void_capture\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end @@ -85,7 +85,7 @@ def void_capture_with_http_info(void_capture_request, id, opts = {}) # @param void_credit_request # @param id The credit ID returned from a previous credit request. # @param [Hash] opts the optional parameters - # @return [InlineResponse2015] + # @return [PtsV2PaymentsVoidsPost201Response] def void_credit(void_credit_request, id, opts = {}) data, _status_code, _headers = void_credit_with_http_info(void_credit_request, id, opts) return data, _status_code, _headers @@ -96,7 +96,7 @@ def void_credit(void_credit_request, id, opts = {}) # @param void_credit_request # @param id The credit ID returned from a previous credit request. # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2015, Fixnum, Hash)>] InlineResponse2015 data, response status code and response headers + # @return [Array<(PtsV2PaymentsVoidsPost201Response, Fixnum, Hash)>] PtsV2PaymentsVoidsPost201Response data, response status code and response headers def void_credit_with_http_info(void_credit_request, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VoidApi.void_credit ...' @@ -134,7 +134,7 @@ def void_credit_with_http_info(void_credit_request, id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2015') + :return_type => 'PtsV2PaymentsVoidsPost201Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: VoidApi#void_credit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end @@ -145,7 +145,7 @@ def void_credit_with_http_info(void_credit_request, id, opts = {}) # @param void_payment_request # @param id The payment ID returned from a previous payment request. # @param [Hash] opts the optional parameters - # @return [InlineResponse2015] + # @return [PtsV2PaymentsVoidsPost201Response] def void_payment(void_payment_request, id, opts = {}) data, _status_code, _headers = void_payment_with_http_info(void_payment_request, id, opts) return data, _status_code, _headers @@ -156,7 +156,7 @@ def void_payment(void_payment_request, id, opts = {}) # @param void_payment_request # @param id The payment ID returned from a previous payment request. # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2015, Fixnum, Hash)>] InlineResponse2015 data, response status code and response headers + # @return [Array<(PtsV2PaymentsVoidsPost201Response, Fixnum, Hash)>] PtsV2PaymentsVoidsPost201Response data, response status code and response headers def void_payment_with_http_info(void_payment_request, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VoidApi.void_payment ...' @@ -194,7 +194,7 @@ def void_payment_with_http_info(void_payment_request, id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2015') + :return_type => 'PtsV2PaymentsVoidsPost201Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: VoidApi#void_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end @@ -205,7 +205,7 @@ def void_payment_with_http_info(void_payment_request, id, opts = {}) # @param void_refund_request # @param id The refund ID returned from a previous refund request. # @param [Hash] opts the optional parameters - # @return [InlineResponse2015] + # @return [PtsV2PaymentsVoidsPost201Response] def void_refund(void_refund_request, id, opts = {}) data, _status_code, _headers = void_refund_with_http_info(void_refund_request, id, opts) return data, _status_code, _headers @@ -216,7 +216,7 @@ def void_refund(void_refund_request, id, opts = {}) # @param void_refund_request # @param id The refund ID returned from a previous refund request. # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2015, Fixnum, Hash)>] InlineResponse2015 data, response status code and response headers + # @return [Array<(PtsV2PaymentsVoidsPost201Response, Fixnum, Hash)>] PtsV2PaymentsVoidsPost201Response data, response status code and response headers def void_refund_with_http_info(void_refund_request, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VoidApi.void_refund ...' @@ -254,7 +254,7 @@ def void_refund_with_http_info(void_refund_request, id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2015') + :return_type => 'PtsV2PaymentsVoidsPost201Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: VoidApi#void_refund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end diff --git a/lib/cybersource_rest_client/api_client.rb b/lib/cybersource_rest_client/api_client.rb index 4d863349..fe8af7ff 100644 --- a/lib/cybersource_rest_client/api_client.rb +++ b/lib/cybersource_rest_client/api_client.rb @@ -127,7 +127,7 @@ def build_request(http_method, path, opts = {}) download_file(request) if opts[:return_type] == 'File' request end - # set merchantConfig + # set merchantConfig def set_configuration(config) require_relative '../../AuthenticationSDK/core/Merchantconfig.rb' $merchantconfig_obj = Merchantconfig.new(config) diff --git a/lib/cybersource_rest_client/models/create_search_request.rb b/lib/cybersource_rest_client/models/create_search_request.rb deleted file mode 100644 index c5a79ef7..00000000 --- a/lib/cybersource_rest_client/models/create_search_request.rb +++ /dev/null @@ -1,244 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class CreateSearchRequest - # save or not save. - attr_accessor :save - - # The description for this field is not available. - attr_accessor :name - - # Time Zone. - attr_accessor :timezone - - # transaction search query string. - attr_accessor :query - - # offset. - attr_accessor :offset - - # limit on number of results. - attr_accessor :limit - - # A comma separated list of the following form - fieldName1 asc or desc, fieldName2 asc or desc, etc. - attr_accessor :sort - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'save' => :'save', - :'name' => :'name', - :'timezone' => :'timezone', - :'query' => :'query', - :'offset' => :'offset', - :'limit' => :'limit', - :'sort' => :'sort' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'save' => :'BOOLEAN', - :'name' => :'String', - :'timezone' => :'String', - :'query' => :'String', - :'offset' => :'Integer', - :'limit' => :'Integer', - :'sort' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'save') - self.save = attributes[:'save'] - end - - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.has_key?(:'timezone') - self.timezone = attributes[:'timezone'] - end - - if attributes.has_key?(:'query') - self.query = attributes[:'query'] - end - - if attributes.has_key?(:'offset') - self.offset = attributes[:'offset'] - end - - if attributes.has_key?(:'limit') - self.limit = attributes[:'limit'] - end - - if attributes.has_key?(:'sort') - self.sort = attributes[:'sort'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - save == o.save && - name == o.name && - timezone == o.timezone && - query == o.query && - offset == o.offset && - limit == o.limit && - sort == o.sort - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [save, name, timezone, query, offset, limit, sort].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/flex_v1_keys_post200_response.rb b/lib/cybersource_rest_client/models/flex_v1_keys_post200_response.rb new file mode 100644 index 00000000..757a0263 --- /dev/null +++ b/lib/cybersource_rest_client/models/flex_v1_keys_post200_response.rb @@ -0,0 +1,202 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class FlexV1KeysPost200Response + # Unique identifier for the generated token. Used in the subsequent Tokenize Card request from your customer’s device or browser. + attr_accessor :key_id + + attr_accessor :der + + attr_accessor :jwk + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'key_id' => :'keyId', + :'der' => :'der', + :'jwk' => :'jwk' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'key_id' => :'String', + :'der' => :'FlexV1KeysPost200ResponseDer', + :'jwk' => :'FlexV1KeysPost200ResponseJwk' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'keyId') + self.key_id = attributes[:'keyId'] + end + + if attributes.has_key?(:'der') + self.der = attributes[:'der'] + end + + if attributes.has_key?(:'jwk') + self.jwk = attributes[:'jwk'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + key_id == o.key_id && + der == o.der && + jwk == o.jwk + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [key_id, der, jwk].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/flex_v1_keys_post200_response_der.rb b/lib/cybersource_rest_client/models/flex_v1_keys_post200_response_der.rb new file mode 100644 index 00000000..3bcf5915 --- /dev/null +++ b/lib/cybersource_rest_client/models/flex_v1_keys_post200_response_der.rb @@ -0,0 +1,205 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + # The public key in DER format. Used to validate the response from the Tokenize Card request. Additionally this format is useful for client side encryption in Android and iOS implementations. + class FlexV1KeysPost200ResponseDer + # Specifies the format of the public key; currently X.509. + attr_accessor :format + + # Algorithm used to encrypt the public key. + attr_accessor :algorithm + + # Base64 encoded public key value. + attr_accessor :public_key + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'format' => :'format', + :'algorithm' => :'algorithm', + :'public_key' => :'publicKey' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'format' => :'String', + :'algorithm' => :'String', + :'public_key' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'format') + self.format = attributes[:'format'] + end + + if attributes.has_key?(:'algorithm') + self.algorithm = attributes[:'algorithm'] + end + + if attributes.has_key?(:'publicKey') + self.public_key = attributes[:'publicKey'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + format == o.format && + algorithm == o.algorithm && + public_key == o.public_key + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [format, algorithm, public_key].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/flex_v1_keys_post200_response_jwk.rb b/lib/cybersource_rest_client/models/flex_v1_keys_post200_response_jwk.rb new file mode 100644 index 00000000..77e4aa70 --- /dev/null +++ b/lib/cybersource_rest_client/models/flex_v1_keys_post200_response_jwk.rb @@ -0,0 +1,225 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + # The public key in JSON Web Key (JWK) format. This format is useful for client side encryption in JavaScript based implementations. + class FlexV1KeysPost200ResponseJwk + # Algorithm used to encrypt the public key. + attr_accessor :kty + + # Defines whether to use the key for encryption (enc) or verifying a signature (sig). Always returned as enc. + attr_accessor :use + + # The key ID in JWK format. + attr_accessor :kid + + # JWK RSA Modulus + attr_accessor :n + + # JWK RSA Exponent + attr_accessor :e + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'kty' => :'kty', + :'use' => :'use', + :'kid' => :'kid', + :'n' => :'n', + :'e' => :'e' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'kty' => :'String', + :'use' => :'String', + :'kid' => :'String', + :'n' => :'String', + :'e' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'kty') + self.kty = attributes[:'kty'] + end + + if attributes.has_key?(:'use') + self.use = attributes[:'use'] + end + + if attributes.has_key?(:'kid') + self.kid = attributes[:'kid'] + end + + if attributes.has_key?(:'n') + self.n = attributes[:'n'] + end + + if attributes.has_key?(:'e') + self.e = attributes[:'e'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + kty == o.kty && + use == o.use && + kid == o.kid && + n == o.n && + e == o.e + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [kty, use, kid, n, e].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/flex_v1_tokens_post200_response.rb b/lib/cybersource_rest_client/models/flex_v1_tokens_post200_response.rb new file mode 100644 index 00000000..cc7b19cb --- /dev/null +++ b/lib/cybersource_rest_client/models/flex_v1_tokens_post200_response.rb @@ -0,0 +1,255 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class FlexV1TokensPost200Response + # The Key ID. + attr_accessor :key_id + + # The generated token. The token replaces card data and is used as the Subscription ID in the CyberSource Simple Order API or SCMP API. + attr_accessor :token + + # The masked card number displaying the first 6 digits and the last 4 digits. + attr_accessor :masked_pan + + # The card type. + attr_accessor :card_type + + # The UTC date and time in milliseconds at which the signature was generated. + attr_accessor :timestamp + + # Indicates which fields from the response make up the data that is used when verifying the response signature. See the [sample code] (https://github.com/CyberSource/cybersource-flex-samples/blob/master/java/spring-boot/src/main/java/com/cybersource/flex/application/CheckoutController.java) on how to verify the signature. + attr_accessor :signed_fields + + # Flex-generated digital signature. To ensure the values have not been tampered with while passing through the client, verify this server-side using the public key generated from the /keys resource. + attr_accessor :signature + + attr_accessor :discoverable_services + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'key_id' => :'keyId', + :'token' => :'token', + :'masked_pan' => :'maskedPan', + :'card_type' => :'cardType', + :'timestamp' => :'timestamp', + :'signed_fields' => :'signedFields', + :'signature' => :'signature', + :'discoverable_services' => :'discoverableServices' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'key_id' => :'String', + :'token' => :'String', + :'masked_pan' => :'String', + :'card_type' => :'String', + :'timestamp' => :'Integer', + :'signed_fields' => :'String', + :'signature' => :'String', + :'discoverable_services' => :'Hash' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'keyId') + self.key_id = attributes[:'keyId'] + end + + if attributes.has_key?(:'token') + self.token = attributes[:'token'] + end + + if attributes.has_key?(:'maskedPan') + self.masked_pan = attributes[:'maskedPan'] + end + + if attributes.has_key?(:'cardType') + self.card_type = attributes[:'cardType'] + end + + if attributes.has_key?(:'timestamp') + self.timestamp = attributes[:'timestamp'] + end + + if attributes.has_key?(:'signedFields') + self.signed_fields = attributes[:'signedFields'] + end + + if attributes.has_key?(:'signature') + self.signature = attributes[:'signature'] + end + + if attributes.has_key?(:'discoverableServices') + if (value = attributes[:'discoverableServices']).is_a?(Hash) + self.discoverable_services = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + key_id == o.key_id && + token == o.token && + masked_pan == o.masked_pan && + card_type == o.card_type && + timestamp == o.timestamp && + signed_fields == o.signed_fields && + signature == o.signature && + discoverable_services == o.discoverable_services + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [key_id, token, masked_pan, card_type, timestamp, signed_fields, signature, discoverable_services].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/inline_response_200.rb b/lib/cybersource_rest_client/models/inline_response_200.rb deleted file mode 100644 index 311cef6c..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200.rb +++ /dev/null @@ -1,202 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse200 - # Unique identifier for the generated token. Used in the subsequent Tokenize Card request from your customer’s device or browser. - attr_accessor :key_id - - attr_accessor :der - - attr_accessor :jwk - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'key_id' => :'keyId', - :'der' => :'der', - :'jwk' => :'jwk' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'key_id' => :'String', - :'der' => :'InlineResponse200Der', - :'jwk' => :'InlineResponse200Jwk' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'keyId') - self.key_id = attributes[:'keyId'] - end - - if attributes.has_key?(:'der') - self.der = attributes[:'der'] - end - - if attributes.has_key?(:'jwk') - self.jwk = attributes[:'jwk'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - key_id == o.key_id && - der == o.der && - jwk == o.jwk - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [key_id, der, jwk].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_1.rb b/lib/cybersource_rest_client/models/inline_response_200_1.rb deleted file mode 100644 index aa092535..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_1.rb +++ /dev/null @@ -1,255 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2001 - # The Key ID. - attr_accessor :key_id - - # The generated token. The token replaces card data and is used as the Subscription ID in the CyberSource Simple Order API or SCMP API. - attr_accessor :token - - # The masked card number displaying the first 6 digits and the last 4 digits. - attr_accessor :masked_pan - - # The card type. - attr_accessor :card_type - - # The UTC date and time in milliseconds at which the signature was generated. - attr_accessor :timestamp - - # Indicates which fields from the response make up the data that is used when verifying the response signature. See the [sample code] (https://github.com/CyberSource/cybersource-flex-samples/blob/master/java/spring-boot/src/main/java/com/cybersource/flex/application/CheckoutController.java) on how to verify the signature. - attr_accessor :signed_fields - - # Flex-generated digital signature. To ensure the values have not been tampered with while passing through the client, verify this server-side using the public key generated from the /keys resource. - attr_accessor :signature - - attr_accessor :discoverable_services - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'key_id' => :'keyId', - :'token' => :'token', - :'masked_pan' => :'maskedPan', - :'card_type' => :'cardType', - :'timestamp' => :'timestamp', - :'signed_fields' => :'signedFields', - :'signature' => :'signature', - :'discoverable_services' => :'discoverableServices' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'key_id' => :'String', - :'token' => :'String', - :'masked_pan' => :'String', - :'card_type' => :'String', - :'timestamp' => :'Integer', - :'signed_fields' => :'String', - :'signature' => :'String', - :'discoverable_services' => :'Hash' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'keyId') - self.key_id = attributes[:'keyId'] - end - - if attributes.has_key?(:'token') - self.token = attributes[:'token'] - end - - if attributes.has_key?(:'maskedPan') - self.masked_pan = attributes[:'maskedPan'] - end - - if attributes.has_key?(:'cardType') - self.card_type = attributes[:'cardType'] - end - - if attributes.has_key?(:'timestamp') - self.timestamp = attributes[:'timestamp'] - end - - if attributes.has_key?(:'signedFields') - self.signed_fields = attributes[:'signedFields'] - end - - if attributes.has_key?(:'signature') - self.signature = attributes[:'signature'] - end - - if attributes.has_key?(:'discoverableServices') - if (value = attributes[:'discoverableServices']).is_a?(Hash) - self.discoverable_services = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - key_id == o.key_id && - token == o.token && - masked_pan == o.masked_pan && - card_type == o.card_type && - timestamp == o.timestamp && - signed_fields == o.signed_fields && - signature == o.signature && - discoverable_services == o.discoverable_services - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [key_id, token, masked_pan, card_type, timestamp, signed_fields, signature, discoverable_services].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_10.rb b/lib/cybersource_rest_client/models/inline_response_200_10.rb deleted file mode 100644 index 3c09c204..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_10.rb +++ /dev/null @@ -1,295 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20010 - attr_accessor :_links - - # Unique identification number assigned by CyberSource to the submitted request. - attr_accessor :id - - # Describes type of token. For example: customer, paymentInstrument or instrumentIdentifier. - attr_accessor :object - - # Current state of the token. - attr_accessor :state - - attr_accessor :card - - attr_accessor :bank_account - - attr_accessor :processing_information - - attr_accessor :metadata - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_links' => :'_links', - :'id' => :'id', - :'object' => :'object', - :'state' => :'state', - :'card' => :'card', - :'bank_account' => :'bankAccount', - :'processing_information' => :'processingInformation', - :'metadata' => :'metadata' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_links' => :'Tmsv1instrumentidentifiersLinks', - :'id' => :'String', - :'object' => :'String', - :'state' => :'String', - :'card' => :'Tmsv1instrumentidentifiersCard', - :'bank_account' => :'Tmsv1instrumentidentifiersBankAccount', - :'processing_information' => :'Tmsv1instrumentidentifiersProcessingInformation', - :'metadata' => :'Tmsv1instrumentidentifiersMetadata' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'_links') - self._links = attributes[:'_links'] - end - - if attributes.has_key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.has_key?(:'object') - self.object = attributes[:'object'] - end - - if attributes.has_key?(:'state') - self.state = attributes[:'state'] - end - - if attributes.has_key?(:'card') - self.card = attributes[:'card'] - end - - if attributes.has_key?(:'bankAccount') - self.bank_account = attributes[:'bankAccount'] - end - - if attributes.has_key?(:'processingInformation') - self.processing_information = attributes[:'processingInformation'] - end - - if attributes.has_key?(:'metadata') - self.metadata = attributes[:'metadata'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - object_validator = EnumAttributeValidator.new('String', ['instrumentIdentifier']) - return false unless object_validator.valid?(@object) - state_validator = EnumAttributeValidator.new('String', ['ACTIVE', 'CLOSED']) - return false unless state_validator.valid?(@state) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] object Object to be assigned - def object=(object) - validator = EnumAttributeValidator.new('String', ['instrumentIdentifier']) - unless validator.valid?(object) - fail ArgumentError, 'invalid value for "object", must be one of #{validator.allowable_values}.' - end - @object = object - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] state Object to be assigned - def state=(state) - validator = EnumAttributeValidator.new('String', ['ACTIVE', 'CLOSED']) - unless validator.valid?(state) - fail ArgumentError, 'invalid value for "state", must be one of #{validator.allowable_values}.' - end - @state = state - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _links == o._links && - id == o.id && - object == o.object && - state == o.state && - card == o.card && - bank_account == o.bank_account && - processing_information == o.processing_information && - metadata == o.metadata - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [_links, id, object, state, card, bank_account, processing_information, metadata].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_11.rb b/lib/cybersource_rest_client/models/inline_response_200_11.rb deleted file mode 100644 index 07b43a1b..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_11.rb +++ /dev/null @@ -1,277 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20011 - attr_accessor :_links - - # Shows the response is a collection of objects. - attr_accessor :object - - # The offset parameter supplied in the request. - attr_accessor :offset - - # The limit parameter supplied in the request. - attr_accessor :limit - - # The number of Payment Instruments returned in the array. - attr_accessor :count - - # The total number of Payment Instruments associated with the Instrument Identifier in the zero-based dataset. - attr_accessor :total - - # Array of Payment Instruments returned for the supplied Instrument Identifier. - attr_accessor :_embedded - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_links' => :'_links', - :'object' => :'object', - :'offset' => :'offset', - :'limit' => :'limit', - :'count' => :'count', - :'total' => :'total', - :'_embedded' => :'_embedded' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_links' => :'InlineResponse20011Links', - :'object' => :'String', - :'offset' => :'String', - :'limit' => :'String', - :'count' => :'String', - :'total' => :'String', - :'_embedded' => :'Object' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'_links') - self._links = attributes[:'_links'] - end - - if attributes.has_key?(:'object') - self.object = attributes[:'object'] - end - - if attributes.has_key?(:'offset') - self.offset = attributes[:'offset'] - end - - if attributes.has_key?(:'limit') - self.limit = attributes[:'limit'] - end - - if attributes.has_key?(:'count') - self.count = attributes[:'count'] - end - - if attributes.has_key?(:'total') - self.total = attributes[:'total'] - end - - if attributes.has_key?(:'_embedded') - self._embedded = attributes[:'_embedded'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - object_validator = EnumAttributeValidator.new('String', ['collection']) - return false unless object_validator.valid?(@object) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] object Object to be assigned - def object=(object) - validator = EnumAttributeValidator.new('String', ['collection']) - unless validator.valid?(object) - fail ArgumentError, 'invalid value for "object", must be one of #{validator.allowable_values}.' - end - @object = object - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _links == o._links && - object == o.object && - offset == o.offset && - limit == o.limit && - count == o.count && - total == o.total && - _embedded == o._embedded - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [_links, object, offset, limit, count, total, _embedded].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_11__links.rb b/lib/cybersource_rest_client/models/inline_response_200_11__links.rb deleted file mode 100644 index 813823fc..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_11__links.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20011Links - attr_accessor :_self - - attr_accessor :first - - attr_accessor :prev - - attr_accessor :_next - - attr_accessor :last - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_self' => :'self', - :'first' => :'first', - :'prev' => :'prev', - :'_next' => :'next', - :'last' => :'last' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_self' => :'InlineResponse20011LinksSelf', - :'first' => :'InlineResponse20011LinksFirst', - :'prev' => :'InlineResponse20011LinksPrev', - :'_next' => :'InlineResponse20011LinksNext', - :'last' => :'InlineResponse20011LinksLast' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'self') - self._self = attributes[:'self'] - end - - if attributes.has_key?(:'first') - self.first = attributes[:'first'] - end - - if attributes.has_key?(:'prev') - self.prev = attributes[:'prev'] - end - - if attributes.has_key?(:'next') - self._next = attributes[:'next'] - end - - if attributes.has_key?(:'last') - self.last = attributes[:'last'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _self == o._self && - first == o.first && - prev == o.prev && - _next == o._next && - last == o.last - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [_self, first, prev, _next, last].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_11__links_first.rb b/lib/cybersource_rest_client/models/inline_response_200_11__links_first.rb deleted file mode 100644 index 0fffbd0c..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_11__links_first.rb +++ /dev/null @@ -1,184 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20011LinksFirst - # A link to the collection starting at offset zero for the supplied limit. - attr_accessor :href - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'href' => :'href' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'href' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'href') - self.href = attributes[:'href'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - href == o.href - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [href].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_11__links_last.rb b/lib/cybersource_rest_client/models/inline_response_200_11__links_last.rb deleted file mode 100644 index 13e2084b..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_11__links_last.rb +++ /dev/null @@ -1,184 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20011LinksLast - # A link to the last collection containing the remaining objects. - attr_accessor :href - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'href' => :'href' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'href' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'href') - self.href = attributes[:'href'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - href == o.href - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [href].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_11__links_next.rb b/lib/cybersource_rest_client/models/inline_response_200_11__links_next.rb deleted file mode 100644 index 61b23d5d..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_11__links_next.rb +++ /dev/null @@ -1,184 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20011LinksNext - # A link to the next collection starting at the supplied offset plus the supplied limit. - attr_accessor :href - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'href' => :'href' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'href' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'href') - self.href = attributes[:'href'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - href == o.href - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [href].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_11__links_prev.rb b/lib/cybersource_rest_client/models/inline_response_200_11__links_prev.rb deleted file mode 100644 index a7a5c3a9..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_11__links_prev.rb +++ /dev/null @@ -1,184 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - # A link to the previous collection starting at the supplied offset minus the supplied limit. - class InlineResponse20011LinksPrev - attr_accessor :href - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'href' => :'href' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'href' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'href') - self.href = attributes[:'href'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - href == o.href - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [href].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_11__links_self.rb b/lib/cybersource_rest_client/models/inline_response_200_11__links_self.rb deleted file mode 100644 index b630c94a..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_11__links_self.rb +++ /dev/null @@ -1,184 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20011LinksSelf - # A link to the current requested collection. - attr_accessor :href - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'href' => :'href' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'href' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'href') - self.href = attributes[:'href'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - href == o.href - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [href].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12.rb b/lib/cybersource_rest_client/models/inline_response_200_12.rb deleted file mode 100644 index 2e011914..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12.rb +++ /dev/null @@ -1,444 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012 - # An unique identification number assigned by CyberSource to identify the submitted request. - attr_accessor :id - - # Payment Request Id - attr_accessor :root_id - - # The reconciliation id for the submitted transaction. This value is not returned for all processors. - attr_accessor :reconciliation_id - - # The description for this field is not available. - attr_accessor :merchant_id - - # The status of the submitted transaction. - attr_accessor :status - - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - attr_accessor :application_information - - attr_accessor :buyer_information - - attr_accessor :client_reference_information - - attr_accessor :consumer_authentication_information - - attr_accessor :device_information - - attr_accessor :error_information - - attr_accessor :installment_information - - attr_accessor :fraud_marking_information - - # The description for this field is not available. - attr_accessor :merchant_defined_information - - attr_accessor :merchant_information - - attr_accessor :order_information - - attr_accessor :payment_information - - attr_accessor :processing_information - - attr_accessor :processor_information - - attr_accessor :point_of_sale_information - - attr_accessor :risk_information - - attr_accessor :sender_information - - attr_accessor :_links - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id', - :'root_id' => :'rootId', - :'reconciliation_id' => :'reconciliationId', - :'merchant_id' => :'merchantId', - :'status' => :'status', - :'submit_time_utc' => :'submitTimeUtc', - :'application_information' => :'applicationInformation', - :'buyer_information' => :'buyerInformation', - :'client_reference_information' => :'clientReferenceInformation', - :'consumer_authentication_information' => :'consumerAuthenticationInformation', - :'device_information' => :'deviceInformation', - :'error_information' => :'errorInformation', - :'installment_information' => :'installmentInformation', - :'fraud_marking_information' => :'fraudMarkingInformation', - :'merchant_defined_information' => :'merchantDefinedInformation', - :'merchant_information' => :'merchantInformation', - :'order_information' => :'orderInformation', - :'payment_information' => :'paymentInformation', - :'processing_information' => :'processingInformation', - :'processor_information' => :'processorInformation', - :'point_of_sale_information' => :'pointOfSaleInformation', - :'risk_information' => :'riskInformation', - :'sender_information' => :'senderInformation', - :'_links' => :'_links' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'id' => :'String', - :'root_id' => :'String', - :'reconciliation_id' => :'String', - :'merchant_id' => :'String', - :'status' => :'String', - :'submit_time_utc' => :'String', - :'application_information' => :'InlineResponse20012ApplicationInformation', - :'buyer_information' => :'InlineResponse20012BuyerInformation', - :'client_reference_information' => :'InlineResponse20012ClientReferenceInformation', - :'consumer_authentication_information' => :'InlineResponse20012ConsumerAuthenticationInformation', - :'device_information' => :'InlineResponse20012DeviceInformation', - :'error_information' => :'InlineResponse20012ErrorInformation', - :'installment_information' => :'InlineResponse20012InstallmentInformation', - :'fraud_marking_information' => :'InlineResponse20012FraudMarkingInformation', - :'merchant_defined_information' => :'Array', - :'merchant_information' => :'InlineResponse20012MerchantInformation', - :'order_information' => :'InlineResponse20012OrderInformation', - :'payment_information' => :'InlineResponse20012PaymentInformation', - :'processing_information' => :'InlineResponse20012ProcessingInformation', - :'processor_information' => :'InlineResponse20012ProcessorInformation', - :'point_of_sale_information' => :'InlineResponse20012PointOfSaleInformation', - :'risk_information' => :'InlineResponse20012RiskInformation', - :'sender_information' => :'InlineResponse20012SenderInformation', - :'_links' => :'InlineResponse2011Links' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.has_key?(:'rootId') - self.root_id = attributes[:'rootId'] - end - - if attributes.has_key?(:'reconciliationId') - self.reconciliation_id = attributes[:'reconciliationId'] - end - - if attributes.has_key?(:'merchantId') - self.merchant_id = attributes[:'merchantId'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - - if attributes.has_key?(:'applicationInformation') - self.application_information = attributes[:'applicationInformation'] - end - - if attributes.has_key?(:'buyerInformation') - self.buyer_information = attributes[:'buyerInformation'] - end - - if attributes.has_key?(:'clientReferenceInformation') - self.client_reference_information = attributes[:'clientReferenceInformation'] - end - - if attributes.has_key?(:'consumerAuthenticationInformation') - self.consumer_authentication_information = attributes[:'consumerAuthenticationInformation'] - end - - if attributes.has_key?(:'deviceInformation') - self.device_information = attributes[:'deviceInformation'] - end - - if attributes.has_key?(:'errorInformation') - self.error_information = attributes[:'errorInformation'] - end - - if attributes.has_key?(:'installmentInformation') - self.installment_information = attributes[:'installmentInformation'] - end - - if attributes.has_key?(:'fraudMarkingInformation') - self.fraud_marking_information = attributes[:'fraudMarkingInformation'] - end - - if attributes.has_key?(:'merchantDefinedInformation') - if (value = attributes[:'merchantDefinedInformation']).is_a?(Array) - self.merchant_defined_information = value - end - end - - if attributes.has_key?(:'merchantInformation') - self.merchant_information = attributes[:'merchantInformation'] - end - - if attributes.has_key?(:'orderInformation') - self.order_information = attributes[:'orderInformation'] - end - - if attributes.has_key?(:'paymentInformation') - self.payment_information = attributes[:'paymentInformation'] - end - - if attributes.has_key?(:'processingInformation') - self.processing_information = attributes[:'processingInformation'] - end - - if attributes.has_key?(:'processorInformation') - self.processor_information = attributes[:'processorInformation'] - end - - if attributes.has_key?(:'pointOfSaleInformation') - self.point_of_sale_information = attributes[:'pointOfSaleInformation'] - end - - if attributes.has_key?(:'riskInformation') - self.risk_information = attributes[:'riskInformation'] - end - - if attributes.has_key?(:'senderInformation') - self.sender_information = attributes[:'senderInformation'] - end - - if attributes.has_key?(:'_links') - self._links = attributes[:'_links'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@id.nil? && @id.to_s.length > 26 - invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') - end - - if !@root_id.nil? && @root_id.to_s.length > 26 - invalid_properties.push('invalid value for "root_id", the character length must be smaller than or equal to 26.') - end - - if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - invalid_properties.push('invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@id.nil? && @id.to_s.length > 26 - return false if !@root_id.nil? && @root_id.to_s.length > 26 - return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - true - end - - # Custom attribute writer method with validation - # @param [Object] id Value to be assigned - def id=(id) - if !id.nil? && id.to_s.length > 26 - fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' - end - - @id = id - end - - # Custom attribute writer method with validation - # @param [Object] root_id Value to be assigned - def root_id=(root_id) - if !root_id.nil? && root_id.to_s.length > 26 - fail ArgumentError, 'invalid value for "root_id", the character length must be smaller than or equal to 26.' - end - - @root_id = root_id - end - - # Custom attribute writer method with validation - # @param [Object] reconciliation_id Value to be assigned - def reconciliation_id=(reconciliation_id) - if !reconciliation_id.nil? && reconciliation_id.to_s.length > 60 - fail ArgumentError, 'invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.' - end - - @reconciliation_id = reconciliation_id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - root_id == o.root_id && - reconciliation_id == o.reconciliation_id && - merchant_id == o.merchant_id && - status == o.status && - submit_time_utc == o.submit_time_utc && - application_information == o.application_information && - buyer_information == o.buyer_information && - client_reference_information == o.client_reference_information && - consumer_authentication_information == o.consumer_authentication_information && - device_information == o.device_information && - error_information == o.error_information && - installment_information == o.installment_information && - fraud_marking_information == o.fraud_marking_information && - merchant_defined_information == o.merchant_defined_information && - merchant_information == o.merchant_information && - order_information == o.order_information && - payment_information == o.payment_information && - processing_information == o.processing_information && - processor_information == o.processor_information && - point_of_sale_information == o.point_of_sale_information && - risk_information == o.risk_information && - sender_information == o.sender_information && - _links == o._links - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [id, root_id, reconciliation_id, merchant_id, status, submit_time_utc, application_information, buyer_information, client_reference_information, consumer_authentication_information, device_information, error_information, installment_information, fraud_marking_information, merchant_defined_information, merchant_information, order_information, payment_information, processing_information, processor_information, point_of_sale_information, risk_information, sender_information, _links].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_application_information.rb b/lib/cybersource_rest_client/models/inline_response_200_12_application_information.rb deleted file mode 100644 index dadcc142..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_application_information.rb +++ /dev/null @@ -1,225 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012ApplicationInformation - # The status of the submitted transaction. - attr_accessor :status - - # The description for this field is not available. - attr_accessor :reason_code - - # The description for this field is not available. - attr_accessor :r_code - - # The description for this field is not available. - attr_accessor :r_flag - - attr_accessor :applications - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'status' => :'status', - :'reason_code' => :'reasonCode', - :'r_code' => :'rCode', - :'r_flag' => :'rFlag', - :'applications' => :'applications' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'status' => :'String', - :'reason_code' => :'String', - :'r_code' => :'String', - :'r_flag' => :'String', - :'applications' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'reasonCode') - self.reason_code = attributes[:'reasonCode'] - end - - if attributes.has_key?(:'rCode') - self.r_code = attributes[:'rCode'] - end - - if attributes.has_key?(:'rFlag') - self.r_flag = attributes[:'rFlag'] - end - - if attributes.has_key?(:'applications') - if (value = attributes[:'applications']).is_a?(Array) - self.applications = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - status == o.status && - reason_code == o.reason_code && - r_code == o.r_code && - r_flag == o.r_flag && - applications == o.applications - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [status, reason_code, r_code, r_flag, applications].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_application_information_applications.rb b/lib/cybersource_rest_client/models/inline_response_200_12_application_information_applications.rb deleted file mode 100644 index a56f0fa0..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_application_information_applications.rb +++ /dev/null @@ -1,254 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012ApplicationInformationApplications - # The description for this field is not available. - attr_accessor :name - - # The description for this field is not available. - attr_accessor :status - - # The description for this field is not available. - attr_accessor :reason_code - - # The description for this field is not available. - attr_accessor :r_code - - # The description for this field is not available. - attr_accessor :r_flag - - # The description for this field is not available. - attr_accessor :reconciliation_id - - # The description for this field is not available. - attr_accessor :r_message - - # The description for this field is not available. - attr_accessor :return_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'name' => :'name', - :'status' => :'status', - :'reason_code' => :'reasonCode', - :'r_code' => :'rCode', - :'r_flag' => :'rFlag', - :'reconciliation_id' => :'reconciliationId', - :'r_message' => :'rMessage', - :'return_code' => :'returnCode' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'name' => :'String', - :'status' => :'String', - :'reason_code' => :'String', - :'r_code' => :'String', - :'r_flag' => :'String', - :'reconciliation_id' => :'String', - :'r_message' => :'String', - :'return_code' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'reasonCode') - self.reason_code = attributes[:'reasonCode'] - end - - if attributes.has_key?(:'rCode') - self.r_code = attributes[:'rCode'] - end - - if attributes.has_key?(:'rFlag') - self.r_flag = attributes[:'rFlag'] - end - - if attributes.has_key?(:'reconciliationId') - self.reconciliation_id = attributes[:'reconciliationId'] - end - - if attributes.has_key?(:'rMessage') - self.r_message = attributes[:'rMessage'] - end - - if attributes.has_key?(:'returnCode') - self.return_code = attributes[:'returnCode'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - status == o.status && - reason_code == o.reason_code && - r_code == o.r_code && - r_flag == o.r_flag && - reconciliation_id == o.reconciliation_id && - r_message == o.r_message && - return_code == o.return_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [name, status, reason_code, r_code, r_flag, reconciliation_id, r_message, return_code].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_buyer_information.rb b/lib/cybersource_rest_client/models/inline_response_200_12_buyer_information.rb deleted file mode 100644 index 5d68bd5f..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_buyer_information.rb +++ /dev/null @@ -1,224 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012BuyerInformation - # Your identifier for the customer. For processor-specific information, see the customer_account_id field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :merchant_customer_id - - # The description for this field is not available. - attr_accessor :hashed_password - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'merchant_customer_id' => :'merchantCustomerId', - :'hashed_password' => :'hashedPassword' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'merchant_customer_id' => :'String', - :'hashed_password' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'merchantCustomerId') - self.merchant_customer_id = attributes[:'merchantCustomerId'] - end - - if attributes.has_key?(:'hashedPassword') - self.hashed_password = attributes[:'hashedPassword'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@merchant_customer_id.nil? && @merchant_customer_id.to_s.length > 100 - invalid_properties.push('invalid value for "merchant_customer_id", the character length must be smaller than or equal to 100.') - end - - if !@hashed_password.nil? && @hashed_password.to_s.length > 100 - invalid_properties.push('invalid value for "hashed_password", the character length must be smaller than or equal to 100.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@merchant_customer_id.nil? && @merchant_customer_id.to_s.length > 100 - return false if !@hashed_password.nil? && @hashed_password.to_s.length > 100 - true - end - - # Custom attribute writer method with validation - # @param [Object] merchant_customer_id Value to be assigned - def merchant_customer_id=(merchant_customer_id) - if !merchant_customer_id.nil? && merchant_customer_id.to_s.length > 100 - fail ArgumentError, 'invalid value for "merchant_customer_id", the character length must be smaller than or equal to 100.' - end - - @merchant_customer_id = merchant_customer_id - end - - # Custom attribute writer method with validation - # @param [Object] hashed_password Value to be assigned - def hashed_password=(hashed_password) - if !hashed_password.nil? && hashed_password.to_s.length > 100 - fail ArgumentError, 'invalid value for "hashed_password", the character length must be smaller than or equal to 100.' - end - - @hashed_password = hashed_password - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - merchant_customer_id == o.merchant_customer_id && - hashed_password == o.hashed_password - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [merchant_customer_id, hashed_password].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_client_reference_information.rb b/lib/cybersource_rest_client/models/inline_response_200_12_client_reference_information.rb deleted file mode 100644 index bae1979a..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_client_reference_information.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012ClientReferenceInformation - # Client-generated order reference or tracking number. CyberSource recommends that you send a unique value for each transaction so that you can perform meaningful searches for the transaction. - attr_accessor :code - - # The description for this field is not available. - attr_accessor :application_version - - # The application name of client which is used to submit the request. - attr_accessor :application_name - - # The description for this field is not available. - attr_accessor :application_user - - # The description for this field is not available. - attr_accessor :comments - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'application_version' => :'applicationVersion', - :'application_name' => :'applicationName', - :'application_user' => :'applicationUser', - :'comments' => :'comments' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'code' => :'String', - :'application_version' => :'String', - :'application_name' => :'String', - :'application_user' => :'String', - :'comments' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.has_key?(:'applicationVersion') - self.application_version = attributes[:'applicationVersion'] - end - - if attributes.has_key?(:'applicationName') - self.application_name = attributes[:'applicationName'] - end - - if attributes.has_key?(:'applicationUser') - self.application_user = attributes[:'applicationUser'] - end - - if attributes.has_key?(:'comments') - self.comments = attributes[:'comments'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@code.nil? && @code.to_s.length > 50 - invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 50.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@code.nil? && @code.to_s.length > 50 - true - end - - # Custom attribute writer method with validation - # @param [Object] code Value to be assigned - def code=(code) - if !code.nil? && code.to_s.length > 50 - fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 50.' - end - - @code = code - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - application_version == o.application_version && - application_name == o.application_name && - application_user == o.application_user && - comments == o.comments - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [code, application_version, application_name, application_user, comments].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_consumer_authentication_information.rb b/lib/cybersource_rest_client/models/inline_response_200_12_consumer_authentication_information.rb deleted file mode 100644 index 1e3c51a2..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_consumer_authentication_information.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012ConsumerAuthenticationInformation - # Raw electronic commerce indicator (ECI). - attr_accessor :eci_raw - - # Cardholder authentication verification value (CAVV). - attr_accessor :cavv - - # Transaction identifier. - attr_accessor :xid - - # Payer auth Transaction identifier. - attr_accessor :transaction_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'eci_raw' => :'eciRaw', - :'cavv' => :'cavv', - :'xid' => :'xid', - :'transaction_id' => :'transactionId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'eci_raw' => :'String', - :'cavv' => :'String', - :'xid' => :'String', - :'transaction_id' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'eciRaw') - self.eci_raw = attributes[:'eciRaw'] - end - - if attributes.has_key?(:'cavv') - self.cavv = attributes[:'cavv'] - end - - if attributes.has_key?(:'xid') - self.xid = attributes[:'xid'] - end - - if attributes.has_key?(:'transactionId') - self.transaction_id = attributes[:'transactionId'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@eci_raw.nil? && @eci_raw.to_s.length > 2 - invalid_properties.push('invalid value for "eci_raw", the character length must be smaller than or equal to 2.') - end - - if !@cavv.nil? && @cavv.to_s.length > 40 - invalid_properties.push('invalid value for "cavv", the character length must be smaller than or equal to 40.') - end - - if !@xid.nil? && @xid.to_s.length > 40 - invalid_properties.push('invalid value for "xid", the character length must be smaller than or equal to 40.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@eci_raw.nil? && @eci_raw.to_s.length > 2 - return false if !@cavv.nil? && @cavv.to_s.length > 40 - return false if !@xid.nil? && @xid.to_s.length > 40 - true - end - - # Custom attribute writer method with validation - # @param [Object] eci_raw Value to be assigned - def eci_raw=(eci_raw) - if !eci_raw.nil? && eci_raw.to_s.length > 2 - fail ArgumentError, 'invalid value for "eci_raw", the character length must be smaller than or equal to 2.' - end - - @eci_raw = eci_raw - end - - # Custom attribute writer method with validation - # @param [Object] cavv Value to be assigned - def cavv=(cavv) - if !cavv.nil? && cavv.to_s.length > 40 - fail ArgumentError, 'invalid value for "cavv", the character length must be smaller than or equal to 40.' - end - - @cavv = cavv - end - - # Custom attribute writer method with validation - # @param [Object] xid Value to be assigned - def xid=(xid) - if !xid.nil? && xid.to_s.length > 40 - fail ArgumentError, 'invalid value for "xid", the character length must be smaller than or equal to 40.' - end - - @xid = xid - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - eci_raw == o.eci_raw && - cavv == o.cavv && - xid == o.xid && - transaction_id == o.transaction_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [eci_raw, cavv, xid, transaction_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_device_information.rb b/lib/cybersource_rest_client/models/inline_response_200_12_device_information.rb deleted file mode 100644 index 3a86966f..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_device_information.rb +++ /dev/null @@ -1,234 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012DeviceInformation - # IP address of the customer. - attr_accessor :ip_address - - # DNS resolved hostname from above _ipAddress_. - attr_accessor :host_name - - # The description for this field is not available. - attr_accessor :cookies_accepted - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'ip_address' => :'ipAddress', - :'host_name' => :'hostName', - :'cookies_accepted' => :'cookiesAccepted' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'ip_address' => :'String', - :'host_name' => :'String', - :'cookies_accepted' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'ipAddress') - self.ip_address = attributes[:'ipAddress'] - end - - if attributes.has_key?(:'hostName') - self.host_name = attributes[:'hostName'] - end - - if attributes.has_key?(:'cookiesAccepted') - self.cookies_accepted = attributes[:'cookiesAccepted'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@ip_address.nil? && @ip_address.to_s.length > 15 - invalid_properties.push('invalid value for "ip_address", the character length must be smaller than or equal to 15.') - end - - if !@host_name.nil? && @host_name.to_s.length > 60 - invalid_properties.push('invalid value for "host_name", the character length must be smaller than or equal to 60.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@ip_address.nil? && @ip_address.to_s.length > 15 - return false if !@host_name.nil? && @host_name.to_s.length > 60 - true - end - - # Custom attribute writer method with validation - # @param [Object] ip_address Value to be assigned - def ip_address=(ip_address) - if !ip_address.nil? && ip_address.to_s.length > 15 - fail ArgumentError, 'invalid value for "ip_address", the character length must be smaller than or equal to 15.' - end - - @ip_address = ip_address - end - - # Custom attribute writer method with validation - # @param [Object] host_name Value to be assigned - def host_name=(host_name) - if !host_name.nil? && host_name.to_s.length > 60 - fail ArgumentError, 'invalid value for "host_name", the character length must be smaller than or equal to 60.' - end - - @host_name = host_name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - ip_address == o.ip_address && - host_name == o.host_name && - cookies_accepted == o.cookies_accepted - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [ip_address, host_name, cookies_accepted].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_error_information.rb b/lib/cybersource_rest_client/models/inline_response_200_12_error_information.rb deleted file mode 100644 index fb72f5ee..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_error_information.rb +++ /dev/null @@ -1,205 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012ErrorInformation - # The description for this field is not available. - attr_accessor :reason - - # The description for this field is not available. - attr_accessor :message - - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'reason' => :'reason', - :'message' => :'message', - :'details' => :'details' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'reason' => :'String', - :'message' => :'String', - :'details' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'reason') - self.reason = attributes[:'reason'] - end - - if attributes.has_key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.has_key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - reason == o.reason && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [reason, message, details].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_fraud_marking_information.rb b/lib/cybersource_rest_client/models/inline_response_200_12_fraud_marking_information.rb deleted file mode 100644 index 4f63a4c6..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_fraud_marking_information.rb +++ /dev/null @@ -1,184 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012FraudMarkingInformation - # The description for this field is not available. - attr_accessor :reason - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'reason' => :'reason' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'reason' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'reason') - self.reason = attributes[:'reason'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - reason == o.reason - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [reason].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_installment_information.rb b/lib/cybersource_rest_client/models/inline_response_200_12_installment_information.rb deleted file mode 100644 index 539468ee..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_installment_information.rb +++ /dev/null @@ -1,184 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012InstallmentInformation - # Number of Installments. - attr_accessor :number_of_installments - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'number_of_installments' => :'numberOfInstallments' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'number_of_installments' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'numberOfInstallments') - self.number_of_installments = attributes[:'numberOfInstallments'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - number_of_installments == o.number_of_installments - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [number_of_installments].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_merchant_defined_information.rb b/lib/cybersource_rest_client/models/inline_response_200_12_merchant_defined_information.rb deleted file mode 100644 index 72fdf696..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_merchant_defined_information.rb +++ /dev/null @@ -1,224 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012MerchantDefinedInformation - # The description for this field is not available. - attr_accessor :key - - # The description for this field is not available. - attr_accessor :value - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'key' => :'key', - :'value' => :'value' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'key' => :'String', - :'value' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'key') - self.key = attributes[:'key'] - end - - if attributes.has_key?(:'value') - self.value = attributes[:'value'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@key.nil? && @key.to_s.length > 50 - invalid_properties.push('invalid value for "key", the character length must be smaller than or equal to 50.') - end - - if !@value.nil? && @value.to_s.length > 255 - invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 255.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@key.nil? && @key.to_s.length > 50 - return false if !@value.nil? && @value.to_s.length > 255 - true - end - - # Custom attribute writer method with validation - # @param [Object] key Value to be assigned - def key=(key) - if !key.nil? && key.to_s.length > 50 - fail ArgumentError, 'invalid value for "key", the character length must be smaller than or equal to 50.' - end - - @key = key - end - - # Custom attribute writer method with validation - # @param [Object] value Value to be assigned - def value=(value) - if !value.nil? && value.to_s.length > 255 - fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 255.' - end - - @value = value - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - key == o.key && - value == o.value - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [key, value].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_merchant_information.rb b/lib/cybersource_rest_client/models/inline_response_200_12_merchant_information.rb deleted file mode 100644 index cc12a76b..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_merchant_information.rb +++ /dev/null @@ -1,183 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012MerchantInformation - attr_accessor :merchant_descriptor - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'merchant_descriptor' => :'merchantDescriptor' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'merchant_descriptor' => :'InlineResponse20012MerchantInformationMerchantDescriptor' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'merchantDescriptor') - self.merchant_descriptor = attributes[:'merchantDescriptor'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - merchant_descriptor == o.merchant_descriptor - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [merchant_descriptor].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_merchant_information_merchant_descriptor.rb b/lib/cybersource_rest_client/models/inline_response_200_12_merchant_information_merchant_descriptor.rb deleted file mode 100644 index 92acde74..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_merchant_information_merchant_descriptor.rb +++ /dev/null @@ -1,199 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012MerchantInformationMerchantDescriptor - # For the descriptions, used-by information, data types, and lengths for these fields, see Merchant Descriptors in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) For Payouts: * Paymentech (22) - attr_accessor :name - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'name' => :'name' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'name' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@name.nil? && @name.to_s.length > 23 - invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 23.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@name.nil? && @name.to_s.length > 23 - true - end - - # Custom attribute writer method with validation - # @param [Object] name Value to be assigned - def name=(name) - if !name.nil? && name.to_s.length > 23 - fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 23.' - end - - @name = name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [name].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_order_information.rb b/lib/cybersource_rest_client/models/inline_response_200_12_order_information.rb deleted file mode 100644 index 8c55dfcb..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_order_information.rb +++ /dev/null @@ -1,222 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012OrderInformation - attr_accessor :bill_to - - attr_accessor :ship_to - - # Transaction Line Item data. - attr_accessor :line_items - - attr_accessor :amount_details - - attr_accessor :shipping_details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'bill_to' => :'billTo', - :'ship_to' => :'shipTo', - :'line_items' => :'lineItems', - :'amount_details' => :'amountDetails', - :'shipping_details' => :'shippingDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'bill_to' => :'InlineResponse20012OrderInformationBillTo', - :'ship_to' => :'InlineResponse20012OrderInformationShipTo', - :'line_items' => :'Array', - :'amount_details' => :'InlineResponse20012OrderInformationAmountDetails', - :'shipping_details' => :'InlineResponse20012OrderInformationShippingDetails' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'billTo') - self.bill_to = attributes[:'billTo'] - end - - if attributes.has_key?(:'shipTo') - self.ship_to = attributes[:'shipTo'] - end - - if attributes.has_key?(:'lineItems') - if (value = attributes[:'lineItems']).is_a?(Array) - self.line_items = value - end - end - - if attributes.has_key?(:'amountDetails') - self.amount_details = attributes[:'amountDetails'] - end - - if attributes.has_key?(:'shippingDetails') - self.shipping_details = attributes[:'shippingDetails'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - bill_to == o.bill_to && - ship_to == o.ship_to && - line_items == o.line_items && - amount_details == o.amount_details && - shipping_details == o.shipping_details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [bill_to, ship_to, line_items, amount_details, shipping_details].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_order_information_amount_details.rb b/lib/cybersource_rest_client/models/inline_response_200_12_order_information_amount_details.rb deleted file mode 100644 index 7ba88c0c..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_order_information_amount_details.rb +++ /dev/null @@ -1,274 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012OrderInformationAmountDetails - # Grand total for the order. You can include a decimal point (.), but no other special characters. CyberSource truncates the amount to the correct number of decimal places. * CTV, FDCCompass, Paymentech (<= 12) For processor-specific information, see the grand_total_amount field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :total_amount - - # Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. - attr_accessor :currency - - # Total tax amount for all the items in the order. For processor-specific information, see the total_tax_amount field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) - attr_accessor :tax_amount - - # Amount that was authorized. - attr_accessor :authorized_amount - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'total_amount' => :'totalAmount', - :'currency' => :'currency', - :'tax_amount' => :'taxAmount', - :'authorized_amount' => :'authorizedAmount' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'total_amount' => :'String', - :'currency' => :'String', - :'tax_amount' => :'String', - :'authorized_amount' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'totalAmount') - self.total_amount = attributes[:'totalAmount'] - end - - if attributes.has_key?(:'currency') - self.currency = attributes[:'currency'] - end - - if attributes.has_key?(:'taxAmount') - self.tax_amount = attributes[:'taxAmount'] - end - - if attributes.has_key?(:'authorizedAmount') - self.authorized_amount = attributes[:'authorizedAmount'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@total_amount.nil? && @total_amount.to_s.length > 19 - invalid_properties.push('invalid value for "total_amount", the character length must be smaller than or equal to 19.') - end - - if !@currency.nil? && @currency.to_s.length > 3 - invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.') - end - - if !@tax_amount.nil? && @tax_amount.to_s.length > 12 - invalid_properties.push('invalid value for "tax_amount", the character length must be smaller than or equal to 12.') - end - - if !@authorized_amount.nil? && @authorized_amount.to_s.length > 15 - invalid_properties.push('invalid value for "authorized_amount", the character length must be smaller than or equal to 15.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@total_amount.nil? && @total_amount.to_s.length > 19 - return false if !@currency.nil? && @currency.to_s.length > 3 - return false if !@tax_amount.nil? && @tax_amount.to_s.length > 12 - return false if !@authorized_amount.nil? && @authorized_amount.to_s.length > 15 - true - end - - # Custom attribute writer method with validation - # @param [Object] total_amount Value to be assigned - def total_amount=(total_amount) - if !total_amount.nil? && total_amount.to_s.length > 19 - fail ArgumentError, 'invalid value for "total_amount", the character length must be smaller than or equal to 19.' - end - - @total_amount = total_amount - end - - # Custom attribute writer method with validation - # @param [Object] currency Value to be assigned - def currency=(currency) - if !currency.nil? && currency.to_s.length > 3 - fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.' - end - - @currency = currency - end - - # Custom attribute writer method with validation - # @param [Object] tax_amount Value to be assigned - def tax_amount=(tax_amount) - if !tax_amount.nil? && tax_amount.to_s.length > 12 - fail ArgumentError, 'invalid value for "tax_amount", the character length must be smaller than or equal to 12.' - end - - @tax_amount = tax_amount - end - - # Custom attribute writer method with validation - # @param [Object] authorized_amount Value to be assigned - def authorized_amount=(authorized_amount) - if !authorized_amount.nil? && authorized_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "authorized_amount", the character length must be smaller than or equal to 15.' - end - - @authorized_amount = authorized_amount - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total_amount == o.total_amount && - currency == o.currency && - tax_amount == o.tax_amount && - authorized_amount == o.authorized_amount - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [total_amount, currency, tax_amount, authorized_amount].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_order_information_bill_to.rb b/lib/cybersource_rest_client/models/inline_response_200_12_order_information_bill_to.rb deleted file mode 100644 index 4b6e1c87..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_order_information_bill_to.rb +++ /dev/null @@ -1,524 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012OrderInformationBillTo - # Customer’s first name. This name must be the same as the name on the card. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the customer_firstname field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :first_name - - # Customer’s last name. This name must be the same as the name on the card. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the customer_lastname field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :last_name - - # Customer’s middle name. - attr_accessor :middel_name - - # Customer’s name suffix. - attr_accessor :name_suffix - - # First line of the billing street address as it appears on the credit card issuer’s records. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_address1 field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :address1 - - # Additional address information. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_address2 field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :address2 - - # City of the billing address. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_city field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :locality - - # State or province of the billing address. Use the State, Province, and Territory Codes for the United States and Canada. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_state field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :administrative_area - - # Postal code for the billing address. The postal code must consist of 5 to 9 digits. When the billing country is the U.S., the 9-digit postal code must follow this format: [5 digits][dash][4 digits] Example 12345-6789 When the billing country is Canada, the 6-digit postal code must follow this format: [alpha][numeric][alpha][space][numeric][alpha][numeric] Example A1B 2C3 For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_zip field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :postal_code - - # Name of the customer’s company. For processor-specific information, see the company_name field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :company - - # Customer's email address, including the full domain name. For processor-specific information, see the customer_email field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :email - - # Country of the billing address. Use the two-character ISO Standard Country Codes. For processor-specific information, see the bill_country field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :country - - # Title. - attr_accessor :title - - # Customer’s phone number. For Payouts: This field may be sent only for FDC Compass. CyberSource recommends that you include the country code when the order is from outside the U.S. For processor-specific information, see the customer_phone field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :phone_number - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'first_name' => :'firstName', - :'last_name' => :'lastName', - :'middel_name' => :'middelName', - :'name_suffix' => :'nameSuffix', - :'address1' => :'address1', - :'address2' => :'address2', - :'locality' => :'locality', - :'administrative_area' => :'administrativeArea', - :'postal_code' => :'postalCode', - :'company' => :'company', - :'email' => :'email', - :'country' => :'country', - :'title' => :'title', - :'phone_number' => :'phoneNumber' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'first_name' => :'String', - :'last_name' => :'String', - :'middel_name' => :'String', - :'name_suffix' => :'String', - :'address1' => :'String', - :'address2' => :'String', - :'locality' => :'String', - :'administrative_area' => :'String', - :'postal_code' => :'String', - :'company' => :'String', - :'email' => :'String', - :'country' => :'String', - :'title' => :'String', - :'phone_number' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'firstName') - self.first_name = attributes[:'firstName'] - end - - if attributes.has_key?(:'lastName') - self.last_name = attributes[:'lastName'] - end - - if attributes.has_key?(:'middelName') - self.middel_name = attributes[:'middelName'] - end - - if attributes.has_key?(:'nameSuffix') - self.name_suffix = attributes[:'nameSuffix'] - end - - if attributes.has_key?(:'address1') - self.address1 = attributes[:'address1'] - end - - if attributes.has_key?(:'address2') - self.address2 = attributes[:'address2'] - end - - if attributes.has_key?(:'locality') - self.locality = attributes[:'locality'] - end - - if attributes.has_key?(:'administrativeArea') - self.administrative_area = attributes[:'administrativeArea'] - end - - if attributes.has_key?(:'postalCode') - self.postal_code = attributes[:'postalCode'] - end - - if attributes.has_key?(:'company') - self.company = attributes[:'company'] - end - - if attributes.has_key?(:'email') - self.email = attributes[:'email'] - end - - if attributes.has_key?(:'country') - self.country = attributes[:'country'] - end - - if attributes.has_key?(:'title') - self.title = attributes[:'title'] - end - - if attributes.has_key?(:'phoneNumber') - self.phone_number = attributes[:'phoneNumber'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@first_name.nil? && @first_name.to_s.length > 60 - invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 60.') - end - - if !@last_name.nil? && @last_name.to_s.length > 60 - invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 60.') - end - - if !@middel_name.nil? && @middel_name.to_s.length > 60 - invalid_properties.push('invalid value for "middel_name", the character length must be smaller than or equal to 60.') - end - - if !@name_suffix.nil? && @name_suffix.to_s.length > 60 - invalid_properties.push('invalid value for "name_suffix", the character length must be smaller than or equal to 60.') - end - - if !@address1.nil? && @address1.to_s.length > 60 - invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 60.') - end - - if !@address2.nil? && @address2.to_s.length > 60 - invalid_properties.push('invalid value for "address2", the character length must be smaller than or equal to 60.') - end - - if !@locality.nil? && @locality.to_s.length > 50 - invalid_properties.push('invalid value for "locality", the character length must be smaller than or equal to 50.') - end - - if !@administrative_area.nil? && @administrative_area.to_s.length > 2 - invalid_properties.push('invalid value for "administrative_area", the character length must be smaller than or equal to 2.') - end - - if !@postal_code.nil? && @postal_code.to_s.length > 10 - invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 10.') - end - - if !@company.nil? && @company.to_s.length > 60 - invalid_properties.push('invalid value for "company", the character length must be smaller than or equal to 60.') - end - - if !@email.nil? && @email.to_s.length > 255 - invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 255.') - end - - if !@country.nil? && @country.to_s.length > 2 - invalid_properties.push('invalid value for "country", the character length must be smaller than or equal to 2.') - end - - if !@title.nil? && @title.to_s.length > 60 - invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 60.') - end - - if !@phone_number.nil? && @phone_number.to_s.length > 15 - invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 15.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@first_name.nil? && @first_name.to_s.length > 60 - return false if !@last_name.nil? && @last_name.to_s.length > 60 - return false if !@middel_name.nil? && @middel_name.to_s.length > 60 - return false if !@name_suffix.nil? && @name_suffix.to_s.length > 60 - return false if !@address1.nil? && @address1.to_s.length > 60 - return false if !@address2.nil? && @address2.to_s.length > 60 - return false if !@locality.nil? && @locality.to_s.length > 50 - return false if !@administrative_area.nil? && @administrative_area.to_s.length > 2 - return false if !@postal_code.nil? && @postal_code.to_s.length > 10 - return false if !@company.nil? && @company.to_s.length > 60 - return false if !@email.nil? && @email.to_s.length > 255 - return false if !@country.nil? && @country.to_s.length > 2 - return false if !@title.nil? && @title.to_s.length > 60 - return false if !@phone_number.nil? && @phone_number.to_s.length > 15 - true - end - - # Custom attribute writer method with validation - # @param [Object] first_name Value to be assigned - def first_name=(first_name) - if !first_name.nil? && first_name.to_s.length > 60 - fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 60.' - end - - @first_name = first_name - end - - # Custom attribute writer method with validation - # @param [Object] last_name Value to be assigned - def last_name=(last_name) - if !last_name.nil? && last_name.to_s.length > 60 - fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 60.' - end - - @last_name = last_name - end - - # Custom attribute writer method with validation - # @param [Object] middel_name Value to be assigned - def middel_name=(middel_name) - if !middel_name.nil? && middel_name.to_s.length > 60 - fail ArgumentError, 'invalid value for "middel_name", the character length must be smaller than or equal to 60.' - end - - @middel_name = middel_name - end - - # Custom attribute writer method with validation - # @param [Object] name_suffix Value to be assigned - def name_suffix=(name_suffix) - if !name_suffix.nil? && name_suffix.to_s.length > 60 - fail ArgumentError, 'invalid value for "name_suffix", the character length must be smaller than or equal to 60.' - end - - @name_suffix = name_suffix - end - - # Custom attribute writer method with validation - # @param [Object] address1 Value to be assigned - def address1=(address1) - if !address1.nil? && address1.to_s.length > 60 - fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 60.' - end - - @address1 = address1 - end - - # Custom attribute writer method with validation - # @param [Object] address2 Value to be assigned - def address2=(address2) - if !address2.nil? && address2.to_s.length > 60 - fail ArgumentError, 'invalid value for "address2", the character length must be smaller than or equal to 60.' - end - - @address2 = address2 - end - - # Custom attribute writer method with validation - # @param [Object] locality Value to be assigned - def locality=(locality) - if !locality.nil? && locality.to_s.length > 50 - fail ArgumentError, 'invalid value for "locality", the character length must be smaller than or equal to 50.' - end - - @locality = locality - end - - # Custom attribute writer method with validation - # @param [Object] administrative_area Value to be assigned - def administrative_area=(administrative_area) - if !administrative_area.nil? && administrative_area.to_s.length > 2 - fail ArgumentError, 'invalid value for "administrative_area", the character length must be smaller than or equal to 2.' - end - - @administrative_area = administrative_area - end - - # Custom attribute writer method with validation - # @param [Object] postal_code Value to be assigned - def postal_code=(postal_code) - if !postal_code.nil? && postal_code.to_s.length > 10 - fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 10.' - end - - @postal_code = postal_code - end - - # Custom attribute writer method with validation - # @param [Object] company Value to be assigned - def company=(company) - if !company.nil? && company.to_s.length > 60 - fail ArgumentError, 'invalid value for "company", the character length must be smaller than or equal to 60.' - end - - @company = company - end - - # Custom attribute writer method with validation - # @param [Object] email Value to be assigned - def email=(email) - if !email.nil? && email.to_s.length > 255 - fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 255.' - end - - @email = email - end - - # Custom attribute writer method with validation - # @param [Object] country Value to be assigned - def country=(country) - if !country.nil? && country.to_s.length > 2 - fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 2.' - end - - @country = country - end - - # Custom attribute writer method with validation - # @param [Object] title Value to be assigned - def title=(title) - if !title.nil? && title.to_s.length > 60 - fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 60.' - end - - @title = title - end - - # Custom attribute writer method with validation - # @param [Object] phone_number Value to be assigned - def phone_number=(phone_number) - if !phone_number.nil? && phone_number.to_s.length > 15 - fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 15.' - end - - @phone_number = phone_number - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - first_name == o.first_name && - last_name == o.last_name && - middel_name == o.middel_name && - name_suffix == o.name_suffix && - address1 == o.address1 && - address2 == o.address2 && - locality == o.locality && - administrative_area == o.administrative_area && - postal_code == o.postal_code && - company == o.company && - email == o.email && - country == o.country && - title == o.title && - phone_number == o.phone_number - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [first_name, last_name, middel_name, name_suffix, address1, address2, locality, administrative_area, postal_code, company, email, country, title, phone_number].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_order_information_line_items.rb b/lib/cybersource_rest_client/models/inline_response_200_12_order_information_line_items.rb deleted file mode 100644 index 1cb3007b..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_order_information_line_items.rb +++ /dev/null @@ -1,343 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012OrderInformationLineItems - # Type of product. This value is used to determine the category that the product is in: electronic, handling, physical, service, or shipping. The default value is **default**. For a payment, when you set this field to a value other than default or any of the values related to shipping and handling, below fields _quantity_, _productName_, and _productSKU_ are required. - attr_accessor :product_code - - # For PAYMENT and CAPTURE API, this field is required when above _productCode_ is not **default** or one of the values related to shipping and handling. - attr_accessor :product_name - - # Identification code for the product. For PAYMENT and CAPTURE API, this field is required when above _productCode_ is not **default** or one of the values related to shipping and/or handling. - attr_accessor :product_sku - - # Total tax to apply to the product. This value cannot be negative. The tax amount and the offer amount must be in the same currency. The tax amount field is additive. The following example uses a two-exponent currency such as USD: 1. You include each line item in your request. ..- 1st line item has amount=10.00, quantity=1, and taxAmount=0.80 ..- 2nd line item has amount=20.00, quantity=1, and taxAmount=1.60 2. The total amount authorized will be 32.40, not 30.00 with 2.40 of tax included. This field is frequently used for Level II and Level III transactions. - attr_accessor :tax_amount - - # For a payment or capture, this field is required when _productCode_ is not **default** or one of the values related to shipping and handling. - attr_accessor :quantity - - # Per-item price of the product. This value cannot be negative. You can include a decimal point (.), but you cannot include any other special characters. CyberSource truncates the amount to the correct number of decimal places. For processor-specific information, see the amount field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :unit_price - - # The description for this field is not available. - attr_accessor :fulfillment_type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'product_code' => :'productCode', - :'product_name' => :'productName', - :'product_sku' => :'productSku', - :'tax_amount' => :'taxAmount', - :'quantity' => :'quantity', - :'unit_price' => :'unitPrice', - :'fulfillment_type' => :'fulfillmentType' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'product_code' => :'String', - :'product_name' => :'String', - :'product_sku' => :'String', - :'tax_amount' => :'String', - :'quantity' => :'Float', - :'unit_price' => :'String', - :'fulfillment_type' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'productCode') - self.product_code = attributes[:'productCode'] - end - - if attributes.has_key?(:'productName') - self.product_name = attributes[:'productName'] - end - - if attributes.has_key?(:'productSku') - self.product_sku = attributes[:'productSku'] - end - - if attributes.has_key?(:'taxAmount') - self.tax_amount = attributes[:'taxAmount'] - end - - if attributes.has_key?(:'quantity') - self.quantity = attributes[:'quantity'] - end - - if attributes.has_key?(:'unitPrice') - self.unit_price = attributes[:'unitPrice'] - end - - if attributes.has_key?(:'fulfillmentType') - self.fulfillment_type = attributes[:'fulfillmentType'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@product_code.nil? && @product_code.to_s.length > 255 - invalid_properties.push('invalid value for "product_code", the character length must be smaller than or equal to 255.') - end - - if !@product_name.nil? && @product_name.to_s.length > 255 - invalid_properties.push('invalid value for "product_name", the character length must be smaller than or equal to 255.') - end - - if !@product_sku.nil? && @product_sku.to_s.length > 255 - invalid_properties.push('invalid value for "product_sku", the character length must be smaller than or equal to 255.') - end - - if !@tax_amount.nil? && @tax_amount.to_s.length > 15 - invalid_properties.push('invalid value for "tax_amount", the character length must be smaller than or equal to 15.') - end - - if !@quantity.nil? && @quantity > 9999999999 - invalid_properties.push('invalid value for "quantity", must be smaller than or equal to 9999999999.') - end - - if !@quantity.nil? && @quantity < 1 - invalid_properties.push('invalid value for "quantity", must be greater than or equal to 1.') - end - - if !@unit_price.nil? && @unit_price.to_s.length > 15 - invalid_properties.push('invalid value for "unit_price", the character length must be smaller than or equal to 15.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@product_code.nil? && @product_code.to_s.length > 255 - return false if !@product_name.nil? && @product_name.to_s.length > 255 - return false if !@product_sku.nil? && @product_sku.to_s.length > 255 - return false if !@tax_amount.nil? && @tax_amount.to_s.length > 15 - return false if !@quantity.nil? && @quantity > 9999999999 - return false if !@quantity.nil? && @quantity < 1 - return false if !@unit_price.nil? && @unit_price.to_s.length > 15 - true - end - - # Custom attribute writer method with validation - # @param [Object] product_code Value to be assigned - def product_code=(product_code) - if !product_code.nil? && product_code.to_s.length > 255 - fail ArgumentError, 'invalid value for "product_code", the character length must be smaller than or equal to 255.' - end - - @product_code = product_code - end - - # Custom attribute writer method with validation - # @param [Object] product_name Value to be assigned - def product_name=(product_name) - if !product_name.nil? && product_name.to_s.length > 255 - fail ArgumentError, 'invalid value for "product_name", the character length must be smaller than or equal to 255.' - end - - @product_name = product_name - end - - # Custom attribute writer method with validation - # @param [Object] product_sku Value to be assigned - def product_sku=(product_sku) - if !product_sku.nil? && product_sku.to_s.length > 255 - fail ArgumentError, 'invalid value for "product_sku", the character length must be smaller than or equal to 255.' - end - - @product_sku = product_sku - end - - # Custom attribute writer method with validation - # @param [Object] tax_amount Value to be assigned - def tax_amount=(tax_amount) - if !tax_amount.nil? && tax_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "tax_amount", the character length must be smaller than or equal to 15.' - end - - @tax_amount = tax_amount - end - - # Custom attribute writer method with validation - # @param [Object] quantity Value to be assigned - def quantity=(quantity) - if !quantity.nil? && quantity > 9999999999 - fail ArgumentError, 'invalid value for "quantity", must be smaller than or equal to 9999999999.' - end - - if !quantity.nil? && quantity < 1 - fail ArgumentError, 'invalid value for "quantity", must be greater than or equal to 1.' - end - - @quantity = quantity - end - - # Custom attribute writer method with validation - # @param [Object] unit_price Value to be assigned - def unit_price=(unit_price) - if !unit_price.nil? && unit_price.to_s.length > 15 - fail ArgumentError, 'invalid value for "unit_price", the character length must be smaller than or equal to 15.' - end - - @unit_price = unit_price - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - product_code == o.product_code && - product_name == o.product_name && - product_sku == o.product_sku && - tax_amount == o.tax_amount && - quantity == o.quantity && - unit_price == o.unit_price && - fulfillment_type == o.fulfillment_type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [product_code, product_name, product_sku, tax_amount, quantity, unit_price, fulfillment_type].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_order_information_ship_to.rb b/lib/cybersource_rest_client/models/inline_response_200_12_order_information_ship_to.rb deleted file mode 100644 index 2960ca08..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_order_information_ship_to.rb +++ /dev/null @@ -1,424 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012OrderInformationShipTo - # First name of the recipient. **Processor specific maximum length** - Litle: 25 - All other processors: 60 - attr_accessor :first_name - - # Last name of the recipient. **Processor specific maximum length** - Litle: 25 - All other processors: 60 - attr_accessor :last_name - - # First line of the shipping address. - attr_accessor :address1 - - # Second line of the shipping address. - attr_accessor :address2 - - # City of the shipping address. - attr_accessor :locality - - # State or province of the shipping address. Use the State, Province, and Territory Codes for the United States and Canada. - attr_accessor :administrative_area - - # Postal code for the shipping address. The postal code must consist of 5 to 9 digits. When the billing country is the U.S., the 9-digit postal code must follow this format: [5 digits][dash][4 digits] Example 12345-6789 When the billing country is Canada, the 6-digit postal code must follow this format: [alpha][numeric][alpha][space][numeric][alpha][numeric] Example A1B 2C3 - attr_accessor :postal_code - - # Name of the customer’s company. For processor-specific information, see the company_name field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :company - - # Country of the shipping address. Use the two character ISO Standard Country Codes. - attr_accessor :country - - # Phone number for the shipping address. - attr_accessor :phone_number - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'first_name' => :'firstName', - :'last_name' => :'lastName', - :'address1' => :'address1', - :'address2' => :'address2', - :'locality' => :'locality', - :'administrative_area' => :'administrativeArea', - :'postal_code' => :'postalCode', - :'company' => :'company', - :'country' => :'country', - :'phone_number' => :'phoneNumber' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'first_name' => :'String', - :'last_name' => :'String', - :'address1' => :'String', - :'address2' => :'String', - :'locality' => :'String', - :'administrative_area' => :'String', - :'postal_code' => :'String', - :'company' => :'String', - :'country' => :'String', - :'phone_number' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'firstName') - self.first_name = attributes[:'firstName'] - end - - if attributes.has_key?(:'lastName') - self.last_name = attributes[:'lastName'] - end - - if attributes.has_key?(:'address1') - self.address1 = attributes[:'address1'] - end - - if attributes.has_key?(:'address2') - self.address2 = attributes[:'address2'] - end - - if attributes.has_key?(:'locality') - self.locality = attributes[:'locality'] - end - - if attributes.has_key?(:'administrativeArea') - self.administrative_area = attributes[:'administrativeArea'] - end - - if attributes.has_key?(:'postalCode') - self.postal_code = attributes[:'postalCode'] - end - - if attributes.has_key?(:'company') - self.company = attributes[:'company'] - end - - if attributes.has_key?(:'country') - self.country = attributes[:'country'] - end - - if attributes.has_key?(:'phoneNumber') - self.phone_number = attributes[:'phoneNumber'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@first_name.nil? && @first_name.to_s.length > 60 - invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 60.') - end - - if !@last_name.nil? && @last_name.to_s.length > 60 - invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 60.') - end - - if !@address1.nil? && @address1.to_s.length > 60 - invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 60.') - end - - if !@address2.nil? && @address2.to_s.length > 60 - invalid_properties.push('invalid value for "address2", the character length must be smaller than or equal to 60.') - end - - if !@locality.nil? && @locality.to_s.length > 50 - invalid_properties.push('invalid value for "locality", the character length must be smaller than or equal to 50.') - end - - if !@administrative_area.nil? && @administrative_area.to_s.length > 2 - invalid_properties.push('invalid value for "administrative_area", the character length must be smaller than or equal to 2.') - end - - if !@postal_code.nil? && @postal_code.to_s.length > 10 - invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 10.') - end - - if !@company.nil? && @company.to_s.length > 60 - invalid_properties.push('invalid value for "company", the character length must be smaller than or equal to 60.') - end - - if !@country.nil? && @country.to_s.length > 2 - invalid_properties.push('invalid value for "country", the character length must be smaller than or equal to 2.') - end - - if !@phone_number.nil? && @phone_number.to_s.length > 15 - invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 15.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@first_name.nil? && @first_name.to_s.length > 60 - return false if !@last_name.nil? && @last_name.to_s.length > 60 - return false if !@address1.nil? && @address1.to_s.length > 60 - return false if !@address2.nil? && @address2.to_s.length > 60 - return false if !@locality.nil? && @locality.to_s.length > 50 - return false if !@administrative_area.nil? && @administrative_area.to_s.length > 2 - return false if !@postal_code.nil? && @postal_code.to_s.length > 10 - return false if !@company.nil? && @company.to_s.length > 60 - return false if !@country.nil? && @country.to_s.length > 2 - return false if !@phone_number.nil? && @phone_number.to_s.length > 15 - true - end - - # Custom attribute writer method with validation - # @param [Object] first_name Value to be assigned - def first_name=(first_name) - if !first_name.nil? && first_name.to_s.length > 60 - fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 60.' - end - - @first_name = first_name - end - - # Custom attribute writer method with validation - # @param [Object] last_name Value to be assigned - def last_name=(last_name) - if !last_name.nil? && last_name.to_s.length > 60 - fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 60.' - end - - @last_name = last_name - end - - # Custom attribute writer method with validation - # @param [Object] address1 Value to be assigned - def address1=(address1) - if !address1.nil? && address1.to_s.length > 60 - fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 60.' - end - - @address1 = address1 - end - - # Custom attribute writer method with validation - # @param [Object] address2 Value to be assigned - def address2=(address2) - if !address2.nil? && address2.to_s.length > 60 - fail ArgumentError, 'invalid value for "address2", the character length must be smaller than or equal to 60.' - end - - @address2 = address2 - end - - # Custom attribute writer method with validation - # @param [Object] locality Value to be assigned - def locality=(locality) - if !locality.nil? && locality.to_s.length > 50 - fail ArgumentError, 'invalid value for "locality", the character length must be smaller than or equal to 50.' - end - - @locality = locality - end - - # Custom attribute writer method with validation - # @param [Object] administrative_area Value to be assigned - def administrative_area=(administrative_area) - if !administrative_area.nil? && administrative_area.to_s.length > 2 - fail ArgumentError, 'invalid value for "administrative_area", the character length must be smaller than or equal to 2.' - end - - @administrative_area = administrative_area - end - - # Custom attribute writer method with validation - # @param [Object] postal_code Value to be assigned - def postal_code=(postal_code) - if !postal_code.nil? && postal_code.to_s.length > 10 - fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 10.' - end - - @postal_code = postal_code - end - - # Custom attribute writer method with validation - # @param [Object] company Value to be assigned - def company=(company) - if !company.nil? && company.to_s.length > 60 - fail ArgumentError, 'invalid value for "company", the character length must be smaller than or equal to 60.' - end - - @company = company - end - - # Custom attribute writer method with validation - # @param [Object] country Value to be assigned - def country=(country) - if !country.nil? && country.to_s.length > 2 - fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 2.' - end - - @country = country - end - - # Custom attribute writer method with validation - # @param [Object] phone_number Value to be assigned - def phone_number=(phone_number) - if !phone_number.nil? && phone_number.to_s.length > 15 - fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 15.' - end - - @phone_number = phone_number - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - first_name == o.first_name && - last_name == o.last_name && - address1 == o.address1 && - address2 == o.address2 && - locality == o.locality && - administrative_area == o.administrative_area && - postal_code == o.postal_code && - company == o.company && - country == o.country && - phone_number == o.phone_number - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [first_name, last_name, address1, address2, locality, administrative_area, postal_code, company, country, phone_number].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_order_information_shipping_details.rb b/lib/cybersource_rest_client/models/inline_response_200_12_order_information_shipping_details.rb deleted file mode 100644 index 9b054f69..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_order_information_shipping_details.rb +++ /dev/null @@ -1,209 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012OrderInformationShippingDetails - # The description for this field is not available. - attr_accessor :gift_wrap - - # Shipping method for the product. Possible values: - lowcost: Lowest-cost service - sameday: Courier or same-day service - oneday: Next-day or overnight service - twoday: Two-day service - threeday: Three-day service - pickup: Store pick-up - other: Other shipping method - none: No shipping method because product is a service or subscription - attr_accessor :shipping_method - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'gift_wrap' => :'giftWrap', - :'shipping_method' => :'shippingMethod' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'gift_wrap' => :'BOOLEAN', - :'shipping_method' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'giftWrap') - self.gift_wrap = attributes[:'giftWrap'] - end - - if attributes.has_key?(:'shippingMethod') - self.shipping_method = attributes[:'shippingMethod'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@shipping_method.nil? && @shipping_method.to_s.length > 10 - invalid_properties.push('invalid value for "shipping_method", the character length must be smaller than or equal to 10.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@shipping_method.nil? && @shipping_method.to_s.length > 10 - true - end - - # Custom attribute writer method with validation - # @param [Object] shipping_method Value to be assigned - def shipping_method=(shipping_method) - if !shipping_method.nil? && shipping_method.to_s.length > 10 - fail ArgumentError, 'invalid value for "shipping_method", the character length must be smaller than or equal to 10.' - end - - @shipping_method = shipping_method - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - gift_wrap == o.gift_wrap && - shipping_method == o.shipping_method - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [gift_wrap, shipping_method].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_payment_information.rb b/lib/cybersource_rest_client/models/inline_response_200_12_payment_information.rb deleted file mode 100644 index 9f7fadce..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_payment_information.rb +++ /dev/null @@ -1,228 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012PaymentInformation - attr_accessor :payment_type - - attr_accessor :customer - - attr_accessor :card - - attr_accessor :invoice - - attr_accessor :bank - - attr_accessor :account_features - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'payment_type' => :'paymentType', - :'customer' => :'customer', - :'card' => :'card', - :'invoice' => :'invoice', - :'bank' => :'bank', - :'account_features' => :'accountFeatures' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'payment_type' => :'InlineResponse20012PaymentInformationPaymentType', - :'customer' => :'Ptsv2paymentsPaymentInformationCustomer', - :'card' => :'InlineResponse20012PaymentInformationCard', - :'invoice' => :'InlineResponse20012PaymentInformationInvoice', - :'bank' => :'InlineResponse20012PaymentInformationBank', - :'account_features' => :'InlineResponse20012PaymentInformationAccountFeatures' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'paymentType') - self.payment_type = attributes[:'paymentType'] - end - - if attributes.has_key?(:'customer') - self.customer = attributes[:'customer'] - end - - if attributes.has_key?(:'card') - self.card = attributes[:'card'] - end - - if attributes.has_key?(:'invoice') - self.invoice = attributes[:'invoice'] - end - - if attributes.has_key?(:'bank') - self.bank = attributes[:'bank'] - end - - if attributes.has_key?(:'accountFeatures') - self.account_features = attributes[:'accountFeatures'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - payment_type == o.payment_type && - customer == o.customer && - card == o.card && - invoice == o.invoice && - bank == o.bank && - account_features == o.account_features - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [payment_type, customer, card, invoice, bank, account_features].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_account_features.rb b/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_account_features.rb deleted file mode 100644 index b7c7e5ea..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_account_features.rb +++ /dev/null @@ -1,249 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012PaymentInformationAccountFeatures - # Remaining balance on the account. - attr_accessor :balance_amount - - # Remaining balance on the account. - attr_accessor :previous_balance_amount - - # Currency of the remaining balance on the account. For the possible values, see the ISO Standard Currency Codes. - attr_accessor :currency - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'balance_amount' => :'balanceAmount', - :'previous_balance_amount' => :'previousBalanceAmount', - :'currency' => :'currency' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'balance_amount' => :'String', - :'previous_balance_amount' => :'String', - :'currency' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'balanceAmount') - self.balance_amount = attributes[:'balanceAmount'] - end - - if attributes.has_key?(:'previousBalanceAmount') - self.previous_balance_amount = attributes[:'previousBalanceAmount'] - end - - if attributes.has_key?(:'currency') - self.currency = attributes[:'currency'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@balance_amount.nil? && @balance_amount.to_s.length > 12 - invalid_properties.push('invalid value for "balance_amount", the character length must be smaller than or equal to 12.') - end - - if !@previous_balance_amount.nil? && @previous_balance_amount.to_s.length > 12 - invalid_properties.push('invalid value for "previous_balance_amount", the character length must be smaller than or equal to 12.') - end - - if !@currency.nil? && @currency.to_s.length > 5 - invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 5.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@balance_amount.nil? && @balance_amount.to_s.length > 12 - return false if !@previous_balance_amount.nil? && @previous_balance_amount.to_s.length > 12 - return false if !@currency.nil? && @currency.to_s.length > 5 - true - end - - # Custom attribute writer method with validation - # @param [Object] balance_amount Value to be assigned - def balance_amount=(balance_amount) - if !balance_amount.nil? && balance_amount.to_s.length > 12 - fail ArgumentError, 'invalid value for "balance_amount", the character length must be smaller than or equal to 12.' - end - - @balance_amount = balance_amount - end - - # Custom attribute writer method with validation - # @param [Object] previous_balance_amount Value to be assigned - def previous_balance_amount=(previous_balance_amount) - if !previous_balance_amount.nil? && previous_balance_amount.to_s.length > 12 - fail ArgumentError, 'invalid value for "previous_balance_amount", the character length must be smaller than or equal to 12.' - end - - @previous_balance_amount = previous_balance_amount - end - - # Custom attribute writer method with validation - # @param [Object] currency Value to be assigned - def currency=(currency) - if !currency.nil? && currency.to_s.length > 5 - fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 5.' - end - - @currency = currency - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - balance_amount == o.balance_amount && - previous_balance_amount == o.previous_balance_amount && - currency == o.currency - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [balance_amount, previous_balance_amount, currency].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_bank.rb b/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_bank.rb deleted file mode 100644 index b003378e..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_bank.rb +++ /dev/null @@ -1,242 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012PaymentInformationBank - # The description for this field is not available. - attr_accessor :routing_number - - # The description for this field is not available. - attr_accessor :branch_code - - # The description for this field is not available. - attr_accessor :swift_code - - # The description for this field is not available. - attr_accessor :bank_code - - # The description for this field is not available. - attr_accessor :iban - - attr_accessor :account - - attr_accessor :mandate - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'routing_number' => :'routingNumber', - :'branch_code' => :'branchCode', - :'swift_code' => :'swiftCode', - :'bank_code' => :'bankCode', - :'iban' => :'iban', - :'account' => :'account', - :'mandate' => :'mandate' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'routing_number' => :'String', - :'branch_code' => :'String', - :'swift_code' => :'String', - :'bank_code' => :'String', - :'iban' => :'String', - :'account' => :'InlineResponse20012PaymentInformationBankAccount', - :'mandate' => :'InlineResponse20012PaymentInformationBankMandate' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'routingNumber') - self.routing_number = attributes[:'routingNumber'] - end - - if attributes.has_key?(:'branchCode') - self.branch_code = attributes[:'branchCode'] - end - - if attributes.has_key?(:'swiftCode') - self.swift_code = attributes[:'swiftCode'] - end - - if attributes.has_key?(:'bankCode') - self.bank_code = attributes[:'bankCode'] - end - - if attributes.has_key?(:'iban') - self.iban = attributes[:'iban'] - end - - if attributes.has_key?(:'account') - self.account = attributes[:'account'] - end - - if attributes.has_key?(:'mandate') - self.mandate = attributes[:'mandate'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - routing_number == o.routing_number && - branch_code == o.branch_code && - swift_code == o.swift_code && - bank_code == o.bank_code && - iban == o.iban && - account == o.account && - mandate == o.mandate - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [routing_number, branch_code, swift_code, bank_code, iban, account, mandate].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_bank_account.rb b/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_bank_account.rb deleted file mode 100644 index 37200b45..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_bank_account.rb +++ /dev/null @@ -1,244 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012PaymentInformationBankAccount - # The description for this field is not available. - attr_accessor :suffix - - # The description for this field is not available. - attr_accessor :prefix - - # The description for this field is not available. - attr_accessor :check_number - - # The description for this field is not available. - attr_accessor :type - - # The description for this field is not available. - attr_accessor :name - - # The description for this field is not available. - attr_accessor :check_digit - - # The description for this field is not available. - attr_accessor :encoder_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'suffix' => :'suffix', - :'prefix' => :'prefix', - :'check_number' => :'checkNumber', - :'type' => :'type', - :'name' => :'name', - :'check_digit' => :'checkDigit', - :'encoder_id' => :'encoderId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'suffix' => :'String', - :'prefix' => :'String', - :'check_number' => :'String', - :'type' => :'String', - :'name' => :'String', - :'check_digit' => :'String', - :'encoder_id' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'suffix') - self.suffix = attributes[:'suffix'] - end - - if attributes.has_key?(:'prefix') - self.prefix = attributes[:'prefix'] - end - - if attributes.has_key?(:'checkNumber') - self.check_number = attributes[:'checkNumber'] - end - - if attributes.has_key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.has_key?(:'checkDigit') - self.check_digit = attributes[:'checkDigit'] - end - - if attributes.has_key?(:'encoderId') - self.encoder_id = attributes[:'encoderId'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - suffix == o.suffix && - prefix == o.prefix && - check_number == o.check_number && - type == o.type && - name == o.name && - check_digit == o.check_digit && - encoder_id == o.encoder_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [suffix, prefix, check_number, type, name, check_digit, encoder_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_bank_mandate.rb b/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_bank_mandate.rb deleted file mode 100644 index 0725e42c..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_bank_mandate.rb +++ /dev/null @@ -1,204 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012PaymentInformationBankMandate - # The description for this field is not available. - attr_accessor :reference_number - - # The description for this field is not available. - attr_accessor :recurring_type - - # The description for this field is not available. - attr_accessor :id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'reference_number' => :'referenceNumber', - :'recurring_type' => :'recurringType', - :'id' => :'id' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'reference_number' => :'String', - :'recurring_type' => :'String', - :'id' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'referenceNumber') - self.reference_number = attributes[:'referenceNumber'] - end - - if attributes.has_key?(:'recurringType') - self.recurring_type = attributes[:'recurringType'] - end - - if attributes.has_key?(:'id') - self.id = attributes[:'id'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - reference_number == o.reference_number && - recurring_type == o.recurring_type && - id == o.id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [reference_number, recurring_type, id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_card.rb b/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_card.rb deleted file mode 100644 index 53849c65..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_card.rb +++ /dev/null @@ -1,428 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012PaymentInformationCard - # Last four digits of the cardholder’s account number. This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. - attr_accessor :suffix - - # The description for this field is not available. - attr_accessor :prefix - - # Two-digit month in which the credit card expires. `Format: MM`. Possible values: 01 through 12. **Encoded Account Numbers** For encoded account numbers (_type_=039), if there is no expiration date on the card, use 12. For processor-specific information, see the customer_cc_expmo field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :expiration_month - - # Four-digit year in which the credit card expires. `Format: YYYY`. **Encoded Account Numbers** For encoded account numbers (_type_=039), if there is no expiration date on the card, use 2021. For processor-specific information, see the customer_cc_expyr field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :expiration_year - - # Month of the start of the Maestro (UK Domestic) card validity period. Do not include the field, even with a blank value, if the card is not a Maestro (UK Domestic) card. `Format: MM`. Possible values: 01 through 12. The start date is not required for Maestro (UK Domestic) transactions. - attr_accessor :start_month - - # Year of the start of the Maestro (UK Domestic) card validity period. Do not include the field, even with a blank value, if the card is not a Maestro (UK Domestic) card. `Format: YYYY`. The start date is not required for Maestro (UK Domestic) transactions. - attr_accessor :start_year - - # Number of times a Maestro (UK Domestic) card has been issued to the account holder. The card might or might not have an issue number. The number can consist of one or two digits, and the first digit might be a zero. When you include this value in your request, include exactly what is printed on the card. A value of 2 is different than a value of 02. Do not include the field, even with a blank value, if the card is not a Maestro (UK Domestic) card. The issue number is not required for Maestro (UK Domestic) transactions. - attr_accessor :issue_number - - # Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover - attr_accessor :type - - # Identifier for the issuing bank that provided the customer’s encoded account number. Contact your processor for the bank’s ID. - attr_accessor :account_encoder_id - - # Flag that specifies the type of account associated with the card. The cardholder provides this information during the payment process. **Cielo** and **Comercio Latino** Possible values: - CREDIT: Credit card - DEBIT: Debit card This field is required for: - Debit transactions on Cielo and Comercio Latino. - Transactions with Brazilian-issued cards on CyberSource through VisaNet. - attr_accessor :use_as - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'suffix' => :'suffix', - :'prefix' => :'prefix', - :'expiration_month' => :'expirationMonth', - :'expiration_year' => :'expirationYear', - :'start_month' => :'startMonth', - :'start_year' => :'startYear', - :'issue_number' => :'issueNumber', - :'type' => :'type', - :'account_encoder_id' => :'accountEncoderId', - :'use_as' => :'useAs' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'suffix' => :'String', - :'prefix' => :'String', - :'expiration_month' => :'String', - :'expiration_year' => :'String', - :'start_month' => :'String', - :'start_year' => :'String', - :'issue_number' => :'String', - :'type' => :'String', - :'account_encoder_id' => :'String', - :'use_as' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'suffix') - self.suffix = attributes[:'suffix'] - end - - if attributes.has_key?(:'prefix') - self.prefix = attributes[:'prefix'] - end - - if attributes.has_key?(:'expirationMonth') - self.expiration_month = attributes[:'expirationMonth'] - end - - if attributes.has_key?(:'expirationYear') - self.expiration_year = attributes[:'expirationYear'] - end - - if attributes.has_key?(:'startMonth') - self.start_month = attributes[:'startMonth'] - end - - if attributes.has_key?(:'startYear') - self.start_year = attributes[:'startYear'] - end - - if attributes.has_key?(:'issueNumber') - self.issue_number = attributes[:'issueNumber'] - end - - if attributes.has_key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.has_key?(:'accountEncoderId') - self.account_encoder_id = attributes[:'accountEncoderId'] - end - - if attributes.has_key?(:'useAs') - self.use_as = attributes[:'useAs'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@suffix.nil? && @suffix.to_s.length > 4 - invalid_properties.push('invalid value for "suffix", the character length must be smaller than or equal to 4.') - end - - if !@prefix.nil? && @prefix.to_s.length > 6 - invalid_properties.push('invalid value for "prefix", the character length must be smaller than or equal to 6.') - end - - if !@expiration_month.nil? && @expiration_month.to_s.length > 2 - invalid_properties.push('invalid value for "expiration_month", the character length must be smaller than or equal to 2.') - end - - if !@expiration_year.nil? && @expiration_year.to_s.length > 4 - invalid_properties.push('invalid value for "expiration_year", the character length must be smaller than or equal to 4.') - end - - if !@start_month.nil? && @start_month.to_s.length > 2 - invalid_properties.push('invalid value for "start_month", the character length must be smaller than or equal to 2.') - end - - if !@start_year.nil? && @start_year.to_s.length > 4 - invalid_properties.push('invalid value for "start_year", the character length must be smaller than or equal to 4.') - end - - if !@issue_number.nil? && @issue_number.to_s.length > 5 - invalid_properties.push('invalid value for "issue_number", the character length must be smaller than or equal to 5.') - end - # ansuguma - - # if !@type.nil? && @type.to_s.length > 3 - # invalid_properties.push('invalid value for "type", the character length must be smaller than or equal to 3.') - # end - - if !@account_encoder_id.nil? && @account_encoder_id.to_s.length > 3 - invalid_properties.push('invalid value for "account_encoder_id", the character length must be smaller than or equal to 3.') - end - - if !@use_as.nil? && @use_as.to_s.length > 2 - invalid_properties.push('invalid value for "use_as", the character length must be smaller than or equal to 2.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@suffix.nil? && @suffix.to_s.length > 4 - return false if !@prefix.nil? && @prefix.to_s.length > 6 - return false if !@expiration_month.nil? && @expiration_month.to_s.length > 2 - return false if !@expiration_year.nil? && @expiration_year.to_s.length > 4 - return false if !@start_month.nil? && @start_month.to_s.length > 2 - return false if !@start_year.nil? && @start_year.to_s.length > 4 - return false if !@issue_number.nil? && @issue_number.to_s.length > 5 - # ansuguma - # return false if !@type.nil? && @type.to_s.length > 3 - return false if !@account_encoder_id.nil? && @account_encoder_id.to_s.length > 3 - return false if !@use_as.nil? && @use_as.to_s.length > 2 - true - end - - # Custom attribute writer method with validation - # @param [Object] suffix Value to be assigned - def suffix=(suffix) - if !suffix.nil? && suffix.to_s.length > 4 - fail ArgumentError, 'invalid value for "suffix", the character length must be smaller than or equal to 4.' - end - - @suffix = suffix - end - - # Custom attribute writer method with validation - # @param [Object] prefix Value to be assigned - def prefix=(prefix) - if !prefix.nil? && prefix.to_s.length > 6 - fail ArgumentError, 'invalid value for "prefix", the character length must be smaller than or equal to 6.' - end - - @prefix = prefix - end - - # Custom attribute writer method with validation - # @param [Object] expiration_month Value to be assigned - def expiration_month=(expiration_month) - if !expiration_month.nil? && expiration_month.to_s.length > 2 - fail ArgumentError, 'invalid value for "expiration_month", the character length must be smaller than or equal to 2.' - end - - @expiration_month = expiration_month - end - - # Custom attribute writer method with validation - # @param [Object] expiration_year Value to be assigned - def expiration_year=(expiration_year) - if !expiration_year.nil? && expiration_year.to_s.length > 4 - fail ArgumentError, 'invalid value for "expiration_year", the character length must be smaller than or equal to 4.' - end - - @expiration_year = expiration_year - end - - # Custom attribute writer method with validation - # @param [Object] start_month Value to be assigned - def start_month=(start_month) - if !start_month.nil? && start_month.to_s.length > 2 - fail ArgumentError, 'invalid value for "start_month", the character length must be smaller than or equal to 2.' - end - - @start_month = start_month - end - - # Custom attribute writer method with validation - # @param [Object] start_year Value to be assigned - def start_year=(start_year) - if !start_year.nil? && start_year.to_s.length > 4 - fail ArgumentError, 'invalid value for "start_year", the character length must be smaller than or equal to 4.' - end - - @start_year = start_year - end - - # Custom attribute writer method with validation - # @param [Object] issue_number Value to be assigned - def issue_number=(issue_number) - if !issue_number.nil? && issue_number.to_s.length > 5 - fail ArgumentError, 'invalid value for "issue_number", the character length must be smaller than or equal to 5.' - end - - @issue_number = issue_number - end - - # Custom attribute writer method with validation - # @param [Object] type Value to be assigned - def type=(type) - # ansuguma - - # if !type.nil? && type.to_s.length > 3 - # fail ArgumentError, 'invalid value for "type", the character length must be smaller than or equal to 3.' - # end - - @type = type - end - - # Custom attribute writer method with validation - # @param [Object] account_encoder_id Value to be assigned - def account_encoder_id=(account_encoder_id) - if !account_encoder_id.nil? && account_encoder_id.to_s.length > 3 - fail ArgumentError, 'invalid value for "account_encoder_id", the character length must be smaller than or equal to 3.' - end - - @account_encoder_id = account_encoder_id - end - - # Custom attribute writer method with validation - # @param [Object] use_as Value to be assigned - def use_as=(use_as) - if !use_as.nil? && use_as.to_s.length > 2 - fail ArgumentError, 'invalid value for "use_as", the character length must be smaller than or equal to 2.' - end - - @use_as = use_as - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - suffix == o.suffix && - prefix == o.prefix && - expiration_month == o.expiration_month && - expiration_year == o.expiration_year && - start_month == o.start_month && - start_year == o.start_year && - issue_number == o.issue_number && - type == o.type && - account_encoder_id == o.account_encoder_id && - use_as == o.use_as - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [suffix, prefix, expiration_month, expiration_year, start_month, start_year, issue_number, type, account_encoder_id, use_as].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_invoice.rb b/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_invoice.rb deleted file mode 100644 index b89e4b49..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_invoice.rb +++ /dev/null @@ -1,204 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012PaymentInformationInvoice - # Invoice Number. - attr_accessor :number - - # Barcode Number. - attr_accessor :barcode_number - - # Expiration Date. - attr_accessor :expiration_date - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'number' => :'number', - :'barcode_number' => :'barcodeNumber', - :'expiration_date' => :'expirationDate' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'number' => :'String', - :'barcode_number' => :'String', - :'expiration_date' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'number') - self.number = attributes[:'number'] - end - - if attributes.has_key?(:'barcodeNumber') - self.barcode_number = attributes[:'barcodeNumber'] - end - - if attributes.has_key?(:'expirationDate') - self.expiration_date = attributes[:'expirationDate'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - number == o.number && - barcode_number == o.barcode_number && - expiration_date == o.expiration_date - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [number, barcode_number, expiration_date].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_payment_type.rb b/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_payment_type.rb deleted file mode 100644 index 8487b818..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_payment_type.rb +++ /dev/null @@ -1,244 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012PaymentInformationPaymentType - # The description for this field is not available. - attr_accessor :name - - # The description for this field is not available. - attr_accessor :type - - # The description for this field is not available. - attr_accessor :sub_type - - # The description for this field is not available. - attr_accessor :method - - # The description for this field is not available. - attr_accessor :funding_source - - # The description for this field is not available. - attr_accessor :funding_source_affiliation - - # The description for this field is not available. - attr_accessor :credential - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'name' => :'name', - :'type' => :'type', - :'sub_type' => :'subType', - :'method' => :'method', - :'funding_source' => :'fundingSource', - :'funding_source_affiliation' => :'fundingSourceAffiliation', - :'credential' => :'credential' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'name' => :'String', - :'type' => :'String', - :'sub_type' => :'String', - :'method' => :'String', - :'funding_source' => :'String', - :'funding_source_affiliation' => :'String', - :'credential' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.has_key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.has_key?(:'subType') - self.sub_type = attributes[:'subType'] - end - - if attributes.has_key?(:'method') - self.method = attributes[:'method'] - end - - if attributes.has_key?(:'fundingSource') - self.funding_source = attributes[:'fundingSource'] - end - - if attributes.has_key?(:'fundingSourceAffiliation') - self.funding_source_affiliation = attributes[:'fundingSourceAffiliation'] - end - - if attributes.has_key?(:'credential') - self.credential = attributes[:'credential'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - type == o.type && - sub_type == o.sub_type && - method == o.method && - funding_source == o.funding_source && - funding_source_affiliation == o.funding_source_affiliation && - credential == o.credential - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [name, type, sub_type, method, funding_source, funding_source_affiliation, credential].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_point_of_sale_information.rb b/lib/cybersource_rest_client/models/inline_response_200_12_point_of_sale_information.rb deleted file mode 100644 index cc7559b0..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_point_of_sale_information.rb +++ /dev/null @@ -1,233 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012PointOfSaleInformation - # Method of entering credit card information into the POS terminal. Possible values: - contact: Read from direct contact with chip card. - contactless: Read from a contactless interface using chip data. - keyed: Manually keyed into POS terminal. - msd: Read from a contactless interface using magnetic stripe data (MSD). - swiped: Read from credit card magnetic stripe. The contact, contactless, and msd values are supported only for EMV transactions. * Applicable only for CTV for Payouts. - attr_accessor :entry_mode - - # POS terminal’s capability. Possible values: - 1: Terminal has a magnetic stripe reader only. - 2: Terminal has a magnetic stripe reader and manual entry capability. - 3: Terminal has manual entry capability only. - 4: Terminal can read chip cards. - 5: Terminal can read contactless chip cards. The values of 4 and 5 are supported only for EMV transactions. * Applicable only for CTV for Payouts. - attr_accessor :terminal_capability - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'entry_mode' => :'entryMode', - :'terminal_capability' => :'terminalCapability' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'entry_mode' => :'String', - :'terminal_capability' => :'Integer' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'entryMode') - self.entry_mode = attributes[:'entryMode'] - end - - if attributes.has_key?(:'terminalCapability') - self.terminal_capability = attributes[:'terminalCapability'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@entry_mode.nil? && @entry_mode.to_s.length > 11 - invalid_properties.push('invalid value for "entry_mode", the character length must be smaller than or equal to 11.') - end - - if !@terminal_capability.nil? && @terminal_capability > 5 - invalid_properties.push('invalid value for "terminal_capability", must be smaller than or equal to 5.') - end - - if !@terminal_capability.nil? && @terminal_capability < 1 - invalid_properties.push('invalid value for "terminal_capability", must be greater than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@entry_mode.nil? && @entry_mode.to_s.length > 11 - return false if !@terminal_capability.nil? && @terminal_capability > 5 - return false if !@terminal_capability.nil? && @terminal_capability < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] entry_mode Value to be assigned - def entry_mode=(entry_mode) - if !entry_mode.nil? && entry_mode.to_s.length > 11 - fail ArgumentError, 'invalid value for "entry_mode", the character length must be smaller than or equal to 11.' - end - - @entry_mode = entry_mode - end - - # Custom attribute writer method with validation - # @param [Object] terminal_capability Value to be assigned - def terminal_capability=(terminal_capability) - if !terminal_capability.nil? && terminal_capability > 5 - fail ArgumentError, 'invalid value for "terminal_capability", must be smaller than or equal to 5.' - end - - if !terminal_capability.nil? && terminal_capability < 1 - fail ArgumentError, 'invalid value for "terminal_capability", must be greater than or equal to 1.' - end - - @terminal_capability = terminal_capability - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - entry_mode == o.entry_mode && - terminal_capability == o.terminal_capability - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [entry_mode, terminal_capability].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_processing_information.rb b/lib/cybersource_rest_client/models/inline_response_200_12_processing_information.rb deleted file mode 100644 index 3e0b1e78..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_processing_information.rb +++ /dev/null @@ -1,252 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012ProcessingInformation - # Type of digital payment solution that is being used for the transaction. Possible Values: - **visacheckout**: Visa Checkout. - **001**: Apple Pay. - **005**: Masterpass. Required for Masterpass transactions on OmniPay Direct. - **006**: Android Pay. - **008**: Samsung Pay. - attr_accessor :payment_solution - - # Type of transaction. Some payment card companies use this information when determining discount rates. When you omit this field for **Ingenico ePayments**, the processor uses the default transaction type they have on file for you instead of the default value listed here. - attr_accessor :commerce_indicator - - # The description for this field is not available. - attr_accessor :business_application_id - - attr_accessor :authorization_options - - attr_accessor :bank_transfer_options - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'payment_solution' => :'paymentSolution', - :'commerce_indicator' => :'commerceIndicator', - :'business_application_id' => :'businessApplicationId', - :'authorization_options' => :'authorizationOptions', - :'bank_transfer_options' => :'bankTransferOptions' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'payment_solution' => :'String', - :'commerce_indicator' => :'String', - :'business_application_id' => :'String', - :'authorization_options' => :'InlineResponse20012ProcessingInformationAuthorizationOptions', - :'bank_transfer_options' => :'InlineResponse20012ProcessingInformationBankTransferOptions' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'paymentSolution') - self.payment_solution = attributes[:'paymentSolution'] - end - - if attributes.has_key?(:'commerceIndicator') - self.commerce_indicator = attributes[:'commerceIndicator'] - end - - if attributes.has_key?(:'businessApplicationId') - self.business_application_id = attributes[:'businessApplicationId'] - end - - if attributes.has_key?(:'authorizationOptions') - self.authorization_options = attributes[:'authorizationOptions'] - end - - if attributes.has_key?(:'bankTransferOptions') - self.bank_transfer_options = attributes[:'bankTransferOptions'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@payment_solution.nil? && @payment_solution.to_s.length > 12 - invalid_properties.push('invalid value for "payment_solution", the character length must be smaller than or equal to 12.') - end - - if !@commerce_indicator.nil? && @commerce_indicator.to_s.length > 20 - invalid_properties.push('invalid value for "commerce_indicator", the character length must be smaller than or equal to 20.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@payment_solution.nil? && @payment_solution.to_s.length > 12 - return false if !@commerce_indicator.nil? && @commerce_indicator.to_s.length > 20 - true - end - - # Custom attribute writer method with validation - # @param [Object] payment_solution Value to be assigned - def payment_solution=(payment_solution) - if !payment_solution.nil? && payment_solution.to_s.length > 12 - fail ArgumentError, 'invalid value for "payment_solution", the character length must be smaller than or equal to 12.' - end - - @payment_solution = payment_solution - end - - # Custom attribute writer method with validation - # @param [Object] commerce_indicator Value to be assigned - def commerce_indicator=(commerce_indicator) - if !commerce_indicator.nil? && commerce_indicator.to_s.length > 20 - fail ArgumentError, 'invalid value for "commerce_indicator", the character length must be smaller than or equal to 20.' - end - - @commerce_indicator = commerce_indicator - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - payment_solution == o.payment_solution && - commerce_indicator == o.commerce_indicator && - business_application_id == o.business_application_id && - authorization_options == o.authorization_options && - bank_transfer_options == o.bank_transfer_options - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [payment_solution, commerce_indicator, business_application_id, authorization_options, bank_transfer_options].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_processing_information_authorization_options.rb b/lib/cybersource_rest_client/models/inline_response_200_12_processing_information_authorization_options.rb deleted file mode 100644 index 9a663928..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_processing_information_authorization_options.rb +++ /dev/null @@ -1,199 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012ProcessingInformationAuthorizationOptions - # 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) - attr_accessor :auth_type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'auth_type' => :'authType' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'auth_type' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'authType') - self.auth_type = attributes[:'authType'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@auth_type.nil? && @auth_type.to_s.length > 15 - invalid_properties.push('invalid value for "auth_type", the character length must be smaller than or equal to 15.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@auth_type.nil? && @auth_type.to_s.length > 15 - true - end - - # Custom attribute writer method with validation - # @param [Object] auth_type Value to be assigned - def auth_type=(auth_type) - if !auth_type.nil? && auth_type.to_s.length > 15 - fail ArgumentError, 'invalid value for "auth_type", the character length must be smaller than or equal to 15.' - end - - @auth_type = auth_type - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - auth_type == o.auth_type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [auth_type].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_processing_information_bank_transfer_options.rb b/lib/cybersource_rest_client/models/inline_response_200_12_processing_information_bank_transfer_options.rb deleted file mode 100644 index 0fa99e28..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_processing_information_bank_transfer_options.rb +++ /dev/null @@ -1,184 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012ProcessingInformationBankTransferOptions - # The description for this field is not available. - attr_accessor :sec_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'sec_code' => :'secCode' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'sec_code' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'secCode') - self.sec_code = attributes[:'secCode'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - sec_code == o.sec_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [sec_code].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_processor_information.rb b/lib/cybersource_rest_client/models/inline_response_200_12_processor_information.rb deleted file mode 100644 index d72730aa..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_processor_information.rb +++ /dev/null @@ -1,309 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012ProcessorInformation - attr_accessor :processor - - # Network transaction identifier (TID). You can use this value to identify a specific transaction when you are discussing the transaction with your processor. Not all processors provide this value. - attr_accessor :transaction_id - - # The description for this field is not available. - attr_accessor :network_transaction_id - - # The description for this field is not available. - attr_accessor :response_id - - # The description for this field is not available. - attr_accessor :provider_transaction_id - - # Authorization code. Returned only when the processor returns this value. - attr_accessor :approval_code - - # For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of the authorization. - attr_accessor :response_code - - attr_accessor :avs - - attr_accessor :card_verification - - attr_accessor :ach_verification - - attr_accessor :electronic_verification_results - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'processor' => :'processor', - :'transaction_id' => :'transactionId', - :'network_transaction_id' => :'networkTransactionId', - :'response_id' => :'responseId', - :'provider_transaction_id' => :'providerTransactionId', - :'approval_code' => :'approvalCode', - :'response_code' => :'responseCode', - :'avs' => :'avs', - :'card_verification' => :'cardVerification', - :'ach_verification' => :'achVerification', - :'electronic_verification_results' => :'electronicVerificationResults' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'processor' => :'InlineResponse20012ProcessorInformationProcessor', - :'transaction_id' => :'String', - :'network_transaction_id' => :'String', - :'response_id' => :'String', - :'provider_transaction_id' => :'String', - :'approval_code' => :'String', - :'response_code' => :'String', - :'avs' => :'InlineResponse201ProcessorInformationAvs', - :'card_verification' => :'InlineResponse20012ProcessorInformationCardVerification', - :'ach_verification' => :'InlineResponse20012ProcessorInformationAchVerification', - :'electronic_verification_results' => :'InlineResponse20012ProcessorInformationElectronicVerificationResults' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'processor') - self.processor = attributes[:'processor'] - end - - if attributes.has_key?(:'transactionId') - self.transaction_id = attributes[:'transactionId'] - end - - if attributes.has_key?(:'networkTransactionId') - self.network_transaction_id = attributes[:'networkTransactionId'] - end - - if attributes.has_key?(:'responseId') - self.response_id = attributes[:'responseId'] - end - - if attributes.has_key?(:'providerTransactionId') - self.provider_transaction_id = attributes[:'providerTransactionId'] - end - - if attributes.has_key?(:'approvalCode') - self.approval_code = attributes[:'approvalCode'] - end - - if attributes.has_key?(:'responseCode') - self.response_code = attributes[:'responseCode'] - end - - if attributes.has_key?(:'avs') - self.avs = attributes[:'avs'] - end - - if attributes.has_key?(:'cardVerification') - self.card_verification = attributes[:'cardVerification'] - end - - if attributes.has_key?(:'achVerification') - self.ach_verification = attributes[:'achVerification'] - end - - if attributes.has_key?(:'electronicVerificationResults') - self.electronic_verification_results = attributes[:'electronicVerificationResults'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@transaction_id.nil? && @transaction_id.to_s.length > 50 - invalid_properties.push('invalid value for "transaction_id", the character length must be smaller than or equal to 50.') - end - - if !@response_code.nil? && @response_code.to_s.length > 10 - invalid_properties.push('invalid value for "response_code", the character length must be smaller than or equal to 10.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@transaction_id.nil? && @transaction_id.to_s.length > 50 - return false if !@response_code.nil? && @response_code.to_s.length > 10 - true - end - - # Custom attribute writer method with validation - # @param [Object] transaction_id Value to be assigned - def transaction_id=(transaction_id) - if !transaction_id.nil? && transaction_id.to_s.length > 50 - fail ArgumentError, 'invalid value for "transaction_id", the character length must be smaller than or equal to 50.' - end - - @transaction_id = transaction_id - end - - # Custom attribute writer method with validation - # @param [Object] response_code Value to be assigned - def response_code=(response_code) - if !response_code.nil? && response_code.to_s.length > 10 - fail ArgumentError, 'invalid value for "response_code", the character length must be smaller than or equal to 10.' - end - - @response_code = response_code - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - processor == o.processor && - transaction_id == o.transaction_id && - network_transaction_id == o.network_transaction_id && - response_id == o.response_id && - provider_transaction_id == o.provider_transaction_id && - approval_code == o.approval_code && - response_code == o.response_code && - avs == o.avs && - card_verification == o.card_verification && - ach_verification == o.ach_verification && - electronic_verification_results == o.electronic_verification_results - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [processor, transaction_id, network_transaction_id, response_id, provider_transaction_id, approval_code, response_code, avs, card_verification, ach_verification, electronic_verification_results].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_processor_information_ach_verification.rb b/lib/cybersource_rest_client/models/inline_response_200_12_processor_information_ach_verification.rb deleted file mode 100644 index ae8af21b..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_processor_information_ach_verification.rb +++ /dev/null @@ -1,224 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012ProcessorInformationAchVerification - # The description for this field is not available.. - attr_accessor :result_code - - # The description for this field is not available. - attr_accessor :result_code_raw - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'result_code' => :'resultCode', - :'result_code_raw' => :'resultCodeRaw' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'result_code' => :'String', - :'result_code_raw' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'resultCode') - self.result_code = attributes[:'resultCode'] - end - - if attributes.has_key?(:'resultCodeRaw') - self.result_code_raw = attributes[:'resultCodeRaw'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@result_code.nil? && @result_code.to_s.length > 1 - invalid_properties.push('invalid value for "result_code", the character length must be smaller than or equal to 1.') - end - - if !@result_code_raw.nil? && @result_code_raw.to_s.length > 10 - invalid_properties.push('invalid value for "result_code_raw", the character length must be smaller than or equal to 10.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@result_code.nil? && @result_code.to_s.length > 1 - return false if !@result_code_raw.nil? && @result_code_raw.to_s.length > 10 - true - end - - # Custom attribute writer method with validation - # @param [Object] result_code Value to be assigned - def result_code=(result_code) - if !result_code.nil? && result_code.to_s.length > 1 - fail ArgumentError, 'invalid value for "result_code", the character length must be smaller than or equal to 1.' - end - - @result_code = result_code - end - - # Custom attribute writer method with validation - # @param [Object] result_code_raw Value to be assigned - def result_code_raw=(result_code_raw) - if !result_code_raw.nil? && result_code_raw.to_s.length > 10 - fail ArgumentError, 'invalid value for "result_code_raw", the character length must be smaller than or equal to 10.' - end - - @result_code_raw = result_code_raw - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - result_code == o.result_code && - result_code_raw == o.result_code_raw - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [result_code, result_code_raw].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_processor_information_card_verification.rb b/lib/cybersource_rest_client/models/inline_response_200_12_processor_information_card_verification.rb deleted file mode 100644 index 76834e07..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_processor_information_card_verification.rb +++ /dev/null @@ -1,199 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012ProcessorInformationCardVerification - # CVN result code. - attr_accessor :result_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'result_code' => :'resultCode' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'result_code' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'resultCode') - self.result_code = attributes[:'resultCode'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@result_code.nil? && @result_code.to_s.length > 1 - invalid_properties.push('invalid value for "result_code", the character length must be smaller than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@result_code.nil? && @result_code.to_s.length > 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] result_code Value to be assigned - def result_code=(result_code) - if !result_code.nil? && result_code.to_s.length > 1 - fail ArgumentError, 'invalid value for "result_code", the character length must be smaller than or equal to 1.' - end - - @result_code = result_code - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - result_code == o.result_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [result_code].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_processor_information_electronic_verification_results.rb b/lib/cybersource_rest_client/models/inline_response_200_12_processor_information_electronic_verification_results.rb deleted file mode 100644 index 1fdb9b5f..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_processor_information_electronic_verification_results.rb +++ /dev/null @@ -1,424 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012ProcessorInformationElectronicVerificationResults - # Mapped Electronic Verification response code for the customer’s email address. - attr_accessor :email - - # Raw Electronic Verification response code from the processor for the customer’s email address. - attr_accessor :email_raw - - # The description for this field is not available. - attr_accessor :name - - # The description for this field is not available. - attr_accessor :name_raw - - # Mapped Electronic Verification response code for the customer’s phone number. - attr_accessor :phone_number - - # Raw Electronic Verification response code from the processor for the customer’s phone number. - attr_accessor :phone_number_raw - - # Mapped Electronic Verification response code for the customer’s street address. - attr_accessor :street - - # Raw Electronic Verification response code from the processor for the customer’s street address. - attr_accessor :street_raw - - # Mapped Electronic Verification response code for the customer’s postal code. - attr_accessor :postal_code - - # Raw Electronic Verification response code from the processor for the customer’s postal code. - attr_accessor :postal_code_raw - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'email' => :'email', - :'email_raw' => :'emailRaw', - :'name' => :'name', - :'name_raw' => :'nameRaw', - :'phone_number' => :'phoneNumber', - :'phone_number_raw' => :'phoneNumberRaw', - :'street' => :'street', - :'street_raw' => :'streetRaw', - :'postal_code' => :'postalCode', - :'postal_code_raw' => :'postalCodeRaw' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'email' => :'String', - :'email_raw' => :'String', - :'name' => :'String', - :'name_raw' => :'String', - :'phone_number' => :'String', - :'phone_number_raw' => :'String', - :'street' => :'String', - :'street_raw' => :'String', - :'postal_code' => :'String', - :'postal_code_raw' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'email') - self.email = attributes[:'email'] - end - - if attributes.has_key?(:'emailRaw') - self.email_raw = attributes[:'emailRaw'] - end - - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.has_key?(:'nameRaw') - self.name_raw = attributes[:'nameRaw'] - end - - if attributes.has_key?(:'phoneNumber') - self.phone_number = attributes[:'phoneNumber'] - end - - if attributes.has_key?(:'phoneNumberRaw') - self.phone_number_raw = attributes[:'phoneNumberRaw'] - end - - if attributes.has_key?(:'street') - self.street = attributes[:'street'] - end - - if attributes.has_key?(:'streetRaw') - self.street_raw = attributes[:'streetRaw'] - end - - if attributes.has_key?(:'postalCode') - self.postal_code = attributes[:'postalCode'] - end - - if attributes.has_key?(:'postalCodeRaw') - self.postal_code_raw = attributes[:'postalCodeRaw'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@email.nil? && @email.to_s.length > 1 - invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 1.') - end - - if !@email_raw.nil? && @email_raw.to_s.length > 1 - invalid_properties.push('invalid value for "email_raw", the character length must be smaller than or equal to 1.') - end - - if !@name.nil? && @name.to_s.length > 30 - invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 30.') - end - - if !@name_raw.nil? && @name_raw.to_s.length > 30 - invalid_properties.push('invalid value for "name_raw", the character length must be smaller than or equal to 30.') - end - - if !@phone_number.nil? && @phone_number.to_s.length > 1 - invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 1.') - end - - if !@phone_number_raw.nil? && @phone_number_raw.to_s.length > 1 - invalid_properties.push('invalid value for "phone_number_raw", the character length must be smaller than or equal to 1.') - end - - if !@street.nil? && @street.to_s.length > 1 - invalid_properties.push('invalid value for "street", the character length must be smaller than or equal to 1.') - end - - if !@street_raw.nil? && @street_raw.to_s.length > 1 - invalid_properties.push('invalid value for "street_raw", the character length must be smaller than or equal to 1.') - end - - if !@postal_code.nil? && @postal_code.to_s.length > 1 - invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 1.') - end - - if !@postal_code_raw.nil? && @postal_code_raw.to_s.length > 1 - invalid_properties.push('invalid value for "postal_code_raw", the character length must be smaller than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@email.nil? && @email.to_s.length > 1 - return false if !@email_raw.nil? && @email_raw.to_s.length > 1 - return false if !@name.nil? && @name.to_s.length > 30 - return false if !@name_raw.nil? && @name_raw.to_s.length > 30 - return false if !@phone_number.nil? && @phone_number.to_s.length > 1 - return false if !@phone_number_raw.nil? && @phone_number_raw.to_s.length > 1 - return false if !@street.nil? && @street.to_s.length > 1 - return false if !@street_raw.nil? && @street_raw.to_s.length > 1 - return false if !@postal_code.nil? && @postal_code.to_s.length > 1 - return false if !@postal_code_raw.nil? && @postal_code_raw.to_s.length > 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] email Value to be assigned - def email=(email) - if !email.nil? && email.to_s.length > 1 - fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 1.' - end - - @email = email - end - - # Custom attribute writer method with validation - # @param [Object] email_raw Value to be assigned - def email_raw=(email_raw) - if !email_raw.nil? && email_raw.to_s.length > 1 - fail ArgumentError, 'invalid value for "email_raw", the character length must be smaller than or equal to 1.' - end - - @email_raw = email_raw - end - - # Custom attribute writer method with validation - # @param [Object] name Value to be assigned - def name=(name) - if !name.nil? && name.to_s.length > 30 - fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 30.' - end - - @name = name - end - - # Custom attribute writer method with validation - # @param [Object] name_raw Value to be assigned - def name_raw=(name_raw) - if !name_raw.nil? && name_raw.to_s.length > 30 - fail ArgumentError, 'invalid value for "name_raw", the character length must be smaller than or equal to 30.' - end - - @name_raw = name_raw - end - - # Custom attribute writer method with validation - # @param [Object] phone_number Value to be assigned - def phone_number=(phone_number) - if !phone_number.nil? && phone_number.to_s.length > 1 - fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 1.' - end - - @phone_number = phone_number - end - - # Custom attribute writer method with validation - # @param [Object] phone_number_raw Value to be assigned - def phone_number_raw=(phone_number_raw) - if !phone_number_raw.nil? && phone_number_raw.to_s.length > 1 - fail ArgumentError, 'invalid value for "phone_number_raw", the character length must be smaller than or equal to 1.' - end - - @phone_number_raw = phone_number_raw - end - - # Custom attribute writer method with validation - # @param [Object] street Value to be assigned - def street=(street) - if !street.nil? && street.to_s.length > 1 - fail ArgumentError, 'invalid value for "street", the character length must be smaller than or equal to 1.' - end - - @street = street - end - - # Custom attribute writer method with validation - # @param [Object] street_raw Value to be assigned - def street_raw=(street_raw) - if !street_raw.nil? && street_raw.to_s.length > 1 - fail ArgumentError, 'invalid value for "street_raw", the character length must be smaller than or equal to 1.' - end - - @street_raw = street_raw - end - - # Custom attribute writer method with validation - # @param [Object] postal_code Value to be assigned - def postal_code=(postal_code) - if !postal_code.nil? && postal_code.to_s.length > 1 - fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 1.' - end - - @postal_code = postal_code - end - - # Custom attribute writer method with validation - # @param [Object] postal_code_raw Value to be assigned - def postal_code_raw=(postal_code_raw) - if !postal_code_raw.nil? && postal_code_raw.to_s.length > 1 - fail ArgumentError, 'invalid value for "postal_code_raw", the character length must be smaller than or equal to 1.' - end - - @postal_code_raw = postal_code_raw - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - email == o.email && - email_raw == o.email_raw && - name == o.name && - name_raw == o.name_raw && - phone_number == o.phone_number && - phone_number_raw == o.phone_number_raw && - street == o.street && - street_raw == o.street_raw && - postal_code == o.postal_code && - postal_code_raw == o.postal_code_raw - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [email, email_raw, name, name_raw, phone_number, phone_number_raw, street, street_raw, postal_code, postal_code_raw].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_processor_information_processor.rb b/lib/cybersource_rest_client/models/inline_response_200_12_processor_information_processor.rb deleted file mode 100644 index d1135715..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_processor_information_processor.rb +++ /dev/null @@ -1,199 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012ProcessorInformationProcessor - # Name of the Processor. - attr_accessor :name - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'name' => :'name' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'name' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@name.nil? && @name.to_s.length > 30 - invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 30.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@name.nil? && @name.to_s.length > 30 - true - end - - # Custom attribute writer method with validation - # @param [Object] name Value to be assigned - def name=(name) - if !name.nil? && name.to_s.length > 30 - fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 30.' - end - - @name = name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [name].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_risk_information.rb b/lib/cybersource_rest_client/models/inline_response_200_12_risk_information.rb deleted file mode 100644 index 5387a695..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_risk_information.rb +++ /dev/null @@ -1,233 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012RiskInformation - attr_accessor :profile - - attr_accessor :rules - - attr_accessor :passive_profile - - attr_accessor :passive_rules - - attr_accessor :score - - # Time that the transaction was submitted in local time.. - attr_accessor :local_time - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'profile' => :'profile', - :'rules' => :'rules', - :'passive_profile' => :'passiveProfile', - :'passive_rules' => :'passiveRules', - :'score' => :'score', - :'local_time' => :'localTime' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'profile' => :'InlineResponse20012RiskInformationProfile', - :'rules' => :'Array', - :'passive_profile' => :'InlineResponse20012RiskInformationProfile', - :'passive_rules' => :'Array', - :'score' => :'InlineResponse20012RiskInformationScore', - :'local_time' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'profile') - self.profile = attributes[:'profile'] - end - - if attributes.has_key?(:'rules') - if (value = attributes[:'rules']).is_a?(Array) - self.rules = value - end - end - - if attributes.has_key?(:'passiveProfile') - self.passive_profile = attributes[:'passiveProfile'] - end - - if attributes.has_key?(:'passiveRules') - if (value = attributes[:'passiveRules']).is_a?(Array) - self.passive_rules = value - end - end - - if attributes.has_key?(:'score') - self.score = attributes[:'score'] - end - - if attributes.has_key?(:'localTime') - self.local_time = attributes[:'localTime'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - profile == o.profile && - rules == o.rules && - passive_profile == o.passive_profile && - passive_rules == o.passive_rules && - score == o.score && - local_time == o.local_time - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [profile, rules, passive_profile, passive_rules, score, local_time].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_risk_information_profile.rb b/lib/cybersource_rest_client/models/inline_response_200_12_risk_information_profile.rb deleted file mode 100644 index 435833c5..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_risk_information_profile.rb +++ /dev/null @@ -1,194 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012RiskInformationProfile - # The description for this field is not available. - attr_accessor :name - - # The description for this field is not available. - attr_accessor :decision - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'name' => :'name', - :'decision' => :'decision' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'name' => :'String', - :'decision' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.has_key?(:'decision') - self.decision = attributes[:'decision'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - decision == o.decision - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [name, decision].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_risk_information_score.rb b/lib/cybersource_rest_client/models/inline_response_200_12_risk_information_score.rb deleted file mode 100644 index fe1024ad..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_risk_information_score.rb +++ /dev/null @@ -1,196 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012RiskInformationScore - # Array of factor codes. - attr_accessor :factor_codes - - # The description for this field is not available. - attr_accessor :result - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'factor_codes' => :'factorCodes', - :'result' => :'result' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'factor_codes' => :'Array', - :'result' => :'Integer' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'factorCodes') - if (value = attributes[:'factorCodes']).is_a?(Array) - self.factor_codes = value - end - end - - if attributes.has_key?(:'result') - self.result = attributes[:'result'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - factor_codes == o.factor_codes && - result == o.result - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [factor_codes, result].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_12_sender_information.rb b/lib/cybersource_rest_client/models/inline_response_200_12_sender_information.rb deleted file mode 100644 index 6c2d4a05..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_12_sender_information.rb +++ /dev/null @@ -1,199 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20012SenderInformation - # Reference number generated by you that uniquely identifies the sender. - attr_accessor :reference_number - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'reference_number' => :'referenceNumber' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'reference_number' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'referenceNumber') - self.reference_number = attributes[:'referenceNumber'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@reference_number.nil? && @reference_number.to_s.length > 19 - invalid_properties.push('invalid value for "reference_number", the character length must be smaller than or equal to 19.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@reference_number.nil? && @reference_number.to_s.length > 19 - true - end - - # Custom attribute writer method with validation - # @param [Object] reference_number Value to be assigned - def reference_number=(reference_number) - if !reference_number.nil? && reference_number.to_s.length > 19 - fail ArgumentError, 'invalid value for "reference_number", the character length must be smaller than or equal to 19.' - end - - @reference_number = reference_number - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - reference_number == o.reference_number - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [reference_number].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_13.rb b/lib/cybersource_rest_client/models/inline_response_200_13.rb deleted file mode 100644 index ce0b44d4..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_13.rb +++ /dev/null @@ -1,185 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20013 - attr_accessor :users - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'users' => :'users' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'users' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'users') - if (value = attributes[:'users']).is_a?(Array) - self.users = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - users == o.users - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [users].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_13_account_information.rb b/lib/cybersource_rest_client/models/inline_response_200_13_account_information.rb deleted file mode 100644 index 6d4496e0..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_13_account_information.rb +++ /dev/null @@ -1,282 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20013AccountInformation - attr_accessor :user_name - - attr_accessor :role_id - - attr_accessor :permissions - - attr_accessor :status - - attr_accessor :created_time - - attr_accessor :last_access_time - - attr_accessor :language_preference - - attr_accessor :timezone - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'user_name' => :'userName', - :'role_id' => :'roleId', - :'permissions' => :'permissions', - :'status' => :'status', - :'created_time' => :'createdTime', - :'last_access_time' => :'lastAccessTime', - :'language_preference' => :'languagePreference', - :'timezone' => :'timezone' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'user_name' => :'String', - :'role_id' => :'String', - :'permissions' => :'Array', - :'status' => :'String', - :'created_time' => :'DateTime', - :'last_access_time' => :'DateTime', - :'language_preference' => :'String', - :'timezone' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'userName') - self.user_name = attributes[:'userName'] - end - - if attributes.has_key?(:'roleId') - self.role_id = attributes[:'roleId'] - end - - if attributes.has_key?(:'permissions') - if (value = attributes[:'permissions']).is_a?(Array) - self.permissions = value - end - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'createdTime') - self.created_time = attributes[:'createdTime'] - end - - if attributes.has_key?(:'lastAccessTime') - self.last_access_time = attributes[:'lastAccessTime'] - end - - if attributes.has_key?(:'languagePreference') - self.language_preference = attributes[:'languagePreference'] - end - - if attributes.has_key?(:'timezone') - self.timezone = attributes[:'timezone'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - status_validator = EnumAttributeValidator.new('String', ['active', 'inactive', 'locked', 'disabled', 'forgotpassword', 'deleted']) - return false unless status_validator.valid?(@status) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('String', ['active', 'inactive', 'locked', 'disabled', 'forgotpassword', 'deleted']) - unless validator.valid?(status) - fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' - end - @status = status - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user_name == o.user_name && - role_id == o.role_id && - permissions == o.permissions && - status == o.status && - created_time == o.created_time && - last_access_time == o.last_access_time && - language_preference == o.language_preference && - timezone == o.timezone - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [user_name, role_id, permissions, status, created_time, last_access_time, language_preference, timezone].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_13_contact_information.rb b/lib/cybersource_rest_client/models/inline_response_200_13_contact_information.rb deleted file mode 100644 index c1e8096a..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_13_contact_information.rb +++ /dev/null @@ -1,210 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20013ContactInformation - attr_accessor :email - - attr_accessor :phone_number - - attr_accessor :first_name - - attr_accessor :last_name - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'email' => :'email', - :'phone_number' => :'phoneNumber', - :'first_name' => :'firstName', - :'last_name' => :'lastName' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'email' => :'String', - :'phone_number' => :'String', - :'first_name' => :'String', - :'last_name' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'email') - self.email = attributes[:'email'] - end - - if attributes.has_key?(:'phoneNumber') - self.phone_number = attributes[:'phoneNumber'] - end - - if attributes.has_key?(:'firstName') - self.first_name = attributes[:'firstName'] - end - - if attributes.has_key?(:'lastName') - self.last_name = attributes[:'lastName'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - email == o.email && - phone_number == o.phone_number && - first_name == o.first_name && - last_name == o.last_name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [email, phone_number, first_name, last_name].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_13_organization_information.rb b/lib/cybersource_rest_client/models/inline_response_200_13_organization_information.rb deleted file mode 100644 index 507df7db..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_13_organization_information.rb +++ /dev/null @@ -1,183 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20013OrganizationInformation - attr_accessor :organization_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'organization_id' => :'organizationId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'organization_id' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'organizationId') - self.organization_id = attributes[:'organizationId'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - organization_id == o.organization_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [organization_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_13_users.rb b/lib/cybersource_rest_client/models/inline_response_200_13_users.rb deleted file mode 100644 index 9bd4d52d..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_13_users.rb +++ /dev/null @@ -1,201 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse20013Users - attr_accessor :account_information - - attr_accessor :organization_information - - attr_accessor :contact_information - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'account_information' => :'accountInformation', - :'organization_information' => :'organizationInformation', - :'contact_information' => :'contactInformation' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'account_information' => :'InlineResponse20013AccountInformation', - :'organization_information' => :'InlineResponse20013OrganizationInformation', - :'contact_information' => :'InlineResponse20013ContactInformation' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'accountInformation') - self.account_information = attributes[:'accountInformation'] - end - - if attributes.has_key?(:'organizationInformation') - self.organization_information = attributes[:'organizationInformation'] - end - - if attributes.has_key?(:'contactInformation') - self.contact_information = attributes[:'contactInformation'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - account_information == o.account_information && - organization_information == o.organization_information && - contact_information == o.contact_information - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [account_information, organization_information, contact_information].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_2.rb b/lib/cybersource_rest_client/models/inline_response_200_2.rb deleted file mode 100644 index e0c12793..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_2.rb +++ /dev/null @@ -1,204 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2002 - attr_accessor :transaction_batches - - attr_accessor :_links - - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'transaction_batches' => :'transactionBatches', - :'_links' => :'_links', - :'submit_time_utc' => :'submitTimeUtc' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'transaction_batches' => :'Array', - :'_links' => :'InlineResponse2002Links', - :'submit_time_utc' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'transactionBatches') - if (value = attributes[:'transactionBatches']).is_a?(Array) - self.transaction_batches = value - end - end - - if attributes.has_key?(:'_links') - self._links = attributes[:'_links'] - end - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - transaction_batches == o.transaction_batches && - _links == o._links && - submit_time_utc == o.submit_time_utc - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [transaction_batches, _links, submit_time_utc].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_2__links.rb b/lib/cybersource_rest_client/models/inline_response_200_2__links.rb deleted file mode 100644 index 3a8f144b..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_2__links.rb +++ /dev/null @@ -1,183 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2002Links - attr_accessor :_self - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_self' => :'self' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_self' => :'InlineResponse2002LinksSelf' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'self') - self._self = attributes[:'self'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _self == o._self - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [_self].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_2__links_self.rb b/lib/cybersource_rest_client/models/inline_response_200_2__links_self.rb deleted file mode 100644 index 514939e2..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_2__links_self.rb +++ /dev/null @@ -1,192 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2002LinksSelf - attr_accessor :href - - attr_accessor :method - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'href' => :'href', - :'method' => :'method' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'href' => :'String', - :'method' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'href') - self.href = attributes[:'href'] - end - - if attributes.has_key?(:'method') - self.method = attributes[:'method'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - href == o.href && - method == o.method - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [href, method].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_2_transaction_batches.rb b/lib/cybersource_rest_client/models/inline_response_200_2_transaction_batches.rb deleted file mode 100644 index 364cbe31..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_2_transaction_batches.rb +++ /dev/null @@ -1,277 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2002TransactionBatches - # Unique identifier assigned to the batch file. - attr_accessor :id - - # Date when the batch template was update. - attr_accessor :upload_date - - # The date when the batch template processing completed. - attr_accessor :completion_date - - # Number of transactions in the transaction. - attr_accessor :transaction_count - - # Number of transactions accepted. - attr_accessor :accepted_transaction_count - - # Number of transactions rejected. - attr_accessor :rejected_transaction_count - - # The status of you batch template processing. - attr_accessor :status - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id', - :'upload_date' => :'uploadDate', - :'completion_date' => :'completionDate', - :'transaction_count' => :'transactionCount', - :'accepted_transaction_count' => :'acceptedTransactionCount', - :'rejected_transaction_count' => :'rejectedTransactionCount', - :'status' => :'status' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'id' => :'String', - :'upload_date' => :'String', - :'completion_date' => :'String', - :'transaction_count' => :'Integer', - :'accepted_transaction_count' => :'Integer', - :'rejected_transaction_count' => :'String', - :'status' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.has_key?(:'uploadDate') - self.upload_date = attributes[:'uploadDate'] - end - - if attributes.has_key?(:'completionDate') - self.completion_date = attributes[:'completionDate'] - end - - if attributes.has_key?(:'transactionCount') - self.transaction_count = attributes[:'transactionCount'] - end - - if attributes.has_key?(:'acceptedTransactionCount') - self.accepted_transaction_count = attributes[:'acceptedTransactionCount'] - end - - if attributes.has_key?(:'rejectedTransactionCount') - self.rejected_transaction_count = attributes[:'rejectedTransactionCount'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@id.nil? && @id.to_s.length > 8 - invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 8.') - end - - if !@id.nil? && @id.to_s.length < 1 - invalid_properties.push('invalid value for "id", the character length must be great than or equal to 1.') - end - - if !@id.nil? && @id !~ Regexp.new(/^[a-zA-Z0-9_+-]*$/) - invalid_properties.push('invalid value for "id", must conform to the pattern /^[a-zA-Z0-9_+-]*$/.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@id.nil? && @id.to_s.length > 8 - return false if !@id.nil? && @id.to_s.length < 1 - return false if !@id.nil? && @id !~ Regexp.new(/^[a-zA-Z0-9_+-]*$/) - true - end - - # Custom attribute writer method with validation - # @param [Object] id Value to be assigned - def id=(id) - if !id.nil? && id.to_s.length > 8 - fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 8.' - end - - if !id.nil? && id.to_s.length < 1 - fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.' - end - - if !id.nil? && id !~ Regexp.new(/^[a-zA-Z0-9_+-]*$/) - fail ArgumentError, 'invalid value for "id", must conform to the pattern /^[a-zA-Z0-9_+-]*$/.' - end - - @id = id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - upload_date == o.upload_date && - completion_date == o.completion_date && - transaction_count == o.transaction_count && - accepted_transaction_count == o.accepted_transaction_count && - rejected_transaction_count == o.rejected_transaction_count && - status == o.status - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [id, upload_date, completion_date, transaction_count, accepted_transaction_count, rejected_transaction_count, status].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_3.rb b/lib/cybersource_rest_client/models/inline_response_200_3.rb deleted file mode 100644 index b47ab993..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_3.rb +++ /dev/null @@ -1,186 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2003 - # List of Notification Of Change Info values - attr_accessor :notification_of_changes - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'notification_of_changes' => :'notificationOfChanges' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'notification_of_changes' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'notificationOfChanges') - if (value = attributes[:'notificationOfChanges']).is_a?(Array) - self.notification_of_changes = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - notification_of_changes == o.notification_of_changes - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [notification_of_changes].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_3_notification_of_changes.rb b/lib/cybersource_rest_client/models/inline_response_200_3_notification_of_changes.rb deleted file mode 100644 index b9c14c97..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_3_notification_of_changes.rb +++ /dev/null @@ -1,255 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - # Notification Of Change - class InlineResponse2003NotificationOfChanges - # Merchant Reference Number - attr_accessor :merchant_reference_number - - # Transaction Reference Number - attr_accessor :transaction_reference_number - - # Notification Of Change Date(ISO 8601 Extended) - attr_accessor :time - - # Merchant Reference Number - attr_accessor :code - - # Account Type - attr_accessor :account_type - - # Routing Number - attr_accessor :routing_number - - # Account Number - attr_accessor :account_number - - # Consumer Name - attr_accessor :consumer_name - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'merchant_reference_number' => :'merchantReferenceNumber', - :'transaction_reference_number' => :'transactionReferenceNumber', - :'time' => :'time', - :'code' => :'code', - :'account_type' => :'accountType', - :'routing_number' => :'routingNumber', - :'account_number' => :'accountNumber', - :'consumer_name' => :'consumerName' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'merchant_reference_number' => :'String', - :'transaction_reference_number' => :'String', - :'time' => :'DateTime', - :'code' => :'String', - :'account_type' => :'String', - :'routing_number' => :'String', - :'account_number' => :'String', - :'consumer_name' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'merchantReferenceNumber') - self.merchant_reference_number = attributes[:'merchantReferenceNumber'] - end - - if attributes.has_key?(:'transactionReferenceNumber') - self.transaction_reference_number = attributes[:'transactionReferenceNumber'] - end - - if attributes.has_key?(:'time') - self.time = attributes[:'time'] - end - - if attributes.has_key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.has_key?(:'accountType') - self.account_type = attributes[:'accountType'] - end - - if attributes.has_key?(:'routingNumber') - self.routing_number = attributes[:'routingNumber'] - end - - if attributes.has_key?(:'accountNumber') - self.account_number = attributes[:'accountNumber'] - end - - if attributes.has_key?(:'consumerName') - self.consumer_name = attributes[:'consumerName'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - merchant_reference_number == o.merchant_reference_number && - transaction_reference_number == o.transaction_reference_number && - time == o.time && - code == o.code && - account_type == o.account_type && - routing_number == o.routing_number && - account_number == o.account_number && - consumer_name == o.consumer_name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [merchant_reference_number, transaction_reference_number, time, code, account_type, routing_number, account_number, consumer_name].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_4.rb b/lib/cybersource_rest_client/models/inline_response_200_4.rb deleted file mode 100644 index f5575481..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_4.rb +++ /dev/null @@ -1,185 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2004 - attr_accessor :report_definitions - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'report_definitions' => :'reportDefinitions' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'report_definitions' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'reportDefinitions') - if (value = attributes[:'reportDefinitions']).is_a?(Array) - self.report_definitions = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - report_definitions == o.report_definitions - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [report_definitions].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_4_report_definitions.rb b/lib/cybersource_rest_client/models/inline_response_200_4_report_definitions.rb deleted file mode 100644 index fd11967d..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_4_report_definitions.rb +++ /dev/null @@ -1,243 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2004ReportDefinitions - attr_accessor :type - - attr_accessor :report_definition_id - - attr_accessor :report_defintion_name - - attr_accessor :supported_formats - - attr_accessor :description - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'type' => :'type', - :'report_definition_id' => :'reportDefinitionId', - :'report_defintion_name' => :'reportDefintionName', - :'supported_formats' => :'supportedFormats', - :'description' => :'description' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'type' => :'String', - :'report_definition_id' => :'Integer', - :'report_defintion_name' => :'String', - :'supported_formats' => :'Array', - :'description' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.has_key?(:'reportDefinitionId') - self.report_definition_id = attributes[:'reportDefinitionId'] - end - - if attributes.has_key?(:'reportDefintionName') - self.report_defintion_name = attributes[:'reportDefintionName'] - end - - if attributes.has_key?(:'supportedFormats') - if (value = attributes[:'supportedFormats']).is_a?(Array) - self.supported_formats = value - end - end - - if attributes.has_key?(:'description') - self.description = attributes[:'description'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - type == o.type && - report_definition_id == o.report_definition_id && - report_defintion_name == o.report_defintion_name && - supported_formats == o.supported_formats && - description == o.description - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [type, report_definition_id, report_defintion_name, supported_formats, description].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_5.rb b/lib/cybersource_rest_client/models/inline_response_200_5.rb deleted file mode 100644 index 0aeb5b6c..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_5.rb +++ /dev/null @@ -1,254 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2005 - attr_accessor :type - - attr_accessor :report_definition_id - - attr_accessor :report_defintion_name - - attr_accessor :attributes - - attr_accessor :supported_formats - - attr_accessor :description - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'type' => :'type', - :'report_definition_id' => :'reportDefinitionId', - :'report_defintion_name' => :'reportDefintionName', - :'attributes' => :'attributes', - :'supported_formats' => :'supportedFormats', - :'description' => :'description' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'type' => :'String', - :'report_definition_id' => :'Integer', - :'report_defintion_name' => :'String', - :'attributes' => :'Array', - :'supported_formats' => :'Array', - :'description' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.has_key?(:'reportDefinitionId') - self.report_definition_id = attributes[:'reportDefinitionId'] - end - - if attributes.has_key?(:'reportDefintionName') - self.report_defintion_name = attributes[:'reportDefintionName'] - end - - if attributes.has_key?(:'attributes') - if (value = attributes[:'attributes']).is_a?(Array) - self.attributes = value - end - end - - if attributes.has_key?(:'supportedFormats') - if (value = attributes[:'supportedFormats']).is_a?(Array) - self.supported_formats = value - end - end - - if attributes.has_key?(:'description') - self.description = attributes[:'description'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - type == o.type && - report_definition_id == o.report_definition_id && - report_defintion_name == o.report_defintion_name && - attributes == o.attributes && - supported_formats == o.supported_formats && - description == o.description - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [type, report_definition_id, report_defintion_name, attributes, supported_formats, description].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_5_attributes.rb b/lib/cybersource_rest_client/models/inline_response_200_5_attributes.rb deleted file mode 100644 index 0f5e7aa4..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_5_attributes.rb +++ /dev/null @@ -1,237 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2005Attributes - attr_accessor :id - - attr_accessor :name - - attr_accessor :description - - attr_accessor :filter_type - - attr_accessor :default - - attr_accessor :required - - attr_accessor :supported_type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id', - :'name' => :'name', - :'description' => :'description', - :'filter_type' => :'filterType', - :'default' => :'default', - :'required' => :'required', - :'supported_type' => :'supportedType' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'id' => :'String', - :'name' => :'String', - :'description' => :'String', - :'filter_type' => :'String', - :'default' => :'BOOLEAN', - :'required' => :'BOOLEAN', - :'supported_type' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.has_key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.has_key?(:'filterType') - self.filter_type = attributes[:'filterType'] - end - - if attributes.has_key?(:'default') - self.default = attributes[:'default'] - end - - if attributes.has_key?(:'required') - self.required = attributes[:'required'] - end - - if attributes.has_key?(:'supportedType') - self.supported_type = attributes[:'supportedType'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - name == o.name && - description == o.description && - filter_type == o.filter_type && - default == o.default && - required == o.required && - supported_type == o.supported_type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [id, name, description, filter_type, default, required, supported_type].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_6.rb b/lib/cybersource_rest_client/models/inline_response_200_6.rb deleted file mode 100644 index 87e9ee20..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_6.rb +++ /dev/null @@ -1,185 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2006 - attr_accessor :subscriptions - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'subscriptions' => :'subscriptions' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'subscriptions' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'subscriptions') - if (value = attributes[:'subscriptions']).is_a?(Array) - self.subscriptions = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - subscriptions == o.subscriptions - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [subscriptions].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_6_report_preferences.rb b/lib/cybersource_rest_client/models/inline_response_200_6_report_preferences.rb deleted file mode 100644 index 0228c989..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_6_report_preferences.rb +++ /dev/null @@ -1,229 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - # Report Preferences - class InlineResponse2006ReportPreferences - # Indicator to determine whether negative sign infron of amount for all refunded transaction - attr_accessor :signed_amounts - - # Specify the field naming convention to be followed in reports (applicable to only csv report formats - attr_accessor :field_name_convention - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'signed_amounts' => :'signedAmounts', - :'field_name_convention' => :'fieldNameConvention' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'signed_amounts' => :'BOOLEAN', - :'field_name_convention' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'signedAmounts') - self.signed_amounts = attributes[:'signedAmounts'] - end - - if attributes.has_key?(:'fieldNameConvention') - self.field_name_convention = attributes[:'fieldNameConvention'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - field_name_convention_validator = EnumAttributeValidator.new('String', ['SOAPI', 'SCMP']) - return false unless field_name_convention_validator.valid?(@field_name_convention) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] field_name_convention Object to be assigned - def field_name_convention=(field_name_convention) - validator = EnumAttributeValidator.new('String', ['SOAPI', 'SCMP']) - unless validator.valid?(field_name_convention) - fail ArgumentError, 'invalid value for "field_name_convention", must be one of #{validator.allowable_values}.' - end - @field_name_convention = field_name_convention - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - signed_amounts == o.signed_amounts && - field_name_convention == o.field_name_convention - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [signed_amounts, field_name_convention].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_6_subscriptions.rb b/lib/cybersource_rest_client/models/inline_response_200_6_subscriptions.rb deleted file mode 100644 index 821ec51c..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_6_subscriptions.rb +++ /dev/null @@ -1,354 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - # Subscription Details - class InlineResponse2006Subscriptions - # Organization Id - attr_accessor :organization_id - - # Report Definition Id - attr_accessor :report_definition_id - - # Report Definition - attr_accessor :report_definition_name - - # Report Format - attr_accessor :report_mime_type - - # Report Frequency - attr_accessor :report_frequency - - # Report Name - attr_accessor :report_name - - # Time Zone - attr_accessor :timezone - - # Start Time - attr_accessor :start_time - - # Start Day - attr_accessor :start_day - - # List of all fields String values - attr_accessor :report_fields - - # List of filters to apply - attr_accessor :report_filters - - attr_accessor :report_preferences - - # Selected name of the group. - attr_accessor :selected_merchant_group_name - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'organization_id' => :'organizationId', - :'report_definition_id' => :'reportDefinitionId', - :'report_definition_name' => :'reportDefinitionName', - :'report_mime_type' => :'reportMimeType', - :'report_frequency' => :'reportFrequency', - :'report_name' => :'reportName', - :'timezone' => :'timezone', - :'start_time' => :'startTime', - :'start_day' => :'startDay', - :'report_fields' => :'reportFields', - :'report_filters' => :'reportFilters', - :'report_preferences' => :'reportPreferences', - :'selected_merchant_group_name' => :'selectedMerchantGroupName' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'organization_id' => :'String', - :'report_definition_id' => :'String', - :'report_definition_name' => :'String', - :'report_mime_type' => :'String', - :'report_frequency' => :'String', - :'report_name' => :'String', - :'timezone' => :'String', - :'start_time' => :'DateTime', - :'start_day' => :'Integer', - :'report_fields' => :'Array', - :'report_filters' => :'Array', - :'report_preferences' => :'InlineResponse2006ReportPreferences', - :'selected_merchant_group_name' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'organizationId') - self.organization_id = attributes[:'organizationId'] - end - - if attributes.has_key?(:'reportDefinitionId') - self.report_definition_id = attributes[:'reportDefinitionId'] - end - - if attributes.has_key?(:'reportDefinitionName') - self.report_definition_name = attributes[:'reportDefinitionName'] - end - - if attributes.has_key?(:'reportMimeType') - self.report_mime_type = attributes[:'reportMimeType'] - end - - if attributes.has_key?(:'reportFrequency') - self.report_frequency = attributes[:'reportFrequency'] - end - - if attributes.has_key?(:'reportName') - self.report_name = attributes[:'reportName'] - end - - if attributes.has_key?(:'timezone') - self.timezone = attributes[:'timezone'] - end - - if attributes.has_key?(:'startTime') - self.start_time = attributes[:'startTime'] - end - - if attributes.has_key?(:'startDay') - self.start_day = attributes[:'startDay'] - end - - if attributes.has_key?(:'reportFields') - if (value = attributes[:'reportFields']).is_a?(Array) - self.report_fields = value - end - end - - if attributes.has_key?(:'reportFilters') - if (value = attributes[:'reportFilters']).is_a?(Array) - self.report_filters = value - end - end - - if attributes.has_key?(:'reportPreferences') - self.report_preferences = attributes[:'reportPreferences'] - end - - if attributes.has_key?(:'selectedMerchantGroupName') - self.selected_merchant_group_name = attributes[:'selectedMerchantGroupName'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - report_mime_type_validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv']) - return false unless report_mime_type_validator.valid?(@report_mime_type) - report_frequency_validator = EnumAttributeValidator.new('String', ['DAILY', 'WEEKLY', 'MONTHLY']) - return false unless report_frequency_validator.valid?(@report_frequency) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] report_mime_type Object to be assigned - def report_mime_type=(report_mime_type) - validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv']) - unless validator.valid?(report_mime_type) - fail ArgumentError, 'invalid value for "report_mime_type", must be one of #{validator.allowable_values}.' - end - @report_mime_type = report_mime_type - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] report_frequency Object to be assigned - def report_frequency=(report_frequency) - validator = EnumAttributeValidator.new('String', ['DAILY', 'WEEKLY', 'MONTHLY']) - unless validator.valid?(report_frequency) - fail ArgumentError, 'invalid value for "report_frequency", must be one of #{validator.allowable_values}.' - end - @report_frequency = report_frequency - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - organization_id == o.organization_id && - report_definition_id == o.report_definition_id && - report_definition_name == o.report_definition_name && - report_mime_type == o.report_mime_type && - report_frequency == o.report_frequency && - report_name == o.report_name && - timezone == o.timezone && - start_time == o.start_time && - start_day == o.start_day && - report_fields == o.report_fields && - report_filters == o.report_filters && - report_preferences == o.report_preferences && - selected_merchant_group_name == o.selected_merchant_group_name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [organization_id, report_definition_id, report_definition_name, report_mime_type, report_frequency, report_name, timezone, start_time, start_day, report_fields, report_filters, report_preferences, selected_merchant_group_name].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_7.rb b/lib/cybersource_rest_client/models/inline_response_200_7.rb deleted file mode 100644 index 225ebf56..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_7.rb +++ /dev/null @@ -1,185 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2007 - attr_accessor :reports - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'reports' => :'reports' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'reports' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'reports') - if (value = attributes[:'reports']).is_a?(Array) - self.reports = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - reports == o.reports - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [reports].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_7_reports.rb b/lib/cybersource_rest_client/models/inline_response_200_7_reports.rb deleted file mode 100644 index df5873d3..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_7_reports.rb +++ /dev/null @@ -1,373 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - # Report Search Result Bean - class InlineResponse2007Reports - # Unique Report Identifier of each report type - attr_accessor :report_definition_id - - # Name of the report specified by merchant while creating the report - attr_accessor :report_name - - # Format of the report to get generated - attr_accessor :report_mime_type - - # Frequency of the report to get generated - attr_accessor :report_frequency - - # Status of the report - attr_accessor :status - - # Specifies the report start time in ISO 8601 format - attr_accessor :report_start_time - - # Specifies the report end time in ISO 8601 format - attr_accessor :report_end_time - - # Time Zone - attr_accessor :timezone - - # Unique identifier generated for every reports - attr_accessor :report_id - - # CyberSource Merchant Id - attr_accessor :organization_id - - # Specifies the time of the report in queued in ISO 8601 format - attr_accessor :queued_time - - # Specifies the time of the report started to generate in ISO 8601 format - attr_accessor :report_generating_time - - # Specifies the time of the report completed the generation in ISO 8601 format - attr_accessor :report_completed_time - - # Selected name of the group - attr_accessor :selected_merchant_group_name - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'report_definition_id' => :'reportDefinitionId', - :'report_name' => :'reportName', - :'report_mime_type' => :'reportMimeType', - :'report_frequency' => :'reportFrequency', - :'status' => :'status', - :'report_start_time' => :'reportStartTime', - :'report_end_time' => :'reportEndTime', - :'timezone' => :'timezone', - :'report_id' => :'reportId', - :'organization_id' => :'organizationId', - :'queued_time' => :'queuedTime', - :'report_generating_time' => :'reportGeneratingTime', - :'report_completed_time' => :'reportCompletedTime', - :'selected_merchant_group_name' => :'selectedMerchantGroupName' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'report_definition_id' => :'String', - :'report_name' => :'String', - :'report_mime_type' => :'String', - :'report_frequency' => :'String', - :'status' => :'String', - :'report_start_time' => :'DateTime', - :'report_end_time' => :'DateTime', - :'timezone' => :'String', - :'report_id' => :'String', - :'organization_id' => :'String', - :'queued_time' => :'DateTime', - :'report_generating_time' => :'DateTime', - :'report_completed_time' => :'DateTime', - :'selected_merchant_group_name' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'reportDefinitionId') - self.report_definition_id = attributes[:'reportDefinitionId'] - end - - if attributes.has_key?(:'reportName') - self.report_name = attributes[:'reportName'] - end - - if attributes.has_key?(:'reportMimeType') - self.report_mime_type = attributes[:'reportMimeType'] - end - - if attributes.has_key?(:'reportFrequency') - self.report_frequency = attributes[:'reportFrequency'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'reportStartTime') - self.report_start_time = attributes[:'reportStartTime'] - end - - if attributes.has_key?(:'reportEndTime') - self.report_end_time = attributes[:'reportEndTime'] - end - - if attributes.has_key?(:'timezone') - self.timezone = attributes[:'timezone'] - end - - if attributes.has_key?(:'reportId') - self.report_id = attributes[:'reportId'] - end - - if attributes.has_key?(:'organizationId') - self.organization_id = attributes[:'organizationId'] - end - - if attributes.has_key?(:'queuedTime') - self.queued_time = attributes[:'queuedTime'] - end - - if attributes.has_key?(:'reportGeneratingTime') - self.report_generating_time = attributes[:'reportGeneratingTime'] - end - - if attributes.has_key?(:'reportCompletedTime') - self.report_completed_time = attributes[:'reportCompletedTime'] - end - - if attributes.has_key?(:'selectedMerchantGroupName') - self.selected_merchant_group_name = attributes[:'selectedMerchantGroupName'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - report_mime_type_validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv']) - return false unless report_mime_type_validator.valid?(@report_mime_type) - report_frequency_validator = EnumAttributeValidator.new('String', ['DAILY', 'WEEKLY', 'MONTHLY', 'ADHOC']) - return false unless report_frequency_validator.valid?(@report_frequency) - status_validator = EnumAttributeValidator.new('String', ['COMPLETED', 'PENDING', 'QUEUED', 'RUNNING', 'ERROR', 'NO_DATA']) - return false unless status_validator.valid?(@status) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] report_mime_type Object to be assigned - def report_mime_type=(report_mime_type) - validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv']) - unless validator.valid?(report_mime_type) - fail ArgumentError, 'invalid value for "report_mime_type", must be one of #{validator.allowable_values}.' - end - @report_mime_type = report_mime_type - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] report_frequency Object to be assigned - def report_frequency=(report_frequency) - validator = EnumAttributeValidator.new('String', ['DAILY', 'WEEKLY', 'MONTHLY', 'ADHOC']) - unless validator.valid?(report_frequency) - fail ArgumentError, 'invalid value for "report_frequency", must be one of #{validator.allowable_values}.' - end - @report_frequency = report_frequency - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('String', ['COMPLETED', 'PENDING', 'QUEUED', 'RUNNING', 'ERROR', 'NO_DATA']) - unless validator.valid?(status) - fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' - end - @status = status - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - report_definition_id == o.report_definition_id && - report_name == o.report_name && - report_mime_type == o.report_mime_type && - report_frequency == o.report_frequency && - status == o.status && - report_start_time == o.report_start_time && - report_end_time == o.report_end_time && - timezone == o.timezone && - report_id == o.report_id && - organization_id == o.organization_id && - queued_time == o.queued_time && - report_generating_time == o.report_generating_time && - report_completed_time == o.report_completed_time && - selected_merchant_group_name == o.selected_merchant_group_name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [report_definition_id, report_name, report_mime_type, report_frequency, status, report_start_time, report_end_time, timezone, report_id, organization_id, queued_time, report_generating_time, report_completed_time, selected_merchant_group_name].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_8.rb b/lib/cybersource_rest_client/models/inline_response_200_8.rb deleted file mode 100644 index c4b93e74..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_8.rb +++ /dev/null @@ -1,376 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - # Report Log - class InlineResponse2008 - # CyberSource merchant id - attr_accessor :organization_id - - # Report ID Value - attr_accessor :report_id - - # Report definition Id - attr_accessor :report_definition_id - - # Report Name - attr_accessor :report_name - - # Report Format - attr_accessor :report_mime_type - - # Report Frequency Value - attr_accessor :report_frequency - - # List of Integer Values - attr_accessor :report_fields - - # Report Status Value - attr_accessor :report_status - - # Report Start Time Value - attr_accessor :report_start_time - - # Report End Time Value - attr_accessor :report_end_time - - # Time Zone Value - attr_accessor :timezone - - # Report Filters - attr_accessor :report_filters - - attr_accessor :report_preferences - - # Selected Merchant Group name - attr_accessor :selected_merchant_group_name - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'organization_id' => :'organizationId', - :'report_id' => :'reportId', - :'report_definition_id' => :'reportDefinitionId', - :'report_name' => :'reportName', - :'report_mime_type' => :'reportMimeType', - :'report_frequency' => :'reportFrequency', - :'report_fields' => :'reportFields', - :'report_status' => :'reportStatus', - :'report_start_time' => :'reportStartTime', - :'report_end_time' => :'reportEndTime', - :'timezone' => :'timezone', - :'report_filters' => :'reportFilters', - :'report_preferences' => :'reportPreferences', - :'selected_merchant_group_name' => :'selectedMerchantGroupName' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'organization_id' => :'String', - :'report_id' => :'String', - :'report_definition_id' => :'String', - :'report_name' => :'String', - :'report_mime_type' => :'String', - :'report_frequency' => :'String', - :'report_fields' => :'Array', - :'report_status' => :'String', - :'report_start_time' => :'DateTime', - :'report_end_time' => :'DateTime', - :'timezone' => :'String', - :'report_filters' => :'Hash>', - :'report_preferences' => :'InlineResponse2006ReportPreferences', - :'selected_merchant_group_name' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'organizationId') - self.organization_id = attributes[:'organizationId'] - end - - if attributes.has_key?(:'reportId') - self.report_id = attributes[:'reportId'] - end - - if attributes.has_key?(:'reportDefinitionId') - self.report_definition_id = attributes[:'reportDefinitionId'] - end - - if attributes.has_key?(:'reportName') - self.report_name = attributes[:'reportName'] - end - - if attributes.has_key?(:'reportMimeType') - self.report_mime_type = attributes[:'reportMimeType'] - end - - if attributes.has_key?(:'reportFrequency') - self.report_frequency = attributes[:'reportFrequency'] - end - - if attributes.has_key?(:'reportFields') - if (value = attributes[:'reportFields']).is_a?(Array) - self.report_fields = value - end - end - - if attributes.has_key?(:'reportStatus') - self.report_status = attributes[:'reportStatus'] - end - - if attributes.has_key?(:'reportStartTime') - self.report_start_time = attributes[:'reportStartTime'] - end - - if attributes.has_key?(:'reportEndTime') - self.report_end_time = attributes[:'reportEndTime'] - end - - if attributes.has_key?(:'timezone') - self.timezone = attributes[:'timezone'] - end - - if attributes.has_key?(:'reportFilters') - if (value = attributes[:'reportFilters']).is_a?(Hash) - self.report_filters = value - end - end - - if attributes.has_key?(:'reportPreferences') - self.report_preferences = attributes[:'reportPreferences'] - end - - if attributes.has_key?(:'selectedMerchantGroupName') - self.selected_merchant_group_name = attributes[:'selectedMerchantGroupName'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - report_mime_type_validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv']) - return false unless report_mime_type_validator.valid?(@report_mime_type) - report_frequency_validator = EnumAttributeValidator.new('String', ['DAILY', 'WEEKLY', 'MONTHLY']) - return false unless report_frequency_validator.valid?(@report_frequency) - report_status_validator = EnumAttributeValidator.new('String', ['COMPLETED', 'PENDING', 'QUEUED', 'RUNNING', 'ERROR', 'NO_DATA', 'RERUN']) - return false unless report_status_validator.valid?(@report_status) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] report_mime_type Object to be assigned - def report_mime_type=(report_mime_type) - validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv']) - unless validator.valid?(report_mime_type) - fail ArgumentError, 'invalid value for "report_mime_type", must be one of #{validator.allowable_values}.' - end - @report_mime_type = report_mime_type - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] report_frequency Object to be assigned - def report_frequency=(report_frequency) - validator = EnumAttributeValidator.new('String', ['DAILY', 'WEEKLY', 'MONTHLY']) - unless validator.valid?(report_frequency) - fail ArgumentError, 'invalid value for "report_frequency", must be one of #{validator.allowable_values}.' - end - @report_frequency = report_frequency - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] report_status Object to be assigned - def report_status=(report_status) - validator = EnumAttributeValidator.new('String', ['COMPLETED', 'PENDING', 'QUEUED', 'RUNNING', 'ERROR', 'NO_DATA', 'RERUN']) - unless validator.valid?(report_status) - fail ArgumentError, 'invalid value for "report_status", must be one of #{validator.allowable_values}.' - end - @report_status = report_status - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - organization_id == o.organization_id && - report_id == o.report_id && - report_definition_id == o.report_definition_id && - report_name == o.report_name && - report_mime_type == o.report_mime_type && - report_frequency == o.report_frequency && - report_fields == o.report_fields && - report_status == o.report_status && - report_start_time == o.report_start_time && - report_end_time == o.report_end_time && - timezone == o.timezone && - report_filters == o.report_filters && - report_preferences == o.report_preferences && - selected_merchant_group_name == o.selected_merchant_group_name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [organization_id, report_id, report_definition_id, report_name, report_mime_type, report_frequency, report_fields, report_status, report_start_time, report_end_time, timezone, report_filters, report_preferences, selected_merchant_group_name].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_9.rb b/lib/cybersource_rest_client/models/inline_response_200_9.rb deleted file mode 100644 index f3a47532..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_9.rb +++ /dev/null @@ -1,194 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2009 - attr_accessor :file_details - - attr_accessor :_links - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'file_details' => :'fileDetails', - :'_links' => :'_links' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'file_details' => :'Array', - :'_links' => :'InlineResponse2009Links' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'fileDetails') - if (value = attributes[:'fileDetails']).is_a?(Array) - self.file_details = value - end - end - - if attributes.has_key?(:'_links') - self._links = attributes[:'_links'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - file_details == o.file_details && - _links == o._links - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [file_details, _links].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_9__links.rb b/lib/cybersource_rest_client/models/inline_response_200_9__links.rb deleted file mode 100644 index 8f22f294..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_9__links.rb +++ /dev/null @@ -1,194 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2009Links - attr_accessor :_self - - attr_accessor :files - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_self' => :'self', - :'files' => :'files' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_self' => :'InlineResponse2009LinksSelf', - :'files' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'self') - self._self = attributes[:'self'] - end - - if attributes.has_key?(:'files') - if (value = attributes[:'files']).is_a?(Array) - self.files = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _self == o._self && - files == o.files - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [_self, files].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_9__links_files.rb b/lib/cybersource_rest_client/models/inline_response_200_9__links_files.rb deleted file mode 100644 index 41d6db7d..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_9__links_files.rb +++ /dev/null @@ -1,202 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2009LinksFiles - # Unique identifier for each file - attr_accessor :file_id - - attr_accessor :href - - attr_accessor :method - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'file_id' => :'fileId', - :'href' => :'href', - :'method' => :'method' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'file_id' => :'String', - :'href' => :'String', - :'method' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'fileId') - self.file_id = attributes[:'fileId'] - end - - if attributes.has_key?(:'href') - self.href = attributes[:'href'] - end - - if attributes.has_key?(:'method') - self.method = attributes[:'method'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - file_id == o.file_id && - href == o.href && - method == o.method - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [file_id, href, method].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_9__links_self.rb b/lib/cybersource_rest_client/models/inline_response_200_9__links_self.rb deleted file mode 100644 index fd8c2a23..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_9__links_self.rb +++ /dev/null @@ -1,192 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2009LinksSelf - attr_accessor :href - - attr_accessor :method - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'href' => :'href', - :'method' => :'method' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'href' => :'String', - :'method' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'href') - self.href = attributes[:'href'] - end - - if attributes.has_key?(:'method') - self.method = attributes[:'method'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - href == o.href && - method == o.method - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [href, method].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_9_file_details.rb b/lib/cybersource_rest_client/models/inline_response_200_9_file_details.rb deleted file mode 100644 index 86334097..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_9_file_details.rb +++ /dev/null @@ -1,278 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2009FileDetails - # Unique identifier of a file - attr_accessor :file_id - - # Name of the file - attr_accessor :name - - # Date and time for the file in PST - attr_accessor :created_time - - # Date and time for the file in PST - attr_accessor :last_modified_time - - # Date and time for the file in PST - attr_accessor :date - - # File extension - attr_accessor :mime_type - - # Size of the file in bytes - attr_accessor :size - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'file_id' => :'fileId', - :'name' => :'name', - :'created_time' => :'createdTime', - :'last_modified_time' => :'lastModifiedTime', - :'date' => :'date', - :'mime_type' => :'mimeType', - :'size' => :'size' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'file_id' => :'String', - :'name' => :'String', - :'created_time' => :'DateTime', - :'last_modified_time' => :'DateTime', - :'date' => :'Date', - :'mime_type' => :'String', - :'size' => :'Integer' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'fileId') - self.file_id = attributes[:'fileId'] - end - - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.has_key?(:'createdTime') - self.created_time = attributes[:'createdTime'] - end - - if attributes.has_key?(:'lastModifiedTime') - self.last_modified_time = attributes[:'lastModifiedTime'] - end - - if attributes.has_key?(:'date') - self.date = attributes[:'date'] - end - - if attributes.has_key?(:'mimeType') - self.mime_type = attributes[:'mimeType'] - end - - if attributes.has_key?(:'size') - self.size = attributes[:'size'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - mime_type_validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv', 'application/pdf', 'application/octet-stream']) - return false unless mime_type_validator.valid?(@mime_type) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] mime_type Object to be assigned - def mime_type=(mime_type) - validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv', 'application/pdf', 'application/octet-stream']) - unless validator.valid?(mime_type) - fail ArgumentError, 'invalid value for "mime_type", must be one of #{validator.allowable_values}.' - end - @mime_type = mime_type - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - file_id == o.file_id && - name == o.name && - created_time == o.created_time && - last_modified_time == o.last_modified_time && - date == o.date && - mime_type == o.mime_type && - size == o.size - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [file_id, name, created_time, last_modified_time, date, mime_type, size].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_der.rb b/lib/cybersource_rest_client/models/inline_response_200_der.rb deleted file mode 100644 index e781f479..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_der.rb +++ /dev/null @@ -1,205 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - # The public key in DER format. Used to validate the response from the Tokenize Card request. Additionally this format is useful for client side encryption in Android and iOS implementations. - class InlineResponse200Der - # Specifies the format of the public key; currently X.509. - attr_accessor :format - - # Algorithm used to encrypt the public key. - attr_accessor :algorithm - - # Base64 encoded public key value. - attr_accessor :public_key - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'format' => :'format', - :'algorithm' => :'algorithm', - :'public_key' => :'publicKey' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'format' => :'String', - :'algorithm' => :'String', - :'public_key' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'format') - self.format = attributes[:'format'] - end - - if attributes.has_key?(:'algorithm') - self.algorithm = attributes[:'algorithm'] - end - - if attributes.has_key?(:'publicKey') - self.public_key = attributes[:'publicKey'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - format == o.format && - algorithm == o.algorithm && - public_key == o.public_key - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [format, algorithm, public_key].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_200_jwk.rb b/lib/cybersource_rest_client/models/inline_response_200_jwk.rb deleted file mode 100644 index 667a2261..00000000 --- a/lib/cybersource_rest_client/models/inline_response_200_jwk.rb +++ /dev/null @@ -1,225 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - # The public key in JSON Web Key (JWK) format. This format is useful for client side encryption in JavaScript based implementations. - class InlineResponse200Jwk - # Algorithm used to encrypt the public key. - attr_accessor :kty - - # Defines whether to use the key for encryption (enc) or verifying a signature (sig). Always returned as enc. - attr_accessor :use - - # The key ID in JWK format. - attr_accessor :kid - - # JWK RSA Modulus - attr_accessor :n - - # JWK RSA Exponent - attr_accessor :e - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'kty' => :'kty', - :'use' => :'use', - :'kid' => :'kid', - :'n' => :'n', - :'e' => :'e' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'kty' => :'String', - :'use' => :'String', - :'kid' => :'String', - :'n' => :'String', - :'e' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'kty') - self.kty = attributes[:'kty'] - end - - if attributes.has_key?(:'use') - self.use = attributes[:'use'] - end - - if attributes.has_key?(:'kid') - self.kid = attributes[:'kid'] - end - - if attributes.has_key?(:'n') - self.n = attributes[:'n'] - end - - if attributes.has_key?(:'e') - self.e = attributes[:'e'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - kty == o.kty && - use == o.use && - kid == o.kid && - n == o.n && - e == o.e - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [kty, use, kid, n, e].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201.rb b/lib/cybersource_rest_client/models/inline_response_201.rb deleted file mode 100644 index 016f2b8d..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201.rb +++ /dev/null @@ -1,341 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201 - attr_accessor :_links - - # An unique identification number assigned by CyberSource to identify the submitted request. - attr_accessor :id - - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - # The status of the submitted transaction. - attr_accessor :status - - # The reconciliation id for the submitted transaction. This value is not returned for all processors. - attr_accessor :reconciliation_id - - attr_accessor :error_information - - attr_accessor :client_reference_information - - attr_accessor :processor_information - - attr_accessor :payment_information - - attr_accessor :order_information - - attr_accessor :point_of_sale_information - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_links' => :'_links', - :'id' => :'id', - :'submit_time_utc' => :'submitTimeUtc', - :'status' => :'status', - :'reconciliation_id' => :'reconciliationId', - :'error_information' => :'errorInformation', - :'client_reference_information' => :'clientReferenceInformation', - :'processor_information' => :'processorInformation', - :'payment_information' => :'paymentInformation', - :'order_information' => :'orderInformation', - :'point_of_sale_information' => :'pointOfSaleInformation' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_links' => :'InlineResponse201Links', - :'id' => :'String', - :'submit_time_utc' => :'String', - :'status' => :'String', - :'reconciliation_id' => :'String', - :'error_information' => :'InlineResponse201ErrorInformation', - :'client_reference_information' => :'InlineResponse201ClientReferenceInformation', - :'processor_information' => :'InlineResponse201ProcessorInformation', - :'payment_information' => :'InlineResponse201PaymentInformation', - :'order_information' => :'InlineResponse201OrderInformation', - :'point_of_sale_information' => :'InlineResponse201PointOfSaleInformation' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'_links') - self._links = attributes[:'_links'] - end - - if attributes.has_key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'reconciliationId') - self.reconciliation_id = attributes[:'reconciliationId'] - end - - if attributes.has_key?(:'errorInformation') - self.error_information = attributes[:'errorInformation'] - end - - if attributes.has_key?(:'clientReferenceInformation') - self.client_reference_information = attributes[:'clientReferenceInformation'] - end - - if attributes.has_key?(:'processorInformation') - self.processor_information = attributes[:'processorInformation'] - end - - if attributes.has_key?(:'paymentInformation') - self.payment_information = attributes[:'paymentInformation'] - end - - if attributes.has_key?(:'orderInformation') - self.order_information = attributes[:'orderInformation'] - end - - if attributes.has_key?(:'pointOfSaleInformation') - self.point_of_sale_information = attributes[:'pointOfSaleInformation'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@id.nil? && @id.to_s.length > 26 - invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') - end - - if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - invalid_properties.push('invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@id.nil? && @id.to_s.length > 26 - status_validator = EnumAttributeValidator.new('String', ['AUTHORIZED', 'PARTIAL_AUTHORIZED', 'AUTHORIZED_PENDING_REVIEW', 'DECLINED']) - return false unless status_validator.valid?(@status) - return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - true - end - - # Custom attribute writer method with validation - # @param [Object] id Value to be assigned - def id=(id) - if !id.nil? && id.to_s.length > 26 - fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' - end - - @id = id - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('String', ['AUTHORIZED', 'PARTIAL_AUTHORIZED', 'AUTHORIZED_PENDING_REVIEW', 'DECLINED']) - unless validator.valid?(status) - fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' - end - @status = status - end - - # Custom attribute writer method with validation - # @param [Object] reconciliation_id Value to be assigned - def reconciliation_id=(reconciliation_id) - if !reconciliation_id.nil? && reconciliation_id.to_s.length > 60 - fail ArgumentError, 'invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.' - end - - @reconciliation_id = reconciliation_id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _links == o._links && - id == o.id && - submit_time_utc == o.submit_time_utc && - status == o.status && - reconciliation_id == o.reconciliation_id && - error_information == o.error_information && - client_reference_information == o.client_reference_information && - processor_information == o.processor_information && - payment_information == o.payment_information && - order_information == o.order_information && - point_of_sale_information == o.point_of_sale_information - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [_links, id, submit_time_utc, status, reconciliation_id, error_information, client_reference_information, processor_information, payment_information, order_information, point_of_sale_information].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_1.rb b/lib/cybersource_rest_client/models/inline_response_201_1.rb deleted file mode 100644 index 4e813345..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_1.rb +++ /dev/null @@ -1,332 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2011 - attr_accessor :_links - - # An unique identification number assigned by CyberSource to identify the submitted request. - attr_accessor :id - - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - # The status of the submitted transaction. - attr_accessor :status - - # The reconciliation id for the submitted transaction. This value is not returned for all processors. - attr_accessor :reconciliation_id - - attr_accessor :client_reference_information - - attr_accessor :reversal_amount_details - - attr_accessor :processor_information - - attr_accessor :authorization_information - - attr_accessor :point_of_sale_information - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_links' => :'_links', - :'id' => :'id', - :'submit_time_utc' => :'submitTimeUtc', - :'status' => :'status', - :'reconciliation_id' => :'reconciliationId', - :'client_reference_information' => :'clientReferenceInformation', - :'reversal_amount_details' => :'reversalAmountDetails', - :'processor_information' => :'processorInformation', - :'authorization_information' => :'authorizationInformation', - :'point_of_sale_information' => :'pointOfSaleInformation' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_links' => :'InlineResponse2011Links', - :'id' => :'String', - :'submit_time_utc' => :'String', - :'status' => :'String', - :'reconciliation_id' => :'String', - :'client_reference_information' => :'InlineResponse201ClientReferenceInformation', - :'reversal_amount_details' => :'InlineResponse2011ReversalAmountDetails', - :'processor_information' => :'InlineResponse2011ProcessorInformation', - :'authorization_information' => :'InlineResponse2011AuthorizationInformation', - :'point_of_sale_information' => :'Ptsv2paymentsidreversalsPointOfSaleInformation' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'_links') - self._links = attributes[:'_links'] - end - - if attributes.has_key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'reconciliationId') - self.reconciliation_id = attributes[:'reconciliationId'] - end - - if attributes.has_key?(:'clientReferenceInformation') - self.client_reference_information = attributes[:'clientReferenceInformation'] - end - - if attributes.has_key?(:'reversalAmountDetails') - self.reversal_amount_details = attributes[:'reversalAmountDetails'] - end - - if attributes.has_key?(:'processorInformation') - self.processor_information = attributes[:'processorInformation'] - end - - if attributes.has_key?(:'authorizationInformation') - self.authorization_information = attributes[:'authorizationInformation'] - end - - if attributes.has_key?(:'pointOfSaleInformation') - self.point_of_sale_information = attributes[:'pointOfSaleInformation'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@id.nil? && @id.to_s.length > 26 - invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') - end - - if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - invalid_properties.push('invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@id.nil? && @id.to_s.length > 26 - status_validator = EnumAttributeValidator.new('String', ['REVERSED']) - return false unless status_validator.valid?(@status) - return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - true - end - - # Custom attribute writer method with validation - # @param [Object] id Value to be assigned - def id=(id) - if !id.nil? && id.to_s.length > 26 - fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' - end - - @id = id - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('String', ['REVERSED']) - unless validator.valid?(status) - fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' - end - @status = status - end - - # Custom attribute writer method with validation - # @param [Object] reconciliation_id Value to be assigned - def reconciliation_id=(reconciliation_id) - if !reconciliation_id.nil? && reconciliation_id.to_s.length > 60 - fail ArgumentError, 'invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.' - end - - @reconciliation_id = reconciliation_id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _links == o._links && - id == o.id && - submit_time_utc == o.submit_time_utc && - status == o.status && - reconciliation_id == o.reconciliation_id && - client_reference_information == o.client_reference_information && - reversal_amount_details == o.reversal_amount_details && - processor_information == o.processor_information && - authorization_information == o.authorization_information && - point_of_sale_information == o.point_of_sale_information - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [_links, id, submit_time_utc, status, reconciliation_id, client_reference_information, reversal_amount_details, processor_information, authorization_information, point_of_sale_information].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_1__links.rb b/lib/cybersource_rest_client/models/inline_response_201_1__links.rb deleted file mode 100644 index f9a86dbe..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_1__links.rb +++ /dev/null @@ -1,183 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2011Links - attr_accessor :_self - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_self' => :'self' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_self' => :'InlineResponse201LinksSelf' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'self') - self._self = attributes[:'self'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _self == o._self - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [_self].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_1_authorization_information.rb b/lib/cybersource_rest_client/models/inline_response_201_1_authorization_information.rb deleted file mode 100644 index 38dddd9f..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_1_authorization_information.rb +++ /dev/null @@ -1,224 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2011AuthorizationInformation - # The authorization code returned by the processor. - attr_accessor :approval_code - - # Reply flag for the original transaction. - attr_accessor :reason_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'approval_code' => :'approvalCode', - :'reason_code' => :'reasonCode' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'approval_code' => :'String', - :'reason_code' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'approvalCode') - self.approval_code = attributes[:'approvalCode'] - end - - if attributes.has_key?(:'reasonCode') - self.reason_code = attributes[:'reasonCode'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@approval_code.nil? && @approval_code.to_s.length > 6 - invalid_properties.push('invalid value for "approval_code", the character length must be smaller than or equal to 6.') - end - - if !@reason_code.nil? && @reason_code.to_s.length > 50 - invalid_properties.push('invalid value for "reason_code", the character length must be smaller than or equal to 50.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@approval_code.nil? && @approval_code.to_s.length > 6 - return false if !@reason_code.nil? && @reason_code.to_s.length > 50 - true - end - - # Custom attribute writer method with validation - # @param [Object] approval_code Value to be assigned - def approval_code=(approval_code) - if !approval_code.nil? && approval_code.to_s.length > 6 - fail ArgumentError, 'invalid value for "approval_code", the character length must be smaller than or equal to 6.' - end - - @approval_code = approval_code - end - - # Custom attribute writer method with validation - # @param [Object] reason_code Value to be assigned - def reason_code=(reason_code) - if !reason_code.nil? && reason_code.to_s.length > 50 - fail ArgumentError, 'invalid value for "reason_code", the character length must be smaller than or equal to 50.' - end - - @reason_code = reason_code - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - approval_code == o.approval_code && - reason_code == o.reason_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [approval_code, reason_code].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_1_processor_information.rb b/lib/cybersource_rest_client/models/inline_response_201_1_processor_information.rb deleted file mode 100644 index bf979339..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_1_processor_information.rb +++ /dev/null @@ -1,324 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2011ProcessorInformation - # Processor transaction ID. This value identifies the transaction on a host system. This value is supported only for Moneris. It contains this information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003: - Terminal ID = 66012345 - Shift number = 001 - Batch number = 069 - Transaction number = 003 - attr_accessor :transaction_id - - # For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of the authorization. - attr_accessor :response_code - - # Processor-defined response category code. The associated detail error code is in the auth_auth_response field or the auth_reversal_auth_ response field depending on which service you requested. This field is supported only for: - Japanese issuers - Domestic transactions in Japan - Comercio Latino—processor transaction ID required for troubleshooting **Maximum length for processors**: - Comercio Latino: 32 - All other processors: 3 - attr_accessor :response_category_code - - # Name of the Japanese acquirer that processed the transaction. Returned only for CCS (CAFIS) and JCN Gateway. Please contact the CyberSource Japan Support Group for more information. - attr_accessor :forwarded_acquirer_code - - # Mastercard service that was used for the transaction. Mastercard provides this value to CyberSource. Possible value: - 53: Mastercard card-on-file token service - attr_accessor :master_card_service_code - - # Result of the Mastercard card-on-file token service. Mastercard provides this value to CyberSource. Possible values: - **C**: Service completed successfully. - **F**: One of the following: - Incorrect Mastercard POS entry mode. The Mastercard POS entry mode should be 81 for an authorization or authorization reversal. - Incorrect Mastercard POS entry mode. The Mastercard POS entry mode should be 01 for a tokenized request. - Token requestor ID is missing or formatted incorrectly. - **I**: One of the following: - Invalid token requestor ID. - Suspended or deactivated token. - Invalid token (not in mapping table). - **T**: Invalid combination of token requestor ID and token. - **U**: Expired token. - **W**: Primary account number (PAN) listed in electronic warning bulletin. Note This field is returned only for **CyberSource through VisaNet**. - attr_accessor :master_card_service_reply_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'transaction_id' => :'transactionId', - :'response_code' => :'responseCode', - :'response_category_code' => :'responseCategoryCode', - :'forwarded_acquirer_code' => :'forwardedAcquirerCode', - :'master_card_service_code' => :'masterCardServiceCode', - :'master_card_service_reply_code' => :'masterCardServiceReplyCode' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'transaction_id' => :'String', - :'response_code' => :'String', - :'response_category_code' => :'String', - :'forwarded_acquirer_code' => :'String', - :'master_card_service_code' => :'String', - :'master_card_service_reply_code' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'transactionId') - self.transaction_id = attributes[:'transactionId'] - end - - if attributes.has_key?(:'responseCode') - self.response_code = attributes[:'responseCode'] - end - - if attributes.has_key?(:'responseCategoryCode') - self.response_category_code = attributes[:'responseCategoryCode'] - end - - if attributes.has_key?(:'forwardedAcquirerCode') - self.forwarded_acquirer_code = attributes[:'forwardedAcquirerCode'] - end - - if attributes.has_key?(:'masterCardServiceCode') - self.master_card_service_code = attributes[:'masterCardServiceCode'] - end - - if attributes.has_key?(:'masterCardServiceReplyCode') - self.master_card_service_reply_code = attributes[:'masterCardServiceReplyCode'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@transaction_id.nil? && @transaction_id.to_s.length > 18 - invalid_properties.push('invalid value for "transaction_id", the character length must be smaller than or equal to 18.') - end - - if !@response_code.nil? && @response_code.to_s.length > 10 - invalid_properties.push('invalid value for "response_code", the character length must be smaller than or equal to 10.') - end - - if !@response_category_code.nil? && @response_category_code.to_s.length > 32 - invalid_properties.push('invalid value for "response_category_code", the character length must be smaller than or equal to 32.') - end - - if !@forwarded_acquirer_code.nil? && @forwarded_acquirer_code.to_s.length > 32 - invalid_properties.push('invalid value for "forwarded_acquirer_code", the character length must be smaller than or equal to 32.') - end - - if !@master_card_service_code.nil? && @master_card_service_code.to_s.length > 2 - invalid_properties.push('invalid value for "master_card_service_code", the character length must be smaller than or equal to 2.') - end - - if !@master_card_service_reply_code.nil? && @master_card_service_reply_code.to_s.length > 1 - invalid_properties.push('invalid value for "master_card_service_reply_code", the character length must be smaller than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@transaction_id.nil? && @transaction_id.to_s.length > 18 - return false if !@response_code.nil? && @response_code.to_s.length > 10 - return false if !@response_category_code.nil? && @response_category_code.to_s.length > 32 - return false if !@forwarded_acquirer_code.nil? && @forwarded_acquirer_code.to_s.length > 32 - return false if !@master_card_service_code.nil? && @master_card_service_code.to_s.length > 2 - return false if !@master_card_service_reply_code.nil? && @master_card_service_reply_code.to_s.length > 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] transaction_id Value to be assigned - def transaction_id=(transaction_id) - if !transaction_id.nil? && transaction_id.to_s.length > 18 - fail ArgumentError, 'invalid value for "transaction_id", the character length must be smaller than or equal to 18.' - end - - @transaction_id = transaction_id - end - - # Custom attribute writer method with validation - # @param [Object] response_code Value to be assigned - def response_code=(response_code) - if !response_code.nil? && response_code.to_s.length > 10 - fail ArgumentError, 'invalid value for "response_code", the character length must be smaller than or equal to 10.' - end - - @response_code = response_code - end - - # Custom attribute writer method with validation - # @param [Object] response_category_code Value to be assigned - def response_category_code=(response_category_code) - if !response_category_code.nil? && response_category_code.to_s.length > 32 - fail ArgumentError, 'invalid value for "response_category_code", the character length must be smaller than or equal to 32.' - end - - @response_category_code = response_category_code - end - - # Custom attribute writer method with validation - # @param [Object] forwarded_acquirer_code Value to be assigned - def forwarded_acquirer_code=(forwarded_acquirer_code) - if !forwarded_acquirer_code.nil? && forwarded_acquirer_code.to_s.length > 32 - fail ArgumentError, 'invalid value for "forwarded_acquirer_code", the character length must be smaller than or equal to 32.' - end - - @forwarded_acquirer_code = forwarded_acquirer_code - end - - # Custom attribute writer method with validation - # @param [Object] master_card_service_code Value to be assigned - def master_card_service_code=(master_card_service_code) - if !master_card_service_code.nil? && master_card_service_code.to_s.length > 2 - fail ArgumentError, 'invalid value for "master_card_service_code", the character length must be smaller than or equal to 2.' - end - - @master_card_service_code = master_card_service_code - end - - # Custom attribute writer method with validation - # @param [Object] master_card_service_reply_code Value to be assigned - def master_card_service_reply_code=(master_card_service_reply_code) - if !master_card_service_reply_code.nil? && master_card_service_reply_code.to_s.length > 1 - fail ArgumentError, 'invalid value for "master_card_service_reply_code", the character length must be smaller than or equal to 1.' - end - - @master_card_service_reply_code = master_card_service_reply_code - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - transaction_id == o.transaction_id && - response_code == o.response_code && - response_category_code == o.response_category_code && - forwarded_acquirer_code == o.forwarded_acquirer_code && - master_card_service_code == o.master_card_service_code && - master_card_service_reply_code == o.master_card_service_reply_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [transaction_id, response_code, response_category_code, forwarded_acquirer_code, master_card_service_code, master_card_service_reply_code].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_1_reversal_amount_details.rb b/lib/cybersource_rest_client/models/inline_response_201_1_reversal_amount_details.rb deleted file mode 100644 index 1ab89e0b..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_1_reversal_amount_details.rb +++ /dev/null @@ -1,249 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2011ReversalAmountDetails - # Total reversed amount. - attr_accessor :reversed_amount - - # Amount of the original transaction. - attr_accessor :original_transaction_amount - - # Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. - attr_accessor :currency - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'reversed_amount' => :'reversedAmount', - :'original_transaction_amount' => :'originalTransactionAmount', - :'currency' => :'currency' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'reversed_amount' => :'String', - :'original_transaction_amount' => :'String', - :'currency' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'reversedAmount') - self.reversed_amount = attributes[:'reversedAmount'] - end - - if attributes.has_key?(:'originalTransactionAmount') - self.original_transaction_amount = attributes[:'originalTransactionAmount'] - end - - if attributes.has_key?(:'currency') - self.currency = attributes[:'currency'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@reversed_amount.nil? && @reversed_amount.to_s.length > 15 - invalid_properties.push('invalid value for "reversed_amount", the character length must be smaller than or equal to 15.') - end - - if !@original_transaction_amount.nil? && @original_transaction_amount.to_s.length > 15 - invalid_properties.push('invalid value for "original_transaction_amount", the character length must be smaller than or equal to 15.') - end - - if !@currency.nil? && @currency.to_s.length > 3 - invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@reversed_amount.nil? && @reversed_amount.to_s.length > 15 - return false if !@original_transaction_amount.nil? && @original_transaction_amount.to_s.length > 15 - return false if !@currency.nil? && @currency.to_s.length > 3 - true - end - - # Custom attribute writer method with validation - # @param [Object] reversed_amount Value to be assigned - def reversed_amount=(reversed_amount) - if !reversed_amount.nil? && reversed_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "reversed_amount", the character length must be smaller than or equal to 15.' - end - - @reversed_amount = reversed_amount - end - - # Custom attribute writer method with validation - # @param [Object] original_transaction_amount Value to be assigned - def original_transaction_amount=(original_transaction_amount) - if !original_transaction_amount.nil? && original_transaction_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "original_transaction_amount", the character length must be smaller than or equal to 15.' - end - - @original_transaction_amount = original_transaction_amount - end - - # Custom attribute writer method with validation - # @param [Object] currency Value to be assigned - def currency=(currency) - if !currency.nil? && currency.to_s.length > 3 - fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.' - end - - @currency = currency - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - reversed_amount == o.reversed_amount && - original_transaction_amount == o.original_transaction_amount && - currency == o.currency - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [reversed_amount, original_transaction_amount, currency].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_2.rb b/lib/cybersource_rest_client/models/inline_response_201_2.rb deleted file mode 100644 index 456deba5..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_2.rb +++ /dev/null @@ -1,314 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2012 - attr_accessor :_links - - # An unique identification number assigned by CyberSource to identify the submitted request. - attr_accessor :id - - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - # The status of the submitted transaction. - attr_accessor :status - - # The reconciliation id for the submitted transaction. This value is not returned for all processors. - attr_accessor :reconciliation_id - - attr_accessor :client_reference_information - - attr_accessor :processor_information - - attr_accessor :order_information - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_links' => :'_links', - :'id' => :'id', - :'submit_time_utc' => :'submitTimeUtc', - :'status' => :'status', - :'reconciliation_id' => :'reconciliationId', - :'client_reference_information' => :'clientReferenceInformation', - :'processor_information' => :'processorInformation', - :'order_information' => :'orderInformation' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_links' => :'InlineResponse2012Links', - :'id' => :'String', - :'submit_time_utc' => :'String', - :'status' => :'String', - :'reconciliation_id' => :'String', - :'client_reference_information' => :'InlineResponse201ClientReferenceInformation', - :'processor_information' => :'InlineResponse2012ProcessorInformation', - :'order_information' => :'InlineResponse2012OrderInformation' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'_links') - self._links = attributes[:'_links'] - end - - if attributes.has_key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'reconciliationId') - self.reconciliation_id = attributes[:'reconciliationId'] - end - - if attributes.has_key?(:'clientReferenceInformation') - self.client_reference_information = attributes[:'clientReferenceInformation'] - end - - if attributes.has_key?(:'processorInformation') - self.processor_information = attributes[:'processorInformation'] - end - - if attributes.has_key?(:'orderInformation') - self.order_information = attributes[:'orderInformation'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@id.nil? && @id.to_s.length > 26 - invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') - end - - if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - invalid_properties.push('invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@id.nil? && @id.to_s.length > 26 - status_validator = EnumAttributeValidator.new('String', ['PENDING']) - return false unless status_validator.valid?(@status) - return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - true - end - - # Custom attribute writer method with validation - # @param [Object] id Value to be assigned - def id=(id) - if !id.nil? && id.to_s.length > 26 - fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' - end - - @id = id - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('String', ['PENDING']) - unless validator.valid?(status) - fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' - end - @status = status - end - - # Custom attribute writer method with validation - # @param [Object] reconciliation_id Value to be assigned - def reconciliation_id=(reconciliation_id) - if !reconciliation_id.nil? && reconciliation_id.to_s.length > 60 - fail ArgumentError, 'invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.' - end - - @reconciliation_id = reconciliation_id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _links == o._links && - id == o.id && - submit_time_utc == o.submit_time_utc && - status == o.status && - reconciliation_id == o.reconciliation_id && - client_reference_information == o.client_reference_information && - processor_information == o.processor_information && - order_information == o.order_information - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [_links, id, submit_time_utc, status, reconciliation_id, client_reference_information, processor_information, order_information].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_2__links.rb b/lib/cybersource_rest_client/models/inline_response_201_2__links.rb deleted file mode 100644 index 3b8bccae..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_2__links.rb +++ /dev/null @@ -1,201 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2012Links - attr_accessor :_self - - attr_accessor :void - - attr_accessor :refund - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_self' => :'self', - :'void' => :'void', - :'refund' => :'refund' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_self' => :'InlineResponse201LinksSelf', - :'void' => :'InlineResponse201LinksSelf', - :'refund' => :'InlineResponse201LinksSelf' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'self') - self._self = attributes[:'self'] - end - - if attributes.has_key?(:'void') - self.void = attributes[:'void'] - end - - if attributes.has_key?(:'refund') - self.refund = attributes[:'refund'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _self == o._self && - void == o.void && - refund == o.refund - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [_self, void, refund].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_2_order_information.rb b/lib/cybersource_rest_client/models/inline_response_201_2_order_information.rb deleted file mode 100644 index a6a5dd8b..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_2_order_information.rb +++ /dev/null @@ -1,192 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2012OrderInformation - attr_accessor :amount_details - - attr_accessor :invoice_details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'amount_details' => :'amountDetails', - :'invoice_details' => :'invoiceDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'amount_details' => :'InlineResponse2012OrderInformationAmountDetails', - :'invoice_details' => :'InlineResponse201OrderInformationInvoiceDetails' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'amountDetails') - self.amount_details = attributes[:'amountDetails'] - end - - if attributes.has_key?(:'invoiceDetails') - self.invoice_details = attributes[:'invoiceDetails'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - amount_details == o.amount_details && - invoice_details == o.invoice_details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [amount_details, invoice_details].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_2_order_information_amount_details.rb b/lib/cybersource_rest_client/models/inline_response_201_2_order_information_amount_details.rb deleted file mode 100644 index a927275c..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_2_order_information_amount_details.rb +++ /dev/null @@ -1,224 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2012OrderInformationAmountDetails - # Amount you requested for the capture. - attr_accessor :total_amount - - # Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. - attr_accessor :currency - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'total_amount' => :'totalAmount', - :'currency' => :'currency' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'total_amount' => :'String', - :'currency' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'totalAmount') - self.total_amount = attributes[:'totalAmount'] - end - - if attributes.has_key?(:'currency') - self.currency = attributes[:'currency'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@total_amount.nil? && @total_amount.to_s.length > 15 - invalid_properties.push('invalid value for "total_amount", the character length must be smaller than or equal to 15.') - end - - if !@currency.nil? && @currency.to_s.length > 3 - invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@total_amount.nil? && @total_amount.to_s.length > 15 - return false if !@currency.nil? && @currency.to_s.length > 3 - true - end - - # Custom attribute writer method with validation - # @param [Object] total_amount Value to be assigned - def total_amount=(total_amount) - if !total_amount.nil? && total_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "total_amount", the character length must be smaller than or equal to 15.' - end - - @total_amount = total_amount - end - - # Custom attribute writer method with validation - # @param [Object] currency Value to be assigned - def currency=(currency) - if !currency.nil? && currency.to_s.length > 3 - fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.' - end - - @currency = currency - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total_amount == o.total_amount && - currency == o.currency - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [total_amount, currency].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_2_processor_information.rb b/lib/cybersource_rest_client/models/inline_response_201_2_processor_information.rb deleted file mode 100644 index fa70bd1a..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_2_processor_information.rb +++ /dev/null @@ -1,199 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2012ProcessorInformation - # Processor transaction ID. This value identifies the transaction on a host system. This value is supported only for Moneris. It contains this information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003: - Terminal ID = 66012345 - Shift number = 001 - Batch number = 069 - Transaction number = 003 - attr_accessor :transaction_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'transaction_id' => :'transactionId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'transaction_id' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'transactionId') - self.transaction_id = attributes[:'transactionId'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@transaction_id.nil? && @transaction_id.to_s.length > 18 - invalid_properties.push('invalid value for "transaction_id", the character length must be smaller than or equal to 18.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@transaction_id.nil? && @transaction_id.to_s.length > 18 - true - end - - # Custom attribute writer method with validation - # @param [Object] transaction_id Value to be assigned - def transaction_id=(transaction_id) - if !transaction_id.nil? && transaction_id.to_s.length > 18 - fail ArgumentError, 'invalid value for "transaction_id", the character length must be smaller than or equal to 18.' - end - - @transaction_id = transaction_id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - transaction_id == o.transaction_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [transaction_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_3.rb b/lib/cybersource_rest_client/models/inline_response_201_3.rb deleted file mode 100644 index 2044324f..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_3.rb +++ /dev/null @@ -1,323 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2013 - attr_accessor :_links - - # An unique identification number assigned by CyberSource to identify the submitted request. - attr_accessor :id - - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - # The status of the submitted transaction. - attr_accessor :status - - # The reconciliation id for the submitted transaction. This value is not returned for all processors. - attr_accessor :reconciliation_id - - attr_accessor :client_reference_information - - attr_accessor :refund_amount_details - - attr_accessor :processor_information - - attr_accessor :order_information - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_links' => :'_links', - :'id' => :'id', - :'submit_time_utc' => :'submitTimeUtc', - :'status' => :'status', - :'reconciliation_id' => :'reconciliationId', - :'client_reference_information' => :'clientReferenceInformation', - :'refund_amount_details' => :'refundAmountDetails', - :'processor_information' => :'processorInformation', - :'order_information' => :'orderInformation' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_links' => :'InlineResponse2013Links', - :'id' => :'String', - :'submit_time_utc' => :'String', - :'status' => :'String', - :'reconciliation_id' => :'String', - :'client_reference_information' => :'InlineResponse201ClientReferenceInformation', - :'refund_amount_details' => :'InlineResponse2013RefundAmountDetails', - :'processor_information' => :'InlineResponse2013ProcessorInformation', - :'order_information' => :'InlineResponse2013OrderInformation' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'_links') - self._links = attributes[:'_links'] - end - - if attributes.has_key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'reconciliationId') - self.reconciliation_id = attributes[:'reconciliationId'] - end - - if attributes.has_key?(:'clientReferenceInformation') - self.client_reference_information = attributes[:'clientReferenceInformation'] - end - - if attributes.has_key?(:'refundAmountDetails') - self.refund_amount_details = attributes[:'refundAmountDetails'] - end - - if attributes.has_key?(:'processorInformation') - self.processor_information = attributes[:'processorInformation'] - end - - if attributes.has_key?(:'orderInformation') - self.order_information = attributes[:'orderInformation'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@id.nil? && @id.to_s.length > 26 - invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') - end - - if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - invalid_properties.push('invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@id.nil? && @id.to_s.length > 26 - status_validator = EnumAttributeValidator.new('String', ['PENDING']) - return false unless status_validator.valid?(@status) - return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - true - end - - # Custom attribute writer method with validation - # @param [Object] id Value to be assigned - def id=(id) - if !id.nil? && id.to_s.length > 26 - fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' - end - - @id = id - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('String', ['PENDING']) - unless validator.valid?(status) - fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' - end - @status = status - end - - # Custom attribute writer method with validation - # @param [Object] reconciliation_id Value to be assigned - def reconciliation_id=(reconciliation_id) - if !reconciliation_id.nil? && reconciliation_id.to_s.length > 60 - fail ArgumentError, 'invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.' - end - - @reconciliation_id = reconciliation_id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _links == o._links && - id == o.id && - submit_time_utc == o.submit_time_utc && - status == o.status && - reconciliation_id == o.reconciliation_id && - client_reference_information == o.client_reference_information && - refund_amount_details == o.refund_amount_details && - processor_information == o.processor_information && - order_information == o.order_information - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [_links, id, submit_time_utc, status, reconciliation_id, client_reference_information, refund_amount_details, processor_information, order_information].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_3__links.rb b/lib/cybersource_rest_client/models/inline_response_201_3__links.rb deleted file mode 100644 index af04438c..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_3__links.rb +++ /dev/null @@ -1,192 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2013Links - attr_accessor :_self - - attr_accessor :void - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_self' => :'self', - :'void' => :'void' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_self' => :'InlineResponse201LinksSelf', - :'void' => :'InlineResponse201LinksSelf' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'self') - self._self = attributes[:'self'] - end - - if attributes.has_key?(:'void') - self.void = attributes[:'void'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _self == o._self && - void == o.void - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [_self, void].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_3_order_information.rb b/lib/cybersource_rest_client/models/inline_response_201_3_order_information.rb deleted file mode 100644 index 323655c0..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_3_order_information.rb +++ /dev/null @@ -1,183 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2013OrderInformation - attr_accessor :invoice_details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'invoice_details' => :'invoiceDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'invoice_details' => :'InlineResponse201OrderInformationInvoiceDetails' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'invoiceDetails') - self.invoice_details = attributes[:'invoiceDetails'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - invoice_details == o.invoice_details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [invoice_details].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_3_processor_information.rb b/lib/cybersource_rest_client/models/inline_response_201_3_processor_information.rb deleted file mode 100644 index fa6eeb9d..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_3_processor_information.rb +++ /dev/null @@ -1,224 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2013ProcessorInformation - # Processor transaction ID. This value identifies the transaction on a host system. This value is supported only for Moneris. It contains this information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003: - Terminal ID = 66012345 - Shift number = 001 - Batch number = 069 - Transaction number = 003 - attr_accessor :transaction_id - - # Name of the Japanese acquirer that processed the transaction. Returned only for CCS (CAFIS) and JCN Gateway. Please contact the CyberSource Japan Support Group for more information. - attr_accessor :forwarded_acquirer_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'transaction_id' => :'transactionId', - :'forwarded_acquirer_code' => :'forwardedAcquirerCode' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'transaction_id' => :'String', - :'forwarded_acquirer_code' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'transactionId') - self.transaction_id = attributes[:'transactionId'] - end - - if attributes.has_key?(:'forwardedAcquirerCode') - self.forwarded_acquirer_code = attributes[:'forwardedAcquirerCode'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@transaction_id.nil? && @transaction_id.to_s.length > 18 - invalid_properties.push('invalid value for "transaction_id", the character length must be smaller than or equal to 18.') - end - - if !@forwarded_acquirer_code.nil? && @forwarded_acquirer_code.to_s.length > 32 - invalid_properties.push('invalid value for "forwarded_acquirer_code", the character length must be smaller than or equal to 32.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@transaction_id.nil? && @transaction_id.to_s.length > 18 - return false if !@forwarded_acquirer_code.nil? && @forwarded_acquirer_code.to_s.length > 32 - true - end - - # Custom attribute writer method with validation - # @param [Object] transaction_id Value to be assigned - def transaction_id=(transaction_id) - if !transaction_id.nil? && transaction_id.to_s.length > 18 - fail ArgumentError, 'invalid value for "transaction_id", the character length must be smaller than or equal to 18.' - end - - @transaction_id = transaction_id - end - - # Custom attribute writer method with validation - # @param [Object] forwarded_acquirer_code Value to be assigned - def forwarded_acquirer_code=(forwarded_acquirer_code) - if !forwarded_acquirer_code.nil? && forwarded_acquirer_code.to_s.length > 32 - fail ArgumentError, 'invalid value for "forwarded_acquirer_code", the character length must be smaller than or equal to 32.' - end - - @forwarded_acquirer_code = forwarded_acquirer_code - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - transaction_id == o.transaction_id && - forwarded_acquirer_code == o.forwarded_acquirer_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [transaction_id, forwarded_acquirer_code].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_3_refund_amount_details.rb b/lib/cybersource_rest_client/models/inline_response_201_3_refund_amount_details.rb deleted file mode 100644 index 915c1699..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_3_refund_amount_details.rb +++ /dev/null @@ -1,224 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2013RefundAmountDetails - # Total amount of the refund. - attr_accessor :refund_amount - - # Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. - attr_accessor :currency - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'refund_amount' => :'refundAmount', - :'currency' => :'currency' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'refund_amount' => :'String', - :'currency' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'refundAmount') - self.refund_amount = attributes[:'refundAmount'] - end - - if attributes.has_key?(:'currency') - self.currency = attributes[:'currency'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@refund_amount.nil? && @refund_amount.to_s.length > 15 - invalid_properties.push('invalid value for "refund_amount", the character length must be smaller than or equal to 15.') - end - - if !@currency.nil? && @currency.to_s.length > 3 - invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@refund_amount.nil? && @refund_amount.to_s.length > 15 - return false if !@currency.nil? && @currency.to_s.length > 3 - true - end - - # Custom attribute writer method with validation - # @param [Object] refund_amount Value to be assigned - def refund_amount=(refund_amount) - if !refund_amount.nil? && refund_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "refund_amount", the character length must be smaller than or equal to 15.' - end - - @refund_amount = refund_amount - end - - # Custom attribute writer method with validation - # @param [Object] currency Value to be assigned - def currency=(currency) - if !currency.nil? && currency.to_s.length > 3 - fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.' - end - - @currency = currency - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - refund_amount == o.refund_amount && - currency == o.currency - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [refund_amount, currency].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_4.rb b/lib/cybersource_rest_client/models/inline_response_201_4.rb deleted file mode 100644 index c9f92515..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_4.rb +++ /dev/null @@ -1,323 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2014 - attr_accessor :_links - - # An unique identification number assigned by CyberSource to identify the submitted request. - attr_accessor :id - - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - # The status of the submitted transaction. - attr_accessor :status - - # The reconciliation id for the submitted transaction. This value is not returned for all processors. - attr_accessor :reconciliation_id - - attr_accessor :client_reference_information - - attr_accessor :credit_amount_details - - attr_accessor :processor_information - - attr_accessor :order_information - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_links' => :'_links', - :'id' => :'id', - :'submit_time_utc' => :'submitTimeUtc', - :'status' => :'status', - :'reconciliation_id' => :'reconciliationId', - :'client_reference_information' => :'clientReferenceInformation', - :'credit_amount_details' => :'creditAmountDetails', - :'processor_information' => :'processorInformation', - :'order_information' => :'orderInformation' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_links' => :'InlineResponse2013Links', - :'id' => :'String', - :'submit_time_utc' => :'String', - :'status' => :'String', - :'reconciliation_id' => :'String', - :'client_reference_information' => :'InlineResponse201ClientReferenceInformation', - :'credit_amount_details' => :'InlineResponse2014CreditAmountDetails', - :'processor_information' => :'InlineResponse2013ProcessorInformation', - :'order_information' => :'InlineResponse2013OrderInformation' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'_links') - self._links = attributes[:'_links'] - end - - if attributes.has_key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'reconciliationId') - self.reconciliation_id = attributes[:'reconciliationId'] - end - - if attributes.has_key?(:'clientReferenceInformation') - self.client_reference_information = attributes[:'clientReferenceInformation'] - end - - if attributes.has_key?(:'creditAmountDetails') - self.credit_amount_details = attributes[:'creditAmountDetails'] - end - - if attributes.has_key?(:'processorInformation') - self.processor_information = attributes[:'processorInformation'] - end - - if attributes.has_key?(:'orderInformation') - self.order_information = attributes[:'orderInformation'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@id.nil? && @id.to_s.length > 26 - invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') - end - - if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - invalid_properties.push('invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@id.nil? && @id.to_s.length > 26 - status_validator = EnumAttributeValidator.new('String', ['PENDING']) - return false unless status_validator.valid?(@status) - return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - true - end - - # Custom attribute writer method with validation - # @param [Object] id Value to be assigned - def id=(id) - if !id.nil? && id.to_s.length > 26 - fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' - end - - @id = id - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('String', ['PENDING']) - unless validator.valid?(status) - fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' - end - @status = status - end - - # Custom attribute writer method with validation - # @param [Object] reconciliation_id Value to be assigned - def reconciliation_id=(reconciliation_id) - if !reconciliation_id.nil? && reconciliation_id.to_s.length > 60 - fail ArgumentError, 'invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.' - end - - @reconciliation_id = reconciliation_id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _links == o._links && - id == o.id && - submit_time_utc == o.submit_time_utc && - status == o.status && - reconciliation_id == o.reconciliation_id && - client_reference_information == o.client_reference_information && - credit_amount_details == o.credit_amount_details && - processor_information == o.processor_information && - order_information == o.order_information - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [_links, id, submit_time_utc, status, reconciliation_id, client_reference_information, credit_amount_details, processor_information, order_information].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_4_credit_amount_details.rb b/lib/cybersource_rest_client/models/inline_response_201_4_credit_amount_details.rb deleted file mode 100644 index 0691f6a8..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_4_credit_amount_details.rb +++ /dev/null @@ -1,224 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2014CreditAmountDetails - # Total amount of the credit. - attr_accessor :credit_amount - - # Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. - attr_accessor :currency - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'credit_amount' => :'creditAmount', - :'currency' => :'currency' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'credit_amount' => :'String', - :'currency' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'creditAmount') - self.credit_amount = attributes[:'creditAmount'] - end - - if attributes.has_key?(:'currency') - self.currency = attributes[:'currency'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@credit_amount.nil? && @credit_amount.to_s.length > 15 - invalid_properties.push('invalid value for "credit_amount", the character length must be smaller than or equal to 15.') - end - - if !@currency.nil? && @currency.to_s.length > 3 - invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@credit_amount.nil? && @credit_amount.to_s.length > 15 - return false if !@currency.nil? && @currency.to_s.length > 3 - true - end - - # Custom attribute writer method with validation - # @param [Object] credit_amount Value to be assigned - def credit_amount=(credit_amount) - if !credit_amount.nil? && credit_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "credit_amount", the character length must be smaller than or equal to 15.' - end - - @credit_amount = credit_amount - end - - # Custom attribute writer method with validation - # @param [Object] currency Value to be assigned - def currency=(currency) - if !currency.nil? && currency.to_s.length > 3 - fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.' - end - - @currency = currency - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - credit_amount == o.credit_amount && - currency == o.currency - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [credit_amount, currency].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_5.rb b/lib/cybersource_rest_client/models/inline_response_201_5.rb deleted file mode 100644 index 11f6a0ca..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_5.rb +++ /dev/null @@ -1,280 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2015 - attr_accessor :_links - - # An unique identification number assigned by CyberSource to identify the submitted request. - attr_accessor :id - - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - # The status of the submitted transaction. - attr_accessor :status - - attr_accessor :client_reference_information - - attr_accessor :void_amount_details - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_links' => :'_links', - :'id' => :'id', - :'submit_time_utc' => :'submitTimeUtc', - :'status' => :'status', - :'client_reference_information' => :'clientReferenceInformation', - :'void_amount_details' => :'voidAmountDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_links' => :'InlineResponse2011Links', - :'id' => :'String', - :'submit_time_utc' => :'String', - :'status' => :'String', - :'client_reference_information' => :'InlineResponse201ClientReferenceInformation', - :'void_amount_details' => :'InlineResponse2015VoidAmountDetails' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'_links') - self._links = attributes[:'_links'] - end - - if attributes.has_key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'clientReferenceInformation') - self.client_reference_information = attributes[:'clientReferenceInformation'] - end - - if attributes.has_key?(:'voidAmountDetails') - self.void_amount_details = attributes[:'voidAmountDetails'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@id.nil? && @id.to_s.length > 26 - invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@id.nil? && @id.to_s.length > 26 - status_validator = EnumAttributeValidator.new('String', ['VOIDED']) - return false unless status_validator.valid?(@status) - true - end - - # Custom attribute writer method with validation - # @param [Object] id Value to be assigned - def id=(id) - if !id.nil? && id.to_s.length > 26 - fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' - end - - @id = id - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('String', ['VOIDED']) - unless validator.valid?(status) - fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' - end - @status = status - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _links == o._links && - id == o.id && - submit_time_utc == o.submit_time_utc && - status == o.status && - client_reference_information == o.client_reference_information && - void_amount_details == o.void_amount_details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [_links, id, submit_time_utc, status, client_reference_information, void_amount_details].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_5_void_amount_details.rb b/lib/cybersource_rest_client/models/inline_response_201_5_void_amount_details.rb deleted file mode 100644 index 50ddc8ac..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_5_void_amount_details.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2015VoidAmountDetails - # Total amount of the void. - attr_accessor :void_amount - - # Amount of the original transaction. - attr_accessor :original_transaction_amount - - # Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. - attr_accessor :currency - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'void_amount' => :'voidAmount', - :'original_transaction_amount' => :'originalTransactionAmount', - :'currency' => :'currency' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'void_amount' => :'String', - :'original_transaction_amount' => :'String', - :'currency' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'voidAmount') - self.void_amount = attributes[:'voidAmount'] - end - - if attributes.has_key?(:'originalTransactionAmount') - self.original_transaction_amount = attributes[:'originalTransactionAmount'] - end - - if attributes.has_key?(:'currency') - self.currency = attributes[:'currency'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@currency.nil? && @currency.to_s.length > 3 - invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@currency.nil? && @currency.to_s.length > 3 - true - end - - # Custom attribute writer method with validation - # @param [Object] currency Value to be assigned - def currency=(currency) - if !currency.nil? && currency.to_s.length > 3 - fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.' - end - - @currency = currency - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - void_amount == o.void_amount && - original_transaction_amount == o.original_transaction_amount && - currency == o.currency - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [void_amount, original_transaction_amount, currency].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_6.rb b/lib/cybersource_rest_client/models/inline_response_201_6.rb deleted file mode 100644 index cf07e08a..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_6.rb +++ /dev/null @@ -1,331 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2016 - attr_accessor :_links - - # Unique identification number assigned by CyberSource to the submitted request. - attr_accessor :id - - # Describes type of token. For example: customer, paymentInstrument or instrumentIdentifier. - attr_accessor :object - - # Current state of the token. - attr_accessor :state - - attr_accessor :bank_account - - attr_accessor :card - - attr_accessor :buyer_information - - attr_accessor :bill_to - - attr_accessor :processing_information - - attr_accessor :merchant_information - - attr_accessor :meta_data - - attr_accessor :instrument_identifier - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_links' => :'_links', - :'id' => :'id', - :'object' => :'object', - :'state' => :'state', - :'bank_account' => :'bankAccount', - :'card' => :'card', - :'buyer_information' => :'buyerInformation', - :'bill_to' => :'billTo', - :'processing_information' => :'processingInformation', - :'merchant_information' => :'merchantInformation', - :'meta_data' => :'metaData', - :'instrument_identifier' => :'instrumentIdentifier' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_links' => :'Tmsv1instrumentidentifiersLinks', - :'id' => :'String', - :'object' => :'String', - :'state' => :'String', - :'bank_account' => :'Tmsv1paymentinstrumentsBankAccount', - :'card' => :'Tmsv1paymentinstrumentsCard', - :'buyer_information' => :'Tmsv1paymentinstrumentsBuyerInformation', - :'bill_to' => :'Tmsv1paymentinstrumentsBillTo', - :'processing_information' => :'Tmsv1paymentinstrumentsProcessingInformation', - :'merchant_information' => :'Tmsv1paymentinstrumentsMerchantInformation', - :'meta_data' => :'Tmsv1instrumentidentifiersMetadata', - :'instrument_identifier' => :'Tmsv1paymentinstrumentsInstrumentIdentifier' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'_links') - self._links = attributes[:'_links'] - end - - if attributes.has_key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.has_key?(:'object') - self.object = attributes[:'object'] - end - - if attributes.has_key?(:'state') - self.state = attributes[:'state'] - end - - if attributes.has_key?(:'bankAccount') - self.bank_account = attributes[:'bankAccount'] - end - - if attributes.has_key?(:'card') - self.card = attributes[:'card'] - end - - if attributes.has_key?(:'buyerInformation') - self.buyer_information = attributes[:'buyerInformation'] - end - - if attributes.has_key?(:'billTo') - self.bill_to = attributes[:'billTo'] - end - - if attributes.has_key?(:'processingInformation') - self.processing_information = attributes[:'processingInformation'] - end - - if attributes.has_key?(:'merchantInformation') - self.merchant_information = attributes[:'merchantInformation'] - end - - if attributes.has_key?(:'metaData') - self.meta_data = attributes[:'metaData'] - end - - if attributes.has_key?(:'instrumentIdentifier') - self.instrument_identifier = attributes[:'instrumentIdentifier'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - object_validator = EnumAttributeValidator.new('String', ['paymentInstrument']) - return false unless object_validator.valid?(@object) - state_validator = EnumAttributeValidator.new('String', ['ACTIVE', 'CLOSED']) - return false unless state_validator.valid?(@state) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] object Object to be assigned - def object=(object) - validator = EnumAttributeValidator.new('String', ['paymentInstrument']) - unless validator.valid?(object) - fail ArgumentError, 'invalid value for "object", must be one of #{validator.allowable_values}.' - end - @object = object - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] state Object to be assigned - def state=(state) - validator = EnumAttributeValidator.new('String', ['ACTIVE', 'CLOSED']) - unless validator.valid?(state) - fail ArgumentError, 'invalid value for "state", must be one of #{validator.allowable_values}.' - end - @state = state - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _links == o._links && - id == o.id && - object == o.object && - state == o.state && - bank_account == o.bank_account && - card == o.card && - buyer_information == o.buyer_information && - bill_to == o.bill_to && - processing_information == o.processing_information && - merchant_information == o.merchant_information && - meta_data == o.meta_data && - instrument_identifier == o.instrument_identifier - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [_links, id, object, state, bank_account, card, buyer_information, bill_to, processing_information, merchant_information, meta_data, instrument_identifier].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7.rb b/lib/cybersource_rest_client/models/inline_response_201_7.rb deleted file mode 100644 index ae7b08dd..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7.rb +++ /dev/null @@ -1,317 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017 - # An unique identification number assigned by CyberSource to identify the submitted request. - attr_accessor :id - - # save or not save. - attr_accessor :save - - # The description for this field is not available. - attr_accessor :name - - # Time Zone. - attr_accessor :timezone - - # transaction search query string. - attr_accessor :query - - # offset. - attr_accessor :offset - - # limit on number of results. - attr_accessor :limit - - # A comma separated list of the following form - fieldName1 asc or desc, fieldName2 asc or desc, etc. - attr_accessor :sort - - # Results for this page, this could be below the limit. - attr_accessor :count - - # total number of results. - attr_accessor :total_count - - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - attr_accessor :_embedded - - attr_accessor :_links - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id', - :'save' => :'save', - :'name' => :'name', - :'timezone' => :'timezone', - :'query' => :'query', - :'offset' => :'offset', - :'limit' => :'limit', - :'sort' => :'sort', - :'count' => :'count', - :'total_count' => :'totalCount', - :'submit_time_utc' => :'submitTimeUtc', - :'_embedded' => :'_embedded', - :'_links' => :'_links' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'id' => :'String', - :'save' => :'BOOLEAN', - :'name' => :'String', - :'timezone' => :'String', - :'query' => :'String', - :'offset' => :'Integer', - :'limit' => :'Integer', - :'sort' => :'String', - :'count' => :'Integer', - :'total_count' => :'Integer', - :'submit_time_utc' => :'String', - :'_embedded' => :'InlineResponse2017Embedded', - :'_links' => :'InlineResponse2011Links' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.has_key?(:'save') - self.save = attributes[:'save'] - end - - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.has_key?(:'timezone') - self.timezone = attributes[:'timezone'] - end - - if attributes.has_key?(:'query') - self.query = attributes[:'query'] - end - - if attributes.has_key?(:'offset') - self.offset = attributes[:'offset'] - end - - if attributes.has_key?(:'limit') - self.limit = attributes[:'limit'] - end - - if attributes.has_key?(:'sort') - self.sort = attributes[:'sort'] - end - - if attributes.has_key?(:'count') - self.count = attributes[:'count'] - end - - if attributes.has_key?(:'totalCount') - self.total_count = attributes[:'totalCount'] - end - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - - if attributes.has_key?(:'_embedded') - self._embedded = attributes[:'_embedded'] - end - - if attributes.has_key?(:'_links') - self._links = attributes[:'_links'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@id.nil? && @id.to_s.length > 26 - invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@id.nil? && @id.to_s.length > 26 - true - end - - # Custom attribute writer method with validation - # @param [Object] id Value to be assigned - def id=(id) - if !id.nil? && id.to_s.length > 26 - fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' - end - - @id = id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - save == o.save && - name == o.name && - timezone == o.timezone && - query == o.query && - offset == o.offset && - limit == o.limit && - sort == o.sort && - count == o.count && - total_count == o.total_count && - submit_time_utc == o.submit_time_utc && - _embedded == o._embedded && - _links == o._links - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [id, save, name, timezone, query, offset, limit, sort, count, total_count, submit_time_utc, _embedded, _links].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded.rb deleted file mode 100644 index c821fc44..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded.rb +++ /dev/null @@ -1,186 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017Embedded - # transaction search summary - attr_accessor :transaction_summaries - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'transaction_summaries' => :'transactionSummaries' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'transaction_summaries' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'transactionSummaries') - if (value = attributes[:'transactionSummaries']).is_a?(Array) - self.transaction_summaries = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - transaction_summaries == o.transaction_summaries - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [transaction_summaries].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded__links.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded__links.rb deleted file mode 100644 index 23b88c93..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded__links.rb +++ /dev/null @@ -1,183 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedLinks - attr_accessor :transaction_detail - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'transaction_detail' => :'transactionDetail' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'transaction_detail' => :'InlineResponse201LinksSelf' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'transactionDetail') - self.transaction_detail = attributes[:'transactionDetail'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - transaction_detail == o.transaction_detail - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [transaction_detail].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_buyer_information.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_buyer_information.rb deleted file mode 100644 index 44e5f52d..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_buyer_information.rb +++ /dev/null @@ -1,199 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedBuyerInformation - # Your identifier for the customer. For processor-specific information, see the customer_account_id field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :merchant_customer_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'merchant_customer_id' => :'merchantCustomerId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'merchant_customer_id' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'merchantCustomerId') - self.merchant_customer_id = attributes[:'merchantCustomerId'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@merchant_customer_id.nil? && @merchant_customer_id.to_s.length > 100 - invalid_properties.push('invalid value for "merchant_customer_id", the character length must be smaller than or equal to 100.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@merchant_customer_id.nil? && @merchant_customer_id.to_s.length > 100 - true - end - - # Custom attribute writer method with validation - # @param [Object] merchant_customer_id Value to be assigned - def merchant_customer_id=(merchant_customer_id) - if !merchant_customer_id.nil? && merchant_customer_id.to_s.length > 100 - fail ArgumentError, 'invalid value for "merchant_customer_id", the character length must be smaller than or equal to 100.' - end - - @merchant_customer_id = merchant_customer_id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - merchant_customer_id == o.merchant_customer_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [merchant_customer_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_client_reference_information.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_client_reference_information.rb deleted file mode 100644 index b2a47679..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_client_reference_information.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedClientReferenceInformation - # Client-generated order reference or tracking number. CyberSource recommends that you send a unique value for each transaction so that you can perform meaningful searches for the transaction. - attr_accessor :code - - # The application name of client which is used to submit the request. - attr_accessor :application_name - - # The description for this field is not available. - attr_accessor :application_user - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'application_name' => :'applicationName', - :'application_user' => :'applicationUser' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'code' => :'String', - :'application_name' => :'String', - :'application_user' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.has_key?(:'applicationName') - self.application_name = attributes[:'applicationName'] - end - - if attributes.has_key?(:'applicationUser') - self.application_user = attributes[:'applicationUser'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@code.nil? && @code.to_s.length > 50 - invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 50.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@code.nil? && @code.to_s.length > 50 - true - end - - # Custom attribute writer method with validation - # @param [Object] code Value to be assigned - def code=(code) - if !code.nil? && code.to_s.length > 50 - fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 50.' - end - - @code = code - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - application_name == o.application_name && - application_user == o.application_user - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [code, application_name, application_user].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_consumer_authentication_information.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_consumer_authentication_information.rb deleted file mode 100644 index ae1c849f..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_consumer_authentication_information.rb +++ /dev/null @@ -1,209 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedConsumerAuthenticationInformation - # Transaction identifier. - attr_accessor :xid - - # Payer auth Transaction identifier. - attr_accessor :transaction_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'xid' => :'xid', - :'transaction_id' => :'transactionId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'xid' => :'String', - :'transaction_id' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'xid') - self.xid = attributes[:'xid'] - end - - if attributes.has_key?(:'transactionId') - self.transaction_id = attributes[:'transactionId'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@xid.nil? && @xid.to_s.length > 40 - invalid_properties.push('invalid value for "xid", the character length must be smaller than or equal to 40.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@xid.nil? && @xid.to_s.length > 40 - true - end - - # Custom attribute writer method with validation - # @param [Object] xid Value to be assigned - def xid=(xid) - if !xid.nil? && xid.to_s.length > 40 - fail ArgumentError, 'invalid value for "xid", the character length must be smaller than or equal to 40.' - end - - @xid = xid - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - xid == o.xid && - transaction_id == o.transaction_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [xid, transaction_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_device_information.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_device_information.rb deleted file mode 100644 index ec6195c5..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_device_information.rb +++ /dev/null @@ -1,199 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedDeviceInformation - # IP address of the customer. - attr_accessor :ip_address - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'ip_address' => :'ipAddress' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'ip_address' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'ipAddress') - self.ip_address = attributes[:'ipAddress'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@ip_address.nil? && @ip_address.to_s.length > 15 - invalid_properties.push('invalid value for "ip_address", the character length must be smaller than or equal to 15.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@ip_address.nil? && @ip_address.to_s.length > 15 - true - end - - # Custom attribute writer method with validation - # @param [Object] ip_address Value to be assigned - def ip_address=(ip_address) - if !ip_address.nil? && ip_address.to_s.length > 15 - fail ArgumentError, 'invalid value for "ip_address", the character length must be smaller than or equal to 15.' - end - - @ip_address = ip_address - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - ip_address == o.ip_address - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [ip_address].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_merchant_information.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_merchant_information.rb deleted file mode 100644 index c0132098..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_merchant_information.rb +++ /dev/null @@ -1,199 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedMerchantInformation - # An unique identification number assigned by CyberSource to identify the submitted request. - attr_accessor :reseller_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'reseller_id' => :'resellerId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'reseller_id' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'resellerId') - self.reseller_id = attributes[:'resellerId'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@reseller_id.nil? && @reseller_id.to_s.length > 26 - invalid_properties.push('invalid value for "reseller_id", the character length must be smaller than or equal to 26.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@reseller_id.nil? && @reseller_id.to_s.length > 26 - true - end - - # Custom attribute writer method with validation - # @param [Object] reseller_id Value to be assigned - def reseller_id=(reseller_id) - if !reseller_id.nil? && reseller_id.to_s.length > 26 - fail ArgumentError, 'invalid value for "reseller_id", the character length must be smaller than or equal to 26.' - end - - @reseller_id = reseller_id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - reseller_id == o.reseller_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [reseller_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_order_information.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_order_information.rb deleted file mode 100644 index a89161be..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_order_information.rb +++ /dev/null @@ -1,201 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedOrderInformation - attr_accessor :bill_to - - attr_accessor :ship_to - - attr_accessor :amount_details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'bill_to' => :'billTo', - :'ship_to' => :'shipTo', - :'amount_details' => :'amountDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'bill_to' => :'InlineResponse2017EmbeddedOrderInformationBillTo', - :'ship_to' => :'InlineResponse2017EmbeddedOrderInformationShipTo', - :'amount_details' => :'Ptsv2paymentsidreversalsReversalInformationAmountDetails' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'billTo') - self.bill_to = attributes[:'billTo'] - end - - if attributes.has_key?(:'shipTo') - self.ship_to = attributes[:'shipTo'] - end - - if attributes.has_key?(:'amountDetails') - self.amount_details = attributes[:'amountDetails'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - bill_to == o.bill_to && - ship_to == o.ship_to && - amount_details == o.amount_details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [bill_to, ship_to, amount_details].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_order_information_bill_to.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_order_information_bill_to.rb deleted file mode 100644 index 582d51e2..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_order_information_bill_to.rb +++ /dev/null @@ -1,299 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedOrderInformationBillTo - # Customer’s first name. This name must be the same as the name on the card. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the customer_firstname field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :first_name - - # Customer’s last name. This name must be the same as the name on the card. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the customer_lastname field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :last_name - - # Customer's email address, including the full domain name. For processor-specific information, see the customer_email field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :email - - # Country of the billing address. Use the two-character ISO Standard Country Codes. For processor-specific information, see the bill_country field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :country - - # Customer’s phone number. For Payouts: This field may be sent only for FDC Compass. CyberSource recommends that you include the country code when the order is from outside the U.S. For processor-specific information, see the customer_phone field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :phone_number - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'first_name' => :'firstName', - :'last_name' => :'lastName', - :'email' => :'email', - :'country' => :'country', - :'phone_number' => :'phoneNumber' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'first_name' => :'String', - :'last_name' => :'String', - :'email' => :'String', - :'country' => :'String', - :'phone_number' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'firstName') - self.first_name = attributes[:'firstName'] - end - - if attributes.has_key?(:'lastName') - self.last_name = attributes[:'lastName'] - end - - if attributes.has_key?(:'email') - self.email = attributes[:'email'] - end - - if attributes.has_key?(:'country') - self.country = attributes[:'country'] - end - - if attributes.has_key?(:'phoneNumber') - self.phone_number = attributes[:'phoneNumber'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@first_name.nil? && @first_name.to_s.length > 60 - invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 60.') - end - - if !@last_name.nil? && @last_name.to_s.length > 60 - invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 60.') - end - - if !@email.nil? && @email.to_s.length > 255 - invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 255.') - end - - if !@country.nil? && @country.to_s.length > 2 - invalid_properties.push('invalid value for "country", the character length must be smaller than or equal to 2.') - end - - if !@phone_number.nil? && @phone_number.to_s.length > 15 - invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 15.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@first_name.nil? && @first_name.to_s.length > 60 - return false if !@last_name.nil? && @last_name.to_s.length > 60 - return false if !@email.nil? && @email.to_s.length > 255 - return false if !@country.nil? && @country.to_s.length > 2 - return false if !@phone_number.nil? && @phone_number.to_s.length > 15 - true - end - - # Custom attribute writer method with validation - # @param [Object] first_name Value to be assigned - def first_name=(first_name) - if !first_name.nil? && first_name.to_s.length > 60 - fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 60.' - end - - @first_name = first_name - end - - # Custom attribute writer method with validation - # @param [Object] last_name Value to be assigned - def last_name=(last_name) - if !last_name.nil? && last_name.to_s.length > 60 - fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 60.' - end - - @last_name = last_name - end - - # Custom attribute writer method with validation - # @param [Object] email Value to be assigned - def email=(email) - if !email.nil? && email.to_s.length > 255 - fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 255.' - end - - @email = email - end - - # Custom attribute writer method with validation - # @param [Object] country Value to be assigned - def country=(country) - if !country.nil? && country.to_s.length > 2 - fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 2.' - end - - @country = country - end - - # Custom attribute writer method with validation - # @param [Object] phone_number Value to be assigned - def phone_number=(phone_number) - if !phone_number.nil? && phone_number.to_s.length > 15 - fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 15.' - end - - @phone_number = phone_number - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - first_name == o.first_name && - last_name == o.last_name && - email == o.email && - country == o.country && - phone_number == o.phone_number - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [first_name, last_name, email, country, phone_number].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_order_information_ship_to.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_order_information_ship_to.rb deleted file mode 100644 index c83fdb6e..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_order_information_ship_to.rb +++ /dev/null @@ -1,299 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedOrderInformationShipTo - # First name of the recipient. **Processor specific maximum length** - Litle: 25 - All other processors: 60 - attr_accessor :first_name - - # Last name of the recipient. **Processor specific maximum length** - Litle: 25 - All other processors: 60 - attr_accessor :last_name - - # First line of the shipping address. - attr_accessor :address1 - - # Country of the shipping address. Use the two character ISO Standard Country Codes. - attr_accessor :country - - # Phone number for the shipping address. - attr_accessor :phone_number - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'first_name' => :'firstName', - :'last_name' => :'lastName', - :'address1' => :'address1', - :'country' => :'country', - :'phone_number' => :'phoneNumber' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'first_name' => :'String', - :'last_name' => :'String', - :'address1' => :'String', - :'country' => :'String', - :'phone_number' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'firstName') - self.first_name = attributes[:'firstName'] - end - - if attributes.has_key?(:'lastName') - self.last_name = attributes[:'lastName'] - end - - if attributes.has_key?(:'address1') - self.address1 = attributes[:'address1'] - end - - if attributes.has_key?(:'country') - self.country = attributes[:'country'] - end - - if attributes.has_key?(:'phoneNumber') - self.phone_number = attributes[:'phoneNumber'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@first_name.nil? && @first_name.to_s.length > 60 - invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 60.') - end - - if !@last_name.nil? && @last_name.to_s.length > 60 - invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 60.') - end - - if !@address1.nil? && @address1.to_s.length > 60 - invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 60.') - end - - if !@country.nil? && @country.to_s.length > 2 - invalid_properties.push('invalid value for "country", the character length must be smaller than or equal to 2.') - end - - if !@phone_number.nil? && @phone_number.to_s.length > 15 - invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 15.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@first_name.nil? && @first_name.to_s.length > 60 - return false if !@last_name.nil? && @last_name.to_s.length > 60 - return false if !@address1.nil? && @address1.to_s.length > 60 - return false if !@country.nil? && @country.to_s.length > 2 - return false if !@phone_number.nil? && @phone_number.to_s.length > 15 - true - end - - # Custom attribute writer method with validation - # @param [Object] first_name Value to be assigned - def first_name=(first_name) - if !first_name.nil? && first_name.to_s.length > 60 - fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 60.' - end - - @first_name = first_name - end - - # Custom attribute writer method with validation - # @param [Object] last_name Value to be assigned - def last_name=(last_name) - if !last_name.nil? && last_name.to_s.length > 60 - fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 60.' - end - - @last_name = last_name - end - - # Custom attribute writer method with validation - # @param [Object] address1 Value to be assigned - def address1=(address1) - if !address1.nil? && address1.to_s.length > 60 - fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 60.' - end - - @address1 = address1 - end - - # Custom attribute writer method with validation - # @param [Object] country Value to be assigned - def country=(country) - if !country.nil? && country.to_s.length > 2 - fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 2.' - end - - @country = country - end - - # Custom attribute writer method with validation - # @param [Object] phone_number Value to be assigned - def phone_number=(phone_number) - if !phone_number.nil? && phone_number.to_s.length > 15 - fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 15.' - end - - @phone_number = phone_number - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - first_name == o.first_name && - last_name == o.last_name && - address1 == o.address1 && - country == o.country && - phone_number == o.phone_number - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [first_name, last_name, address1, country, phone_number].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_payment_information.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_payment_information.rb deleted file mode 100644 index d526b271..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_payment_information.rb +++ /dev/null @@ -1,201 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedPaymentInformation - attr_accessor :payment_method - - attr_accessor :customer - - attr_accessor :card - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'payment_method' => :'paymentMethod', - :'customer' => :'customer', - :'card' => :'card' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'payment_method' => :'InlineResponse2017EmbeddedPaymentInformationPaymentMethod', - :'customer' => :'Ptsv2paymentsPaymentInformationCustomer', - :'card' => :'InlineResponse2017EmbeddedPaymentInformationCard' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'paymentMethod') - self.payment_method = attributes[:'paymentMethod'] - end - - if attributes.has_key?(:'customer') - self.customer = attributes[:'customer'] - end - - if attributes.has_key?(:'card') - self.card = attributes[:'card'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - payment_method == o.payment_method && - customer == o.customer && - card == o.card - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [payment_method, customer, card].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_payment_information_card.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_payment_information_card.rb deleted file mode 100644 index be1483ff..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_payment_information_card.rb +++ /dev/null @@ -1,249 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedPaymentInformationCard - # Last four digits of the cardholder’s account number. This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. - attr_accessor :suffix - - # The description for this field is not available. - attr_accessor :prefix - - # Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover - attr_accessor :type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'suffix' => :'suffix', - :'prefix' => :'prefix', - :'type' => :'type' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'suffix' => :'String', - :'prefix' => :'String', - :'type' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'suffix') - self.suffix = attributes[:'suffix'] - end - - if attributes.has_key?(:'prefix') - self.prefix = attributes[:'prefix'] - end - - if attributes.has_key?(:'type') - self.type = attributes[:'type'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@suffix.nil? && @suffix.to_s.length > 4 - invalid_properties.push('invalid value for "suffix", the character length must be smaller than or equal to 4.') - end - - if !@prefix.nil? && @prefix.to_s.length > 6 - invalid_properties.push('invalid value for "prefix", the character length must be smaller than or equal to 6.') - end - - if !@type.nil? && @type.to_s.length > 3 - invalid_properties.push('invalid value for "type", the character length must be smaller than or equal to 3.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@suffix.nil? && @suffix.to_s.length > 4 - return false if !@prefix.nil? && @prefix.to_s.length > 6 - return false if !@type.nil? && @type.to_s.length > 3 - true - end - - # Custom attribute writer method with validation - # @param [Object] suffix Value to be assigned - def suffix=(suffix) - if !suffix.nil? && suffix.to_s.length > 4 - fail ArgumentError, 'invalid value for "suffix", the character length must be smaller than or equal to 4.' - end - - @suffix = suffix - end - - # Custom attribute writer method with validation - # @param [Object] prefix Value to be assigned - def prefix=(prefix) - if !prefix.nil? && prefix.to_s.length > 6 - fail ArgumentError, 'invalid value for "prefix", the character length must be smaller than or equal to 6.' - end - - @prefix = prefix - end - - # Custom attribute writer method with validation - # @param [Object] type Value to be assigned - def type=(type) - if !type.nil? && type.to_s.length > 3 - fail ArgumentError, 'invalid value for "type", the character length must be smaller than or equal to 3.' - end - - @type = type - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - suffix == o.suffix && - prefix == o.prefix && - type == o.type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [suffix, prefix, type].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_payment_information_payment_method.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_payment_information_payment_method.rb deleted file mode 100644 index e766d9de..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_payment_information_payment_method.rb +++ /dev/null @@ -1,184 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedPaymentInformationPaymentMethod - # The description for this field is not available. - attr_accessor :type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'type' => :'type' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'type' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'type') - self.type = attributes[:'type'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - type == o.type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [type].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_point_of_sale_information.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_point_of_sale_information.rb deleted file mode 100644 index 619fe569..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_point_of_sale_information.rb +++ /dev/null @@ -1,228 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedPointOfSaleInformation - # Identifier for the terminal at your retail location. You can define this value yourself, but consult the processor for requirements. For Payouts: This field is applicable for CtV. - attr_accessor :terminal_id - - # The description for this field is not available. - attr_accessor :terminal_serial_number - - # The description for this field is not available. - attr_accessor :device_id - - attr_accessor :partner - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'terminal_id' => :'terminalId', - :'terminal_serial_number' => :'terminalSerialNumber', - :'device_id' => :'deviceId', - :'partner' => :'partner' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'terminal_id' => :'String', - :'terminal_serial_number' => :'String', - :'device_id' => :'String', - :'partner' => :'InlineResponse2017EmbeddedPointOfSaleInformationPartner' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'terminalId') - self.terminal_id = attributes[:'terminalId'] - end - - if attributes.has_key?(:'terminalSerialNumber') - self.terminal_serial_number = attributes[:'terminalSerialNumber'] - end - - if attributes.has_key?(:'deviceId') - self.device_id = attributes[:'deviceId'] - end - - if attributes.has_key?(:'partner') - self.partner = attributes[:'partner'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@terminal_id.nil? && @terminal_id.to_s.length > 8 - invalid_properties.push('invalid value for "terminal_id", the character length must be smaller than or equal to 8.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@terminal_id.nil? && @terminal_id.to_s.length > 8 - true - end - - # Custom attribute writer method with validation - # @param [Object] terminal_id Value to be assigned - def terminal_id=(terminal_id) - if !terminal_id.nil? && terminal_id.to_s.length > 8 - fail ArgumentError, 'invalid value for "terminal_id", the character length must be smaller than or equal to 8.' - end - - @terminal_id = terminal_id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - terminal_id == o.terminal_id && - terminal_serial_number == o.terminal_serial_number && - device_id == o.device_id && - partner == o.partner - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [terminal_id, terminal_serial_number, device_id, partner].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_point_of_sale_information_partner.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_point_of_sale_information_partner.rb deleted file mode 100644 index 4c099681..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_point_of_sale_information_partner.rb +++ /dev/null @@ -1,199 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedPointOfSaleInformationPartner - # Network transaction identifier (TID). You can use this value to identify a specific transaction when you are discussing the transaction with your processor. Not all processors provide this value. - attr_accessor :original_transaction_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'original_transaction_id' => :'originalTransactionId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'original_transaction_id' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'originalTransactionId') - self.original_transaction_id = attributes[:'originalTransactionId'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@original_transaction_id.nil? && @original_transaction_id.to_s.length > 50 - invalid_properties.push('invalid value for "original_transaction_id", the character length must be smaller than or equal to 50.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@original_transaction_id.nil? && @original_transaction_id.to_s.length > 50 - true - end - - # Custom attribute writer method with validation - # @param [Object] original_transaction_id Value to be assigned - def original_transaction_id=(original_transaction_id) - if !original_transaction_id.nil? && original_transaction_id.to_s.length > 50 - fail ArgumentError, 'invalid value for "original_transaction_id", the character length must be smaller than or equal to 50.' - end - - @original_transaction_id = original_transaction_id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - original_transaction_id == o.original_transaction_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [original_transaction_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_processing_information.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_processing_information.rb deleted file mode 100644 index 05c8f345..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_processing_information.rb +++ /dev/null @@ -1,209 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedProcessingInformation - # Type of digital payment solution that is being used for the transaction. Possible Values: - **visacheckout**: Visa Checkout. - **001**: Apple Pay. - **005**: Masterpass. Required for Masterpass transactions on OmniPay Direct. - **006**: Android Pay. - **008**: Samsung Pay. - attr_accessor :payment_solution - - # The description for this field is not available. - attr_accessor :business_application_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'payment_solution' => :'paymentSolution', - :'business_application_id' => :'businessApplicationId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'payment_solution' => :'String', - :'business_application_id' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'paymentSolution') - self.payment_solution = attributes[:'paymentSolution'] - end - - if attributes.has_key?(:'businessApplicationId') - self.business_application_id = attributes[:'businessApplicationId'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@payment_solution.nil? && @payment_solution.to_s.length > 12 - invalid_properties.push('invalid value for "payment_solution", the character length must be smaller than or equal to 12.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@payment_solution.nil? && @payment_solution.to_s.length > 12 - true - end - - # Custom attribute writer method with validation - # @param [Object] payment_solution Value to be assigned - def payment_solution=(payment_solution) - if !payment_solution.nil? && payment_solution.to_s.length > 12 - fail ArgumentError, 'invalid value for "payment_solution", the character length must be smaller than or equal to 12.' - end - - @payment_solution = payment_solution - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - payment_solution == o.payment_solution && - business_application_id == o.business_application_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [payment_solution, business_application_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_processor_information.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_processor_information.rb deleted file mode 100644 index ae22f1cd..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_processor_information.rb +++ /dev/null @@ -1,183 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedProcessorInformation - attr_accessor :processor - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'processor' => :'processor' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'processor' => :'InlineResponse20012ProcessorInformationProcessor' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'processor') - self.processor = attributes[:'processor'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - processor == o.processor - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [processor].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_risk_information.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_risk_information.rb deleted file mode 100644 index ab61c50a..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_risk_information.rb +++ /dev/null @@ -1,183 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedRiskInformation - attr_accessor :providers - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'providers' => :'providers' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'providers' => :'InlineResponse2017EmbeddedRiskInformationProviders' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'providers') - self.providers = attributes[:'providers'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - providers == o.providers - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [providers].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_risk_information_providers.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_risk_information_providers.rb deleted file mode 100644 index 21b18c31..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_risk_information_providers.rb +++ /dev/null @@ -1,183 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedRiskInformationProviders - attr_accessor :fingerprint - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'fingerprint' => :'fingerprint' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'fingerprint' => :'InlineResponse2017EmbeddedRiskInformationProvidersFingerprint' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'fingerprint') - self.fingerprint = attributes[:'fingerprint'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - fingerprint == o.fingerprint - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [fingerprint].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_risk_information_providers_fingerprint.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_risk_information_providers_fingerprint.rb deleted file mode 100644 index 6dbc2ee8..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_risk_information_providers_fingerprint.rb +++ /dev/null @@ -1,249 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedRiskInformationProvidersFingerprint - # The description for this field is not available. - attr_accessor :true_ipaddress - - # The description for this field is not available. - attr_accessor :hash - - # The description for this field is not available. - attr_accessor :smart_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'true_ipaddress' => :'true_ipaddress', - :'hash' => :'hash', - :'smart_id' => :'smartId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'true_ipaddress' => :'String', - :'hash' => :'String', - :'smart_id' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'true_ipaddress') - self.true_ipaddress = attributes[:'true_ipaddress'] - end - - if attributes.has_key?(:'hash') - self.hash = attributes[:'hash'] - end - - if attributes.has_key?(:'smartId') - self.smart_id = attributes[:'smartId'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@true_ipaddress.nil? && @true_ipaddress.to_s.length > 255 - invalid_properties.push('invalid value for "true_ipaddress", the character length must be smaller than or equal to 255.') - end - - if !@hash.nil? && @hash.to_s.length > 255 - invalid_properties.push('invalid value for "hash", the character length must be smaller than or equal to 255.') - end - - if !@smart_id.nil? && @smart_id.to_s.length > 255 - invalid_properties.push('invalid value for "smart_id", the character length must be smaller than or equal to 255.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@true_ipaddress.nil? && @true_ipaddress.to_s.length > 255 - return false if !@hash.nil? && @hash.to_s.length > 255 - return false if !@smart_id.nil? && @smart_id.to_s.length > 255 - true - end - - # Custom attribute writer method with validation - # @param [Object] true_ipaddress Value to be assigned - def true_ipaddress=(true_ipaddress) - if !true_ipaddress.nil? && true_ipaddress.to_s.length > 255 - fail ArgumentError, 'invalid value for "true_ipaddress", the character length must be smaller than or equal to 255.' - end - - @true_ipaddress = true_ipaddress - end - - # Custom attribute writer method with validation - # @param [Object] hash Value to be assigned - def hash=(hash) - if !hash.nil? && hash.to_s.length > 255 - fail ArgumentError, 'invalid value for "hash", the character length must be smaller than or equal to 255.' - end - - @hash = hash - end - - # Custom attribute writer method with validation - # @param [Object] smart_id Value to be assigned - def smart_id=(smart_id) - if !smart_id.nil? && smart_id.to_s.length > 255 - fail ArgumentError, 'invalid value for "smart_id", the character length must be smaller than or equal to 255.' - end - - @smart_id = smart_id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - true_ipaddress == o.true_ipaddress && - hash == o.hash && - smart_id == o.smart_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [true_ipaddress, hash, smart_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_transaction_summaries.rb b/lib/cybersource_rest_client/models/inline_response_201_7__embedded_transaction_summaries.rb deleted file mode 100644 index a95ac0a3..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_7__embedded_transaction_summaries.rb +++ /dev/null @@ -1,357 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2017EmbeddedTransactionSummaries - # An unique identification number assigned by CyberSource to identify the submitted request. - attr_accessor :id - - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - # The description for this field is not available. - attr_accessor :merchant_id - - attr_accessor :application_information - - attr_accessor :buyer_information - - attr_accessor :client_reference_information - - attr_accessor :consumer_authentication_information - - attr_accessor :device_information - - attr_accessor :fraud_marking_information - - # The description for this field is not available. - attr_accessor :merchant_defined_information - - attr_accessor :merchant_information - - attr_accessor :order_information - - attr_accessor :payment_information - - attr_accessor :processing_information - - attr_accessor :processor_information - - attr_accessor :point_of_sale_information - - attr_accessor :risk_information - - attr_accessor :_links - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id', - :'submit_time_utc' => :'submitTimeUtc', - :'merchant_id' => :'merchantId', - :'application_information' => :'applicationInformation', - :'buyer_information' => :'buyerInformation', - :'client_reference_information' => :'clientReferenceInformation', - :'consumer_authentication_information' => :'consumerAuthenticationInformation', - :'device_information' => :'deviceInformation', - :'fraud_marking_information' => :'fraudMarkingInformation', - :'merchant_defined_information' => :'merchantDefinedInformation', - :'merchant_information' => :'merchantInformation', - :'order_information' => :'orderInformation', - :'payment_information' => :'paymentInformation', - :'processing_information' => :'processingInformation', - :'processor_information' => :'processorInformation', - :'point_of_sale_information' => :'pointOfSaleInformation', - :'risk_information' => :'riskInformation', - :'_links' => :'_links' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'id' => :'String', - :'submit_time_utc' => :'String', - :'merchant_id' => :'String', - :'application_information' => :'InlineResponse20012ApplicationInformation', - :'buyer_information' => :'InlineResponse2017EmbeddedBuyerInformation', - :'client_reference_information' => :'InlineResponse2017EmbeddedClientReferenceInformation', - :'consumer_authentication_information' => :'InlineResponse2017EmbeddedConsumerAuthenticationInformation', - :'device_information' => :'InlineResponse2017EmbeddedDeviceInformation', - :'fraud_marking_information' => :'InlineResponse20012FraudMarkingInformation', - :'merchant_defined_information' => :'Array', - :'merchant_information' => :'InlineResponse2017EmbeddedMerchantInformation', - :'order_information' => :'InlineResponse2017EmbeddedOrderInformation', - :'payment_information' => :'InlineResponse2017EmbeddedPaymentInformation', - :'processing_information' => :'InlineResponse2017EmbeddedProcessingInformation', - :'processor_information' => :'InlineResponse2017EmbeddedProcessorInformation', - :'point_of_sale_information' => :'InlineResponse2017EmbeddedPointOfSaleInformation', - :'risk_information' => :'InlineResponse2017EmbeddedRiskInformation', - :'_links' => :'InlineResponse2017EmbeddedLinks' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - - if attributes.has_key?(:'merchantId') - self.merchant_id = attributes[:'merchantId'] - end - - if attributes.has_key?(:'applicationInformation') - self.application_information = attributes[:'applicationInformation'] - end - - if attributes.has_key?(:'buyerInformation') - self.buyer_information = attributes[:'buyerInformation'] - end - - if attributes.has_key?(:'clientReferenceInformation') - self.client_reference_information = attributes[:'clientReferenceInformation'] - end - - if attributes.has_key?(:'consumerAuthenticationInformation') - self.consumer_authentication_information = attributes[:'consumerAuthenticationInformation'] - end - - if attributes.has_key?(:'deviceInformation') - self.device_information = attributes[:'deviceInformation'] - end - - if attributes.has_key?(:'fraudMarkingInformation') - self.fraud_marking_information = attributes[:'fraudMarkingInformation'] - end - - if attributes.has_key?(:'merchantDefinedInformation') - if (value = attributes[:'merchantDefinedInformation']).is_a?(Array) - self.merchant_defined_information = value - end - end - - if attributes.has_key?(:'merchantInformation') - self.merchant_information = attributes[:'merchantInformation'] - end - - if attributes.has_key?(:'orderInformation') - self.order_information = attributes[:'orderInformation'] - end - - if attributes.has_key?(:'paymentInformation') - self.payment_information = attributes[:'paymentInformation'] - end - - if attributes.has_key?(:'processingInformation') - self.processing_information = attributes[:'processingInformation'] - end - - if attributes.has_key?(:'processorInformation') - self.processor_information = attributes[:'processorInformation'] - end - - if attributes.has_key?(:'pointOfSaleInformation') - self.point_of_sale_information = attributes[:'pointOfSaleInformation'] - end - - if attributes.has_key?(:'riskInformation') - self.risk_information = attributes[:'riskInformation'] - end - - if attributes.has_key?(:'_links') - self._links = attributes[:'_links'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@id.nil? && @id.to_s.length > 26 - invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@id.nil? && @id.to_s.length > 26 - true - end - - # Custom attribute writer method with validation - # @param [Object] id Value to be assigned - def id=(id) - if !id.nil? && id.to_s.length > 26 - fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' - end - - @id = id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - submit_time_utc == o.submit_time_utc && - merchant_id == o.merchant_id && - application_information == o.application_information && - buyer_information == o.buyer_information && - client_reference_information == o.client_reference_information && - consumer_authentication_information == o.consumer_authentication_information && - device_information == o.device_information && - fraud_marking_information == o.fraud_marking_information && - merchant_defined_information == o.merchant_defined_information && - merchant_information == o.merchant_information && - order_information == o.order_information && - payment_information == o.payment_information && - processing_information == o.processing_information && - processor_information == o.processor_information && - point_of_sale_information == o.point_of_sale_information && - risk_information == o.risk_information && - _links == o._links - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [id, submit_time_utc, merchant_id, application_information, buyer_information, client_reference_information, consumer_authentication_information, device_information, fraud_marking_information, merchant_defined_information, merchant_information, order_information, payment_information, processing_information, processor_information, point_of_sale_information, risk_information, _links].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201__links.rb b/lib/cybersource_rest_client/models/inline_response_201__links.rb deleted file mode 100644 index 82a94cca..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201__links.rb +++ /dev/null @@ -1,201 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201Links - attr_accessor :_self - - attr_accessor :reversal - - attr_accessor :capture - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_self' => :'self', - :'reversal' => :'reversal', - :'capture' => :'capture' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_self' => :'InlineResponse201LinksSelf', - :'reversal' => :'InlineResponse201LinksSelf', - :'capture' => :'InlineResponse201LinksSelf' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'self') - self._self = attributes[:'self'] - end - - if attributes.has_key?(:'reversal') - self.reversal = attributes[:'reversal'] - end - - if attributes.has_key?(:'capture') - self.capture = attributes[:'capture'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _self == o._self && - reversal == o.reversal && - capture == o.capture - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [_self, reversal, capture].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201__links_self.rb b/lib/cybersource_rest_client/models/inline_response_201__links_self.rb deleted file mode 100644 index 51ebae33..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201__links_self.rb +++ /dev/null @@ -1,194 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201LinksSelf - # URL - attr_accessor :href - - # HTTP method applied to above URL - attr_accessor :method - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'href' => :'href', - :'method' => :'method' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'href' => :'String', - :'method' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'href') - self.href = attributes[:'href'] - end - - if attributes.has_key?(:'method') - self.method = attributes[:'method'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - href == o.href && - method == o.method - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [href, method].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_client_reference_information.rb b/lib/cybersource_rest_client/models/inline_response_201_client_reference_information.rb deleted file mode 100644 index 93523c87..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_client_reference_information.rb +++ /dev/null @@ -1,199 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201ClientReferenceInformation - # Client-generated order reference or tracking number. CyberSource recommends that you send a unique value for each transaction so that you can perform meaningful searches for the transaction. - attr_accessor :code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'code' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'code') - self.code = attributes[:'code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@code.nil? && @code.to_s.length > 50 - invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 50.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@code.nil? && @code.to_s.length > 50 - true - end - - # Custom attribute writer method with validation - # @param [Object] code Value to be assigned - def code=(code) - if !code.nil? && code.to_s.length > 50 - fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 50.' - end - - @code = code - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [code].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_error_information.rb b/lib/cybersource_rest_client/models/inline_response_201_error_information.rb deleted file mode 100644 index 68b98bea..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_error_information.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201ErrorInformation - # The reason of the status. - attr_accessor :reason - - # The detail message related to the status and reason listed above. - attr_accessor :message - - attr_accessor :details - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'reason' => :'reason', - :'message' => :'message', - :'details' => :'details' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'reason' => :'String', - :'message' => :'String', - :'details' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'reason') - self.reason = attributes[:'reason'] - end - - if attributes.has_key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.has_key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - reason_validator = EnumAttributeValidator.new('String', ['AVS_FAILED', 'CONTACT_PROCESSOR', 'CV_FAILED', 'EXPIRED_CARD', 'PROCESSOR_DECLINED', 'INSUFFICIENT_FUND', 'STOLEN_LOST_CARD', 'ISSUER_UNAVAILABLE', 'UNAUTHORIZED_CARD', 'CVN_NOT_MATCH', 'EXCEEDS_CREDIT_LIMIT', 'INVALID_CVN', 'PAYMENT_REFUSED', 'INVALID_ACCOUNT', 'GENERAL_DECLINE']) - return false unless reason_validator.valid?(@reason) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] reason Object to be assigned - def reason=(reason) - validator = EnumAttributeValidator.new('String', ['AVS_FAILED', 'CONTACT_PROCESSOR', 'CV_FAILED', 'EXPIRED_CARD', 'PROCESSOR_DECLINED', 'INSUFFICIENT_FUND', 'STOLEN_LOST_CARD', 'ISSUER_UNAVAILABLE', 'UNAUTHORIZED_CARD', 'CVN_NOT_MATCH', 'EXCEEDS_CREDIT_LIMIT', 'INVALID_CVN', 'PAYMENT_REFUSED', 'INVALID_ACCOUNT', 'GENERAL_DECLINE']) - unless validator.valid?(reason) - fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' - end - @reason = reason - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - reason == o.reason && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [reason, message, details].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_error_information_details.rb b/lib/cybersource_rest_client/models/inline_response_201_error_information_details.rb deleted file mode 100644 index 797a40c3..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_error_information_details.rb +++ /dev/null @@ -1,228 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201ErrorInformationDetails - # This is the flattened JSON object field name/path that is either missing or invalid. - attr_accessor :field - - # Possible reasons for the error. - attr_accessor :reason - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'field' => :'field', - :'reason' => :'reason' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'field' => :'String', - :'reason' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'field') - self.field = attributes[:'field'] - end - - if attributes.has_key?(:'reason') - self.reason = attributes[:'reason'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - reason_validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA']) - return false unless reason_validator.valid?(@reason) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] reason Object to be assigned - def reason=(reason) - validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA']) - unless validator.valid?(reason) - fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' - end - @reason = reason - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - field == o.field && - reason == o.reason - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [field, reason].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_order_information.rb b/lib/cybersource_rest_client/models/inline_response_201_order_information.rb deleted file mode 100644 index 919ae3d6..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_order_information.rb +++ /dev/null @@ -1,192 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201OrderInformation - attr_accessor :amount_details - - attr_accessor :invoice_details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'amount_details' => :'amountDetails', - :'invoice_details' => :'invoiceDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'amount_details' => :'InlineResponse201OrderInformationAmountDetails', - :'invoice_details' => :'InlineResponse201OrderInformationInvoiceDetails' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'amountDetails') - self.amount_details = attributes[:'amountDetails'] - end - - if attributes.has_key?(:'invoiceDetails') - self.invoice_details = attributes[:'invoiceDetails'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - amount_details == o.amount_details && - invoice_details == o.invoice_details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [amount_details, invoice_details].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_order_information_amount_details.rb b/lib/cybersource_rest_client/models/inline_response_201_order_information_amount_details.rb deleted file mode 100644 index 55019fec..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_order_information_amount_details.rb +++ /dev/null @@ -1,249 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201OrderInformationAmountDetails - # Amount you requested for the payment or capture. This value is returned for partial authorizations. - attr_accessor :total_amount - - # Amount that was authorized. - attr_accessor :authorized_amount - - # Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. - attr_accessor :currency - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'total_amount' => :'totalAmount', - :'authorized_amount' => :'authorizedAmount', - :'currency' => :'currency' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'total_amount' => :'String', - :'authorized_amount' => :'String', - :'currency' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'totalAmount') - self.total_amount = attributes[:'totalAmount'] - end - - if attributes.has_key?(:'authorizedAmount') - self.authorized_amount = attributes[:'authorizedAmount'] - end - - if attributes.has_key?(:'currency') - self.currency = attributes[:'currency'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@total_amount.nil? && @total_amount.to_s.length > 15 - invalid_properties.push('invalid value for "total_amount", the character length must be smaller than or equal to 15.') - end - - if !@authorized_amount.nil? && @authorized_amount.to_s.length > 15 - invalid_properties.push('invalid value for "authorized_amount", the character length must be smaller than or equal to 15.') - end - - if !@currency.nil? && @currency.to_s.length > 3 - invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@total_amount.nil? && @total_amount.to_s.length > 15 - return false if !@authorized_amount.nil? && @authorized_amount.to_s.length > 15 - return false if !@currency.nil? && @currency.to_s.length > 3 - true - end - - # Custom attribute writer method with validation - # @param [Object] total_amount Value to be assigned - def total_amount=(total_amount) - if !total_amount.nil? && total_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "total_amount", the character length must be smaller than or equal to 15.' - end - - @total_amount = total_amount - end - - # Custom attribute writer method with validation - # @param [Object] authorized_amount Value to be assigned - def authorized_amount=(authorized_amount) - if !authorized_amount.nil? && authorized_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "authorized_amount", the character length must be smaller than or equal to 15.' - end - - @authorized_amount = authorized_amount - end - - # Custom attribute writer method with validation - # @param [Object] currency Value to be assigned - def currency=(currency) - if !currency.nil? && currency.to_s.length > 3 - fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.' - end - - @currency = currency - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total_amount == o.total_amount && - authorized_amount == o.authorized_amount && - currency == o.currency - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [total_amount, authorized_amount, currency].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_order_information_invoice_details.rb b/lib/cybersource_rest_client/models/inline_response_201_order_information_invoice_details.rb deleted file mode 100644 index 1c94bca0..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_order_information_invoice_details.rb +++ /dev/null @@ -1,184 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201OrderInformationInvoiceDetails - # Indicates whether CyberSource sent the Level III information to the processor. The possible values are: If your account is not enabled for Level III data or if you did not include the purchasing level field in your request, CyberSource does not include the Level III data in the request sent to the processor. For processor-specific information, see the bill_purchasing_level3_enabled field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) - attr_accessor :level3_transmission_status - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'level3_transmission_status' => :'level3TransmissionStatus' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'level3_transmission_status' => :'BOOLEAN' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'level3TransmissionStatus') - self.level3_transmission_status = attributes[:'level3TransmissionStatus'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - level3_transmission_status == o.level3_transmission_status - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [level3_transmission_status].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_payment_information.rb b/lib/cybersource_rest_client/models/inline_response_201_payment_information.rb deleted file mode 100644 index 26777b42..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_payment_information.rb +++ /dev/null @@ -1,201 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201PaymentInformation - attr_accessor :card - - attr_accessor :tokenized_card - - attr_accessor :account_features - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'card' => :'card', - :'tokenized_card' => :'tokenizedCard', - :'account_features' => :'accountFeatures' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'card' => :'InlineResponse201PaymentInformationCard', - :'tokenized_card' => :'InlineResponse201PaymentInformationTokenizedCard', - :'account_features' => :'InlineResponse201PaymentInformationAccountFeatures' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'card') - self.card = attributes[:'card'] - end - - if attributes.has_key?(:'tokenizedCard') - self.tokenized_card = attributes[:'tokenizedCard'] - end - - if attributes.has_key?(:'accountFeatures') - self.account_features = attributes[:'accountFeatures'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - card == o.card && - tokenized_card == o.tokenized_card && - account_features == o.account_features - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [card, tokenized_card, account_features].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_payment_information_account_features.rb b/lib/cybersource_rest_client/models/inline_response_201_payment_information_account_features.rb deleted file mode 100644 index 2582ad61..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_payment_information_account_features.rb +++ /dev/null @@ -1,623 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201PaymentInformationAccountFeatures - # Type of account. This value is returned only if you requested a balance inquiry. Possible values: - **00**: Not applicable or not specified - **10**: Savings account - **20**: Checking account - **30**: Credit card account - **40**: Universal account - attr_accessor :account_type - - # Possible values: - **N**: Nonregulated - **R**: Regulated `Note` This field is returned only for CyberSource through VisaNet. - attr_accessor :account_status - - # Remaining balance on the account. - attr_accessor :balance_amount - - # Type of amount. This value is returned only if you requested a balance inquiry. The issuer determines the value that is returned. Possible values for deposit accounts: - **01**: Current ledger (posted) balance. - **02**: Current available balance, which is typically the ledger balance less outstanding authorizations. Some depository institutions also include pending deposits and the credit or overdraft line associated with the account. Possible values for credit card accounts: - **01**: Credit amount remaining for customer (open to buy). - **02**: Credit limit. - attr_accessor :balance_amount_type - - # Currency of the remaining balance on the account. For the possible values, see the ISO Standard Currency Codes. - attr_accessor :currency - - # Sign for the remaining balance on the account. Returned only when the processor returns this value. Possible values: - attr_accessor :balance_sign - - # **Chase Paymentech Solutions** Indicates whether a customer has high credit limits. This information enables you to market high cost items to these customers and to understand the kinds of cards that high income customers are using. This field is supported for Visa, Mastercard, Discover, and Diners Club. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown **Litle** Flag that indicates that a Visa cardholder or Mastercard cardholder is in one of the affluent categories. Possible values: - **AFFLUENT**: High income customer with high spending pattern (>100k USD annual income and >40k USD annual card usage). - **MASS AFFLUENT**: High income customer (>100k USD annual income). **Processor specific maximum length**: - Chase Paymentech Solutions: 1 - Litle: 13 - attr_accessor :affluence_indicator - - # **CyberSource through VisaNet** Visa product ID. **GPN** Visa or Mastercard product ID. **Litle** Type of card used in the transaction. The only possible value is: - PREPAID: Prepaid Card **RBS WorldPay Atlanta** Type of card used in the transaction. Possible values: - **B**: Business Card - **O**: Noncommercial Card - **R**: Corporate Card - **S**: Purchase Card - **Blank**: Purchase card not supported **Maximum length for processors**: - CyberSource through VisaNet: 3 - GPN: 3 - Litle: 7 - RBS WorldPay Atlanta: 1 - attr_accessor :category - - # Indicates whether the card is a commercial card, which enables you to include Level II data in your transaction requests. This field is supported for Visa and Mastercard on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown - attr_accessor :commercial - - # Type of commercial card. This field is supported only for CyberSource through VisaNet. Possible values: - **B**: Business card - **R**: Corporate card - **S**: Purchasing card - **0**: Noncommercial card - attr_accessor :group - - # Indicates whether the card is a healthcare card. This field is supported for Visa and Mastercard on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown - attr_accessor :health_care - - # Indicates whether the card is a payroll card. This field is supported for Visa, Discover, Diners Club, and JCB on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown - attr_accessor :payroll - - # Indicates whether the card is eligible for Level III interchange fees, which enables you to include Level III data in your transaction requests. This field is supported for Visa and Mastercard on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown - attr_accessor :level3_eligible - - # Indicates whether the card is a PINless debit card. This field is supported for Visa and Mastercard on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown - attr_accessor :pinless_debit - - # Indicates whether the card is a signature debit card. This information enables you to alter the way an order is processed. For example, you might not want to reauthorize a transaction for a signature debit card, or you might want to perform reversals promptly for a signature debit card. This field is supported for Visa, Mastercard, and Maestro (International) on Chase Paymentech Solutions. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown - attr_accessor :signature_debit - - # Indicates whether the card is a prepaid card. This information enables you to determine when a gift card or prepaid card is presented for use when establishing a new recurring, installment, or deferred billing relationship. This field is supported for Visa, Mastercard, Discover, Diners Club, and JCB on Chase Paymentech Solutions. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown - attr_accessor :prepaid - - # Indicates whether the card is regulated according to the Durbin Amendment. If the card is regulated, the card issuer is subject to price caps and interchange rules. This field is supported for Visa, Mastercard, Discover, Diners Club, and JCB on Chase Paymentech Solutions. Possible values: - **Y**: Yes (assets greater than 10B USD) - **N**: No (assets less than 10B USD) - **X**: Not applicable / Unknown - attr_accessor :regulated - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'account_type' => :'accountType', - :'account_status' => :'accountStatus', - :'balance_amount' => :'balanceAmount', - :'balance_amount_type' => :'balanceAmountType', - :'currency' => :'currency', - :'balance_sign' => :'balanceSign', - :'affluence_indicator' => :'affluenceIndicator', - :'category' => :'category', - :'commercial' => :'commercial', - :'group' => :'group', - :'health_care' => :'healthCare', - :'payroll' => :'payroll', - :'level3_eligible' => :'level3Eligible', - :'pinless_debit' => :'pinlessDebit', - :'signature_debit' => :'signatureDebit', - :'prepaid' => :'prepaid', - :'regulated' => :'regulated' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'account_type' => :'String', - :'account_status' => :'String', - :'balance_amount' => :'String', - :'balance_amount_type' => :'String', - :'currency' => :'String', - :'balance_sign' => :'String', - :'affluence_indicator' => :'String', - :'category' => :'String', - :'commercial' => :'String', - :'group' => :'String', - :'health_care' => :'String', - :'payroll' => :'String', - :'level3_eligible' => :'String', - :'pinless_debit' => :'String', - :'signature_debit' => :'String', - :'prepaid' => :'String', - :'regulated' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'accountType') - self.account_type = attributes[:'accountType'] - end - - if attributes.has_key?(:'accountStatus') - self.account_status = attributes[:'accountStatus'] - end - - if attributes.has_key?(:'balanceAmount') - self.balance_amount = attributes[:'balanceAmount'] - end - - if attributes.has_key?(:'balanceAmountType') - self.balance_amount_type = attributes[:'balanceAmountType'] - end - - if attributes.has_key?(:'currency') - self.currency = attributes[:'currency'] - end - - if attributes.has_key?(:'balanceSign') - self.balance_sign = attributes[:'balanceSign'] - end - - if attributes.has_key?(:'affluenceIndicator') - self.affluence_indicator = attributes[:'affluenceIndicator'] - end - - if attributes.has_key?(:'category') - self.category = attributes[:'category'] - end - - if attributes.has_key?(:'commercial') - self.commercial = attributes[:'commercial'] - end - - if attributes.has_key?(:'group') - self.group = attributes[:'group'] - end - - if attributes.has_key?(:'healthCare') - self.health_care = attributes[:'healthCare'] - end - - if attributes.has_key?(:'payroll') - self.payroll = attributes[:'payroll'] - end - - if attributes.has_key?(:'level3Eligible') - self.level3_eligible = attributes[:'level3Eligible'] - end - - if attributes.has_key?(:'pinlessDebit') - self.pinless_debit = attributes[:'pinlessDebit'] - end - - if attributes.has_key?(:'signatureDebit') - self.signature_debit = attributes[:'signatureDebit'] - end - - if attributes.has_key?(:'prepaid') - self.prepaid = attributes[:'prepaid'] - end - - if attributes.has_key?(:'regulated') - self.regulated = attributes[:'regulated'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@account_type.nil? && @account_type.to_s.length > 2 - invalid_properties.push('invalid value for "account_type", the character length must be smaller than or equal to 2.') - end - - if !@account_status.nil? && @account_status.to_s.length > 1 - invalid_properties.push('invalid value for "account_status", the character length must be smaller than or equal to 1.') - end - - if !@balance_amount.nil? && @balance_amount.to_s.length > 12 - invalid_properties.push('invalid value for "balance_amount", the character length must be smaller than or equal to 12.') - end - - if !@balance_amount_type.nil? && @balance_amount_type.to_s.length > 2 - invalid_properties.push('invalid value for "balance_amount_type", the character length must be smaller than or equal to 2.') - end - - if !@currency.nil? && @currency.to_s.length > 5 - invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 5.') - end - - if !@balance_sign.nil? && @balance_sign.to_s.length > 1 - invalid_properties.push('invalid value for "balance_sign", the character length must be smaller than or equal to 1.') - end - - if !@affluence_indicator.nil? && @affluence_indicator.to_s.length > 13 - invalid_properties.push('invalid value for "affluence_indicator", the character length must be smaller than or equal to 13.') - end - - if !@category.nil? && @category.to_s.length > 7 - invalid_properties.push('invalid value for "category", the character length must be smaller than or equal to 7.') - end - - if !@commercial.nil? && @commercial.to_s.length > 1 - invalid_properties.push('invalid value for "commercial", the character length must be smaller than or equal to 1.') - end - - if !@group.nil? && @group.to_s.length > 1 - invalid_properties.push('invalid value for "group", the character length must be smaller than or equal to 1.') - end - - if !@health_care.nil? && @health_care.to_s.length > 1 - invalid_properties.push('invalid value for "health_care", the character length must be smaller than or equal to 1.') - end - - if !@payroll.nil? && @payroll.to_s.length > 1 - invalid_properties.push('invalid value for "payroll", the character length must be smaller than or equal to 1.') - end - - if !@level3_eligible.nil? && @level3_eligible.to_s.length > 1 - invalid_properties.push('invalid value for "level3_eligible", the character length must be smaller than or equal to 1.') - end - - if !@pinless_debit.nil? && @pinless_debit.to_s.length > 1 - invalid_properties.push('invalid value for "pinless_debit", the character length must be smaller than or equal to 1.') - end - - if !@signature_debit.nil? && @signature_debit.to_s.length > 1 - invalid_properties.push('invalid value for "signature_debit", the character length must be smaller than or equal to 1.') - end - - if !@prepaid.nil? && @prepaid.to_s.length > 1 - invalid_properties.push('invalid value for "prepaid", the character length must be smaller than or equal to 1.') - end - - if !@regulated.nil? && @regulated.to_s.length > 1 - invalid_properties.push('invalid value for "regulated", the character length must be smaller than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@account_type.nil? && @account_type.to_s.length > 2 - return false if !@account_status.nil? && @account_status.to_s.length > 1 - return false if !@balance_amount.nil? && @balance_amount.to_s.length > 12 - return false if !@balance_amount_type.nil? && @balance_amount_type.to_s.length > 2 - return false if !@currency.nil? && @currency.to_s.length > 5 - balance_sign_validator = EnumAttributeValidator.new('String', ['+', '-']) - return false unless balance_sign_validator.valid?(@balance_sign) - return false if !@balance_sign.nil? && @balance_sign.to_s.length > 1 - return false if !@affluence_indicator.nil? && @affluence_indicator.to_s.length > 13 - return false if !@category.nil? && @category.to_s.length > 7 - return false if !@commercial.nil? && @commercial.to_s.length > 1 - return false if !@group.nil? && @group.to_s.length > 1 - return false if !@health_care.nil? && @health_care.to_s.length > 1 - return false if !@payroll.nil? && @payroll.to_s.length > 1 - return false if !@level3_eligible.nil? && @level3_eligible.to_s.length > 1 - return false if !@pinless_debit.nil? && @pinless_debit.to_s.length > 1 - return false if !@signature_debit.nil? && @signature_debit.to_s.length > 1 - return false if !@prepaid.nil? && @prepaid.to_s.length > 1 - return false if !@regulated.nil? && @regulated.to_s.length > 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] account_type Value to be assigned - def account_type=(account_type) - if !account_type.nil? && account_type.to_s.length > 2 - fail ArgumentError, 'invalid value for "account_type", the character length must be smaller than or equal to 2.' - end - - @account_type = account_type - end - - # Custom attribute writer method with validation - # @param [Object] account_status Value to be assigned - def account_status=(account_status) - if !account_status.nil? && account_status.to_s.length > 1 - fail ArgumentError, 'invalid value for "account_status", the character length must be smaller than or equal to 1.' - end - - @account_status = account_status - end - - # Custom attribute writer method with validation - # @param [Object] balance_amount Value to be assigned - def balance_amount=(balance_amount) - if !balance_amount.nil? && balance_amount.to_s.length > 12 - fail ArgumentError, 'invalid value for "balance_amount", the character length must be smaller than or equal to 12.' - end - - @balance_amount = balance_amount - end - - # Custom attribute writer method with validation - # @param [Object] balance_amount_type Value to be assigned - def balance_amount_type=(balance_amount_type) - if !balance_amount_type.nil? && balance_amount_type.to_s.length > 2 - fail ArgumentError, 'invalid value for "balance_amount_type", the character length must be smaller than or equal to 2.' - end - - @balance_amount_type = balance_amount_type - end - - # Custom attribute writer method with validation - # @param [Object] currency Value to be assigned - def currency=(currency) - if !currency.nil? && currency.to_s.length > 5 - fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 5.' - end - - @currency = currency - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] balance_sign Object to be assigned - def balance_sign=(balance_sign) - validator = EnumAttributeValidator.new('String', ['+', '-']) - unless validator.valid?(balance_sign) - fail ArgumentError, 'invalid value for "balance_sign", must be one of #{validator.allowable_values}.' - end - @balance_sign = balance_sign - end - - # Custom attribute writer method with validation - # @param [Object] affluence_indicator Value to be assigned - def affluence_indicator=(affluence_indicator) - if !affluence_indicator.nil? && affluence_indicator.to_s.length > 13 - fail ArgumentError, 'invalid value for "affluence_indicator", the character length must be smaller than or equal to 13.' - end - - @affluence_indicator = affluence_indicator - end - - # Custom attribute writer method with validation - # @param [Object] category Value to be assigned - def category=(category) - if !category.nil? && category.to_s.length > 7 - fail ArgumentError, 'invalid value for "category", the character length must be smaller than or equal to 7.' - end - - @category = category - end - - # Custom attribute writer method with validation - # @param [Object] commercial Value to be assigned - def commercial=(commercial) - if !commercial.nil? && commercial.to_s.length > 1 - fail ArgumentError, 'invalid value for "commercial", the character length must be smaller than or equal to 1.' - end - - @commercial = commercial - end - - # Custom attribute writer method with validation - # @param [Object] group Value to be assigned - def group=(group) - if !group.nil? && group.to_s.length > 1 - fail ArgumentError, 'invalid value for "group", the character length must be smaller than or equal to 1.' - end - - @group = group - end - - # Custom attribute writer method with validation - # @param [Object] health_care Value to be assigned - def health_care=(health_care) - if !health_care.nil? && health_care.to_s.length > 1 - fail ArgumentError, 'invalid value for "health_care", the character length must be smaller than or equal to 1.' - end - - @health_care = health_care - end - - # Custom attribute writer method with validation - # @param [Object] payroll Value to be assigned - def payroll=(payroll) - if !payroll.nil? && payroll.to_s.length > 1 - fail ArgumentError, 'invalid value for "payroll", the character length must be smaller than or equal to 1.' - end - - @payroll = payroll - end - - # Custom attribute writer method with validation - # @param [Object] level3_eligible Value to be assigned - def level3_eligible=(level3_eligible) - if !level3_eligible.nil? && level3_eligible.to_s.length > 1 - fail ArgumentError, 'invalid value for "level3_eligible", the character length must be smaller than or equal to 1.' - end - - @level3_eligible = level3_eligible - end - - # Custom attribute writer method with validation - # @param [Object] pinless_debit Value to be assigned - def pinless_debit=(pinless_debit) - if !pinless_debit.nil? && pinless_debit.to_s.length > 1 - fail ArgumentError, 'invalid value for "pinless_debit", the character length must be smaller than or equal to 1.' - end - - @pinless_debit = pinless_debit - end - - # Custom attribute writer method with validation - # @param [Object] signature_debit Value to be assigned - def signature_debit=(signature_debit) - if !signature_debit.nil? && signature_debit.to_s.length > 1 - fail ArgumentError, 'invalid value for "signature_debit", the character length must be smaller than or equal to 1.' - end - - @signature_debit = signature_debit - end - - # Custom attribute writer method with validation - # @param [Object] prepaid Value to be assigned - def prepaid=(prepaid) - if !prepaid.nil? && prepaid.to_s.length > 1 - fail ArgumentError, 'invalid value for "prepaid", the character length must be smaller than or equal to 1.' - end - - @prepaid = prepaid - end - - # Custom attribute writer method with validation - # @param [Object] regulated Value to be assigned - def regulated=(regulated) - if !regulated.nil? && regulated.to_s.length > 1 - fail ArgumentError, 'invalid value for "regulated", the character length must be smaller than or equal to 1.' - end - - @regulated = regulated - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - account_type == o.account_type && - account_status == o.account_status && - balance_amount == o.balance_amount && - balance_amount_type == o.balance_amount_type && - currency == o.currency && - balance_sign == o.balance_sign && - affluence_indicator == o.affluence_indicator && - category == o.category && - commercial == o.commercial && - group == o.group && - health_care == o.health_care && - payroll == o.payroll && - level3_eligible == o.level3_eligible && - pinless_debit == o.pinless_debit && - signature_debit == o.signature_debit && - prepaid == o.prepaid && - regulated == o.regulated - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [account_type, account_status, balance_amount, balance_amount_type, currency, balance_sign, affluence_indicator, category, commercial, group, health_care, payroll, level3_eligible, pinless_debit, signature_debit, prepaid, regulated].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_payment_information_card.rb b/lib/cybersource_rest_client/models/inline_response_201_payment_information_card.rb deleted file mode 100644 index b6f4da0c..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_payment_information_card.rb +++ /dev/null @@ -1,199 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201PaymentInformationCard - # Last four digits of the cardholder’s account number. This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. - attr_accessor :suffix - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'suffix' => :'suffix' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'suffix' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'suffix') - self.suffix = attributes[:'suffix'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@suffix.nil? && @suffix.to_s.length > 4 - invalid_properties.push('invalid value for "suffix", the character length must be smaller than or equal to 4.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@suffix.nil? && @suffix.to_s.length > 4 - true - end - - # Custom attribute writer method with validation - # @param [Object] suffix Value to be assigned - def suffix=(suffix) - if !suffix.nil? && suffix.to_s.length > 4 - fail ArgumentError, 'invalid value for "suffix", the character length must be smaller than or equal to 4.' - end - - @suffix = suffix - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - suffix == o.suffix - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [suffix].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_payment_information_tokenized_card.rb b/lib/cybersource_rest_client/models/inline_response_201_payment_information_tokenized_card.rb deleted file mode 100644 index 28675afa..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_payment_information_tokenized_card.rb +++ /dev/null @@ -1,349 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201PaymentInformationTokenizedCard - # First six digits of token. CyberSource includes this field in the reply message when it decrypts the payment blob for the tokenized transaction. - attr_accessor :prefix - - # Last four digits of token. CyberSource includes this field in the reply message when it decrypts the payment blob for the tokenized transaction. - attr_accessor :suffix - - # Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover - attr_accessor :type - - # Confidence level of the tokenization. This value is assigned by the token service provider. `Note` This field is supported only for **CyberSource through VisaNet** and **FDC Nashville Global**. - attr_accessor :assurance_level - - # Two-digit month in which the payment network token expires. `Format: MM`. Possible values: 01 through 12. - attr_accessor :expiration_month - - # Four-digit year in which the payment network token expires. `Format: YYYY`. - attr_accessor :expiration_year - - # Value that identifies your business and indicates that the cardholder’s account number is tokenized. This value is assigned by the token service provider and is unique within the token service provider’s database. `Note` This field is supported only for **CyberSource through VisaNet** and **FDC Nashville Global**. - attr_accessor :requestor_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'prefix' => :'prefix', - :'suffix' => :'suffix', - :'type' => :'type', - :'assurance_level' => :'assuranceLevel', - :'expiration_month' => :'expirationMonth', - :'expiration_year' => :'expirationYear', - :'requestor_id' => :'requestorId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'prefix' => :'String', - :'suffix' => :'String', - :'type' => :'String', - :'assurance_level' => :'String', - :'expiration_month' => :'String', - :'expiration_year' => :'String', - :'requestor_id' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'prefix') - self.prefix = attributes[:'prefix'] - end - - if attributes.has_key?(:'suffix') - self.suffix = attributes[:'suffix'] - end - - if attributes.has_key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.has_key?(:'assuranceLevel') - self.assurance_level = attributes[:'assuranceLevel'] - end - - if attributes.has_key?(:'expirationMonth') - self.expiration_month = attributes[:'expirationMonth'] - end - - if attributes.has_key?(:'expirationYear') - self.expiration_year = attributes[:'expirationYear'] - end - - if attributes.has_key?(:'requestorId') - self.requestor_id = attributes[:'requestorId'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@prefix.nil? && @prefix.to_s.length > 6 - invalid_properties.push('invalid value for "prefix", the character length must be smaller than or equal to 6.') - end - - if !@suffix.nil? && @suffix.to_s.length > 4 - invalid_properties.push('invalid value for "suffix", the character length must be smaller than or equal to 4.') - end - - if !@type.nil? && @type.to_s.length > 3 - invalid_properties.push('invalid value for "type", the character length must be smaller than or equal to 3.') - end - - if !@assurance_level.nil? && @assurance_level.to_s.length > 2 - invalid_properties.push('invalid value for "assurance_level", the character length must be smaller than or equal to 2.') - end - - if !@expiration_month.nil? && @expiration_month.to_s.length > 2 - invalid_properties.push('invalid value for "expiration_month", the character length must be smaller than or equal to 2.') - end - - if !@expiration_year.nil? && @expiration_year.to_s.length > 4 - invalid_properties.push('invalid value for "expiration_year", the character length must be smaller than or equal to 4.') - end - - if !@requestor_id.nil? && @requestor_id.to_s.length > 11 - invalid_properties.push('invalid value for "requestor_id", the character length must be smaller than or equal to 11.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@prefix.nil? && @prefix.to_s.length > 6 - return false if !@suffix.nil? && @suffix.to_s.length > 4 - return false if !@type.nil? && @type.to_s.length > 3 - return false if !@assurance_level.nil? && @assurance_level.to_s.length > 2 - return false if !@expiration_month.nil? && @expiration_month.to_s.length > 2 - return false if !@expiration_year.nil? && @expiration_year.to_s.length > 4 - return false if !@requestor_id.nil? && @requestor_id.to_s.length > 11 - true - end - - # Custom attribute writer method with validation - # @param [Object] prefix Value to be assigned - def prefix=(prefix) - if !prefix.nil? && prefix.to_s.length > 6 - fail ArgumentError, 'invalid value for "prefix", the character length must be smaller than or equal to 6.' - end - - @prefix = prefix - end - - # Custom attribute writer method with validation - # @param [Object] suffix Value to be assigned - def suffix=(suffix) - if !suffix.nil? && suffix.to_s.length > 4 - fail ArgumentError, 'invalid value for "suffix", the character length must be smaller than or equal to 4.' - end - - @suffix = suffix - end - - # Custom attribute writer method with validation - # @param [Object] type Value to be assigned - def type=(type) - if !type.nil? && type.to_s.length > 3 - fail ArgumentError, 'invalid value for "type", the character length must be smaller than or equal to 3.' - end - - @type = type - end - - # Custom attribute writer method with validation - # @param [Object] assurance_level Value to be assigned - def assurance_level=(assurance_level) - if !assurance_level.nil? && assurance_level.to_s.length > 2 - fail ArgumentError, 'invalid value for "assurance_level", the character length must be smaller than or equal to 2.' - end - - @assurance_level = assurance_level - end - - # Custom attribute writer method with validation - # @param [Object] expiration_month Value to be assigned - def expiration_month=(expiration_month) - if !expiration_month.nil? && expiration_month.to_s.length > 2 - fail ArgumentError, 'invalid value for "expiration_month", the character length must be smaller than or equal to 2.' - end - - @expiration_month = expiration_month - end - - # Custom attribute writer method with validation - # @param [Object] expiration_year Value to be assigned - def expiration_year=(expiration_year) - if !expiration_year.nil? && expiration_year.to_s.length > 4 - fail ArgumentError, 'invalid value for "expiration_year", the character length must be smaller than or equal to 4.' - end - - @expiration_year = expiration_year - end - - # Custom attribute writer method with validation - # @param [Object] requestor_id Value to be assigned - def requestor_id=(requestor_id) - if !requestor_id.nil? && requestor_id.to_s.length > 11 - fail ArgumentError, 'invalid value for "requestor_id", the character length must be smaller than or equal to 11.' - end - - @requestor_id = requestor_id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - prefix == o.prefix && - suffix == o.suffix && - type == o.type && - assurance_level == o.assurance_level && - expiration_month == o.expiration_month && - expiration_year == o.expiration_year && - requestor_id == o.requestor_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [prefix, suffix, type, assurance_level, expiration_month, expiration_year, requestor_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_point_of_sale_information.rb b/lib/cybersource_rest_client/models/inline_response_201_point_of_sale_information.rb deleted file mode 100644 index 10b66775..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_point_of_sale_information.rb +++ /dev/null @@ -1,208 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201PointOfSaleInformation - attr_accessor :emv - - # Point-of-sale details for the transaction. This value is returned only for **American Express Direct**. CyberSource generates this value, which consists of a series of codes that identify terminal capability, security data, and specific conditions present at the time the transaction occurred. To comply with the CAPN requirements, this value must be included in all subsequent follow-on requests, such as captures and follow-on credits. When you perform authorizations, captures, and credits through CyberSource, CyberSource passes this value from the authorization service to the subsequent services for you. However, when you perform authorizations through CyberSource and perform subsequent services through other financial institutions, you must ensure that your requests for captures and credits include this value. - attr_accessor :amex_capn_data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'emv' => :'emv', - :'amex_capn_data' => :'amexCapnData' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'emv' => :'InlineResponse201PointOfSaleInformationEmv', - :'amex_capn_data' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'emv') - self.emv = attributes[:'emv'] - end - - if attributes.has_key?(:'amexCapnData') - self.amex_capn_data = attributes[:'amexCapnData'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@amex_capn_data.nil? && @amex_capn_data.to_s.length > 12 - invalid_properties.push('invalid value for "amex_capn_data", the character length must be smaller than or equal to 12.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@amex_capn_data.nil? && @amex_capn_data.to_s.length > 12 - true - end - - # Custom attribute writer method with validation - # @param [Object] amex_capn_data Value to be assigned - def amex_capn_data=(amex_capn_data) - if !amex_capn_data.nil? && amex_capn_data.to_s.length > 12 - fail ArgumentError, 'invalid value for "amex_capn_data", the character length must be smaller than or equal to 12.' - end - - @amex_capn_data = amex_capn_data - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - emv == o.emv && - amex_capn_data == o.amex_capn_data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [emv, amex_capn_data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_point_of_sale_information_emv.rb b/lib/cybersource_rest_client/models/inline_response_201_point_of_sale_information_emv.rb deleted file mode 100644 index a9ab538d..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_point_of_sale_information_emv.rb +++ /dev/null @@ -1,199 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201PointOfSaleInformationEmv - # EMV data that is transmitted from the chip card to the issuer, and from the issuer to the chip card. The EMV data is in the tag-length-value format and includes chip card tags, terminal tags, and transaction detail tags. `Important` The following tags contain sensitive information and **must not** be included in this field: - **56**: Track 1 equivalent data - **57**: Track 2 equivalent data - **5A**: Application PAN - **5F20**: Cardholder name - **5F24**: Application expiration date (This sensitivity has been relaxed for cmcic, amexdirect, fdiglobal, opdfde, six) - **99**: Transaction PIN - **9F0B**: Cardholder name (extended) - **9F1F**: Track 1 discretionary data - **9F20**: Track 2 discretionary data For captures, this field is required for contact EMV transactions. Otherwise, it is optional. For credits, this field is required for contact EMV stand-alone credits and contactless EMV stand-alone credits. Otherwise, it is optional. `Important` For contact EMV captures, contact EMV stand-alone credits, and contactless EMV stand-alone credits, you must include the following tags in this field. For all other types of EMV transactions, the following tags are optional. - **95**: Terminal verification results - **9F10**: Issuer application data - **9F26**: Application cryptogram - attr_accessor :tags - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'tags' => :'tags' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'tags' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'tags') - self.tags = attributes[:'tags'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@tags.nil? && @tags.to_s.length > 1998 - invalid_properties.push('invalid value for "tags", the character length must be smaller than or equal to 1998.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@tags.nil? && @tags.to_s.length > 1998 - true - end - - # Custom attribute writer method with validation - # @param [Object] tags Value to be assigned - def tags=(tags) - if !tags.nil? && tags.to_s.length > 1998 - fail ArgumentError, 'invalid value for "tags", the character length must be smaller than or equal to 1998.' - end - - @tags = tags - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - tags == o.tags - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [tags].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_processor_information.rb b/lib/cybersource_rest_client/models/inline_response_201_processor_information.rb deleted file mode 100644 index 0e8ae1e7..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_processor_information.rb +++ /dev/null @@ -1,642 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201ProcessorInformation - # Authorization code. Returned only when the processor returns this value. - attr_accessor :approval_code - - # Network transaction identifier (TID). You can use this value to identify a specific transaction when you are discussing the transaction with your processor. Not all processors provide this value. - attr_accessor :transaction_id - - # Description of this field is not available. - attr_accessor :network_transaction_id - - # Description of this field is not available. - attr_accessor :provider_transaction_id - - # For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of the authorization. - attr_accessor :response_code - - # Used by Visa only and contains the response source/reason code that identifies the source of the response decision. - attr_accessor :response_code_source - - # This field might contain information about a decline. This field is supported only for **CyberSource through VisaNet**. - attr_accessor :response_details - - # Processor-defined response category code. The associated detail error code is in the auth_auth_response field or the auth_reversal_auth_ response field depending on which service you requested. This field is supported only for: - Japanese issuers - Domestic transactions in Japan - Comercio Latino—processor transaction ID required for troubleshooting **Maximum length for processors**: - Comercio Latino: 32 - All other processors: 3 - attr_accessor :response_category_code - - # Name of the Japanese acquirer that processed the transaction. Returned only for CCS (CAFIS) and JCN Gateway. Please contact the CyberSource Japan Support Group for more information. - attr_accessor :forwarded_acquirer_code - - attr_accessor :avs - - attr_accessor :card_verification - - attr_accessor :merchant_advice - - attr_accessor :electronic_verification_results - - attr_accessor :customer - - attr_accessor :consumer_authentication_response - - attr_accessor :issuer - - # This field is returned only for **American Express Direct** and **CyberSource through VisaNet**. **American Express Direct** System trace audit number (STAN). This value identifies the transaction and is useful when investigating a chargeback dispute. **CyberSource through VisaNet** System trace number that must be printed on the customer’s receipt. - attr_accessor :system_trace_audit_number - - # Visa-generated reference number that identifies a card-present transaction for which youprovided one of the following: - Visa primary account number (PAN) - Visa-generated token for a PAN This reference number serves as a link to the cardholder account and to all transactions for that account. - attr_accessor :payment_account_reference_number - - # Transaction integrity classification provided by Mastercard. This value specifies Mastercard’s evaluation of the transaction’s safety and security. This field is returned only for **CyberSource through VisaNet**. For card-present transactions, possible values: - **A1**: EMV or token in a secure, trusted environment - **B1**: EMV or chip equivalent - **C1**: Magnetic stripe - **E1**: Key entered - **U0**: Unclassified For card-not-present transactions, possible values: - **A2**: Digital transactions - **B2**: Authenticated checkout - **C2**: Transaction validation - **D2**: Enhanced data - **E2**: Generic messaging - **U0**: Unclassified For information about these values, contact Mastercard or your acquirer. - attr_accessor :transaction_integrity_code - - # Referral response number for a verbal authorization with FDMS Nashville when using an American Express card. Give this number to American Express when you call them for the verbal authorization. - attr_accessor :amex_verbal_auth_reference_number - - # Transaction identifier that CyberSource generates. You have the option of printing the sales slip number on the receipt. This field is supported only for **JCN Gateway**. - attr_accessor :sales_slip_number - - # Mastercard service that was used for the transaction. Mastercard provides this value to CyberSource. Possible value: - 53: Mastercard card-on-file token service - attr_accessor :master_card_service_code - - # Result of the Mastercard card-on-file token service. Mastercard provides this value to CyberSource. Possible values: - **C**: Service completed successfully. - **F**: One of the following: - Incorrect Mastercard POS entry mode. The Mastercard POS entry mode should be 81 for an authorization or authorization reversal. - Incorrect Mastercard POS entry mode. The Mastercard POS entry mode should be 01 for a tokenized request. - Token requestor ID is missing or formatted incorrectly. - **I**: One of the following: - Invalid token requestor ID. - Suspended or deactivated token. - Invalid token (not in mapping table). - **T**: Invalid combination of token requestor ID and token. - **U**: Expired token. - **W**: Primary account number (PAN) listed in electronic warning bulletin. Note This field is returned only for **CyberSource through VisaNet**. - attr_accessor :master_card_service_reply_code - - # Type of authentication for which the transaction qualifies as determined by the Mastercard authentication service, which confirms the identity of the cardholder. Mastercard provides this value to CyberSource. Possible values: - **1**: Transaction qualifies for Mastercard authentication type 1. - **2**: Transaction qualifies for Mastercard authentication type 2. - attr_accessor :master_card_authentication_type - - # Name of the Processor. - attr_accessor :name - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'approval_code' => :'approvalCode', - :'transaction_id' => :'transactionId', - :'network_transaction_id' => :'networkTransactionId', - :'provider_transaction_id' => :'providerTransactionId', - :'response_code' => :'responseCode', - :'response_code_source' => :'responseCodeSource', - :'response_details' => :'responseDetails', - :'response_category_code' => :'responseCategoryCode', - :'forwarded_acquirer_code' => :'forwardedAcquirerCode', - :'avs' => :'avs', - :'card_verification' => :'cardVerification', - :'merchant_advice' => :'merchantAdvice', - :'electronic_verification_results' => :'electronicVerificationResults', - :'customer' => :'customer', - :'consumer_authentication_response' => :'consumerAuthenticationResponse', - :'issuer' => :'issuer', - :'system_trace_audit_number' => :'systemTraceAuditNumber', - :'payment_account_reference_number' => :'paymentAccountReferenceNumber', - :'transaction_integrity_code' => :'transactionIntegrityCode', - :'amex_verbal_auth_reference_number' => :'amexVerbalAuthReferenceNumber', - :'sales_slip_number' => :'salesSlipNumber', - :'master_card_service_code' => :'masterCardServiceCode', - :'master_card_service_reply_code' => :'masterCardServiceReplyCode', - :'master_card_authentication_type' => :'masterCardAuthenticationType', - :'name' => :'name' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'approval_code' => :'String', - :'transaction_id' => :'String', - :'network_transaction_id' => :'String', - :'provider_transaction_id' => :'String', - :'response_code' => :'String', - :'response_code_source' => :'String', - :'response_details' => :'String', - :'response_category_code' => :'String', - :'forwarded_acquirer_code' => :'String', - :'avs' => :'InlineResponse201ProcessorInformationAvs', - :'card_verification' => :'InlineResponse201ProcessorInformationCardVerification', - :'merchant_advice' => :'InlineResponse201ProcessorInformationMerchantAdvice', - :'electronic_verification_results' => :'InlineResponse201ProcessorInformationElectronicVerificationResults', - :'customer' => :'InlineResponse201ProcessorInformationCustomer', - :'consumer_authentication_response' => :'InlineResponse201ProcessorInformationConsumerAuthenticationResponse', - :'issuer' => :'InlineResponse201ProcessorInformationIssuer', - :'system_trace_audit_number' => :'String', - :'payment_account_reference_number' => :'String', - :'transaction_integrity_code' => :'String', - :'amex_verbal_auth_reference_number' => :'String', - :'sales_slip_number' => :'Float', - :'master_card_service_code' => :'String', - :'master_card_service_reply_code' => :'String', - :'master_card_authentication_type' => :'String', - :'name' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'approvalCode') - self.approval_code = attributes[:'approvalCode'] - end - - if attributes.has_key?(:'transactionId') - self.transaction_id = attributes[:'transactionId'] - end - - if attributes.has_key?(:'networkTransactionId') - self.network_transaction_id = attributes[:'networkTransactionId'] - end - - if attributes.has_key?(:'providerTransactionId') - self.provider_transaction_id = attributes[:'providerTransactionId'] - end - - if attributes.has_key?(:'responseCode') - self.response_code = attributes[:'responseCode'] - end - - if attributes.has_key?(:'responseCodeSource') - self.response_code_source = attributes[:'responseCodeSource'] - end - - if attributes.has_key?(:'responseDetails') - self.response_details = attributes[:'responseDetails'] - end - - if attributes.has_key?(:'responseCategoryCode') - self.response_category_code = attributes[:'responseCategoryCode'] - end - - if attributes.has_key?(:'forwardedAcquirerCode') - self.forwarded_acquirer_code = attributes[:'forwardedAcquirerCode'] - end - - if attributes.has_key?(:'avs') - self.avs = attributes[:'avs'] - end - - if attributes.has_key?(:'cardVerification') - self.card_verification = attributes[:'cardVerification'] - end - - if attributes.has_key?(:'merchantAdvice') - self.merchant_advice = attributes[:'merchantAdvice'] - end - - if attributes.has_key?(:'electronicVerificationResults') - self.electronic_verification_results = attributes[:'electronicVerificationResults'] - end - - if attributes.has_key?(:'customer') - self.customer = attributes[:'customer'] - end - - if attributes.has_key?(:'consumerAuthenticationResponse') - self.consumer_authentication_response = attributes[:'consumerAuthenticationResponse'] - end - - if attributes.has_key?(:'issuer') - self.issuer = attributes[:'issuer'] - end - - if attributes.has_key?(:'systemTraceAuditNumber') - self.system_trace_audit_number = attributes[:'systemTraceAuditNumber'] - end - - if attributes.has_key?(:'paymentAccountReferenceNumber') - self.payment_account_reference_number = attributes[:'paymentAccountReferenceNumber'] - end - - if attributes.has_key?(:'transactionIntegrityCode') - self.transaction_integrity_code = attributes[:'transactionIntegrityCode'] - end - - if attributes.has_key?(:'amexVerbalAuthReferenceNumber') - self.amex_verbal_auth_reference_number = attributes[:'amexVerbalAuthReferenceNumber'] - end - - if attributes.has_key?(:'salesSlipNumber') - self.sales_slip_number = attributes[:'salesSlipNumber'] - end - - if attributes.has_key?(:'masterCardServiceCode') - self.master_card_service_code = attributes[:'masterCardServiceCode'] - end - - if attributes.has_key?(:'masterCardServiceReplyCode') - self.master_card_service_reply_code = attributes[:'masterCardServiceReplyCode'] - end - - if attributes.has_key?(:'masterCardAuthenticationType') - self.master_card_authentication_type = attributes[:'masterCardAuthenticationType'] - end - - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@transaction_id.nil? && @transaction_id.to_s.length > 50 - invalid_properties.push('invalid value for "transaction_id", the character length must be smaller than or equal to 50.') - end - - if !@response_code.nil? && @response_code.to_s.length > 10 - invalid_properties.push('invalid value for "response_code", the character length must be smaller than or equal to 10.') - end - - if !@response_code_source.nil? && @response_code_source.to_s.length > 1 - invalid_properties.push('invalid value for "response_code_source", the character length must be smaller than or equal to 1.') - end - - if !@response_details.nil? && @response_details.to_s.length > 255 - invalid_properties.push('invalid value for "response_details", the character length must be smaller than or equal to 255.') - end - - if !@response_category_code.nil? && @response_category_code.to_s.length > 32 - invalid_properties.push('invalid value for "response_category_code", the character length must be smaller than or equal to 32.') - end - - if !@forwarded_acquirer_code.nil? && @forwarded_acquirer_code.to_s.length > 32 - invalid_properties.push('invalid value for "forwarded_acquirer_code", the character length must be smaller than or equal to 32.') - end - - if !@system_trace_audit_number.nil? && @system_trace_audit_number.to_s.length > 6 - invalid_properties.push('invalid value for "system_trace_audit_number", the character length must be smaller than or equal to 6.') - end - - if !@payment_account_reference_number.nil? && @payment_account_reference_number.to_s.length > 32 - invalid_properties.push('invalid value for "payment_account_reference_number", the character length must be smaller than or equal to 32.') - end - - if !@transaction_integrity_code.nil? && @transaction_integrity_code.to_s.length > 2 - invalid_properties.push('invalid value for "transaction_integrity_code", the character length must be smaller than or equal to 2.') - end - - if !@amex_verbal_auth_reference_number.nil? && @amex_verbal_auth_reference_number.to_s.length > 6 - invalid_properties.push('invalid value for "amex_verbal_auth_reference_number", the character length must be smaller than or equal to 6.') - end - - if !@sales_slip_number.nil? && @sales_slip_number > 99999 - invalid_properties.push('invalid value for "sales_slip_number", must be smaller than or equal to 99999.') - end - - if !@master_card_service_code.nil? && @master_card_service_code.to_s.length > 2 - invalid_properties.push('invalid value for "master_card_service_code", the character length must be smaller than or equal to 2.') - end - - if !@master_card_service_reply_code.nil? && @master_card_service_reply_code.to_s.length > 1 - invalid_properties.push('invalid value for "master_card_service_reply_code", the character length must be smaller than or equal to 1.') - end - - if !@master_card_authentication_type.nil? && @master_card_authentication_type.to_s.length > 1 - invalid_properties.push('invalid value for "master_card_authentication_type", the character length must be smaller than or equal to 1.') - end - - if !@name.nil? && @name.to_s.length > 30 - invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 30.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@transaction_id.nil? && @transaction_id.to_s.length > 50 - return false if !@response_code.nil? && @response_code.to_s.length > 10 - return false if !@response_code_source.nil? && @response_code_source.to_s.length > 1 - return false if !@response_details.nil? && @response_details.to_s.length > 255 - return false if !@response_category_code.nil? && @response_category_code.to_s.length > 32 - return false if !@forwarded_acquirer_code.nil? && @forwarded_acquirer_code.to_s.length > 32 - return false if !@system_trace_audit_number.nil? && @system_trace_audit_number.to_s.length > 6 - return false if !@payment_account_reference_number.nil? && @payment_account_reference_number.to_s.length > 32 - return false if !@transaction_integrity_code.nil? && @transaction_integrity_code.to_s.length > 2 - return false if !@amex_verbal_auth_reference_number.nil? && @amex_verbal_auth_reference_number.to_s.length > 6 - return false if !@sales_slip_number.nil? && @sales_slip_number > 99999 - return false if !@master_card_service_code.nil? && @master_card_service_code.to_s.length > 2 - return false if !@master_card_service_reply_code.nil? && @master_card_service_reply_code.to_s.length > 1 - return false if !@master_card_authentication_type.nil? && @master_card_authentication_type.to_s.length > 1 - return false if !@name.nil? && @name.to_s.length > 30 - true - end - - # Custom attribute writer method with validation - # @param [Object] transaction_id Value to be assigned - def transaction_id=(transaction_id) - if !transaction_id.nil? && transaction_id.to_s.length > 50 - fail ArgumentError, 'invalid value for "transaction_id", the character length must be smaller than or equal to 50.' - end - - @transaction_id = transaction_id - end - - # Custom attribute writer method with validation - # @param [Object] response_code Value to be assigned - def response_code=(response_code) - if !response_code.nil? && response_code.to_s.length > 10 - fail ArgumentError, 'invalid value for "response_code", the character length must be smaller than or equal to 10.' - end - - @response_code = response_code - end - - # Custom attribute writer method with validation - # @param [Object] response_code_source Value to be assigned - def response_code_source=(response_code_source) - if !response_code_source.nil? && response_code_source.to_s.length > 1 - fail ArgumentError, 'invalid value for "response_code_source", the character length must be smaller than or equal to 1.' - end - - @response_code_source = response_code_source - end - - # Custom attribute writer method with validation - # @param [Object] response_details Value to be assigned - def response_details=(response_details) - if !response_details.nil? && response_details.to_s.length > 255 - fail ArgumentError, 'invalid value for "response_details", the character length must be smaller than or equal to 255.' - end - - @response_details = response_details - end - - # Custom attribute writer method with validation - # @param [Object] response_category_code Value to be assigned - def response_category_code=(response_category_code) - if !response_category_code.nil? && response_category_code.to_s.length > 32 - fail ArgumentError, 'invalid value for "response_category_code", the character length must be smaller than or equal to 32.' - end - - @response_category_code = response_category_code - end - - # Custom attribute writer method with validation - # @param [Object] forwarded_acquirer_code Value to be assigned - def forwarded_acquirer_code=(forwarded_acquirer_code) - if !forwarded_acquirer_code.nil? && forwarded_acquirer_code.to_s.length > 32 - fail ArgumentError, 'invalid value for "forwarded_acquirer_code", the character length must be smaller than or equal to 32.' - end - - @forwarded_acquirer_code = forwarded_acquirer_code - end - - # Custom attribute writer method with validation - # @param [Object] system_trace_audit_number Value to be assigned - def system_trace_audit_number=(system_trace_audit_number) - if !system_trace_audit_number.nil? && system_trace_audit_number.to_s.length > 6 - fail ArgumentError, 'invalid value for "system_trace_audit_number", the character length must be smaller than or equal to 6.' - end - - @system_trace_audit_number = system_trace_audit_number - end - - # Custom attribute writer method with validation - # @param [Object] payment_account_reference_number Value to be assigned - def payment_account_reference_number=(payment_account_reference_number) - if !payment_account_reference_number.nil? && payment_account_reference_number.to_s.length > 32 - fail ArgumentError, 'invalid value for "payment_account_reference_number", the character length must be smaller than or equal to 32.' - end - - @payment_account_reference_number = payment_account_reference_number - end - - # Custom attribute writer method with validation - # @param [Object] transaction_integrity_code Value to be assigned - def transaction_integrity_code=(transaction_integrity_code) - if !transaction_integrity_code.nil? && transaction_integrity_code.to_s.length > 2 - fail ArgumentError, 'invalid value for "transaction_integrity_code", the character length must be smaller than or equal to 2.' - end - - @transaction_integrity_code = transaction_integrity_code - end - - # Custom attribute writer method with validation - # @param [Object] amex_verbal_auth_reference_number Value to be assigned - def amex_verbal_auth_reference_number=(amex_verbal_auth_reference_number) - if !amex_verbal_auth_reference_number.nil? && amex_verbal_auth_reference_number.to_s.length > 6 - fail ArgumentError, 'invalid value for "amex_verbal_auth_reference_number", the character length must be smaller than or equal to 6.' - end - - @amex_verbal_auth_reference_number = amex_verbal_auth_reference_number - end - - # Custom attribute writer method with validation - # @param [Object] sales_slip_number Value to be assigned - def sales_slip_number=(sales_slip_number) - if !sales_slip_number.nil? && sales_slip_number > 99999 - fail ArgumentError, 'invalid value for "sales_slip_number", must be smaller than or equal to 99999.' - end - - @sales_slip_number = sales_slip_number - end - - # Custom attribute writer method with validation - # @param [Object] master_card_service_code Value to be assigned - def master_card_service_code=(master_card_service_code) - if !master_card_service_code.nil? && master_card_service_code.to_s.length > 2 - fail ArgumentError, 'invalid value for "master_card_service_code", the character length must be smaller than or equal to 2.' - end - - @master_card_service_code = master_card_service_code - end - - # Custom attribute writer method with validation - # @param [Object] master_card_service_reply_code Value to be assigned - def master_card_service_reply_code=(master_card_service_reply_code) - if !master_card_service_reply_code.nil? && master_card_service_reply_code.to_s.length > 1 - fail ArgumentError, 'invalid value for "master_card_service_reply_code", the character length must be smaller than or equal to 1.' - end - - @master_card_service_reply_code = master_card_service_reply_code - end - - # Custom attribute writer method with validation - # @param [Object] master_card_authentication_type Value to be assigned - def master_card_authentication_type=(master_card_authentication_type) - if !master_card_authentication_type.nil? && master_card_authentication_type.to_s.length > 1 - fail ArgumentError, 'invalid value for "master_card_authentication_type", the character length must be smaller than or equal to 1.' - end - - @master_card_authentication_type = master_card_authentication_type - end - - # Custom attribute writer method with validation - # @param [Object] name Value to be assigned - def name=(name) - if !name.nil? && name.to_s.length > 30 - fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 30.' - end - - @name = name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - approval_code == o.approval_code && - transaction_id == o.transaction_id && - network_transaction_id == o.network_transaction_id && - provider_transaction_id == o.provider_transaction_id && - response_code == o.response_code && - response_code_source == o.response_code_source && - response_details == o.response_details && - response_category_code == o.response_category_code && - forwarded_acquirer_code == o.forwarded_acquirer_code && - avs == o.avs && - card_verification == o.card_verification && - merchant_advice == o.merchant_advice && - electronic_verification_results == o.electronic_verification_results && - customer == o.customer && - consumer_authentication_response == o.consumer_authentication_response && - issuer == o.issuer && - system_trace_audit_number == o.system_trace_audit_number && - payment_account_reference_number == o.payment_account_reference_number && - transaction_integrity_code == o.transaction_integrity_code && - amex_verbal_auth_reference_number == o.amex_verbal_auth_reference_number && - sales_slip_number == o.sales_slip_number && - master_card_service_code == o.master_card_service_code && - master_card_service_reply_code == o.master_card_service_reply_code && - master_card_authentication_type == o.master_card_authentication_type && - name == o.name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [approval_code, transaction_id, network_transaction_id, provider_transaction_id, response_code, response_code_source, response_details, response_category_code, forwarded_acquirer_code, avs, card_verification, merchant_advice, electronic_verification_results, customer, consumer_authentication_response, issuer, system_trace_audit_number, payment_account_reference_number, transaction_integrity_code, amex_verbal_auth_reference_number, sales_slip_number, master_card_service_code, master_card_service_reply_code, master_card_authentication_type, name].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_processor_information_avs.rb b/lib/cybersource_rest_client/models/inline_response_201_processor_information_avs.rb deleted file mode 100644 index bc8753b8..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_processor_information_avs.rb +++ /dev/null @@ -1,227 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201ProcessorInformationAvs - # AVS result code. - attr_accessor :code - - # AVS result code sent directly from the processor. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of AVS. Use for debugging purposes only. - attr_accessor :code_raw - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'code_raw' => :'codeRaw' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'code' => :'String', - :'code_raw' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.has_key?(:'codeRaw') - self.code_raw = attributes[:'codeRaw'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - # ansuguma - # if !@code.nil? && @code.to_s.length > 1 - # invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 1.') - # end - - if !@code_raw.nil? && @code_raw.to_s.length > 10 - invalid_properties.push('invalid value for "code_raw", the character length must be smaller than or equal to 10.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - # ansuguma - # return false if !@code.nil? && @code.to_s.length > 1 - return false if !@code_raw.nil? && @code_raw.to_s.length > 10 - true - end - - # Custom attribute writer method with validation - # @param [Object] code Value to be assigned - def code=(code) - # ansuguma - # if !code.nil? && code.to_s.length > 1 - # fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 1.' - # end - - @code = code - end - - # Custom attribute writer method with validation - # @param [Object] code_raw Value to be assigned - def code_raw=(code_raw) - if !code_raw.nil? && code_raw.to_s.length > 10 - fail ArgumentError, 'invalid value for "code_raw", the character length must be smaller than or equal to 10.' - end - - @code_raw = code_raw - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - code_raw == o.code_raw - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [code, code_raw].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_processor_information_card_verification.rb b/lib/cybersource_rest_client/models/inline_response_201_processor_information_card_verification.rb deleted file mode 100644 index 10595e69..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_processor_information_card_verification.rb +++ /dev/null @@ -1,224 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201ProcessorInformationCardVerification - # CVN result code. - attr_accessor :result_code - - # CVN result code sent directly from the processor. Returned only when the processor returns this value. `Important` Do not use this field to evaluate the result of card verification. Use for debugging purposes only. - attr_accessor :result_code_raw - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'result_code' => :'resultCode', - :'result_code_raw' => :'resultCodeRaw' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'result_code' => :'String', - :'result_code_raw' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'resultCode') - self.result_code = attributes[:'resultCode'] - end - - if attributes.has_key?(:'resultCodeRaw') - self.result_code_raw = attributes[:'resultCodeRaw'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@result_code.nil? && @result_code.to_s.length > 1 - invalid_properties.push('invalid value for "result_code", the character length must be smaller than or equal to 1.') - end - - if !@result_code_raw.nil? && @result_code_raw.to_s.length > 10 - invalid_properties.push('invalid value for "result_code_raw", the character length must be smaller than or equal to 10.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@result_code.nil? && @result_code.to_s.length > 1 - return false if !@result_code_raw.nil? && @result_code_raw.to_s.length > 10 - true - end - - # Custom attribute writer method with validation - # @param [Object] result_code Value to be assigned - def result_code=(result_code) - if !result_code.nil? && result_code.to_s.length > 1 - fail ArgumentError, 'invalid value for "result_code", the character length must be smaller than or equal to 1.' - end - - @result_code = result_code - end - - # Custom attribute writer method with validation - # @param [Object] result_code_raw Value to be assigned - def result_code_raw=(result_code_raw) - if !result_code_raw.nil? && result_code_raw.to_s.length > 10 - fail ArgumentError, 'invalid value for "result_code_raw", the character length must be smaller than or equal to 10.' - end - - @result_code_raw = result_code_raw - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - result_code == o.result_code && - result_code_raw == o.result_code_raw - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [result_code, result_code_raw].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_processor_information_consumer_authentication_response.rb b/lib/cybersource_rest_client/models/inline_response_201_processor_information_consumer_authentication_response.rb deleted file mode 100644 index 6a693a71..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_processor_information_consumer_authentication_response.rb +++ /dev/null @@ -1,224 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201ProcessorInformationConsumerAuthenticationResponse - # Mapped response code for Verified by Visa and American Express SafeKey: - attr_accessor :code - - # Raw response code sent directly from the processor for Verified by Visa and American Express SafeKey: - attr_accessor :code_raw - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'code_raw' => :'codeRaw' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'code' => :'String', - :'code_raw' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.has_key?(:'codeRaw') - self.code_raw = attributes[:'codeRaw'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@code.nil? && @code.to_s.length > 3 - invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 3.') - end - - if !@code_raw.nil? && @code_raw.to_s.length > 3 - invalid_properties.push('invalid value for "code_raw", the character length must be smaller than or equal to 3.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@code.nil? && @code.to_s.length > 3 - return false if !@code_raw.nil? && @code_raw.to_s.length > 3 - true - end - - # Custom attribute writer method with validation - # @param [Object] code Value to be assigned - def code=(code) - if !code.nil? && code.to_s.length > 3 - fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 3.' - end - - @code = code - end - - # Custom attribute writer method with validation - # @param [Object] code_raw Value to be assigned - def code_raw=(code_raw) - if !code_raw.nil? && code_raw.to_s.length > 3 - fail ArgumentError, 'invalid value for "code_raw", the character length must be smaller than or equal to 3.' - end - - @code_raw = code_raw - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - code_raw == o.code_raw - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [code, code_raw].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_processor_information_customer.rb b/lib/cybersource_rest_client/models/inline_response_201_processor_information_customer.rb deleted file mode 100644 index 19f823e4..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_processor_information_customer.rb +++ /dev/null @@ -1,199 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201ProcessorInformationCustomer - # Personal identifier result. This field is supported only for Redecard in Brazil for CyberSource Latin American Processing. If you included _buyerInformation.personalIdentification[].ID_ in the request, this value indicates whether or not _buyerInformation.personalIdentification[].ID_ matched a value in a record on file. Returned only when the personal ID result is returned by the processor. Possible values: - **Y**: Match - **N**: No match - **K**: Not supported - **U**: Unknown - **Z**: No response returned - attr_accessor :personal_id_result - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'personal_id_result' => :'personalIdResult' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'personal_id_result' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'personalIdResult') - self.personal_id_result = attributes[:'personalIdResult'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@personal_id_result.nil? && @personal_id_result.to_s.length > 1 - invalid_properties.push('invalid value for "personal_id_result", the character length must be smaller than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@personal_id_result.nil? && @personal_id_result.to_s.length > 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] personal_id_result Value to be assigned - def personal_id_result=(personal_id_result) - if !personal_id_result.nil? && personal_id_result.to_s.length > 1 - fail ArgumentError, 'invalid value for "personal_id_result", the character length must be smaller than or equal to 1.' - end - - @personal_id_result = personal_id_result - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - personal_id_result == o.personal_id_result - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [personal_id_result].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_processor_information_electronic_verification_results.rb b/lib/cybersource_rest_client/models/inline_response_201_processor_information_electronic_verification_results.rb deleted file mode 100644 index 7e16cc89..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_processor_information_electronic_verification_results.rb +++ /dev/null @@ -1,474 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201ProcessorInformationElectronicVerificationResults - # Mapped Electronic Verification response code for the customer’s name. - attr_accessor :code - - # Raw Electronic Verification response code from the processor for the customer’s last name - attr_accessor :code_raw - - # Mapped Electronic Verification response code for the customer’s email address. - attr_accessor :email - - # Raw Electronic Verification response code from the processor for the customer’s email address. - attr_accessor :email_raw - - # Mapped Electronic Verification response code for the customer’s phone number. - attr_accessor :phone_number - - # Raw Electronic Verification response code from the processor for the customer’s phone number. - attr_accessor :phone_number_raw - - # Mapped Electronic Verification response code for the customer’s postal code. - attr_accessor :postal_code - - # Raw Electronic Verification response code from the processor for the customer’s postal code. - attr_accessor :postal_code_raw - - # Mapped Electronic Verification response code for the customer’s street address. - attr_accessor :street - - # Raw Electronic Verification response code from the processor for the customer’s street address. - attr_accessor :street_raw - - # TODO - attr_accessor :name - - # TODO - attr_accessor :name_raw - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'code_raw' => :'codeRaw', - :'email' => :'email', - :'email_raw' => :'emailRaw', - :'phone_number' => :'phoneNumber', - :'phone_number_raw' => :'phoneNumberRaw', - :'postal_code' => :'postalCode', - :'postal_code_raw' => :'postalCodeRaw', - :'street' => :'street', - :'street_raw' => :'streetRaw', - :'name' => :'name', - :'name_raw' => :'nameRaw' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'code' => :'String', - :'code_raw' => :'String', - :'email' => :'String', - :'email_raw' => :'String', - :'phone_number' => :'String', - :'phone_number_raw' => :'String', - :'postal_code' => :'String', - :'postal_code_raw' => :'String', - :'street' => :'String', - :'street_raw' => :'String', - :'name' => :'String', - :'name_raw' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.has_key?(:'codeRaw') - self.code_raw = attributes[:'codeRaw'] - end - - if attributes.has_key?(:'email') - self.email = attributes[:'email'] - end - - if attributes.has_key?(:'emailRaw') - self.email_raw = attributes[:'emailRaw'] - end - - if attributes.has_key?(:'phoneNumber') - self.phone_number = attributes[:'phoneNumber'] - end - - if attributes.has_key?(:'phoneNumberRaw') - self.phone_number_raw = attributes[:'phoneNumberRaw'] - end - - if attributes.has_key?(:'postalCode') - self.postal_code = attributes[:'postalCode'] - end - - if attributes.has_key?(:'postalCodeRaw') - self.postal_code_raw = attributes[:'postalCodeRaw'] - end - - if attributes.has_key?(:'street') - self.street = attributes[:'street'] - end - - if attributes.has_key?(:'streetRaw') - self.street_raw = attributes[:'streetRaw'] - end - - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.has_key?(:'nameRaw') - self.name_raw = attributes[:'nameRaw'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@code.nil? && @code.to_s.length > 1 - invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 1.') - end - - if !@code_raw.nil? && @code_raw.to_s.length > 1 - invalid_properties.push('invalid value for "code_raw", the character length must be smaller than or equal to 1.') - end - - if !@email.nil? && @email.to_s.length > 1 - invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 1.') - end - - if !@email_raw.nil? && @email_raw.to_s.length > 1 - invalid_properties.push('invalid value for "email_raw", the character length must be smaller than or equal to 1.') - end - - if !@phone_number.nil? && @phone_number.to_s.length > 1 - invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 1.') - end - - if !@phone_number_raw.nil? && @phone_number_raw.to_s.length > 1 - invalid_properties.push('invalid value for "phone_number_raw", the character length must be smaller than or equal to 1.') - end - - if !@postal_code.nil? && @postal_code.to_s.length > 1 - invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 1.') - end - - if !@postal_code_raw.nil? && @postal_code_raw.to_s.length > 1 - invalid_properties.push('invalid value for "postal_code_raw", the character length must be smaller than or equal to 1.') - end - - if !@street.nil? && @street.to_s.length > 1 - invalid_properties.push('invalid value for "street", the character length must be smaller than or equal to 1.') - end - - if !@street_raw.nil? && @street_raw.to_s.length > 1 - invalid_properties.push('invalid value for "street_raw", the character length must be smaller than or equal to 1.') - end - - if !@name.nil? && @name.to_s.length > 30 - invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 30.') - end - - if !@name_raw.nil? && @name_raw.to_s.length > 30 - invalid_properties.push('invalid value for "name_raw", the character length must be smaller than or equal to 30.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@code.nil? && @code.to_s.length > 1 - return false if !@code_raw.nil? && @code_raw.to_s.length > 1 - return false if !@email.nil? && @email.to_s.length > 1 - return false if !@email_raw.nil? && @email_raw.to_s.length > 1 - return false if !@phone_number.nil? && @phone_number.to_s.length > 1 - return false if !@phone_number_raw.nil? && @phone_number_raw.to_s.length > 1 - return false if !@postal_code.nil? && @postal_code.to_s.length > 1 - return false if !@postal_code_raw.nil? && @postal_code_raw.to_s.length > 1 - return false if !@street.nil? && @street.to_s.length > 1 - return false if !@street_raw.nil? && @street_raw.to_s.length > 1 - return false if !@name.nil? && @name.to_s.length > 30 - return false if !@name_raw.nil? && @name_raw.to_s.length > 30 - true - end - - # Custom attribute writer method with validation - # @param [Object] code Value to be assigned - def code=(code) - if !code.nil? && code.to_s.length > 1 - fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 1.' - end - - @code = code - end - - # Custom attribute writer method with validation - # @param [Object] code_raw Value to be assigned - def code_raw=(code_raw) - if !code_raw.nil? && code_raw.to_s.length > 1 - fail ArgumentError, 'invalid value for "code_raw", the character length must be smaller than or equal to 1.' - end - - @code_raw = code_raw - end - - # Custom attribute writer method with validation - # @param [Object] email Value to be assigned - def email=(email) - if !email.nil? && email.to_s.length > 1 - fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 1.' - end - - @email = email - end - - # Custom attribute writer method with validation - # @param [Object] email_raw Value to be assigned - def email_raw=(email_raw) - if !email_raw.nil? && email_raw.to_s.length > 1 - fail ArgumentError, 'invalid value for "email_raw", the character length must be smaller than or equal to 1.' - end - - @email_raw = email_raw - end - - # Custom attribute writer method with validation - # @param [Object] phone_number Value to be assigned - def phone_number=(phone_number) - if !phone_number.nil? && phone_number.to_s.length > 1 - fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 1.' - end - - @phone_number = phone_number - end - - # Custom attribute writer method with validation - # @param [Object] phone_number_raw Value to be assigned - def phone_number_raw=(phone_number_raw) - if !phone_number_raw.nil? && phone_number_raw.to_s.length > 1 - fail ArgumentError, 'invalid value for "phone_number_raw", the character length must be smaller than or equal to 1.' - end - - @phone_number_raw = phone_number_raw - end - - # Custom attribute writer method with validation - # @param [Object] postal_code Value to be assigned - def postal_code=(postal_code) - if !postal_code.nil? && postal_code.to_s.length > 1 - fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 1.' - end - - @postal_code = postal_code - end - - # Custom attribute writer method with validation - # @param [Object] postal_code_raw Value to be assigned - def postal_code_raw=(postal_code_raw) - if !postal_code_raw.nil? && postal_code_raw.to_s.length > 1 - fail ArgumentError, 'invalid value for "postal_code_raw", the character length must be smaller than or equal to 1.' - end - - @postal_code_raw = postal_code_raw - end - - # Custom attribute writer method with validation - # @param [Object] street Value to be assigned - def street=(street) - if !street.nil? && street.to_s.length > 1 - fail ArgumentError, 'invalid value for "street", the character length must be smaller than or equal to 1.' - end - - @street = street - end - - # Custom attribute writer method with validation - # @param [Object] street_raw Value to be assigned - def street_raw=(street_raw) - if !street_raw.nil? && street_raw.to_s.length > 1 - fail ArgumentError, 'invalid value for "street_raw", the character length must be smaller than or equal to 1.' - end - - @street_raw = street_raw - end - - # Custom attribute writer method with validation - # @param [Object] name Value to be assigned - def name=(name) - if !name.nil? && name.to_s.length > 30 - fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 30.' - end - - @name = name - end - - # Custom attribute writer method with validation - # @param [Object] name_raw Value to be assigned - def name_raw=(name_raw) - if !name_raw.nil? && name_raw.to_s.length > 30 - fail ArgumentError, 'invalid value for "name_raw", the character length must be smaller than or equal to 30.' - end - - @name_raw = name_raw - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - code_raw == o.code_raw && - email == o.email && - email_raw == o.email_raw && - phone_number == o.phone_number && - phone_number_raw == o.phone_number_raw && - postal_code == o.postal_code && - postal_code_raw == o.postal_code_raw && - street == o.street && - street_raw == o.street_raw && - name == o.name && - name_raw == o.name_raw - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [code, code_raw, email, email_raw, phone_number, phone_number_raw, postal_code, postal_code_raw, street, street_raw, name, name_raw].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_processor_information_issuer.rb b/lib/cybersource_rest_client/models/inline_response_201_processor_information_issuer.rb deleted file mode 100644 index 490d5984..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_processor_information_issuer.rb +++ /dev/null @@ -1,224 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201ProcessorInformationIssuer - # Country in which the card was issued. This information enables you to determine whether the card was issued domestically or internationally. Use the two-character ISO Standard Country Codes. This field is supported for Visa, Mastercard, Discover, Diners Club, JCB, and Maestro (International) on Chase Paymentech Solutions. - attr_accessor :country - - # Data defined by the issuer. The value for this reply field will probably be the same as the value that you submitted in the authorization request, but it is possible for the processor, issuer, or acquirer to modify the value. This field is supported only for Visa transactions on **CyberSource through VisaNet**. - attr_accessor :discretionary_data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'country' => :'country', - :'discretionary_data' => :'discretionaryData' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'country' => :'String', - :'discretionary_data' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'country') - self.country = attributes[:'country'] - end - - if attributes.has_key?(:'discretionaryData') - self.discretionary_data = attributes[:'discretionaryData'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@country.nil? && @country.to_s.length > 3 - invalid_properties.push('invalid value for "country", the character length must be smaller than or equal to 3.') - end - - if !@discretionary_data.nil? && @discretionary_data.to_s.length > 255 - invalid_properties.push('invalid value for "discretionary_data", the character length must be smaller than or equal to 255.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@country.nil? && @country.to_s.length > 3 - return false if !@discretionary_data.nil? && @discretionary_data.to_s.length > 255 - true - end - - # Custom attribute writer method with validation - # @param [Object] country Value to be assigned - def country=(country) - if !country.nil? && country.to_s.length > 3 - fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 3.' - end - - @country = country - end - - # Custom attribute writer method with validation - # @param [Object] discretionary_data Value to be assigned - def discretionary_data=(discretionary_data) - if !discretionary_data.nil? && discretionary_data.to_s.length > 255 - fail ArgumentError, 'invalid value for "discretionary_data", the character length must be smaller than or equal to 255.' - end - - @discretionary_data = discretionary_data - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - country == o.country && - discretionary_data == o.discretionary_data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [country, discretionary_data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_201_processor_information_merchant_advice.rb b/lib/cybersource_rest_client/models/inline_response_201_processor_information_merchant_advice.rb deleted file mode 100644 index 53bdc94b..00000000 --- a/lib/cybersource_rest_client/models/inline_response_201_processor_information_merchant_advice.rb +++ /dev/null @@ -1,224 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse201ProcessorInformationMerchantAdvice - # Reason the recurring payment transaction was declined. For some processors, this field is used only for Mastercard. For other processors, this field is used for Visa and Mastercard. And for other processors, this field is not implemented. Possible values: - **00**: Response not provided. - **01**: New account information is available. Obtain the new information. - **02**: Try again later. - **03**: Do not try again. Obtain another type of payment from the customer. - **04**: Problem with a token or a partial shipment indicator. - **21**: Recurring payment cancellation service. - **99**: An unknown value was returned from the processor. - attr_accessor :code - - # Raw merchant advice code sent directly from the processor. This field is used only for Mastercard. For processor-specific information, see the auth_merchant_advice_code_raw field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :code_raw - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'code_raw' => :'codeRaw' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'code' => :'String', - :'code_raw' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.has_key?(:'codeRaw') - self.code_raw = attributes[:'codeRaw'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@code.nil? && @code.to_s.length > 2 - invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 2.') - end - - if !@code_raw.nil? && @code_raw.to_s.length > 2 - invalid_properties.push('invalid value for "code_raw", the character length must be smaller than or equal to 2.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@code.nil? && @code.to_s.length > 2 - return false if !@code_raw.nil? && @code_raw.to_s.length > 2 - true - end - - # Custom attribute writer method with validation - # @param [Object] code Value to be assigned - def code=(code) - if !code.nil? && code.to_s.length > 2 - fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 2.' - end - - @code = code - end - - # Custom attribute writer method with validation - # @param [Object] code_raw Value to be assigned - def code_raw=(code_raw) - if !code_raw.nil? && code_raw.to_s.length > 2 - fail ArgumentError, 'invalid value for "code_raw", the character length must be smaller than or equal to 2.' - end - - @code_raw = code_raw - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - code_raw == o.code_raw - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [code, code_raw].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_400.rb b/lib/cybersource_rest_client/models/inline_response_400.rb index 7928bde1..9067d47a 100644 --- a/lib/cybersource_rest_client/models/inline_response_400.rb +++ b/lib/cybersource_rest_client/models/inline_response_400.rb @@ -14,48 +14,17 @@ module CyberSource class InlineResponse400 - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc + attr_accessor :type - # The status of the submitted transaction. - attr_accessor :status - - # The reason of the status. - attr_accessor :reason - - # The detail message related to the status and reason listed above. + # The detailed message related to the type stated above. attr_accessor :message attr_accessor :details - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'submit_time_utc' => :'submitTimeUtc', - :'status' => :'status', - :'reason' => :'reason', + :'type' => :'type', :'message' => :'message', :'details' => :'details' } @@ -64,11 +33,9 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'submit_time_utc' => :'String', - :'status' => :'String', - :'reason' => :'String', + :'type' => :'String', :'message' => :'String', - :'details' => :'Array' + :'details' => :'Tmsv1instrumentidentifiersDetails' } end @@ -80,16 +47,8 @@ def initialize(attributes = {}) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'reason') - self.reason = attributes[:'reason'] + if attributes.has_key?(:'type') + self.type = attributes[:'type'] end if attributes.has_key?(:'message') @@ -97,9 +56,7 @@ def initialize(attributes = {}) end if attributes.has_key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end + self.details = attributes[:'details'] end end @@ -113,41 +70,15 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - status_validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) - return false unless status_validator.valid?(@status) - reason_validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_CARD', 'CARD_TYPE_NOT_ACCEPTED', 'INVALID_MERCHANT_CONFIGURATION', 'PROCESSOR_UNAVAILABLE', 'INVALID_AMOUNT', 'INVALID_CARD_TYPE', 'DEBIT_CARD_USEAGE_EXCEEDD_LIMIT']) - return false unless reason_validator.valid?(@reason) true end - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) - unless validator.valid?(status) - fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' - end - @status = status - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] reason Object to be assigned - def reason=(reason) - validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_CARD', 'CARD_TYPE_NOT_ACCEPTED', 'INVALID_MERCHANT_CONFIGURATION', 'PROCESSOR_UNAVAILABLE', 'INVALID_AMOUNT', 'INVALID_CARD_TYPE', 'DEBIT_CARD_USEAGE_EXCEEDD_LIMIT']) - unless validator.valid?(reason) - fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' - end - @reason = reason - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && - submit_time_utc == o.submit_time_utc && - status == o.status && - reason == o.reason && + type == o.type && message == o.message && details == o.details end @@ -161,7 +92,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [submit_time_utc, status, reason, message, details].hash + [type, message, details].hash end # Builds the object from hash diff --git a/lib/cybersource_rest_client/models/inline_response_400_1.rb b/lib/cybersource_rest_client/models/inline_response_400_1.rb deleted file mode 100644 index 8c5de690..00000000 --- a/lib/cybersource_rest_client/models/inline_response_400_1.rb +++ /dev/null @@ -1,271 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse4001 - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - # The status of the submitted transaction. - attr_accessor :status - - # The reason of the status. - attr_accessor :reason - - # The detail message related to the status and reason listed above. - attr_accessor :message - - attr_accessor :details - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'submit_time_utc' => :'submitTimeUtc', - :'status' => :'status', - :'reason' => :'reason', - :'message' => :'message', - :'details' => :'details' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'submit_time_utc' => :'String', - :'status' => :'String', - :'reason' => :'String', - :'message' => :'String', - :'details' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'reason') - self.reason = attributes[:'reason'] - end - - if attributes.has_key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.has_key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - status_validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) - return false unless status_validator.valid?(@status) - reason_validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'AUTH_ALREADY_REVERSED', 'MISSING_AUTH', 'TRANSACTION_ALREADY_REVERSED_OR_SETTLED']) - return false unless reason_validator.valid?(@reason) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) - unless validator.valid?(status) - fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' - end - @status = status - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] reason Object to be assigned - def reason=(reason) - validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'AUTH_ALREADY_REVERSED', 'MISSING_AUTH', 'TRANSACTION_ALREADY_REVERSED_OR_SETTLED']) - unless validator.valid?(reason) - fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' - end - @reason = reason - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - submit_time_utc == o.submit_time_utc && - status == o.status && - reason == o.reason && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [submit_time_utc, status, reason, message, details].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_400_2.rb b/lib/cybersource_rest_client/models/inline_response_400_2.rb deleted file mode 100644 index cee1fbf6..00000000 --- a/lib/cybersource_rest_client/models/inline_response_400_2.rb +++ /dev/null @@ -1,271 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse4002 - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - # The status of the submitted transaction. - attr_accessor :status - - # The reason of the status. - attr_accessor :reason - - # The detail message related to the status and reason listed above. - attr_accessor :message - - attr_accessor :details - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'submit_time_utc' => :'submitTimeUtc', - :'status' => :'status', - :'reason' => :'reason', - :'message' => :'message', - :'details' => :'details' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'submit_time_utc' => :'String', - :'status' => :'String', - :'reason' => :'String', - :'message' => :'String', - :'details' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'reason') - self.reason = attributes[:'reason'] - end - - if attributes.has_key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.has_key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - status_validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) - return false unless status_validator.valid?(@status) - reason_validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'EXCEEDS_AUTH_AMOUNT', 'AUTH_ALREADY_REVERSED', 'TRANSACTION_ALREADY_SETTLED', 'MISSING_AUTH', 'TRANSACTION_ALREADY_REVERSED_OR_SETTLED']) - return false unless reason_validator.valid?(@reason) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) - unless validator.valid?(status) - fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' - end - @status = status - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] reason Object to be assigned - def reason=(reason) - validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'EXCEEDS_AUTH_AMOUNT', 'AUTH_ALREADY_REVERSED', 'TRANSACTION_ALREADY_SETTLED', 'MISSING_AUTH', 'TRANSACTION_ALREADY_REVERSED_OR_SETTLED']) - unless validator.valid?(reason) - fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' - end - @reason = reason - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - submit_time_utc == o.submit_time_utc && - status == o.status && - reason == o.reason && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [submit_time_utc, status, reason, message, details].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_400_3.rb b/lib/cybersource_rest_client/models/inline_response_400_3.rb deleted file mode 100644 index 261e312d..00000000 --- a/lib/cybersource_rest_client/models/inline_response_400_3.rb +++ /dev/null @@ -1,271 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse4003 - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - # The status of the submitted transaction. - attr_accessor :status - - # The reason of the status. - attr_accessor :reason - - # The detail message related to the status and reason listed above. - attr_accessor :message - - attr_accessor :details - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'submit_time_utc' => :'submitTimeUtc', - :'status' => :'status', - :'reason' => :'reason', - :'message' => :'message', - :'details' => :'details' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'submit_time_utc' => :'String', - :'status' => :'String', - :'reason' => :'String', - :'message' => :'String', - :'details' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'reason') - self.reason = attributes[:'reason'] - end - - if attributes.has_key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.has_key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - status_validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) - return false unless status_validator.valid?(@status) - reason_validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_CARD', 'INVALID_MERCHANT_CONFIGURATION', 'CAPTURE_ALREADY_VOIDED', 'ACCOUNT_NOT_ALLOWED_CREDIT']) - return false unless reason_validator.valid?(@reason) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) - unless validator.valid?(status) - fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' - end - @status = status - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] reason Object to be assigned - def reason=(reason) - validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_CARD', 'INVALID_MERCHANT_CONFIGURATION', 'CAPTURE_ALREADY_VOIDED', 'ACCOUNT_NOT_ALLOWED_CREDIT']) - unless validator.valid?(reason) - fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' - end - @reason = reason - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - submit_time_utc == o.submit_time_utc && - status == o.status && - reason == o.reason && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [submit_time_utc, status, reason, message, details].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_400_4.rb b/lib/cybersource_rest_client/models/inline_response_400_4.rb deleted file mode 100644 index 6a948f34..00000000 --- a/lib/cybersource_rest_client/models/inline_response_400_4.rb +++ /dev/null @@ -1,271 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse4004 - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - # The status of the submitted transaction. - attr_accessor :status - - # The reason of the status. - attr_accessor :reason - - # The detail message related to the status and reason listed above. - attr_accessor :message - - attr_accessor :details - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'submit_time_utc' => :'submitTimeUtc', - :'status' => :'status', - :'reason' => :'reason', - :'message' => :'message', - :'details' => :'details' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'submit_time_utc' => :'String', - :'status' => :'String', - :'reason' => :'String', - :'message' => :'String', - :'details' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'reason') - self.reason = attributes[:'reason'] - end - - if attributes.has_key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.has_key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - status_validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) - return false unless status_validator.valid?(@status) - reason_validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'NOT_VOIDABLE']) - return false unless reason_validator.valid?(@reason) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) - unless validator.valid?(status) - fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' - end - @status = status - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] reason Object to be assigned - def reason=(reason) - validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'NOT_VOIDABLE']) - unless validator.valid?(reason) - fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' - end - @reason = reason - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - submit_time_utc == o.submit_time_utc && - status == o.status && - reason == o.reason && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [submit_time_utc, status, reason, message, details].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_400_5.rb b/lib/cybersource_rest_client/models/inline_response_400_5.rb deleted file mode 100644 index 8f363dde..00000000 --- a/lib/cybersource_rest_client/models/inline_response_400_5.rb +++ /dev/null @@ -1,193 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse4005 - attr_accessor :error_information - - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'error_information' => :'errorInformation', - :'submit_time_utc' => :'submitTimeUtc' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'error_information' => :'InlineResponse4005ErrorInformation', - :'submit_time_utc' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'errorInformation') - self.error_information = attributes[:'errorInformation'] - end - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - error_information == o.error_information && - submit_time_utc == o.submit_time_utc - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [error_information, submit_time_utc].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_400_5_error_information.rb b/lib/cybersource_rest_client/models/inline_response_400_5_error_information.rb deleted file mode 100644 index 9fadc660..00000000 --- a/lib/cybersource_rest_client/models/inline_response_400_5_error_information.rb +++ /dev/null @@ -1,203 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse4005ErrorInformation - attr_accessor :reason - - attr_accessor :message - - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'reason' => :'reason', - :'message' => :'message', - :'details' => :'details' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'reason' => :'String', - :'message' => :'String', - :'details' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'reason') - self.reason = attributes[:'reason'] - end - - if attributes.has_key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.has_key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - reason == o.reason && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [reason, message, details].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_400_5_error_information_details.rb b/lib/cybersource_rest_client/models/inline_response_400_5_error_information_details.rb deleted file mode 100644 index 61913292..00000000 --- a/lib/cybersource_rest_client/models/inline_response_400_5_error_information_details.rb +++ /dev/null @@ -1,194 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse4005ErrorInformationDetails - # This is the flattened JSON object field name/path that is either missing or invalid. - attr_accessor :field - - # The detailed message related to the status and reason listed above. - attr_accessor :message - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'field' => :'field', - :'message' => :'message' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'field' => :'String', - :'message' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'field') - self.field = attributes[:'field'] - end - - if attributes.has_key?(:'message') - self.message = attributes[:'message'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - field == o.field && - message == o.message - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [field, message].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_400_6.rb b/lib/cybersource_rest_client/models/inline_response_400_6.rb deleted file mode 100644 index d54140db..00000000 --- a/lib/cybersource_rest_client/models/inline_response_400_6.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse4006 - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - # The status of the submitted transaction. - attr_accessor :status - - # The reason of the status. - attr_accessor :reason - - # The detail message related to the status and reason listed above. Possible value is: - Your aggregator or acquirer is not accepting transactions from you at this time. - Your aggregator or acquirer is not accepting this transaction. - CyberSource declined the request because the credit card has expired. You might also receive this value if the expiration date you provided does not match the date the issuing bank has on file. - The bank declined the transaction. - The merchant reference number for this authorization request matches the merchant reference number of another authorization request that you sent within the past 15 minutes. Resend the request with a unique merchant reference number. - The credit card number did not pass CyberSource basic checks. - Data provided is not consistent with the request. For example, you requested a product with negative cost. - The request is missing a required field. - attr_accessor :message - - attr_accessor :details - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'submit_time_utc' => :'submitTimeUtc', - :'status' => :'status', - :'reason' => :'reason', - :'message' => :'message', - :'details' => :'details' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'submit_time_utc' => :'String', - :'status' => :'String', - :'reason' => :'String', - :'message' => :'String', - :'details' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'reason') - self.reason = attributes[:'reason'] - end - - if attributes.has_key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.has_key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - reason_validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'INVALID_AMOUNT', 'DEBIT_CARD_USEAGE_EXCEEDD_LIMIT']) - return false unless reason_validator.valid?(@reason) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] reason Object to be assigned - def reason=(reason) - validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'INVALID_AMOUNT', 'DEBIT_CARD_USEAGE_EXCEEDD_LIMIT']) - unless validator.valid?(reason) - fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' - end - @reason = reason - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - submit_time_utc == o.submit_time_utc && - status == o.status && - reason == o.reason && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [submit_time_utc, status, reason, message, details].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_400_7.rb b/lib/cybersource_rest_client/models/inline_response_400_7.rb deleted file mode 100644 index c31f5176..00000000 --- a/lib/cybersource_rest_client/models/inline_response_400_7.rb +++ /dev/null @@ -1,247 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - # Error Bean - class InlineResponse4007 - # Error code - attr_accessor :code - - # Error message - attr_accessor :message - - # Localization Key Name - attr_accessor :localization_key - - # Correlation Id - attr_accessor :correlation_id - - # Error Detail - attr_accessor :detail - - # Error fields List - attr_accessor :fields - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'message' => :'message', - :'localization_key' => :'localizationKey', - :'correlation_id' => :'correlationId', - :'detail' => :'detail', - :'fields' => :'fields' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'code' => :'String', - :'message' => :'String', - :'localization_key' => :'String', - :'correlation_id' => :'String', - :'detail' => :'String', - :'fields' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.has_key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.has_key?(:'localizationKey') - self.localization_key = attributes[:'localizationKey'] - end - - if attributes.has_key?(:'correlationId') - self.correlation_id = attributes[:'correlationId'] - end - - if attributes.has_key?(:'detail') - self.detail = attributes[:'detail'] - end - - if attributes.has_key?(:'fields') - if (value = attributes[:'fields']).is_a?(Array) - self.fields = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @code.nil? - invalid_properties.push('invalid value for "code", code cannot be nil.') - end - - if @message.nil? - invalid_properties.push('invalid value for "message", message cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @code.nil? - return false if @message.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - message == o.message && - localization_key == o.localization_key && - correlation_id == o.correlation_id && - detail == o.detail && - fields == o.fields - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [code, message, localization_key, correlation_id, detail, fields].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_400_7_fields.rb b/lib/cybersource_rest_client/models/inline_response_400_7_fields.rb deleted file mode 100644 index 186f7b8d..00000000 --- a/lib/cybersource_rest_client/models/inline_response_400_7_fields.rb +++ /dev/null @@ -1,205 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - # Provide validation failed input field details - class InlineResponse4007Fields - # Path of the failed property - attr_accessor :path - - # Error description about validation failed field - attr_accessor :message - - # Localized Key Name - attr_accessor :localization_key - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'path' => :'path', - :'message' => :'message', - :'localization_key' => :'localizationKey' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'path' => :'String', - :'message' => :'String', - :'localization_key' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'path') - self.path = attributes[:'path'] - end - - if attributes.has_key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.has_key?(:'localizationKey') - self.localization_key = attributes[:'localizationKey'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - path == o.path && - message == o.message && - localization_key == o.localization_key - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [path, message, localization_key].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_400_8.rb b/lib/cybersource_rest_client/models/inline_response_400_8.rb deleted file mode 100644 index b2fc80f5..00000000 --- a/lib/cybersource_rest_client/models/inline_response_400_8.rb +++ /dev/null @@ -1,202 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse4008 - attr_accessor :type - - # The detailed message related to the type stated above. - attr_accessor :message - - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'type' => :'type', - :'message' => :'message', - :'details' => :'details' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'type' => :'String', - :'message' => :'String', - :'details' => :'Tmsv1instrumentidentifiersDetails' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.has_key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.has_key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - type == o.type && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [type, message, details].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_400_9.rb b/lib/cybersource_rest_client/models/inline_response_400_9.rb deleted file mode 100644 index 0c921a79..00000000 --- a/lib/cybersource_rest_client/models/inline_response_400_9.rb +++ /dev/null @@ -1,249 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse4009 - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - # The status of the submitted transaction. - attr_accessor :status - - # The detail message related to the status and reason listed above. - attr_accessor :message - - attr_accessor :details - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'submit_time_utc' => :'submitTimeUtc', - :'status' => :'status', - :'message' => :'message', - :'details' => :'details' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'submit_time_utc' => :'String', - :'status' => :'String', - :'message' => :'String', - :'details' => :'Array' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.has_key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - status_validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) - return false unless status_validator.valid?(@status) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) - unless validator.valid?(status) - fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' - end - @status = status - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - submit_time_utc == o.submit_time_utc && - status == o.status && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [submit_time_utc, status, message, details].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_409.rb b/lib/cybersource_rest_client/models/inline_response_409.rb deleted file mode 100644 index 01d31728..00000000 --- a/lib/cybersource_rest_client/models/inline_response_409.rb +++ /dev/null @@ -1,183 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse409 - attr_accessor :_links - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_links' => :'_links' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_links' => :'InlineResponse409Links' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'_links') - self._links = attributes[:'_links'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _links == o._links - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [_links].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_409__links.rb b/lib/cybersource_rest_client/models/inline_response_409__links.rb deleted file mode 100644 index ee40049f..00000000 --- a/lib/cybersource_rest_client/models/inline_response_409__links.rb +++ /dev/null @@ -1,183 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse409Links - attr_accessor :payment_instruments - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'payment_instruments' => :'paymentInstruments' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'payment_instruments' => :'InlineResponse409LinksPaymentInstruments' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'paymentInstruments') - self.payment_instruments = attributes[:'paymentInstruments'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - payment_instruments == o.payment_instruments - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [payment_instruments].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_409__links_payment_instruments.rb b/lib/cybersource_rest_client/models/inline_response_409__links_payment_instruments.rb deleted file mode 100644 index 97ae44b5..00000000 --- a/lib/cybersource_rest_client/models/inline_response_409__links_payment_instruments.rb +++ /dev/null @@ -1,183 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse409LinksPaymentInstruments - attr_accessor :href - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'href' => :'href' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'href' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'href') - self.href = attributes[:'href'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - href == o.href - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [href].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_500.rb b/lib/cybersource_rest_client/models/inline_response_500.rb deleted file mode 100644 index 914225f7..00000000 --- a/lib/cybersource_rest_client/models/inline_response_500.rb +++ /dev/null @@ -1,193 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse500 - attr_accessor :error_information - - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'error_information' => :'errorInformation', - :'submit_time_utc' => :'submitTimeUtc' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'error_information' => :'InlineResponse500ErrorInformation', - :'submit_time_utc' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'errorInformation') - self.error_information = attributes[:'errorInformation'] - end - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - error_information == o.error_information && - submit_time_utc == o.submit_time_utc - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [error_information, submit_time_utc].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_500_error_information.rb b/lib/cybersource_rest_client/models/inline_response_500_error_information.rb deleted file mode 100644 index db972f6e..00000000 --- a/lib/cybersource_rest_client/models/inline_response_500_error_information.rb +++ /dev/null @@ -1,194 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse500ErrorInformation - # The reason of status - attr_accessor :reason - - # The detailed message related to the status and reason listed above. - attr_accessor :message - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'reason' => :'reason', - :'message' => :'message' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'reason' => :'String', - :'message' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'reason') - self.reason = attributes[:'reason'] - end - - if attributes.has_key?(:'message') - self.message = attributes[:'message'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - reason == o.reason && - message == o.message - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [reason, message].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/inline_response_502.rb b/lib/cybersource_rest_client/models/inline_response_502.rb deleted file mode 100644 index 3ba349d5..00000000 --- a/lib/cybersource_rest_client/models/inline_response_502.rb +++ /dev/null @@ -1,260 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse502 - # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. - attr_accessor :submit_time_utc - - # The status of the submitted transaction. - attr_accessor :status - - # The reason of the status. - attr_accessor :reason - - # The detail message related to the status and reason listed above. - attr_accessor :message - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'submit_time_utc' => :'submitTimeUtc', - :'status' => :'status', - :'reason' => :'reason', - :'message' => :'message' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'submit_time_utc' => :'String', - :'status' => :'String', - :'reason' => :'String', - :'message' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'submitTimeUtc') - self.submit_time_utc = attributes[:'submitTimeUtc'] - end - - if attributes.has_key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.has_key?(:'reason') - self.reason = attributes[:'reason'] - end - - if attributes.has_key?(:'message') - self.message = attributes[:'message'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - status_validator = EnumAttributeValidator.new('String', ['SERVER_ERROR']) - return false unless status_validator.valid?(@status) - reason_validator = EnumAttributeValidator.new('String', ['SYSTEM_ERROR', 'SERVER_TIMEOUT', 'SERVICE_TIMEOUT', 'PROCESSOR_TIMEOUT']) - return false unless reason_validator.valid?(@reason) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('String', ['SERVER_ERROR']) - unless validator.valid?(status) - fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' - end - @status = status - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] reason Object to be assigned - def reason=(reason) - validator = EnumAttributeValidator.new('String', ['SYSTEM_ERROR', 'SERVER_TIMEOUT', 'SERVICE_TIMEOUT', 'PROCESSOR_TIMEOUT']) - unless validator.valid?(reason) - fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' - end - @reason = reason - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - submit_time_utc == o.submit_time_utc && - status == o.status && - reason == o.reason && - message == o.message - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [submit_time_utc, status, reason, message].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/key_result.rb b/lib/cybersource_rest_client/models/key_result.rb index 7cc22f29..9db3031b 100644 --- a/lib/cybersource_rest_client/models/key_result.rb +++ b/lib/cybersource_rest_client/models/key_result.rb @@ -34,8 +34,8 @@ def self.attribute_map def self.swagger_types { :'key_id' => :'String', - :'der' => :'InlineResponse200Der', - :'jwk' => :'InlineResponse200Jwk' + :'der' => :'FlexV1KeysPost200ResponseDer', + :'jwk' => :'FlexV1KeysPost200ResponseJwk' } end diff --git a/lib/cybersource_rest_client/models/oct_create_payment_request.rb b/lib/cybersource_rest_client/models/oct_create_payment_request.rb deleted file mode 100644 index dc6f820d..00000000 --- a/lib/cybersource_rest_client/models/oct_create_payment_request.rb +++ /dev/null @@ -1,237 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class OctCreatePaymentRequest - attr_accessor :client_reference_information - - attr_accessor :order_information - - attr_accessor :merchant_information - - attr_accessor :recipient_information - - attr_accessor :sender_information - - attr_accessor :processing_information - - attr_accessor :payment_information - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'client_reference_information' => :'clientReferenceInformation', - :'order_information' => :'orderInformation', - :'merchant_information' => :'merchantInformation', - :'recipient_information' => :'recipientInformation', - :'sender_information' => :'senderInformation', - :'processing_information' => :'processingInformation', - :'payment_information' => :'paymentInformation' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'client_reference_information' => :'InlineResponse201ClientReferenceInformation', - :'order_information' => :'Ptsv2payoutsOrderInformation', - :'merchant_information' => :'Ptsv2payoutsMerchantInformation', - :'recipient_information' => :'Ptsv2payoutsRecipientInformation', - :'sender_information' => :'Ptsv2payoutsSenderInformation', - :'processing_information' => :'Ptsv2payoutsProcessingInformation', - :'payment_information' => :'Ptsv2payoutsPaymentInformation' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'clientReferenceInformation') - self.client_reference_information = attributes[:'clientReferenceInformation'] - end - - if attributes.has_key?(:'orderInformation') - self.order_information = attributes[:'orderInformation'] - end - - if attributes.has_key?(:'merchantInformation') - self.merchant_information = attributes[:'merchantInformation'] - end - - if attributes.has_key?(:'recipientInformation') - self.recipient_information = attributes[:'recipientInformation'] - end - - if attributes.has_key?(:'senderInformation') - self.sender_information = attributes[:'senderInformation'] - end - - if attributes.has_key?(:'processingInformation') - self.processing_information = attributes[:'processingInformation'] - end - - if attributes.has_key?(:'paymentInformation') - self.payment_information = attributes[:'paymentInformation'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - client_reference_information == o.client_reference_information && - order_information == o.order_information && - merchant_information == o.merchant_information && - recipient_information == o.recipient_information && - sender_information == o.sender_information && - processing_information == o.processing_information && - payment_information == o.payment_information - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [client_reference_information, order_information, merchant_information, recipient_information, sender_information, processing_information, payment_information].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get200_response.rb b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get200_response.rb new file mode 100644 index 00000000..72426cd8 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get200_response.rb @@ -0,0 +1,204 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV1TransactionBatchesGet200Response + attr_accessor :transaction_batches + + attr_accessor :_links + + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'transaction_batches' => :'transactionBatches', + :'_links' => :'_links', + :'submit_time_utc' => :'submitTimeUtc' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'transaction_batches' => :'Array', + :'_links' => :'PtsV1TransactionBatchesGet200ResponseLinks', + :'submit_time_utc' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'transactionBatches') + if (value = attributes[:'transactionBatches']).is_a?(Array) + self.transaction_batches = value + end + end + + if attributes.has_key?(:'_links') + self._links = attributes[:'_links'] + end + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + transaction_batches == o.transaction_batches && + _links == o._links && + submit_time_utc == o.submit_time_utc + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [transaction_batches, _links, submit_time_utc].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get200_response__links.rb b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get200_response__links.rb new file mode 100644 index 00000000..d855bf28 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get200_response__links.rb @@ -0,0 +1,183 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV1TransactionBatchesGet200ResponseLinks + attr_accessor :_self + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_self' => :'self' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_self' => :'PtsV1TransactionBatchesGet200ResponseLinksSelf' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'self') + self._self = attributes[:'self'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _self == o._self + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [_self].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get200_response__links_self.rb b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get200_response__links_self.rb new file mode 100644 index 00000000..3ef8ab98 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get200_response__links_self.rb @@ -0,0 +1,192 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV1TransactionBatchesGet200ResponseLinksSelf + attr_accessor :href + + attr_accessor :method + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'href' => :'href', + :'method' => :'method' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'href' => :'String', + :'method' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'href') + self.href = attributes[:'href'] + end + + if attributes.has_key?(:'method') + self.method = attributes[:'method'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + href == o.href && + method == o.method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [href, method].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get200_response_transaction_batches.rb b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get200_response_transaction_batches.rb new file mode 100644 index 00000000..8cc7a271 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get200_response_transaction_batches.rb @@ -0,0 +1,277 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV1TransactionBatchesGet200ResponseTransactionBatches + # Unique identifier assigned to the batch file. + attr_accessor :id + + # Date when the batch template was update. + attr_accessor :upload_date + + # The date when the batch template processing completed. + attr_accessor :completion_date + + # Number of transactions in the transaction. + attr_accessor :transaction_count + + # Number of transactions accepted. + attr_accessor :accepted_transaction_count + + # Number of transactions rejected. + attr_accessor :rejected_transaction_count + + # The status of you batch template processing. + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'upload_date' => :'uploadDate', + :'completion_date' => :'completionDate', + :'transaction_count' => :'transactionCount', + :'accepted_transaction_count' => :'acceptedTransactionCount', + :'rejected_transaction_count' => :'rejectedTransactionCount', + :'status' => :'status' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'id' => :'String', + :'upload_date' => :'String', + :'completion_date' => :'String', + :'transaction_count' => :'Integer', + :'accepted_transaction_count' => :'Integer', + :'rejected_transaction_count' => :'String', + :'status' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'uploadDate') + self.upload_date = attributes[:'uploadDate'] + end + + if attributes.has_key?(:'completionDate') + self.completion_date = attributes[:'completionDate'] + end + + if attributes.has_key?(:'transactionCount') + self.transaction_count = attributes[:'transactionCount'] + end + + if attributes.has_key?(:'acceptedTransactionCount') + self.accepted_transaction_count = attributes[:'acceptedTransactionCount'] + end + + if attributes.has_key?(:'rejectedTransactionCount') + self.rejected_transaction_count = attributes[:'rejectedTransactionCount'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@id.nil? && @id.to_s.length > 8 + invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 8.') + end + + if !@id.nil? && @id.to_s.length < 1 + invalid_properties.push('invalid value for "id", the character length must be great than or equal to 1.') + end + + if !@id.nil? && @id !~ Regexp.new(/^[a-zA-Z0-9_+-]*$/) + invalid_properties.push('invalid value for "id", must conform to the pattern /^[a-zA-Z0-9_+-]*$/.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@id.nil? && @id.to_s.length > 8 + return false if !@id.nil? && @id.to_s.length < 1 + return false if !@id.nil? && @id !~ Regexp.new(/^[a-zA-Z0-9_+-]*$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if !id.nil? && id.to_s.length > 8 + fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 8.' + end + + if !id.nil? && id.to_s.length < 1 + fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.' + end + + if !id.nil? && id !~ Regexp.new(/^[a-zA-Z0-9_+-]*$/) + fail ArgumentError, 'invalid value for "id", must conform to the pattern /^[a-zA-Z0-9_+-]*$/.' + end + + @id = id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + upload_date == o.upload_date && + completion_date == o.completion_date && + transaction_count == o.transaction_count && + accepted_transaction_count == o.accepted_transaction_count && + rejected_transaction_count == o.rejected_transaction_count && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [id, upload_date, completion_date, transaction_count, accepted_transaction_count, rejected_transaction_count, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get400_response.rb b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get400_response.rb new file mode 100644 index 00000000..c19724ba --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get400_response.rb @@ -0,0 +1,193 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV1TransactionBatchesGet400Response + attr_accessor :error_information + + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'error_information' => :'errorInformation', + :'submit_time_utc' => :'submitTimeUtc' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'error_information' => :'PtsV1TransactionBatchesGet400ResponseErrorInformation', + :'submit_time_utc' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'errorInformation') + self.error_information = attributes[:'errorInformation'] + end + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + error_information == o.error_information && + submit_time_utc == o.submit_time_utc + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [error_information, submit_time_utc].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get400_response_error_information.rb b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get400_response_error_information.rb new file mode 100644 index 00000000..5fc2b4eb --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get400_response_error_information.rb @@ -0,0 +1,203 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV1TransactionBatchesGet400ResponseErrorInformation + attr_accessor :reason + + attr_accessor :message + + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reason' => :'reason', + :'message' => :'message', + :'details' => :'details' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'reason' => :'String', + :'message' => :'String', + :'details' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'reason') + self.reason = attributes[:'reason'] + end + + if attributes.has_key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.has_key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + reason == o.reason && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [reason, message, details].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get400_response_error_information_details.rb b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get400_response_error_information_details.rb new file mode 100644 index 00000000..3632a1d8 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get400_response_error_information_details.rb @@ -0,0 +1,194 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV1TransactionBatchesGet400ResponseErrorInformationDetails + # This is the flattened JSON object field name/path that is either missing or invalid. + attr_accessor :field + + # The detailed message related to the status and reason listed above. + attr_accessor :message + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'field' => :'field', + :'message' => :'message' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'field' => :'String', + :'message' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'field') + self.field = attributes[:'field'] + end + + if attributes.has_key?(:'message') + self.message = attributes[:'message'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + field == o.field && + message == o.message + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [field, message].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get500_response.rb b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get500_response.rb new file mode 100644 index 00000000..cacacf6c --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get500_response.rb @@ -0,0 +1,193 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV1TransactionBatchesGet500Response + attr_accessor :error_information + + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'error_information' => :'errorInformation', + :'submit_time_utc' => :'submitTimeUtc' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'error_information' => :'PtsV1TransactionBatchesGet500ResponseErrorInformation', + :'submit_time_utc' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'errorInformation') + self.error_information = attributes[:'errorInformation'] + end + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + error_information == o.error_information && + submit_time_utc == o.submit_time_utc + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [error_information, submit_time_utc].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get500_response_error_information.rb b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get500_response_error_information.rb new file mode 100644 index 00000000..fe8fbb6c --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get500_response_error_information.rb @@ -0,0 +1,194 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV1TransactionBatchesGet500ResponseErrorInformation + # The reason of status + attr_accessor :reason + + # The detailed message related to the status and reason listed above. + attr_accessor :message + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reason' => :'reason', + :'message' => :'message' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'reason' => :'String', + :'message' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'reason') + self.reason = attributes[:'reason'] + end + + if attributes.has_key?(:'message') + self.message = attributes[:'message'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + reason == o.reason && + message == o.message + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [reason, message].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_credits_post201_response.rb b/lib/cybersource_rest_client/models/pts_v2_credits_post201_response.rb new file mode 100644 index 00000000..33994c28 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_credits_post201_response.rb @@ -0,0 +1,323 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2CreditsPost201Response + attr_accessor :_links + + # An unique identification number assigned by CyberSource to identify the submitted request. + attr_accessor :id + + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # The status of the submitted transaction. + attr_accessor :status + + # The reconciliation id for the submitted transaction. This value is not returned for all processors. + attr_accessor :reconciliation_id + + attr_accessor :client_reference_information + + attr_accessor :credit_amount_details + + attr_accessor :processor_information + + attr_accessor :order_information + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_links' => :'_links', + :'id' => :'id', + :'submit_time_utc' => :'submitTimeUtc', + :'status' => :'status', + :'reconciliation_id' => :'reconciliationId', + :'client_reference_information' => :'clientReferenceInformation', + :'credit_amount_details' => :'creditAmountDetails', + :'processor_information' => :'processorInformation', + :'order_information' => :'orderInformation' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_links' => :'PtsV2PaymentsRefundPost201ResponseLinks', + :'id' => :'String', + :'submit_time_utc' => :'String', + :'status' => :'String', + :'reconciliation_id' => :'String', + :'client_reference_information' => :'PtsV2PaymentsPost201ResponseClientReferenceInformation', + :'credit_amount_details' => :'PtsV2CreditsPost201ResponseCreditAmountDetails', + :'processor_information' => :'PtsV2PaymentsRefundPost201ResponseProcessorInformation', + :'order_information' => :'PtsV2PaymentsRefundPost201ResponseOrderInformation' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'_links') + self._links = attributes[:'_links'] + end + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'reconciliationId') + self.reconciliation_id = attributes[:'reconciliationId'] + end + + if attributes.has_key?(:'clientReferenceInformation') + self.client_reference_information = attributes[:'clientReferenceInformation'] + end + + if attributes.has_key?(:'creditAmountDetails') + self.credit_amount_details = attributes[:'creditAmountDetails'] + end + + if attributes.has_key?(:'processorInformation') + self.processor_information = attributes[:'processorInformation'] + end + + if attributes.has_key?(:'orderInformation') + self.order_information = attributes[:'orderInformation'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@id.nil? && @id.to_s.length > 26 + invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') + end + + if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + invalid_properties.push('invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@id.nil? && @id.to_s.length > 26 + status_validator = EnumAttributeValidator.new('String', ['PENDING']) + return false unless status_validator.valid?(@status) + return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if !id.nil? && id.to_s.length > 26 + fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' + end + + @id = id + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ['PENDING']) + unless validator.valid?(status) + fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' + end + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] reconciliation_id Value to be assigned + def reconciliation_id=(reconciliation_id) + if !reconciliation_id.nil? && reconciliation_id.to_s.length > 60 + fail ArgumentError, 'invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.' + end + + @reconciliation_id = reconciliation_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _links == o._links && + id == o.id && + submit_time_utc == o.submit_time_utc && + status == o.status && + reconciliation_id == o.reconciliation_id && + client_reference_information == o.client_reference_information && + credit_amount_details == o.credit_amount_details && + processor_information == o.processor_information && + order_information == o.order_information + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [_links, id, submit_time_utc, status, reconciliation_id, client_reference_information, credit_amount_details, processor_information, order_information].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_credit_amount_details.rb b/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_credit_amount_details.rb new file mode 100644 index 00000000..623da4cc --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_credit_amount_details.rb @@ -0,0 +1,224 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2CreditsPost201ResponseCreditAmountDetails + # Total amount of the credit. + attr_accessor :credit_amount + + # Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. + attr_accessor :currency + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'credit_amount' => :'creditAmount', + :'currency' => :'currency' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'credit_amount' => :'String', + :'currency' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'creditAmount') + self.credit_amount = attributes[:'creditAmount'] + end + + if attributes.has_key?(:'currency') + self.currency = attributes[:'currency'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@credit_amount.nil? && @credit_amount.to_s.length > 15 + invalid_properties.push('invalid value for "credit_amount", the character length must be smaller than or equal to 15.') + end + + if !@currency.nil? && @currency.to_s.length > 3 + invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@credit_amount.nil? && @credit_amount.to_s.length > 15 + return false if !@currency.nil? && @currency.to_s.length > 3 + true + end + + # Custom attribute writer method with validation + # @param [Object] credit_amount Value to be assigned + def credit_amount=(credit_amount) + if !credit_amount.nil? && credit_amount.to_s.length > 15 + fail ArgumentError, 'invalid value for "credit_amount", the character length must be smaller than or equal to 15.' + end + + @credit_amount = credit_amount + end + + # Custom attribute writer method with validation + # @param [Object] currency Value to be assigned + def currency=(currency) + if !currency.nil? && currency.to_s.length > 3 + fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.' + end + + @currency = currency + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credit_amount == o.credit_amount && + currency == o.currency + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [credit_amount, currency].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response.rb b/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response.rb new file mode 100644 index 00000000..7efa9fb9 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response.rb @@ -0,0 +1,314 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsCapturesPost201Response + attr_accessor :_links + + # An unique identification number assigned by CyberSource to identify the submitted request. + attr_accessor :id + + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # The status of the submitted transaction. + attr_accessor :status + + # The reconciliation id for the submitted transaction. This value is not returned for all processors. + attr_accessor :reconciliation_id + + attr_accessor :client_reference_information + + attr_accessor :processor_information + + attr_accessor :order_information + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_links' => :'_links', + :'id' => :'id', + :'submit_time_utc' => :'submitTimeUtc', + :'status' => :'status', + :'reconciliation_id' => :'reconciliationId', + :'client_reference_information' => :'clientReferenceInformation', + :'processor_information' => :'processorInformation', + :'order_information' => :'orderInformation' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_links' => :'PtsV2PaymentsCapturesPost201ResponseLinks', + :'id' => :'String', + :'submit_time_utc' => :'String', + :'status' => :'String', + :'reconciliation_id' => :'String', + :'client_reference_information' => :'PtsV2PaymentsPost201ResponseClientReferenceInformation', + :'processor_information' => :'PtsV2PaymentsCapturesPost201ResponseProcessorInformation', + :'order_information' => :'PtsV2PaymentsCapturesPost201ResponseOrderInformation' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'_links') + self._links = attributes[:'_links'] + end + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'reconciliationId') + self.reconciliation_id = attributes[:'reconciliationId'] + end + + if attributes.has_key?(:'clientReferenceInformation') + self.client_reference_information = attributes[:'clientReferenceInformation'] + end + + if attributes.has_key?(:'processorInformation') + self.processor_information = attributes[:'processorInformation'] + end + + if attributes.has_key?(:'orderInformation') + self.order_information = attributes[:'orderInformation'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@id.nil? && @id.to_s.length > 26 + invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') + end + + if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + invalid_properties.push('invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@id.nil? && @id.to_s.length > 26 + status_validator = EnumAttributeValidator.new('String', ['PENDING']) + return false unless status_validator.valid?(@status) + return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if !id.nil? && id.to_s.length > 26 + fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' + end + + @id = id + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ['PENDING']) + unless validator.valid?(status) + fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' + end + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] reconciliation_id Value to be assigned + def reconciliation_id=(reconciliation_id) + if !reconciliation_id.nil? && reconciliation_id.to_s.length > 60 + fail ArgumentError, 'invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.' + end + + @reconciliation_id = reconciliation_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _links == o._links && + id == o.id && + submit_time_utc == o.submit_time_utc && + status == o.status && + reconciliation_id == o.reconciliation_id && + client_reference_information == o.client_reference_information && + processor_information == o.processor_information && + order_information == o.order_information + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [_links, id, submit_time_utc, status, reconciliation_id, client_reference_information, processor_information, order_information].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response__links.rb b/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response__links.rb new file mode 100644 index 00000000..0a56aced --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response__links.rb @@ -0,0 +1,201 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsCapturesPost201ResponseLinks + attr_accessor :_self + + attr_accessor :void + + attr_accessor :refund + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_self' => :'self', + :'void' => :'void', + :'refund' => :'refund' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_self' => :'PtsV2PaymentsPost201ResponseLinksSelf', + :'void' => :'PtsV2PaymentsPost201ResponseLinksSelf', + :'refund' => :'PtsV2PaymentsPost201ResponseLinksSelf' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'self') + self._self = attributes[:'self'] + end + + if attributes.has_key?(:'void') + self.void = attributes[:'void'] + end + + if attributes.has_key?(:'refund') + self.refund = attributes[:'refund'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _self == o._self && + void == o.void && + refund == o.refund + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [_self, void, refund].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_order_information.rb b/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_order_information.rb new file mode 100644 index 00000000..ac600916 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_order_information.rb @@ -0,0 +1,192 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsCapturesPost201ResponseOrderInformation + attr_accessor :amount_details + + attr_accessor :invoice_details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'amount_details' => :'amountDetails', + :'invoice_details' => :'invoiceDetails' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'amount_details' => :'PtsV2PaymentsCapturesPost201ResponseOrderInformationAmountDetails', + :'invoice_details' => :'PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'amountDetails') + self.amount_details = attributes[:'amountDetails'] + end + + if attributes.has_key?(:'invoiceDetails') + self.invoice_details = attributes[:'invoiceDetails'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + amount_details == o.amount_details && + invoice_details == o.invoice_details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [amount_details, invoice_details].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_order_information_amount_details.rb b/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_order_information_amount_details.rb new file mode 100644 index 00000000..d2cbfe12 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_order_information_amount_details.rb @@ -0,0 +1,224 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsCapturesPost201ResponseOrderInformationAmountDetails + # Amount you requested for the capture. + attr_accessor :total_amount + + # Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. + attr_accessor :currency + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'total_amount' => :'totalAmount', + :'currency' => :'currency' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'total_amount' => :'String', + :'currency' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'totalAmount') + self.total_amount = attributes[:'totalAmount'] + end + + if attributes.has_key?(:'currency') + self.currency = attributes[:'currency'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@total_amount.nil? && @total_amount.to_s.length > 15 + invalid_properties.push('invalid value for "total_amount", the character length must be smaller than or equal to 15.') + end + + if !@currency.nil? && @currency.to_s.length > 3 + invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@total_amount.nil? && @total_amount.to_s.length > 15 + return false if !@currency.nil? && @currency.to_s.length > 3 + true + end + + # Custom attribute writer method with validation + # @param [Object] total_amount Value to be assigned + def total_amount=(total_amount) + if !total_amount.nil? && total_amount.to_s.length > 15 + fail ArgumentError, 'invalid value for "total_amount", the character length must be smaller than or equal to 15.' + end + + @total_amount = total_amount + end + + # Custom attribute writer method with validation + # @param [Object] currency Value to be assigned + def currency=(currency) + if !currency.nil? && currency.to_s.length > 3 + fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.' + end + + @currency = currency + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + total_amount == o.total_amount && + currency == o.currency + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [total_amount, currency].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_processor_information.rb b/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_processor_information.rb new file mode 100644 index 00000000..f60b7260 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_processor_information.rb @@ -0,0 +1,199 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsCapturesPost201ResponseProcessorInformation + # Processor transaction ID. This value identifies the transaction on a host system. This value is supported only for Moneris. It contains this information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003: - Terminal ID = 66012345 - Shift number = 001 - Batch number = 069 - Transaction number = 003 + attr_accessor :transaction_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'transaction_id' => :'transactionId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'transaction_id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'transactionId') + self.transaction_id = attributes[:'transactionId'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@transaction_id.nil? && @transaction_id.to_s.length > 18 + invalid_properties.push('invalid value for "transaction_id", the character length must be smaller than or equal to 18.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@transaction_id.nil? && @transaction_id.to_s.length > 18 + true + end + + # Custom attribute writer method with validation + # @param [Object] transaction_id Value to be assigned + def transaction_id=(transaction_id) + if !transaction_id.nil? && transaction_id.to_s.length > 18 + fail ArgumentError, 'invalid value for "transaction_id", the character length must be smaller than or equal to 18.' + end + + @transaction_id = transaction_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + transaction_id == o.transaction_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [transaction_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_captures_post400_response.rb b/lib/cybersource_rest_client/models/pts_v2_payments_captures_post400_response.rb new file mode 100644 index 00000000..0fb1bcda --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_captures_post400_response.rb @@ -0,0 +1,271 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsCapturesPost400Response + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # The status of the submitted transaction. + attr_accessor :status + + # The reason of the status. + attr_accessor :reason + + # The detail message related to the status and reason listed above. + attr_accessor :message + + attr_accessor :details + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'submit_time_utc' => :'submitTimeUtc', + :'status' => :'status', + :'reason' => :'reason', + :'message' => :'message', + :'details' => :'details' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'submit_time_utc' => :'String', + :'status' => :'String', + :'reason' => :'String', + :'message' => :'String', + :'details' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'reason') + self.reason = attributes[:'reason'] + end + + if attributes.has_key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.has_key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + status_validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) + return false unless status_validator.valid?(@status) + reason_validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'EXCEEDS_AUTH_AMOUNT', 'AUTH_ALREADY_REVERSED', 'TRANSACTION_ALREADY_SETTLED', 'MISSING_AUTH', 'TRANSACTION_ALREADY_REVERSED_OR_SETTLED']) + return false unless reason_validator.valid?(@reason) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) + unless validator.valid?(status) + fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' + end + @status = status + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] reason Object to be assigned + def reason=(reason) + validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'EXCEEDS_AUTH_AMOUNT', 'AUTH_ALREADY_REVERSED', 'TRANSACTION_ALREADY_SETTLED', 'MISSING_AUTH', 'TRANSACTION_ALREADY_REVERSED_OR_SETTLED']) + unless validator.valid?(reason) + fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' + end + @reason = reason + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + submit_time_utc == o.submit_time_utc && + status == o.status && + reason == o.reason && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [submit_time_utc, status, reason, message, details].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response.rb new file mode 100644 index 00000000..295fdf1c --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response.rb @@ -0,0 +1,341 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201Response + attr_accessor :_links + + # An unique identification number assigned by CyberSource to identify the submitted request. + attr_accessor :id + + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # The status of the submitted transaction. + attr_accessor :status + + # The reconciliation id for the submitted transaction. This value is not returned for all processors. + attr_accessor :reconciliation_id + + attr_accessor :error_information + + attr_accessor :client_reference_information + + attr_accessor :processor_information + + attr_accessor :payment_information + + attr_accessor :order_information + + attr_accessor :point_of_sale_information + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_links' => :'_links', + :'id' => :'id', + :'submit_time_utc' => :'submitTimeUtc', + :'status' => :'status', + :'reconciliation_id' => :'reconciliationId', + :'error_information' => :'errorInformation', + :'client_reference_information' => :'clientReferenceInformation', + :'processor_information' => :'processorInformation', + :'payment_information' => :'paymentInformation', + :'order_information' => :'orderInformation', + :'point_of_sale_information' => :'pointOfSaleInformation' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_links' => :'PtsV2PaymentsPost201ResponseLinks', + :'id' => :'String', + :'submit_time_utc' => :'String', + :'status' => :'String', + :'reconciliation_id' => :'String', + :'error_information' => :'PtsV2PaymentsPost201ResponseErrorInformation', + :'client_reference_information' => :'PtsV2PaymentsPost201ResponseClientReferenceInformation', + :'processor_information' => :'PtsV2PaymentsPost201ResponseProcessorInformation', + :'payment_information' => :'PtsV2PaymentsPost201ResponsePaymentInformation', + :'order_information' => :'PtsV2PaymentsPost201ResponseOrderInformation', + :'point_of_sale_information' => :'PtsV2PaymentsPost201ResponsePointOfSaleInformation' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'_links') + self._links = attributes[:'_links'] + end + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'reconciliationId') + self.reconciliation_id = attributes[:'reconciliationId'] + end + + if attributes.has_key?(:'errorInformation') + self.error_information = attributes[:'errorInformation'] + end + + if attributes.has_key?(:'clientReferenceInformation') + self.client_reference_information = attributes[:'clientReferenceInformation'] + end + + if attributes.has_key?(:'processorInformation') + self.processor_information = attributes[:'processorInformation'] + end + + if attributes.has_key?(:'paymentInformation') + self.payment_information = attributes[:'paymentInformation'] + end + + if attributes.has_key?(:'orderInformation') + self.order_information = attributes[:'orderInformation'] + end + + if attributes.has_key?(:'pointOfSaleInformation') + self.point_of_sale_information = attributes[:'pointOfSaleInformation'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@id.nil? && @id.to_s.length > 26 + invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') + end + + if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + invalid_properties.push('invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@id.nil? && @id.to_s.length > 26 + status_validator = EnumAttributeValidator.new('String', ['AUTHORIZED', 'PARTIAL_AUTHORIZED', 'AUTHORIZED_PENDING_REVIEW', 'DECLINED']) + return false unless status_validator.valid?(@status) + return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if !id.nil? && id.to_s.length > 26 + fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' + end + + @id = id + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ['AUTHORIZED', 'PARTIAL_AUTHORIZED', 'AUTHORIZED_PENDING_REVIEW', 'DECLINED']) + unless validator.valid?(status) + fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' + end + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] reconciliation_id Value to be assigned + def reconciliation_id=(reconciliation_id) + if !reconciliation_id.nil? && reconciliation_id.to_s.length > 60 + fail ArgumentError, 'invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.' + end + + @reconciliation_id = reconciliation_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _links == o._links && + id == o.id && + submit_time_utc == o.submit_time_utc && + status == o.status && + reconciliation_id == o.reconciliation_id && + error_information == o.error_information && + client_reference_information == o.client_reference_information && + processor_information == o.processor_information && + payment_information == o.payment_information && + order_information == o.order_information && + point_of_sale_information == o.point_of_sale_information + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [_links, id, submit_time_utc, status, reconciliation_id, error_information, client_reference_information, processor_information, payment_information, order_information, point_of_sale_information].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response__links.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response__links.rb new file mode 100644 index 00000000..95a9971a --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response__links.rb @@ -0,0 +1,201 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponseLinks + attr_accessor :_self + + attr_accessor :reversal + + attr_accessor :capture + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_self' => :'self', + :'reversal' => :'reversal', + :'capture' => :'capture' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_self' => :'PtsV2PaymentsPost201ResponseLinksSelf', + :'reversal' => :'PtsV2PaymentsPost201ResponseLinksSelf', + :'capture' => :'PtsV2PaymentsPost201ResponseLinksSelf' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'self') + self._self = attributes[:'self'] + end + + if attributes.has_key?(:'reversal') + self.reversal = attributes[:'reversal'] + end + + if attributes.has_key?(:'capture') + self.capture = attributes[:'capture'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _self == o._self && + reversal == o.reversal && + capture == o.capture + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [_self, reversal, capture].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response__links_self.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response__links_self.rb new file mode 100644 index 00000000..196c98f4 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response__links_self.rb @@ -0,0 +1,194 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponseLinksSelf + # URL + attr_accessor :href + + # HTTP method applied to above URL + attr_accessor :method + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'href' => :'href', + :'method' => :'method' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'href' => :'String', + :'method' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'href') + self.href = attributes[:'href'] + end + + if attributes.has_key?(:'method') + self.method = attributes[:'method'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + href == o.href && + method == o.method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [href, method].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_client_reference_information.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_client_reference_information.rb new file mode 100644 index 00000000..7331fc36 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_client_reference_information.rb @@ -0,0 +1,199 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponseClientReferenceInformation + # Client-generated order reference or tracking number. CyberSource recommends that you send a unique value for each transaction so that you can perform meaningful searches for the transaction. + attr_accessor :code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'code') + self.code = attributes[:'code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@code.nil? && @code.to_s.length > 50 + invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 50.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@code.nil? && @code.to_s.length > 50 + true + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if !code.nil? && code.to_s.length > 50 + fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 50.' + end + + @code = code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information.rb new file mode 100644 index 00000000..18c2901e --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information.rb @@ -0,0 +1,239 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponseErrorInformation + # The reason of the status. + attr_accessor :reason + + # The detail message related to the status and reason listed above. + attr_accessor :message + + attr_accessor :details + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reason' => :'reason', + :'message' => :'message', + :'details' => :'details' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'reason' => :'String', + :'message' => :'String', + :'details' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'reason') + self.reason = attributes[:'reason'] + end + + if attributes.has_key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.has_key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + reason_validator = EnumAttributeValidator.new('String', ['AVS_FAILED', 'CONTACT_PROCESSOR', 'CV_FAILED', 'EXPIRED_CARD', 'PROCESSOR_DECLINED', 'INSUFFICIENT_FUND', 'STOLEN_LOST_CARD', 'ISSUER_UNAVAILABLE', 'UNAUTHORIZED_CARD', 'CVN_NOT_MATCH', 'EXCEEDS_CREDIT_LIMIT', 'INVALID_CVN', 'PAYMENT_REFUSED', 'INVALID_ACCOUNT', 'GENERAL_DECLINE']) + return false unless reason_validator.valid?(@reason) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] reason Object to be assigned + def reason=(reason) + validator = EnumAttributeValidator.new('String', ['AVS_FAILED', 'CONTACT_PROCESSOR', 'CV_FAILED', 'EXPIRED_CARD', 'PROCESSOR_DECLINED', 'INSUFFICIENT_FUND', 'STOLEN_LOST_CARD', 'ISSUER_UNAVAILABLE', 'UNAUTHORIZED_CARD', 'CVN_NOT_MATCH', 'EXCEEDS_CREDIT_LIMIT', 'INVALID_CVN', 'PAYMENT_REFUSED', 'INVALID_ACCOUNT', 'GENERAL_DECLINE']) + unless validator.valid?(reason) + fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' + end + @reason = reason + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + reason == o.reason && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [reason, message, details].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information_details.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information_details.rb new file mode 100644 index 00000000..42c94969 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information_details.rb @@ -0,0 +1,228 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponseErrorInformationDetails + # This is the flattened JSON object field name/path that is either missing or invalid. + attr_accessor :field + + # Possible reasons for the error. + attr_accessor :reason + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'field' => :'field', + :'reason' => :'reason' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'field' => :'String', + :'reason' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'field') + self.field = attributes[:'field'] + end + + if attributes.has_key?(:'reason') + self.reason = attributes[:'reason'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + reason_validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA']) + return false unless reason_validator.valid?(@reason) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] reason Object to be assigned + def reason=(reason) + validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA']) + unless validator.valid?(reason) + fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' + end + @reason = reason + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + field == o.field && + reason == o.reason + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [field, reason].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information.rb new file mode 100644 index 00000000..27ecea4d --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information.rb @@ -0,0 +1,192 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponseOrderInformation + attr_accessor :amount_details + + attr_accessor :invoice_details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'amount_details' => :'amountDetails', + :'invoice_details' => :'invoiceDetails' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'amount_details' => :'PtsV2PaymentsPost201ResponseOrderInformationAmountDetails', + :'invoice_details' => :'PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'amountDetails') + self.amount_details = attributes[:'amountDetails'] + end + + if attributes.has_key?(:'invoiceDetails') + self.invoice_details = attributes[:'invoiceDetails'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + amount_details == o.amount_details && + invoice_details == o.invoice_details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [amount_details, invoice_details].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_amount_details.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_amount_details.rb new file mode 100644 index 00000000..10a91cb8 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_amount_details.rb @@ -0,0 +1,249 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponseOrderInformationAmountDetails + # Amount you requested for the payment or capture. This value is returned for partial authorizations. + attr_accessor :total_amount + + # Amount that was authorized. + attr_accessor :authorized_amount + + # Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. + attr_accessor :currency + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'total_amount' => :'totalAmount', + :'authorized_amount' => :'authorizedAmount', + :'currency' => :'currency' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'total_amount' => :'String', + :'authorized_amount' => :'String', + :'currency' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'totalAmount') + self.total_amount = attributes[:'totalAmount'] + end + + if attributes.has_key?(:'authorizedAmount') + self.authorized_amount = attributes[:'authorizedAmount'] + end + + if attributes.has_key?(:'currency') + self.currency = attributes[:'currency'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@total_amount.nil? && @total_amount.to_s.length > 15 + invalid_properties.push('invalid value for "total_amount", the character length must be smaller than or equal to 15.') + end + + if !@authorized_amount.nil? && @authorized_amount.to_s.length > 15 + invalid_properties.push('invalid value for "authorized_amount", the character length must be smaller than or equal to 15.') + end + + if !@currency.nil? && @currency.to_s.length > 3 + invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@total_amount.nil? && @total_amount.to_s.length > 15 + return false if !@authorized_amount.nil? && @authorized_amount.to_s.length > 15 + return false if !@currency.nil? && @currency.to_s.length > 3 + true + end + + # Custom attribute writer method with validation + # @param [Object] total_amount Value to be assigned + def total_amount=(total_amount) + if !total_amount.nil? && total_amount.to_s.length > 15 + fail ArgumentError, 'invalid value for "total_amount", the character length must be smaller than or equal to 15.' + end + + @total_amount = total_amount + end + + # Custom attribute writer method with validation + # @param [Object] authorized_amount Value to be assigned + def authorized_amount=(authorized_amount) + if !authorized_amount.nil? && authorized_amount.to_s.length > 15 + fail ArgumentError, 'invalid value for "authorized_amount", the character length must be smaller than or equal to 15.' + end + + @authorized_amount = authorized_amount + end + + # Custom attribute writer method with validation + # @param [Object] currency Value to be assigned + def currency=(currency) + if !currency.nil? && currency.to_s.length > 3 + fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.' + end + + @currency = currency + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + total_amount == o.total_amount && + authorized_amount == o.authorized_amount && + currency == o.currency + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [total_amount, authorized_amount, currency].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_invoice_details.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_invoice_details.rb new file mode 100644 index 00000000..3ac27943 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_invoice_details.rb @@ -0,0 +1,184 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails + # Indicates whether CyberSource sent the Level III information to the processor. The possible values are: If your account is not enabled for Level III data or if you did not include the purchasing level field in your request, CyberSource does not include the Level III data in the request sent to the processor. For processor-specific information, see the bill_purchasing_level3_enabled field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) + attr_accessor :level3_transmission_status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'level3_transmission_status' => :'level3TransmissionStatus' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'level3_transmission_status' => :'BOOLEAN' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'level3TransmissionStatus') + self.level3_transmission_status = attributes[:'level3TransmissionStatus'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + level3_transmission_status == o.level3_transmission_status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [level3_transmission_status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information.rb new file mode 100644 index 00000000..272c3d34 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information.rb @@ -0,0 +1,201 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponsePaymentInformation + attr_accessor :card + + attr_accessor :tokenized_card + + attr_accessor :account_features + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'card' => :'card', + :'tokenized_card' => :'tokenizedCard', + :'account_features' => :'accountFeatures' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'card' => :'PtsV2PaymentsPost201ResponsePaymentInformationCard', + :'tokenized_card' => :'PtsV2PaymentsPost201ResponsePaymentInformationTokenizedCard', + :'account_features' => :'PtsV2PaymentsPost201ResponsePaymentInformationAccountFeatures' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'card') + self.card = attributes[:'card'] + end + + if attributes.has_key?(:'tokenizedCard') + self.tokenized_card = attributes[:'tokenizedCard'] + end + + if attributes.has_key?(:'accountFeatures') + self.account_features = attributes[:'accountFeatures'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + card == o.card && + tokenized_card == o.tokenized_card && + account_features == o.account_features + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [card, tokenized_card, account_features].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_account_features.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_account_features.rb new file mode 100644 index 00000000..d7ac39fe --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_account_features.rb @@ -0,0 +1,623 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponsePaymentInformationAccountFeatures + # Type of account. This value is returned only if you requested a balance inquiry. Possible values: - **00**: Not applicable or not specified - **10**: Savings account - **20**: Checking account - **30**: Credit card account - **40**: Universal account + attr_accessor :account_type + + # Possible values: - **N**: Nonregulated - **R**: Regulated `Note` This field is returned only for CyberSource through VisaNet. + attr_accessor :account_status + + # Remaining balance on the account. + attr_accessor :balance_amount + + # Type of amount. This value is returned only if you requested a balance inquiry. The issuer determines the value that is returned. Possible values for deposit accounts: - **01**: Current ledger (posted) balance. - **02**: Current available balance, which is typically the ledger balance less outstanding authorizations. Some depository institutions also include pending deposits and the credit or overdraft line associated with the account. Possible values for credit card accounts: - **01**: Credit amount remaining for customer (open to buy). - **02**: Credit limit. + attr_accessor :balance_amount_type + + # Currency of the remaining balance on the account. For the possible values, see the ISO Standard Currency Codes. + attr_accessor :currency + + # Sign for the remaining balance on the account. Returned only when the processor returns this value. Possible values: + attr_accessor :balance_sign + + # **Chase Paymentech Solutions** Indicates whether a customer has high credit limits. This information enables you to market high cost items to these customers and to understand the kinds of cards that high income customers are using. This field is supported for Visa, Mastercard, Discover, and Diners Club. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown **Litle** Flag that indicates that a Visa cardholder or Mastercard cardholder is in one of the affluent categories. Possible values: - **AFFLUENT**: High income customer with high spending pattern (>100k USD annual income and >40k USD annual card usage). - **MASS AFFLUENT**: High income customer (>100k USD annual income). **Processor specific maximum length**: - Chase Paymentech Solutions: 1 - Litle: 13 + attr_accessor :affluence_indicator + + # **CyberSource through VisaNet** Visa product ID. **GPN** Visa or Mastercard product ID. **Litle** Type of card used in the transaction. The only possible value is: - PREPAID: Prepaid Card **RBS WorldPay Atlanta** Type of card used in the transaction. Possible values: - **B**: Business Card - **O**: Noncommercial Card - **R**: Corporate Card - **S**: Purchase Card - **Blank**: Purchase card not supported **Maximum length for processors**: - CyberSource through VisaNet: 3 - GPN: 3 - Litle: 7 - RBS WorldPay Atlanta: 1 + attr_accessor :category + + # Indicates whether the card is a commercial card, which enables you to include Level II data in your transaction requests. This field is supported for Visa and Mastercard on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown + attr_accessor :commercial + + # Type of commercial card. This field is supported only for CyberSource through VisaNet. Possible values: - **B**: Business card - **R**: Corporate card - **S**: Purchasing card - **0**: Noncommercial card + attr_accessor :group + + # Indicates whether the card is a healthcare card. This field is supported for Visa and Mastercard on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown + attr_accessor :health_care + + # Indicates whether the card is a payroll card. This field is supported for Visa, Discover, Diners Club, and JCB on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown + attr_accessor :payroll + + # Indicates whether the card is eligible for Level III interchange fees, which enables you to include Level III data in your transaction requests. This field is supported for Visa and Mastercard on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown + attr_accessor :level3_eligible + + # Indicates whether the card is a PINless debit card. This field is supported for Visa and Mastercard on **Chase Paymentech Solutions**. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown + attr_accessor :pinless_debit + + # Indicates whether the card is a signature debit card. This information enables you to alter the way an order is processed. For example, you might not want to reauthorize a transaction for a signature debit card, or you might want to perform reversals promptly for a signature debit card. This field is supported for Visa, Mastercard, and Maestro (International) on Chase Paymentech Solutions. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown + attr_accessor :signature_debit + + # Indicates whether the card is a prepaid card. This information enables you to determine when a gift card or prepaid card is presented for use when establishing a new recurring, installment, or deferred billing relationship. This field is supported for Visa, Mastercard, Discover, Diners Club, and JCB on Chase Paymentech Solutions. Possible values: - **Y**: Yes - **N**: No - **X**: Not applicable / Unknown + attr_accessor :prepaid + + # Indicates whether the card is regulated according to the Durbin Amendment. If the card is regulated, the card issuer is subject to price caps and interchange rules. This field is supported for Visa, Mastercard, Discover, Diners Club, and JCB on Chase Paymentech Solutions. Possible values: - **Y**: Yes (assets greater than 10B USD) - **N**: No (assets less than 10B USD) - **X**: Not applicable / Unknown + attr_accessor :regulated + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'account_type' => :'accountType', + :'account_status' => :'accountStatus', + :'balance_amount' => :'balanceAmount', + :'balance_amount_type' => :'balanceAmountType', + :'currency' => :'currency', + :'balance_sign' => :'balanceSign', + :'affluence_indicator' => :'affluenceIndicator', + :'category' => :'category', + :'commercial' => :'commercial', + :'group' => :'group', + :'health_care' => :'healthCare', + :'payroll' => :'payroll', + :'level3_eligible' => :'level3Eligible', + :'pinless_debit' => :'pinlessDebit', + :'signature_debit' => :'signatureDebit', + :'prepaid' => :'prepaid', + :'regulated' => :'regulated' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'account_type' => :'String', + :'account_status' => :'String', + :'balance_amount' => :'String', + :'balance_amount_type' => :'String', + :'currency' => :'String', + :'balance_sign' => :'String', + :'affluence_indicator' => :'String', + :'category' => :'String', + :'commercial' => :'String', + :'group' => :'String', + :'health_care' => :'String', + :'payroll' => :'String', + :'level3_eligible' => :'String', + :'pinless_debit' => :'String', + :'signature_debit' => :'String', + :'prepaid' => :'String', + :'regulated' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'accountType') + self.account_type = attributes[:'accountType'] + end + + if attributes.has_key?(:'accountStatus') + self.account_status = attributes[:'accountStatus'] + end + + if attributes.has_key?(:'balanceAmount') + self.balance_amount = attributes[:'balanceAmount'] + end + + if attributes.has_key?(:'balanceAmountType') + self.balance_amount_type = attributes[:'balanceAmountType'] + end + + if attributes.has_key?(:'currency') + self.currency = attributes[:'currency'] + end + + if attributes.has_key?(:'balanceSign') + self.balance_sign = attributes[:'balanceSign'] + end + + if attributes.has_key?(:'affluenceIndicator') + self.affluence_indicator = attributes[:'affluenceIndicator'] + end + + if attributes.has_key?(:'category') + self.category = attributes[:'category'] + end + + if attributes.has_key?(:'commercial') + self.commercial = attributes[:'commercial'] + end + + if attributes.has_key?(:'group') + self.group = attributes[:'group'] + end + + if attributes.has_key?(:'healthCare') + self.health_care = attributes[:'healthCare'] + end + + if attributes.has_key?(:'payroll') + self.payroll = attributes[:'payroll'] + end + + if attributes.has_key?(:'level3Eligible') + self.level3_eligible = attributes[:'level3Eligible'] + end + + if attributes.has_key?(:'pinlessDebit') + self.pinless_debit = attributes[:'pinlessDebit'] + end + + if attributes.has_key?(:'signatureDebit') + self.signature_debit = attributes[:'signatureDebit'] + end + + if attributes.has_key?(:'prepaid') + self.prepaid = attributes[:'prepaid'] + end + + if attributes.has_key?(:'regulated') + self.regulated = attributes[:'regulated'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@account_type.nil? && @account_type.to_s.length > 2 + invalid_properties.push('invalid value for "account_type", the character length must be smaller than or equal to 2.') + end + + if !@account_status.nil? && @account_status.to_s.length > 1 + invalid_properties.push('invalid value for "account_status", the character length must be smaller than or equal to 1.') + end + + if !@balance_amount.nil? && @balance_amount.to_s.length > 12 + invalid_properties.push('invalid value for "balance_amount", the character length must be smaller than or equal to 12.') + end + + if !@balance_amount_type.nil? && @balance_amount_type.to_s.length > 2 + invalid_properties.push('invalid value for "balance_amount_type", the character length must be smaller than or equal to 2.') + end + + if !@currency.nil? && @currency.to_s.length > 5 + invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 5.') + end + + if !@balance_sign.nil? && @balance_sign.to_s.length > 1 + invalid_properties.push('invalid value for "balance_sign", the character length must be smaller than or equal to 1.') + end + + if !@affluence_indicator.nil? && @affluence_indicator.to_s.length > 13 + invalid_properties.push('invalid value for "affluence_indicator", the character length must be smaller than or equal to 13.') + end + + if !@category.nil? && @category.to_s.length > 7 + invalid_properties.push('invalid value for "category", the character length must be smaller than or equal to 7.') + end + + if !@commercial.nil? && @commercial.to_s.length > 1 + invalid_properties.push('invalid value for "commercial", the character length must be smaller than or equal to 1.') + end + + if !@group.nil? && @group.to_s.length > 1 + invalid_properties.push('invalid value for "group", the character length must be smaller than or equal to 1.') + end + + if !@health_care.nil? && @health_care.to_s.length > 1 + invalid_properties.push('invalid value for "health_care", the character length must be smaller than or equal to 1.') + end + + if !@payroll.nil? && @payroll.to_s.length > 1 + invalid_properties.push('invalid value for "payroll", the character length must be smaller than or equal to 1.') + end + + if !@level3_eligible.nil? && @level3_eligible.to_s.length > 1 + invalid_properties.push('invalid value for "level3_eligible", the character length must be smaller than or equal to 1.') + end + + if !@pinless_debit.nil? && @pinless_debit.to_s.length > 1 + invalid_properties.push('invalid value for "pinless_debit", the character length must be smaller than or equal to 1.') + end + + if !@signature_debit.nil? && @signature_debit.to_s.length > 1 + invalid_properties.push('invalid value for "signature_debit", the character length must be smaller than or equal to 1.') + end + + if !@prepaid.nil? && @prepaid.to_s.length > 1 + invalid_properties.push('invalid value for "prepaid", the character length must be smaller than or equal to 1.') + end + + if !@regulated.nil? && @regulated.to_s.length > 1 + invalid_properties.push('invalid value for "regulated", the character length must be smaller than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@account_type.nil? && @account_type.to_s.length > 2 + return false if !@account_status.nil? && @account_status.to_s.length > 1 + return false if !@balance_amount.nil? && @balance_amount.to_s.length > 12 + return false if !@balance_amount_type.nil? && @balance_amount_type.to_s.length > 2 + return false if !@currency.nil? && @currency.to_s.length > 5 + balance_sign_validator = EnumAttributeValidator.new('String', ['+', '-']) + return false unless balance_sign_validator.valid?(@balance_sign) + return false if !@balance_sign.nil? && @balance_sign.to_s.length > 1 + return false if !@affluence_indicator.nil? && @affluence_indicator.to_s.length > 13 + return false if !@category.nil? && @category.to_s.length > 7 + return false if !@commercial.nil? && @commercial.to_s.length > 1 + return false if !@group.nil? && @group.to_s.length > 1 + return false if !@health_care.nil? && @health_care.to_s.length > 1 + return false if !@payroll.nil? && @payroll.to_s.length > 1 + return false if !@level3_eligible.nil? && @level3_eligible.to_s.length > 1 + return false if !@pinless_debit.nil? && @pinless_debit.to_s.length > 1 + return false if !@signature_debit.nil? && @signature_debit.to_s.length > 1 + return false if !@prepaid.nil? && @prepaid.to_s.length > 1 + return false if !@regulated.nil? && @regulated.to_s.length > 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] account_type Value to be assigned + def account_type=(account_type) + if !account_type.nil? && account_type.to_s.length > 2 + fail ArgumentError, 'invalid value for "account_type", the character length must be smaller than or equal to 2.' + end + + @account_type = account_type + end + + # Custom attribute writer method with validation + # @param [Object] account_status Value to be assigned + def account_status=(account_status) + if !account_status.nil? && account_status.to_s.length > 1 + fail ArgumentError, 'invalid value for "account_status", the character length must be smaller than or equal to 1.' + end + + @account_status = account_status + end + + # Custom attribute writer method with validation + # @param [Object] balance_amount Value to be assigned + def balance_amount=(balance_amount) + if !balance_amount.nil? && balance_amount.to_s.length > 12 + fail ArgumentError, 'invalid value for "balance_amount", the character length must be smaller than or equal to 12.' + end + + @balance_amount = balance_amount + end + + # Custom attribute writer method with validation + # @param [Object] balance_amount_type Value to be assigned + def balance_amount_type=(balance_amount_type) + if !balance_amount_type.nil? && balance_amount_type.to_s.length > 2 + fail ArgumentError, 'invalid value for "balance_amount_type", the character length must be smaller than or equal to 2.' + end + + @balance_amount_type = balance_amount_type + end + + # Custom attribute writer method with validation + # @param [Object] currency Value to be assigned + def currency=(currency) + if !currency.nil? && currency.to_s.length > 5 + fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 5.' + end + + @currency = currency + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] balance_sign Object to be assigned + def balance_sign=(balance_sign) + validator = EnumAttributeValidator.new('String', ['+', '-']) + unless validator.valid?(balance_sign) + fail ArgumentError, 'invalid value for "balance_sign", must be one of #{validator.allowable_values}.' + end + @balance_sign = balance_sign + end + + # Custom attribute writer method with validation + # @param [Object] affluence_indicator Value to be assigned + def affluence_indicator=(affluence_indicator) + if !affluence_indicator.nil? && affluence_indicator.to_s.length > 13 + fail ArgumentError, 'invalid value for "affluence_indicator", the character length must be smaller than or equal to 13.' + end + + @affluence_indicator = affluence_indicator + end + + # Custom attribute writer method with validation + # @param [Object] category Value to be assigned + def category=(category) + if !category.nil? && category.to_s.length > 7 + fail ArgumentError, 'invalid value for "category", the character length must be smaller than or equal to 7.' + end + + @category = category + end + + # Custom attribute writer method with validation + # @param [Object] commercial Value to be assigned + def commercial=(commercial) + if !commercial.nil? && commercial.to_s.length > 1 + fail ArgumentError, 'invalid value for "commercial", the character length must be smaller than or equal to 1.' + end + + @commercial = commercial + end + + # Custom attribute writer method with validation + # @param [Object] group Value to be assigned + def group=(group) + if !group.nil? && group.to_s.length > 1 + fail ArgumentError, 'invalid value for "group", the character length must be smaller than or equal to 1.' + end + + @group = group + end + + # Custom attribute writer method with validation + # @param [Object] health_care Value to be assigned + def health_care=(health_care) + if !health_care.nil? && health_care.to_s.length > 1 + fail ArgumentError, 'invalid value for "health_care", the character length must be smaller than or equal to 1.' + end + + @health_care = health_care + end + + # Custom attribute writer method with validation + # @param [Object] payroll Value to be assigned + def payroll=(payroll) + if !payroll.nil? && payroll.to_s.length > 1 + fail ArgumentError, 'invalid value for "payroll", the character length must be smaller than or equal to 1.' + end + + @payroll = payroll + end + + # Custom attribute writer method with validation + # @param [Object] level3_eligible Value to be assigned + def level3_eligible=(level3_eligible) + if !level3_eligible.nil? && level3_eligible.to_s.length > 1 + fail ArgumentError, 'invalid value for "level3_eligible", the character length must be smaller than or equal to 1.' + end + + @level3_eligible = level3_eligible + end + + # Custom attribute writer method with validation + # @param [Object] pinless_debit Value to be assigned + def pinless_debit=(pinless_debit) + if !pinless_debit.nil? && pinless_debit.to_s.length > 1 + fail ArgumentError, 'invalid value for "pinless_debit", the character length must be smaller than or equal to 1.' + end + + @pinless_debit = pinless_debit + end + + # Custom attribute writer method with validation + # @param [Object] signature_debit Value to be assigned + def signature_debit=(signature_debit) + if !signature_debit.nil? && signature_debit.to_s.length > 1 + fail ArgumentError, 'invalid value for "signature_debit", the character length must be smaller than or equal to 1.' + end + + @signature_debit = signature_debit + end + + # Custom attribute writer method with validation + # @param [Object] prepaid Value to be assigned + def prepaid=(prepaid) + if !prepaid.nil? && prepaid.to_s.length > 1 + fail ArgumentError, 'invalid value for "prepaid", the character length must be smaller than or equal to 1.' + end + + @prepaid = prepaid + end + + # Custom attribute writer method with validation + # @param [Object] regulated Value to be assigned + def regulated=(regulated) + if !regulated.nil? && regulated.to_s.length > 1 + fail ArgumentError, 'invalid value for "regulated", the character length must be smaller than or equal to 1.' + end + + @regulated = regulated + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_type == o.account_type && + account_status == o.account_status && + balance_amount == o.balance_amount && + balance_amount_type == o.balance_amount_type && + currency == o.currency && + balance_sign == o.balance_sign && + affluence_indicator == o.affluence_indicator && + category == o.category && + commercial == o.commercial && + group == o.group && + health_care == o.health_care && + payroll == o.payroll && + level3_eligible == o.level3_eligible && + pinless_debit == o.pinless_debit && + signature_debit == o.signature_debit && + prepaid == o.prepaid && + regulated == o.regulated + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [account_type, account_status, balance_amount, balance_amount_type, currency, balance_sign, affluence_indicator, category, commercial, group, health_care, payroll, level3_eligible, pinless_debit, signature_debit, prepaid, regulated].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_card.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_card.rb new file mode 100644 index 00000000..190eaa49 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_card.rb @@ -0,0 +1,199 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponsePaymentInformationCard + # Last four digits of the cardholder’s account number. This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. + attr_accessor :suffix + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'suffix' => :'suffix' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'suffix' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'suffix') + self.suffix = attributes[:'suffix'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@suffix.nil? && @suffix.to_s.length > 4 + invalid_properties.push('invalid value for "suffix", the character length must be smaller than or equal to 4.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@suffix.nil? && @suffix.to_s.length > 4 + true + end + + # Custom attribute writer method with validation + # @param [Object] suffix Value to be assigned + def suffix=(suffix) + if !suffix.nil? && suffix.to_s.length > 4 + fail ArgumentError, 'invalid value for "suffix", the character length must be smaller than or equal to 4.' + end + + @suffix = suffix + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + suffix == o.suffix + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [suffix].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb new file mode 100644 index 00000000..d22d7190 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb @@ -0,0 +1,349 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponsePaymentInformationTokenizedCard + # First six digits of token. CyberSource includes this field in the reply message when it decrypts the payment blob for the tokenized transaction. + attr_accessor :prefix + + # Last four digits of token. CyberSource includes this field in the reply message when it decrypts the payment blob for the tokenized transaction. + attr_accessor :suffix + + # Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover + attr_accessor :type + + # Confidence level of the tokenization. This value is assigned by the token service provider. `Note` This field is supported only for **CyberSource through VisaNet** and **FDC Nashville Global**. + attr_accessor :assurance_level + + # Two-digit month in which the payment network token expires. `Format: MM`. Possible values: 01 through 12. + attr_accessor :expiration_month + + # Four-digit year in which the payment network token expires. `Format: YYYY`. + attr_accessor :expiration_year + + # Value that identifies your business and indicates that the cardholder’s account number is tokenized. This value is assigned by the token service provider and is unique within the token service provider’s database. `Note` This field is supported only for **CyberSource through VisaNet** and **FDC Nashville Global**. + attr_accessor :requestor_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'prefix' => :'prefix', + :'suffix' => :'suffix', + :'type' => :'type', + :'assurance_level' => :'assuranceLevel', + :'expiration_month' => :'expirationMonth', + :'expiration_year' => :'expirationYear', + :'requestor_id' => :'requestorId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'prefix' => :'String', + :'suffix' => :'String', + :'type' => :'String', + :'assurance_level' => :'String', + :'expiration_month' => :'String', + :'expiration_year' => :'String', + :'requestor_id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'prefix') + self.prefix = attributes[:'prefix'] + end + + if attributes.has_key?(:'suffix') + self.suffix = attributes[:'suffix'] + end + + if attributes.has_key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.has_key?(:'assuranceLevel') + self.assurance_level = attributes[:'assuranceLevel'] + end + + if attributes.has_key?(:'expirationMonth') + self.expiration_month = attributes[:'expirationMonth'] + end + + if attributes.has_key?(:'expirationYear') + self.expiration_year = attributes[:'expirationYear'] + end + + if attributes.has_key?(:'requestorId') + self.requestor_id = attributes[:'requestorId'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@prefix.nil? && @prefix.to_s.length > 6 + invalid_properties.push('invalid value for "prefix", the character length must be smaller than or equal to 6.') + end + + if !@suffix.nil? && @suffix.to_s.length > 4 + invalid_properties.push('invalid value for "suffix", the character length must be smaller than or equal to 4.') + end + + if !@type.nil? && @type.to_s.length > 3 + invalid_properties.push('invalid value for "type", the character length must be smaller than or equal to 3.') + end + + if !@assurance_level.nil? && @assurance_level.to_s.length > 2 + invalid_properties.push('invalid value for "assurance_level", the character length must be smaller than or equal to 2.') + end + + if !@expiration_month.nil? && @expiration_month.to_s.length > 2 + invalid_properties.push('invalid value for "expiration_month", the character length must be smaller than or equal to 2.') + end + + if !@expiration_year.nil? && @expiration_year.to_s.length > 4 + invalid_properties.push('invalid value for "expiration_year", the character length must be smaller than or equal to 4.') + end + + if !@requestor_id.nil? && @requestor_id.to_s.length > 11 + invalid_properties.push('invalid value for "requestor_id", the character length must be smaller than or equal to 11.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@prefix.nil? && @prefix.to_s.length > 6 + return false if !@suffix.nil? && @suffix.to_s.length > 4 + return false if !@type.nil? && @type.to_s.length > 3 + return false if !@assurance_level.nil? && @assurance_level.to_s.length > 2 + return false if !@expiration_month.nil? && @expiration_month.to_s.length > 2 + return false if !@expiration_year.nil? && @expiration_year.to_s.length > 4 + return false if !@requestor_id.nil? && @requestor_id.to_s.length > 11 + true + end + + # Custom attribute writer method with validation + # @param [Object] prefix Value to be assigned + def prefix=(prefix) + if !prefix.nil? && prefix.to_s.length > 6 + fail ArgumentError, 'invalid value for "prefix", the character length must be smaller than or equal to 6.' + end + + @prefix = prefix + end + + # Custom attribute writer method with validation + # @param [Object] suffix Value to be assigned + def suffix=(suffix) + if !suffix.nil? && suffix.to_s.length > 4 + fail ArgumentError, 'invalid value for "suffix", the character length must be smaller than or equal to 4.' + end + + @suffix = suffix + end + + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if !type.nil? && type.to_s.length > 3 + fail ArgumentError, 'invalid value for "type", the character length must be smaller than or equal to 3.' + end + + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] assurance_level Value to be assigned + def assurance_level=(assurance_level) + if !assurance_level.nil? && assurance_level.to_s.length > 2 + fail ArgumentError, 'invalid value for "assurance_level", the character length must be smaller than or equal to 2.' + end + + @assurance_level = assurance_level + end + + # Custom attribute writer method with validation + # @param [Object] expiration_month Value to be assigned + def expiration_month=(expiration_month) + if !expiration_month.nil? && expiration_month.to_s.length > 2 + fail ArgumentError, 'invalid value for "expiration_month", the character length must be smaller than or equal to 2.' + end + + @expiration_month = expiration_month + end + + # Custom attribute writer method with validation + # @param [Object] expiration_year Value to be assigned + def expiration_year=(expiration_year) + if !expiration_year.nil? && expiration_year.to_s.length > 4 + fail ArgumentError, 'invalid value for "expiration_year", the character length must be smaller than or equal to 4.' + end + + @expiration_year = expiration_year + end + + # Custom attribute writer method with validation + # @param [Object] requestor_id Value to be assigned + def requestor_id=(requestor_id) + if !requestor_id.nil? && requestor_id.to_s.length > 11 + fail ArgumentError, 'invalid value for "requestor_id", the character length must be smaller than or equal to 11.' + end + + @requestor_id = requestor_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + prefix == o.prefix && + suffix == o.suffix && + type == o.type && + assurance_level == o.assurance_level && + expiration_month == o.expiration_month && + expiration_year == o.expiration_year && + requestor_id == o.requestor_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [prefix, suffix, type, assurance_level, expiration_month, expiration_year, requestor_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_point_of_sale_information.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_point_of_sale_information.rb new file mode 100644 index 00000000..21123271 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_point_of_sale_information.rb @@ -0,0 +1,208 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponsePointOfSaleInformation + attr_accessor :emv + + # Point-of-sale details for the transaction. This value is returned only for **American Express Direct**. CyberSource generates this value, which consists of a series of codes that identify terminal capability, security data, and specific conditions present at the time the transaction occurred. To comply with the CAPN requirements, this value must be included in all subsequent follow-on requests, such as captures and follow-on credits. When you perform authorizations, captures, and credits through CyberSource, CyberSource passes this value from the authorization service to the subsequent services for you. However, when you perform authorizations through CyberSource and perform subsequent services through other financial institutions, you must ensure that your requests for captures and credits include this value. + attr_accessor :amex_capn_data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'emv' => :'emv', + :'amex_capn_data' => :'amexCapnData' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'emv' => :'PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv', + :'amex_capn_data' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'emv') + self.emv = attributes[:'emv'] + end + + if attributes.has_key?(:'amexCapnData') + self.amex_capn_data = attributes[:'amexCapnData'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@amex_capn_data.nil? && @amex_capn_data.to_s.length > 12 + invalid_properties.push('invalid value for "amex_capn_data", the character length must be smaller than or equal to 12.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@amex_capn_data.nil? && @amex_capn_data.to_s.length > 12 + true + end + + # Custom attribute writer method with validation + # @param [Object] amex_capn_data Value to be assigned + def amex_capn_data=(amex_capn_data) + if !amex_capn_data.nil? && amex_capn_data.to_s.length > 12 + fail ArgumentError, 'invalid value for "amex_capn_data", the character length must be smaller than or equal to 12.' + end + + @amex_capn_data = amex_capn_data + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + emv == o.emv && + amex_capn_data == o.amex_capn_data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [emv, amex_capn_data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_point_of_sale_information_emv.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_point_of_sale_information_emv.rb new file mode 100644 index 00000000..f91a7419 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_point_of_sale_information_emv.rb @@ -0,0 +1,199 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv + # EMV data that is transmitted from the chip card to the issuer, and from the issuer to the chip card. The EMV data is in the tag-length-value format and includes chip card tags, terminal tags, and transaction detail tags. `Important` The following tags contain sensitive information and **must not** be included in this field: - **56**: Track 1 equivalent data - **57**: Track 2 equivalent data - **5A**: Application PAN - **5F20**: Cardholder name - **5F24**: Application expiration date (This sensitivity has been relaxed for cmcic, amexdirect, fdiglobal, opdfde, six) - **99**: Transaction PIN - **9F0B**: Cardholder name (extended) - **9F1F**: Track 1 discretionary data - **9F20**: Track 2 discretionary data For captures, this field is required for contact EMV transactions. Otherwise, it is optional. For credits, this field is required for contact EMV stand-alone credits and contactless EMV stand-alone credits. Otherwise, it is optional. `Important` For contact EMV captures, contact EMV stand-alone credits, and contactless EMV stand-alone credits, you must include the following tags in this field. For all other types of EMV transactions, the following tags are optional. - **95**: Terminal verification results - **9F10**: Issuer application data - **9F26**: Application cryptogram + attr_accessor :tags + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'tags' => :'tags' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'tags' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'tags') + self.tags = attributes[:'tags'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@tags.nil? && @tags.to_s.length > 1998 + invalid_properties.push('invalid value for "tags", the character length must be smaller than or equal to 1998.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@tags.nil? && @tags.to_s.length > 1998 + true + end + + # Custom attribute writer method with validation + # @param [Object] tags Value to be assigned + def tags=(tags) + if !tags.nil? && tags.to_s.length > 1998 + fail ArgumentError, 'invalid value for "tags", the character length must be smaller than or equal to 1998.' + end + + @tags = tags + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + tags == o.tags + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [tags].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb new file mode 100644 index 00000000..4c5ec03d --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb @@ -0,0 +1,642 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponseProcessorInformation + # Authorization code. Returned only when the processor returns this value. + attr_accessor :approval_code + + # Network transaction identifier (TID). You can use this value to identify a specific transaction when you are discussing the transaction with your processor. Not all processors provide this value. + attr_accessor :transaction_id + + # Description of this field is not available. + attr_accessor :network_transaction_id + + # Description of this field is not available. + attr_accessor :provider_transaction_id + + # For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of the authorization. + attr_accessor :response_code + + # Used by Visa only and contains the response source/reason code that identifies the source of the response decision. + attr_accessor :response_code_source + + # This field might contain information about a decline. This field is supported only for **CyberSource through VisaNet**. + attr_accessor :response_details + + # Processor-defined response category code. The associated detail error code is in the auth_auth_response field or the auth_reversal_auth_ response field depending on which service you requested. This field is supported only for: - Japanese issuers - Domestic transactions in Japan - Comercio Latino—processor transaction ID required for troubleshooting **Maximum length for processors**: - Comercio Latino: 32 - All other processors: 3 + attr_accessor :response_category_code + + # Name of the Japanese acquirer that processed the transaction. Returned only for CCS (CAFIS) and JCN Gateway. Please contact the CyberSource Japan Support Group for more information. + attr_accessor :forwarded_acquirer_code + + attr_accessor :avs + + attr_accessor :card_verification + + attr_accessor :merchant_advice + + attr_accessor :electronic_verification_results + + attr_accessor :customer + + attr_accessor :consumer_authentication_response + + attr_accessor :issuer + + # This field is returned only for **American Express Direct** and **CyberSource through VisaNet**. **American Express Direct** System trace audit number (STAN). This value identifies the transaction and is useful when investigating a chargeback dispute. **CyberSource through VisaNet** System trace number that must be printed on the customer’s receipt. + attr_accessor :system_trace_audit_number + + # Visa-generated reference number that identifies a card-present transaction for which youprovided one of the following: - Visa primary account number (PAN) - Visa-generated token for a PAN This reference number serves as a link to the cardholder account and to all transactions for that account. + attr_accessor :payment_account_reference_number + + # Transaction integrity classification provided by Mastercard. This value specifies Mastercard’s evaluation of the transaction’s safety and security. This field is returned only for **CyberSource through VisaNet**. For card-present transactions, possible values: - **A1**: EMV or token in a secure, trusted environment - **B1**: EMV or chip equivalent - **C1**: Magnetic stripe - **E1**: Key entered - **U0**: Unclassified For card-not-present transactions, possible values: - **A2**: Digital transactions - **B2**: Authenticated checkout - **C2**: Transaction validation - **D2**: Enhanced data - **E2**: Generic messaging - **U0**: Unclassified For information about these values, contact Mastercard or your acquirer. + attr_accessor :transaction_integrity_code + + # Referral response number for a verbal authorization with FDMS Nashville when using an American Express card. Give this number to American Express when you call them for the verbal authorization. + attr_accessor :amex_verbal_auth_reference_number + + # Transaction identifier that CyberSource generates. You have the option of printing the sales slip number on the receipt. This field is supported only for **JCN Gateway**. + attr_accessor :sales_slip_number + + # Mastercard service that was used for the transaction. Mastercard provides this value to CyberSource. Possible value: - 53: Mastercard card-on-file token service + attr_accessor :master_card_service_code + + # Result of the Mastercard card-on-file token service. Mastercard provides this value to CyberSource. Possible values: - **C**: Service completed successfully. - **F**: One of the following: - Incorrect Mastercard POS entry mode. The Mastercard POS entry mode should be 81 for an authorization or authorization reversal. - Incorrect Mastercard POS entry mode. The Mastercard POS entry mode should be 01 for a tokenized request. - Token requestor ID is missing or formatted incorrectly. - **I**: One of the following: - Invalid token requestor ID. - Suspended or deactivated token. - Invalid token (not in mapping table). - **T**: Invalid combination of token requestor ID and token. - **U**: Expired token. - **W**: Primary account number (PAN) listed in electronic warning bulletin. Note This field is returned only for **CyberSource through VisaNet**. + attr_accessor :master_card_service_reply_code + + # Type of authentication for which the transaction qualifies as determined by the Mastercard authentication service, which confirms the identity of the cardholder. Mastercard provides this value to CyberSource. Possible values: - **1**: Transaction qualifies for Mastercard authentication type 1. - **2**: Transaction qualifies for Mastercard authentication type 2. + attr_accessor :master_card_authentication_type + + # Name of the Processor. + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'approval_code' => :'approvalCode', + :'transaction_id' => :'transactionId', + :'network_transaction_id' => :'networkTransactionId', + :'provider_transaction_id' => :'providerTransactionId', + :'response_code' => :'responseCode', + :'response_code_source' => :'responseCodeSource', + :'response_details' => :'responseDetails', + :'response_category_code' => :'responseCategoryCode', + :'forwarded_acquirer_code' => :'forwardedAcquirerCode', + :'avs' => :'avs', + :'card_verification' => :'cardVerification', + :'merchant_advice' => :'merchantAdvice', + :'electronic_verification_results' => :'electronicVerificationResults', + :'customer' => :'customer', + :'consumer_authentication_response' => :'consumerAuthenticationResponse', + :'issuer' => :'issuer', + :'system_trace_audit_number' => :'systemTraceAuditNumber', + :'payment_account_reference_number' => :'paymentAccountReferenceNumber', + :'transaction_integrity_code' => :'transactionIntegrityCode', + :'amex_verbal_auth_reference_number' => :'amexVerbalAuthReferenceNumber', + :'sales_slip_number' => :'salesSlipNumber', + :'master_card_service_code' => :'masterCardServiceCode', + :'master_card_service_reply_code' => :'masterCardServiceReplyCode', + :'master_card_authentication_type' => :'masterCardAuthenticationType', + :'name' => :'name' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'approval_code' => :'String', + :'transaction_id' => :'String', + :'network_transaction_id' => :'String', + :'provider_transaction_id' => :'String', + :'response_code' => :'String', + :'response_code_source' => :'String', + :'response_details' => :'String', + :'response_category_code' => :'String', + :'forwarded_acquirer_code' => :'String', + :'avs' => :'PtsV2PaymentsPost201ResponseProcessorInformationAvs', + :'card_verification' => :'PtsV2PaymentsPost201ResponseProcessorInformationCardVerification', + :'merchant_advice' => :'PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdvice', + :'electronic_verification_results' => :'PtsV2PaymentsPost201ResponseProcessorInformationElectronicVerificationResults', + :'customer' => :'PtsV2PaymentsPost201ResponseProcessorInformationCustomer', + :'consumer_authentication_response' => :'PtsV2PaymentsPost201ResponseProcessorInformationConsumerAuthenticationResponse', + :'issuer' => :'PtsV2PaymentsPost201ResponseProcessorInformationIssuer', + :'system_trace_audit_number' => :'String', + :'payment_account_reference_number' => :'String', + :'transaction_integrity_code' => :'String', + :'amex_verbal_auth_reference_number' => :'String', + :'sales_slip_number' => :'Float', + :'master_card_service_code' => :'String', + :'master_card_service_reply_code' => :'String', + :'master_card_authentication_type' => :'String', + :'name' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'approvalCode') + self.approval_code = attributes[:'approvalCode'] + end + + if attributes.has_key?(:'transactionId') + self.transaction_id = attributes[:'transactionId'] + end + + if attributes.has_key?(:'networkTransactionId') + self.network_transaction_id = attributes[:'networkTransactionId'] + end + + if attributes.has_key?(:'providerTransactionId') + self.provider_transaction_id = attributes[:'providerTransactionId'] + end + + if attributes.has_key?(:'responseCode') + self.response_code = attributes[:'responseCode'] + end + + if attributes.has_key?(:'responseCodeSource') + self.response_code_source = attributes[:'responseCodeSource'] + end + + if attributes.has_key?(:'responseDetails') + self.response_details = attributes[:'responseDetails'] + end + + if attributes.has_key?(:'responseCategoryCode') + self.response_category_code = attributes[:'responseCategoryCode'] + end + + if attributes.has_key?(:'forwardedAcquirerCode') + self.forwarded_acquirer_code = attributes[:'forwardedAcquirerCode'] + end + + if attributes.has_key?(:'avs') + self.avs = attributes[:'avs'] + end + + if attributes.has_key?(:'cardVerification') + self.card_verification = attributes[:'cardVerification'] + end + + if attributes.has_key?(:'merchantAdvice') + self.merchant_advice = attributes[:'merchantAdvice'] + end + + if attributes.has_key?(:'electronicVerificationResults') + self.electronic_verification_results = attributes[:'electronicVerificationResults'] + end + + if attributes.has_key?(:'customer') + self.customer = attributes[:'customer'] + end + + if attributes.has_key?(:'consumerAuthenticationResponse') + self.consumer_authentication_response = attributes[:'consumerAuthenticationResponse'] + end + + if attributes.has_key?(:'issuer') + self.issuer = attributes[:'issuer'] + end + + if attributes.has_key?(:'systemTraceAuditNumber') + self.system_trace_audit_number = attributes[:'systemTraceAuditNumber'] + end + + if attributes.has_key?(:'paymentAccountReferenceNumber') + self.payment_account_reference_number = attributes[:'paymentAccountReferenceNumber'] + end + + if attributes.has_key?(:'transactionIntegrityCode') + self.transaction_integrity_code = attributes[:'transactionIntegrityCode'] + end + + if attributes.has_key?(:'amexVerbalAuthReferenceNumber') + self.amex_verbal_auth_reference_number = attributes[:'amexVerbalAuthReferenceNumber'] + end + + if attributes.has_key?(:'salesSlipNumber') + self.sales_slip_number = attributes[:'salesSlipNumber'] + end + + if attributes.has_key?(:'masterCardServiceCode') + self.master_card_service_code = attributes[:'masterCardServiceCode'] + end + + if attributes.has_key?(:'masterCardServiceReplyCode') + self.master_card_service_reply_code = attributes[:'masterCardServiceReplyCode'] + end + + if attributes.has_key?(:'masterCardAuthenticationType') + self.master_card_authentication_type = attributes[:'masterCardAuthenticationType'] + end + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@transaction_id.nil? && @transaction_id.to_s.length > 50 + invalid_properties.push('invalid value for "transaction_id", the character length must be smaller than or equal to 50.') + end + + if !@response_code.nil? && @response_code.to_s.length > 10 + invalid_properties.push('invalid value for "response_code", the character length must be smaller than or equal to 10.') + end + + if !@response_code_source.nil? && @response_code_source.to_s.length > 1 + invalid_properties.push('invalid value for "response_code_source", the character length must be smaller than or equal to 1.') + end + + if !@response_details.nil? && @response_details.to_s.length > 255 + invalid_properties.push('invalid value for "response_details", the character length must be smaller than or equal to 255.') + end + + if !@response_category_code.nil? && @response_category_code.to_s.length > 32 + invalid_properties.push('invalid value for "response_category_code", the character length must be smaller than or equal to 32.') + end + + if !@forwarded_acquirer_code.nil? && @forwarded_acquirer_code.to_s.length > 32 + invalid_properties.push('invalid value for "forwarded_acquirer_code", the character length must be smaller than or equal to 32.') + end + + if !@system_trace_audit_number.nil? && @system_trace_audit_number.to_s.length > 6 + invalid_properties.push('invalid value for "system_trace_audit_number", the character length must be smaller than or equal to 6.') + end + + if !@payment_account_reference_number.nil? && @payment_account_reference_number.to_s.length > 32 + invalid_properties.push('invalid value for "payment_account_reference_number", the character length must be smaller than or equal to 32.') + end + + if !@transaction_integrity_code.nil? && @transaction_integrity_code.to_s.length > 2 + invalid_properties.push('invalid value for "transaction_integrity_code", the character length must be smaller than or equal to 2.') + end + + if !@amex_verbal_auth_reference_number.nil? && @amex_verbal_auth_reference_number.to_s.length > 6 + invalid_properties.push('invalid value for "amex_verbal_auth_reference_number", the character length must be smaller than or equal to 6.') + end + + if !@sales_slip_number.nil? && @sales_slip_number > 99999 + invalid_properties.push('invalid value for "sales_slip_number", must be smaller than or equal to 99999.') + end + + if !@master_card_service_code.nil? && @master_card_service_code.to_s.length > 2 + invalid_properties.push('invalid value for "master_card_service_code", the character length must be smaller than or equal to 2.') + end + + if !@master_card_service_reply_code.nil? && @master_card_service_reply_code.to_s.length > 1 + invalid_properties.push('invalid value for "master_card_service_reply_code", the character length must be smaller than or equal to 1.') + end + + if !@master_card_authentication_type.nil? && @master_card_authentication_type.to_s.length > 1 + invalid_properties.push('invalid value for "master_card_authentication_type", the character length must be smaller than or equal to 1.') + end + + if !@name.nil? && @name.to_s.length > 30 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 30.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@transaction_id.nil? && @transaction_id.to_s.length > 50 + return false if !@response_code.nil? && @response_code.to_s.length > 10 + return false if !@response_code_source.nil? && @response_code_source.to_s.length > 1 + return false if !@response_details.nil? && @response_details.to_s.length > 255 + return false if !@response_category_code.nil? && @response_category_code.to_s.length > 32 + return false if !@forwarded_acquirer_code.nil? && @forwarded_acquirer_code.to_s.length > 32 + return false if !@system_trace_audit_number.nil? && @system_trace_audit_number.to_s.length > 6 + return false if !@payment_account_reference_number.nil? && @payment_account_reference_number.to_s.length > 32 + return false if !@transaction_integrity_code.nil? && @transaction_integrity_code.to_s.length > 2 + return false if !@amex_verbal_auth_reference_number.nil? && @amex_verbal_auth_reference_number.to_s.length > 6 + return false if !@sales_slip_number.nil? && @sales_slip_number > 99999 + return false if !@master_card_service_code.nil? && @master_card_service_code.to_s.length > 2 + return false if !@master_card_service_reply_code.nil? && @master_card_service_reply_code.to_s.length > 1 + return false if !@master_card_authentication_type.nil? && @master_card_authentication_type.to_s.length > 1 + return false if !@name.nil? && @name.to_s.length > 30 + true + end + + # Custom attribute writer method with validation + # @param [Object] transaction_id Value to be assigned + def transaction_id=(transaction_id) + if !transaction_id.nil? && transaction_id.to_s.length > 50 + fail ArgumentError, 'invalid value for "transaction_id", the character length must be smaller than or equal to 50.' + end + + @transaction_id = transaction_id + end + + # Custom attribute writer method with validation + # @param [Object] response_code Value to be assigned + def response_code=(response_code) + if !response_code.nil? && response_code.to_s.length > 10 + fail ArgumentError, 'invalid value for "response_code", the character length must be smaller than or equal to 10.' + end + + @response_code = response_code + end + + # Custom attribute writer method with validation + # @param [Object] response_code_source Value to be assigned + def response_code_source=(response_code_source) + if !response_code_source.nil? && response_code_source.to_s.length > 1 + fail ArgumentError, 'invalid value for "response_code_source", the character length must be smaller than or equal to 1.' + end + + @response_code_source = response_code_source + end + + # Custom attribute writer method with validation + # @param [Object] response_details Value to be assigned + def response_details=(response_details) + if !response_details.nil? && response_details.to_s.length > 255 + fail ArgumentError, 'invalid value for "response_details", the character length must be smaller than or equal to 255.' + end + + @response_details = response_details + end + + # Custom attribute writer method with validation + # @param [Object] response_category_code Value to be assigned + def response_category_code=(response_category_code) + if !response_category_code.nil? && response_category_code.to_s.length > 32 + fail ArgumentError, 'invalid value for "response_category_code", the character length must be smaller than or equal to 32.' + end + + @response_category_code = response_category_code + end + + # Custom attribute writer method with validation + # @param [Object] forwarded_acquirer_code Value to be assigned + def forwarded_acquirer_code=(forwarded_acquirer_code) + if !forwarded_acquirer_code.nil? && forwarded_acquirer_code.to_s.length > 32 + fail ArgumentError, 'invalid value for "forwarded_acquirer_code", the character length must be smaller than or equal to 32.' + end + + @forwarded_acquirer_code = forwarded_acquirer_code + end + + # Custom attribute writer method with validation + # @param [Object] system_trace_audit_number Value to be assigned + def system_trace_audit_number=(system_trace_audit_number) + if !system_trace_audit_number.nil? && system_trace_audit_number.to_s.length > 6 + fail ArgumentError, 'invalid value for "system_trace_audit_number", the character length must be smaller than or equal to 6.' + end + + @system_trace_audit_number = system_trace_audit_number + end + + # Custom attribute writer method with validation + # @param [Object] payment_account_reference_number Value to be assigned + def payment_account_reference_number=(payment_account_reference_number) + if !payment_account_reference_number.nil? && payment_account_reference_number.to_s.length > 32 + fail ArgumentError, 'invalid value for "payment_account_reference_number", the character length must be smaller than or equal to 32.' + end + + @payment_account_reference_number = payment_account_reference_number + end + + # Custom attribute writer method with validation + # @param [Object] transaction_integrity_code Value to be assigned + def transaction_integrity_code=(transaction_integrity_code) + if !transaction_integrity_code.nil? && transaction_integrity_code.to_s.length > 2 + fail ArgumentError, 'invalid value for "transaction_integrity_code", the character length must be smaller than or equal to 2.' + end + + @transaction_integrity_code = transaction_integrity_code + end + + # Custom attribute writer method with validation + # @param [Object] amex_verbal_auth_reference_number Value to be assigned + def amex_verbal_auth_reference_number=(amex_verbal_auth_reference_number) + if !amex_verbal_auth_reference_number.nil? && amex_verbal_auth_reference_number.to_s.length > 6 + fail ArgumentError, 'invalid value for "amex_verbal_auth_reference_number", the character length must be smaller than or equal to 6.' + end + + @amex_verbal_auth_reference_number = amex_verbal_auth_reference_number + end + + # Custom attribute writer method with validation + # @param [Object] sales_slip_number Value to be assigned + def sales_slip_number=(sales_slip_number) + if !sales_slip_number.nil? && sales_slip_number > 99999 + fail ArgumentError, 'invalid value for "sales_slip_number", must be smaller than or equal to 99999.' + end + + @sales_slip_number = sales_slip_number + end + + # Custom attribute writer method with validation + # @param [Object] master_card_service_code Value to be assigned + def master_card_service_code=(master_card_service_code) + if !master_card_service_code.nil? && master_card_service_code.to_s.length > 2 + fail ArgumentError, 'invalid value for "master_card_service_code", the character length must be smaller than or equal to 2.' + end + + @master_card_service_code = master_card_service_code + end + + # Custom attribute writer method with validation + # @param [Object] master_card_service_reply_code Value to be assigned + def master_card_service_reply_code=(master_card_service_reply_code) + if !master_card_service_reply_code.nil? && master_card_service_reply_code.to_s.length > 1 + fail ArgumentError, 'invalid value for "master_card_service_reply_code", the character length must be smaller than or equal to 1.' + end + + @master_card_service_reply_code = master_card_service_reply_code + end + + # Custom attribute writer method with validation + # @param [Object] master_card_authentication_type Value to be assigned + def master_card_authentication_type=(master_card_authentication_type) + if !master_card_authentication_type.nil? && master_card_authentication_type.to_s.length > 1 + fail ArgumentError, 'invalid value for "master_card_authentication_type", the character length must be smaller than or equal to 1.' + end + + @master_card_authentication_type = master_card_authentication_type + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if !name.nil? && name.to_s.length > 30 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 30.' + end + + @name = name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + approval_code == o.approval_code && + transaction_id == o.transaction_id && + network_transaction_id == o.network_transaction_id && + provider_transaction_id == o.provider_transaction_id && + response_code == o.response_code && + response_code_source == o.response_code_source && + response_details == o.response_details && + response_category_code == o.response_category_code && + forwarded_acquirer_code == o.forwarded_acquirer_code && + avs == o.avs && + card_verification == o.card_verification && + merchant_advice == o.merchant_advice && + electronic_verification_results == o.electronic_verification_results && + customer == o.customer && + consumer_authentication_response == o.consumer_authentication_response && + issuer == o.issuer && + system_trace_audit_number == o.system_trace_audit_number && + payment_account_reference_number == o.payment_account_reference_number && + transaction_integrity_code == o.transaction_integrity_code && + amex_verbal_auth_reference_number == o.amex_verbal_auth_reference_number && + sales_slip_number == o.sales_slip_number && + master_card_service_code == o.master_card_service_code && + master_card_service_reply_code == o.master_card_service_reply_code && + master_card_authentication_type == o.master_card_authentication_type && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [approval_code, transaction_id, network_transaction_id, provider_transaction_id, response_code, response_code_source, response_details, response_category_code, forwarded_acquirer_code, avs, card_verification, merchant_advice, electronic_verification_results, customer, consumer_authentication_response, issuer, system_trace_audit_number, payment_account_reference_number, transaction_integrity_code, amex_verbal_auth_reference_number, sales_slip_number, master_card_service_code, master_card_service_reply_code, master_card_authentication_type, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_avs.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_avs.rb new file mode 100644 index 00000000..c24424db --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_avs.rb @@ -0,0 +1,224 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponseProcessorInformationAvs + # AVS result code. + attr_accessor :code + + # AVS result code sent directly from the processor. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of AVS. Use for debugging purposes only. + attr_accessor :code_raw + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'code_raw' => :'codeRaw' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'String', + :'code_raw' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.has_key?(:'codeRaw') + self.code_raw = attributes[:'codeRaw'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + # if !@code.nil? && @code.to_s.length > 1 + # invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 1.') + # end + + if !@code_raw.nil? && @code_raw.to_s.length > 10 + invalid_properties.push('invalid value for "code_raw", the character length must be smaller than or equal to 10.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + # return false if !@code.nil? && @code.to_s.length > 1 + return false if !@code_raw.nil? && @code_raw.to_s.length > 10 + true + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + # if !code.nil? && code.to_s.length > 1 + # fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 1.' + # end + + @code = code + end + + # Custom attribute writer method with validation + # @param [Object] code_raw Value to be assigned + def code_raw=(code_raw) + if !code_raw.nil? && code_raw.to_s.length > 10 + fail ArgumentError, 'invalid value for "code_raw", the character length must be smaller than or equal to 10.' + end + + @code_raw = code_raw + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + code_raw == o.code_raw + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code, code_raw].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_card_verification.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_card_verification.rb new file mode 100644 index 00000000..8830a8bc --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_card_verification.rb @@ -0,0 +1,224 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponseProcessorInformationCardVerification + # CVN result code. + attr_accessor :result_code + + # CVN result code sent directly from the processor. Returned only when the processor returns this value. `Important` Do not use this field to evaluate the result of card verification. Use for debugging purposes only. + attr_accessor :result_code_raw + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'result_code' => :'resultCode', + :'result_code_raw' => :'resultCodeRaw' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'result_code' => :'String', + :'result_code_raw' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'resultCode') + self.result_code = attributes[:'resultCode'] + end + + if attributes.has_key?(:'resultCodeRaw') + self.result_code_raw = attributes[:'resultCodeRaw'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@result_code.nil? && @result_code.to_s.length > 1 + invalid_properties.push('invalid value for "result_code", the character length must be smaller than or equal to 1.') + end + + if !@result_code_raw.nil? && @result_code_raw.to_s.length > 10 + invalid_properties.push('invalid value for "result_code_raw", the character length must be smaller than or equal to 10.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@result_code.nil? && @result_code.to_s.length > 1 + return false if !@result_code_raw.nil? && @result_code_raw.to_s.length > 10 + true + end + + # Custom attribute writer method with validation + # @param [Object] result_code Value to be assigned + def result_code=(result_code) + if !result_code.nil? && result_code.to_s.length > 1 + fail ArgumentError, 'invalid value for "result_code", the character length must be smaller than or equal to 1.' + end + + @result_code = result_code + end + + # Custom attribute writer method with validation + # @param [Object] result_code_raw Value to be assigned + def result_code_raw=(result_code_raw) + if !result_code_raw.nil? && result_code_raw.to_s.length > 10 + fail ArgumentError, 'invalid value for "result_code_raw", the character length must be smaller than or equal to 10.' + end + + @result_code_raw = result_code_raw + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + result_code == o.result_code && + result_code_raw == o.result_code_raw + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [result_code, result_code_raw].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_consumer_authentication_response.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_consumer_authentication_response.rb new file mode 100644 index 00000000..29f2f740 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_consumer_authentication_response.rb @@ -0,0 +1,224 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponseProcessorInformationConsumerAuthenticationResponse + # Mapped response code for Verified by Visa and American Express SafeKey: + attr_accessor :code + + # Raw response code sent directly from the processor for Verified by Visa and American Express SafeKey: + attr_accessor :code_raw + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'code_raw' => :'codeRaw' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'String', + :'code_raw' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.has_key?(:'codeRaw') + self.code_raw = attributes[:'codeRaw'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@code.nil? && @code.to_s.length > 3 + invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 3.') + end + + if !@code_raw.nil? && @code_raw.to_s.length > 3 + invalid_properties.push('invalid value for "code_raw", the character length must be smaller than or equal to 3.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@code.nil? && @code.to_s.length > 3 + return false if !@code_raw.nil? && @code_raw.to_s.length > 3 + true + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if !code.nil? && code.to_s.length > 3 + fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 3.' + end + + @code = code + end + + # Custom attribute writer method with validation + # @param [Object] code_raw Value to be assigned + def code_raw=(code_raw) + if !code_raw.nil? && code_raw.to_s.length > 3 + fail ArgumentError, 'invalid value for "code_raw", the character length must be smaller than or equal to 3.' + end + + @code_raw = code_raw + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + code_raw == o.code_raw + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code, code_raw].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_customer.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_customer.rb new file mode 100644 index 00000000..ecdc77db --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_customer.rb @@ -0,0 +1,199 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponseProcessorInformationCustomer + # Personal identifier result. This field is supported only for Redecard in Brazil for CyberSource Latin American Processing. If you included _buyerInformation.personalIdentification[].ID_ in the request, this value indicates whether or not _buyerInformation.personalIdentification[].ID_ matched a value in a record on file. Returned only when the personal ID result is returned by the processor. Possible values: - **Y**: Match - **N**: No match - **K**: Not supported - **U**: Unknown - **Z**: No response returned + attr_accessor :personal_id_result + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'personal_id_result' => :'personalIdResult' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'personal_id_result' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'personalIdResult') + self.personal_id_result = attributes[:'personalIdResult'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@personal_id_result.nil? && @personal_id_result.to_s.length > 1 + invalid_properties.push('invalid value for "personal_id_result", the character length must be smaller than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@personal_id_result.nil? && @personal_id_result.to_s.length > 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] personal_id_result Value to be assigned + def personal_id_result=(personal_id_result) + if !personal_id_result.nil? && personal_id_result.to_s.length > 1 + fail ArgumentError, 'invalid value for "personal_id_result", the character length must be smaller than or equal to 1.' + end + + @personal_id_result = personal_id_result + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + personal_id_result == o.personal_id_result + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [personal_id_result].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_electronic_verification_results.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_electronic_verification_results.rb new file mode 100644 index 00000000..fadb9bdb --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_electronic_verification_results.rb @@ -0,0 +1,474 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponseProcessorInformationElectronicVerificationResults + # Mapped Electronic Verification response code for the customer’s name. + attr_accessor :code + + # Raw Electronic Verification response code from the processor for the customer’s last name + attr_accessor :code_raw + + # Mapped Electronic Verification response code for the customer’s email address. + attr_accessor :email + + # Raw Electronic Verification response code from the processor for the customer’s email address. + attr_accessor :email_raw + + # Mapped Electronic Verification response code for the customer’s phone number. + attr_accessor :phone_number + + # Raw Electronic Verification response code from the processor for the customer’s phone number. + attr_accessor :phone_number_raw + + # Mapped Electronic Verification response code for the customer’s postal code. + attr_accessor :postal_code + + # Raw Electronic Verification response code from the processor for the customer’s postal code. + attr_accessor :postal_code_raw + + # Mapped Electronic Verification response code for the customer’s street address. + attr_accessor :street + + # Raw Electronic Verification response code from the processor for the customer’s street address. + attr_accessor :street_raw + + # TODO + attr_accessor :name + + # TODO + attr_accessor :name_raw + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'code_raw' => :'codeRaw', + :'email' => :'email', + :'email_raw' => :'emailRaw', + :'phone_number' => :'phoneNumber', + :'phone_number_raw' => :'phoneNumberRaw', + :'postal_code' => :'postalCode', + :'postal_code_raw' => :'postalCodeRaw', + :'street' => :'street', + :'street_raw' => :'streetRaw', + :'name' => :'name', + :'name_raw' => :'nameRaw' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'String', + :'code_raw' => :'String', + :'email' => :'String', + :'email_raw' => :'String', + :'phone_number' => :'String', + :'phone_number_raw' => :'String', + :'postal_code' => :'String', + :'postal_code_raw' => :'String', + :'street' => :'String', + :'street_raw' => :'String', + :'name' => :'String', + :'name_raw' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.has_key?(:'codeRaw') + self.code_raw = attributes[:'codeRaw'] + end + + if attributes.has_key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.has_key?(:'emailRaw') + self.email_raw = attributes[:'emailRaw'] + end + + if attributes.has_key?(:'phoneNumber') + self.phone_number = attributes[:'phoneNumber'] + end + + if attributes.has_key?(:'phoneNumberRaw') + self.phone_number_raw = attributes[:'phoneNumberRaw'] + end + + if attributes.has_key?(:'postalCode') + self.postal_code = attributes[:'postalCode'] + end + + if attributes.has_key?(:'postalCodeRaw') + self.postal_code_raw = attributes[:'postalCodeRaw'] + end + + if attributes.has_key?(:'street') + self.street = attributes[:'street'] + end + + if attributes.has_key?(:'streetRaw') + self.street_raw = attributes[:'streetRaw'] + end + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'nameRaw') + self.name_raw = attributes[:'nameRaw'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@code.nil? && @code.to_s.length > 1 + invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 1.') + end + + if !@code_raw.nil? && @code_raw.to_s.length > 1 + invalid_properties.push('invalid value for "code_raw", the character length must be smaller than or equal to 1.') + end + + if !@email.nil? && @email.to_s.length > 1 + invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 1.') + end + + if !@email_raw.nil? && @email_raw.to_s.length > 1 + invalid_properties.push('invalid value for "email_raw", the character length must be smaller than or equal to 1.') + end + + if !@phone_number.nil? && @phone_number.to_s.length > 1 + invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 1.') + end + + if !@phone_number_raw.nil? && @phone_number_raw.to_s.length > 1 + invalid_properties.push('invalid value for "phone_number_raw", the character length must be smaller than or equal to 1.') + end + + if !@postal_code.nil? && @postal_code.to_s.length > 1 + invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 1.') + end + + if !@postal_code_raw.nil? && @postal_code_raw.to_s.length > 1 + invalid_properties.push('invalid value for "postal_code_raw", the character length must be smaller than or equal to 1.') + end + + if !@street.nil? && @street.to_s.length > 1 + invalid_properties.push('invalid value for "street", the character length must be smaller than or equal to 1.') + end + + if !@street_raw.nil? && @street_raw.to_s.length > 1 + invalid_properties.push('invalid value for "street_raw", the character length must be smaller than or equal to 1.') + end + + if !@name.nil? && @name.to_s.length > 30 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 30.') + end + + if !@name_raw.nil? && @name_raw.to_s.length > 30 + invalid_properties.push('invalid value for "name_raw", the character length must be smaller than or equal to 30.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@code.nil? && @code.to_s.length > 1 + return false if !@code_raw.nil? && @code_raw.to_s.length > 1 + return false if !@email.nil? && @email.to_s.length > 1 + return false if !@email_raw.nil? && @email_raw.to_s.length > 1 + return false if !@phone_number.nil? && @phone_number.to_s.length > 1 + return false if !@phone_number_raw.nil? && @phone_number_raw.to_s.length > 1 + return false if !@postal_code.nil? && @postal_code.to_s.length > 1 + return false if !@postal_code_raw.nil? && @postal_code_raw.to_s.length > 1 + return false if !@street.nil? && @street.to_s.length > 1 + return false if !@street_raw.nil? && @street_raw.to_s.length > 1 + return false if !@name.nil? && @name.to_s.length > 30 + return false if !@name_raw.nil? && @name_raw.to_s.length > 30 + true + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if !code.nil? && code.to_s.length > 1 + fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 1.' + end + + @code = code + end + + # Custom attribute writer method with validation + # @param [Object] code_raw Value to be assigned + def code_raw=(code_raw) + if !code_raw.nil? && code_raw.to_s.length > 1 + fail ArgumentError, 'invalid value for "code_raw", the character length must be smaller than or equal to 1.' + end + + @code_raw = code_raw + end + + # Custom attribute writer method with validation + # @param [Object] email Value to be assigned + def email=(email) + if !email.nil? && email.to_s.length > 1 + fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 1.' + end + + @email = email + end + + # Custom attribute writer method with validation + # @param [Object] email_raw Value to be assigned + def email_raw=(email_raw) + if !email_raw.nil? && email_raw.to_s.length > 1 + fail ArgumentError, 'invalid value for "email_raw", the character length must be smaller than or equal to 1.' + end + + @email_raw = email_raw + end + + # Custom attribute writer method with validation + # @param [Object] phone_number Value to be assigned + def phone_number=(phone_number) + if !phone_number.nil? && phone_number.to_s.length > 1 + fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 1.' + end + + @phone_number = phone_number + end + + # Custom attribute writer method with validation + # @param [Object] phone_number_raw Value to be assigned + def phone_number_raw=(phone_number_raw) + if !phone_number_raw.nil? && phone_number_raw.to_s.length > 1 + fail ArgumentError, 'invalid value for "phone_number_raw", the character length must be smaller than or equal to 1.' + end + + @phone_number_raw = phone_number_raw + end + + # Custom attribute writer method with validation + # @param [Object] postal_code Value to be assigned + def postal_code=(postal_code) + if !postal_code.nil? && postal_code.to_s.length > 1 + fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 1.' + end + + @postal_code = postal_code + end + + # Custom attribute writer method with validation + # @param [Object] postal_code_raw Value to be assigned + def postal_code_raw=(postal_code_raw) + if !postal_code_raw.nil? && postal_code_raw.to_s.length > 1 + fail ArgumentError, 'invalid value for "postal_code_raw", the character length must be smaller than or equal to 1.' + end + + @postal_code_raw = postal_code_raw + end + + # Custom attribute writer method with validation + # @param [Object] street Value to be assigned + def street=(street) + if !street.nil? && street.to_s.length > 1 + fail ArgumentError, 'invalid value for "street", the character length must be smaller than or equal to 1.' + end + + @street = street + end + + # Custom attribute writer method with validation + # @param [Object] street_raw Value to be assigned + def street_raw=(street_raw) + if !street_raw.nil? && street_raw.to_s.length > 1 + fail ArgumentError, 'invalid value for "street_raw", the character length must be smaller than or equal to 1.' + end + + @street_raw = street_raw + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if !name.nil? && name.to_s.length > 30 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 30.' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] name_raw Value to be assigned + def name_raw=(name_raw) + if !name_raw.nil? && name_raw.to_s.length > 30 + fail ArgumentError, 'invalid value for "name_raw", the character length must be smaller than or equal to 30.' + end + + @name_raw = name_raw + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + code_raw == o.code_raw && + email == o.email && + email_raw == o.email_raw && + phone_number == o.phone_number && + phone_number_raw == o.phone_number_raw && + postal_code == o.postal_code && + postal_code_raw == o.postal_code_raw && + street == o.street && + street_raw == o.street_raw && + name == o.name && + name_raw == o.name_raw + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code, code_raw, email, email_raw, phone_number, phone_number_raw, postal_code, postal_code_raw, street, street_raw, name, name_raw].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_issuer.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_issuer.rb new file mode 100644 index 00000000..3d57e887 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_issuer.rb @@ -0,0 +1,224 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponseProcessorInformationIssuer + # Country in which the card was issued. This information enables you to determine whether the card was issued domestically or internationally. Use the two-character ISO Standard Country Codes. This field is supported for Visa, Mastercard, Discover, Diners Club, JCB, and Maestro (International) on Chase Paymentech Solutions. + attr_accessor :country + + # Data defined by the issuer. The value for this reply field will probably be the same as the value that you submitted in the authorization request, but it is possible for the processor, issuer, or acquirer to modify the value. This field is supported only for Visa transactions on **CyberSource through VisaNet**. + attr_accessor :discretionary_data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'country' => :'country', + :'discretionary_data' => :'discretionaryData' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'country' => :'String', + :'discretionary_data' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.has_key?(:'discretionaryData') + self.discretionary_data = attributes[:'discretionaryData'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@country.nil? && @country.to_s.length > 3 + invalid_properties.push('invalid value for "country", the character length must be smaller than or equal to 3.') + end + + if !@discretionary_data.nil? && @discretionary_data.to_s.length > 255 + invalid_properties.push('invalid value for "discretionary_data", the character length must be smaller than or equal to 255.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@country.nil? && @country.to_s.length > 3 + return false if !@discretionary_data.nil? && @discretionary_data.to_s.length > 255 + true + end + + # Custom attribute writer method with validation + # @param [Object] country Value to be assigned + def country=(country) + if !country.nil? && country.to_s.length > 3 + fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 3.' + end + + @country = country + end + + # Custom attribute writer method with validation + # @param [Object] discretionary_data Value to be assigned + def discretionary_data=(discretionary_data) + if !discretionary_data.nil? && discretionary_data.to_s.length > 255 + fail ArgumentError, 'invalid value for "discretionary_data", the character length must be smaller than or equal to 255.' + end + + @discretionary_data = discretionary_data + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + country == o.country && + discretionary_data == o.discretionary_data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [country, discretionary_data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_merchant_advice.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_merchant_advice.rb new file mode 100644 index 00000000..e629cd9a --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_merchant_advice.rb @@ -0,0 +1,224 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdvice + # Reason the recurring payment transaction was declined. For some processors, this field is used only for Mastercard. For other processors, this field is used for Visa and Mastercard. And for other processors, this field is not implemented. Possible values: - **00**: Response not provided. - **01**: New account information is available. Obtain the new information. - **02**: Try again later. - **03**: Do not try again. Obtain another type of payment from the customer. - **04**: Problem with a token or a partial shipment indicator. - **21**: Recurring payment cancellation service. - **99**: An unknown value was returned from the processor. + attr_accessor :code + + # Raw merchant advice code sent directly from the processor. This field is used only for Mastercard. For processor-specific information, see the auth_merchant_advice_code_raw field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :code_raw + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'code_raw' => :'codeRaw' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'String', + :'code_raw' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.has_key?(:'codeRaw') + self.code_raw = attributes[:'codeRaw'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@code.nil? && @code.to_s.length > 2 + invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 2.') + end + + if !@code_raw.nil? && @code_raw.to_s.length > 2 + invalid_properties.push('invalid value for "code_raw", the character length must be smaller than or equal to 2.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@code.nil? && @code.to_s.length > 2 + return false if !@code_raw.nil? && @code_raw.to_s.length > 2 + true + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if !code.nil? && code.to_s.length > 2 + fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 2.' + end + + @code = code + end + + # Custom attribute writer method with validation + # @param [Object] code_raw Value to be assigned + def code_raw=(code_raw) + if !code_raw.nil? && code_raw.to_s.length > 2 + fail ArgumentError, 'invalid value for "code_raw", the character length must be smaller than or equal to 2.' + end + + @code_raw = code_raw + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + code_raw == o.code_raw + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code, code_raw].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post400_response.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post400_response.rb new file mode 100644 index 00000000..ae90a2dc --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post400_response.rb @@ -0,0 +1,271 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost400Response + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # The status of the submitted transaction. + attr_accessor :status + + # The reason of the status. + attr_accessor :reason + + # The detail message related to the status and reason listed above. + attr_accessor :message + + attr_accessor :details + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'submit_time_utc' => :'submitTimeUtc', + :'status' => :'status', + :'reason' => :'reason', + :'message' => :'message', + :'details' => :'details' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'submit_time_utc' => :'String', + :'status' => :'String', + :'reason' => :'String', + :'message' => :'String', + :'details' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'reason') + self.reason = attributes[:'reason'] + end + + if attributes.has_key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.has_key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + status_validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) + return false unless status_validator.valid?(@status) + reason_validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_CARD', 'CARD_TYPE_NOT_ACCEPTED', 'INVALID_MERCHANT_CONFIGURATION', 'PROCESSOR_UNAVAILABLE', 'INVALID_AMOUNT', 'INVALID_CARD_TYPE', 'DEBIT_CARD_USEAGE_EXCEEDD_LIMIT']) + return false unless reason_validator.valid?(@reason) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) + unless validator.valid?(status) + fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' + end + @status = status + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] reason Object to be assigned + def reason=(reason) + validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_CARD', 'CARD_TYPE_NOT_ACCEPTED', 'INVALID_MERCHANT_CONFIGURATION', 'PROCESSOR_UNAVAILABLE', 'INVALID_AMOUNT', 'INVALID_CARD_TYPE', 'DEBIT_CARD_USEAGE_EXCEEDD_LIMIT']) + unless validator.valid?(reason) + fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' + end + @reason = reason + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + submit_time_utc == o.submit_time_utc && + status == o.status && + reason == o.reason && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [submit_time_utc, status, reason, message, details].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_post502_response.rb b/lib/cybersource_rest_client/models/pts_v2_payments_post502_response.rb new file mode 100644 index 00000000..7108d10f --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_post502_response.rb @@ -0,0 +1,260 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsPost502Response + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # The status of the submitted transaction. + attr_accessor :status + + # The reason of the status. + attr_accessor :reason + + # The detail message related to the status and reason listed above. + attr_accessor :message + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'submit_time_utc' => :'submitTimeUtc', + :'status' => :'status', + :'reason' => :'reason', + :'message' => :'message' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'submit_time_utc' => :'String', + :'status' => :'String', + :'reason' => :'String', + :'message' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'reason') + self.reason = attributes[:'reason'] + end + + if attributes.has_key?(:'message') + self.message = attributes[:'message'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + status_validator = EnumAttributeValidator.new('String', ['SERVER_ERROR']) + return false unless status_validator.valid?(@status) + reason_validator = EnumAttributeValidator.new('String', ['SYSTEM_ERROR', 'SERVER_TIMEOUT', 'SERVICE_TIMEOUT', 'PROCESSOR_TIMEOUT']) + return false unless reason_validator.valid?(@reason) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ['SERVER_ERROR']) + unless validator.valid?(status) + fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' + end + @status = status + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] reason Object to be assigned + def reason=(reason) + validator = EnumAttributeValidator.new('String', ['SYSTEM_ERROR', 'SERVER_TIMEOUT', 'SERVICE_TIMEOUT', 'PROCESSOR_TIMEOUT']) + unless validator.valid?(reason) + fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' + end + @reason = reason + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + submit_time_utc == o.submit_time_utc && + status == o.status && + reason == o.reason && + message == o.message + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [submit_time_utc, status, reason, message].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response.rb b/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response.rb new file mode 100644 index 00000000..117c7dae --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response.rb @@ -0,0 +1,323 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsRefundPost201Response + attr_accessor :_links + + # An unique identification number assigned by CyberSource to identify the submitted request. + attr_accessor :id + + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # The status of the submitted transaction. + attr_accessor :status + + # The reconciliation id for the submitted transaction. This value is not returned for all processors. + attr_accessor :reconciliation_id + + attr_accessor :client_reference_information + + attr_accessor :refund_amount_details + + attr_accessor :processor_information + + attr_accessor :order_information + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_links' => :'_links', + :'id' => :'id', + :'submit_time_utc' => :'submitTimeUtc', + :'status' => :'status', + :'reconciliation_id' => :'reconciliationId', + :'client_reference_information' => :'clientReferenceInformation', + :'refund_amount_details' => :'refundAmountDetails', + :'processor_information' => :'processorInformation', + :'order_information' => :'orderInformation' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_links' => :'PtsV2PaymentsRefundPost201ResponseLinks', + :'id' => :'String', + :'submit_time_utc' => :'String', + :'status' => :'String', + :'reconciliation_id' => :'String', + :'client_reference_information' => :'PtsV2PaymentsPost201ResponseClientReferenceInformation', + :'refund_amount_details' => :'PtsV2PaymentsRefundPost201ResponseRefundAmountDetails', + :'processor_information' => :'PtsV2PaymentsRefundPost201ResponseProcessorInformation', + :'order_information' => :'PtsV2PaymentsRefundPost201ResponseOrderInformation' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'_links') + self._links = attributes[:'_links'] + end + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'reconciliationId') + self.reconciliation_id = attributes[:'reconciliationId'] + end + + if attributes.has_key?(:'clientReferenceInformation') + self.client_reference_information = attributes[:'clientReferenceInformation'] + end + + if attributes.has_key?(:'refundAmountDetails') + self.refund_amount_details = attributes[:'refundAmountDetails'] + end + + if attributes.has_key?(:'processorInformation') + self.processor_information = attributes[:'processorInformation'] + end + + if attributes.has_key?(:'orderInformation') + self.order_information = attributes[:'orderInformation'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@id.nil? && @id.to_s.length > 26 + invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') + end + + if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + invalid_properties.push('invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@id.nil? && @id.to_s.length > 26 + status_validator = EnumAttributeValidator.new('String', ['PENDING']) + return false unless status_validator.valid?(@status) + return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if !id.nil? && id.to_s.length > 26 + fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' + end + + @id = id + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ['PENDING']) + unless validator.valid?(status) + fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' + end + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] reconciliation_id Value to be assigned + def reconciliation_id=(reconciliation_id) + if !reconciliation_id.nil? && reconciliation_id.to_s.length > 60 + fail ArgumentError, 'invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.' + end + + @reconciliation_id = reconciliation_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _links == o._links && + id == o.id && + submit_time_utc == o.submit_time_utc && + status == o.status && + reconciliation_id == o.reconciliation_id && + client_reference_information == o.client_reference_information && + refund_amount_details == o.refund_amount_details && + processor_information == o.processor_information && + order_information == o.order_information + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [_links, id, submit_time_utc, status, reconciliation_id, client_reference_information, refund_amount_details, processor_information, order_information].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response__links.rb b/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response__links.rb new file mode 100644 index 00000000..2706fd82 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response__links.rb @@ -0,0 +1,192 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsRefundPost201ResponseLinks + attr_accessor :_self + + attr_accessor :void + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_self' => :'self', + :'void' => :'void' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_self' => :'PtsV2PaymentsPost201ResponseLinksSelf', + :'void' => :'PtsV2PaymentsPost201ResponseLinksSelf' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'self') + self._self = attributes[:'self'] + end + + if attributes.has_key?(:'void') + self.void = attributes[:'void'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _self == o._self && + void == o.void + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [_self, void].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_order_information.rb b/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_order_information.rb new file mode 100644 index 00000000..172189fb --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_order_information.rb @@ -0,0 +1,183 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsRefundPost201ResponseOrderInformation + attr_accessor :invoice_details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'invoice_details' => :'invoiceDetails' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'invoice_details' => :'PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'invoiceDetails') + self.invoice_details = attributes[:'invoiceDetails'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + invoice_details == o.invoice_details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [invoice_details].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb b/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb new file mode 100644 index 00000000..0f8f38a3 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb @@ -0,0 +1,224 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsRefundPost201ResponseProcessorInformation + # Processor transaction ID. This value identifies the transaction on a host system. This value is supported only for Moneris. It contains this information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003: - Terminal ID = 66012345 - Shift number = 001 - Batch number = 069 - Transaction number = 003 + attr_accessor :transaction_id + + # Name of the Japanese acquirer that processed the transaction. Returned only for CCS (CAFIS) and JCN Gateway. Please contact the CyberSource Japan Support Group for more information. + attr_accessor :forwarded_acquirer_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'transaction_id' => :'transactionId', + :'forwarded_acquirer_code' => :'forwardedAcquirerCode' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'transaction_id' => :'String', + :'forwarded_acquirer_code' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'transactionId') + self.transaction_id = attributes[:'transactionId'] + end + + if attributes.has_key?(:'forwardedAcquirerCode') + self.forwarded_acquirer_code = attributes[:'forwardedAcquirerCode'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@transaction_id.nil? && @transaction_id.to_s.length > 18 + invalid_properties.push('invalid value for "transaction_id", the character length must be smaller than or equal to 18.') + end + + if !@forwarded_acquirer_code.nil? && @forwarded_acquirer_code.to_s.length > 32 + invalid_properties.push('invalid value for "forwarded_acquirer_code", the character length must be smaller than or equal to 32.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@transaction_id.nil? && @transaction_id.to_s.length > 18 + return false if !@forwarded_acquirer_code.nil? && @forwarded_acquirer_code.to_s.length > 32 + true + end + + # Custom attribute writer method with validation + # @param [Object] transaction_id Value to be assigned + def transaction_id=(transaction_id) + if !transaction_id.nil? && transaction_id.to_s.length > 18 + fail ArgumentError, 'invalid value for "transaction_id", the character length must be smaller than or equal to 18.' + end + + @transaction_id = transaction_id + end + + # Custom attribute writer method with validation + # @param [Object] forwarded_acquirer_code Value to be assigned + def forwarded_acquirer_code=(forwarded_acquirer_code) + if !forwarded_acquirer_code.nil? && forwarded_acquirer_code.to_s.length > 32 + fail ArgumentError, 'invalid value for "forwarded_acquirer_code", the character length must be smaller than or equal to 32.' + end + + @forwarded_acquirer_code = forwarded_acquirer_code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + transaction_id == o.transaction_id && + forwarded_acquirer_code == o.forwarded_acquirer_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [transaction_id, forwarded_acquirer_code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_refund_amount_details.rb b/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_refund_amount_details.rb new file mode 100644 index 00000000..bad9790d --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_refund_amount_details.rb @@ -0,0 +1,224 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsRefundPost201ResponseRefundAmountDetails + # Total amount of the refund. + attr_accessor :refund_amount + + # Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. + attr_accessor :currency + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'refund_amount' => :'refundAmount', + :'currency' => :'currency' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'refund_amount' => :'String', + :'currency' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'refundAmount') + self.refund_amount = attributes[:'refundAmount'] + end + + if attributes.has_key?(:'currency') + self.currency = attributes[:'currency'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@refund_amount.nil? && @refund_amount.to_s.length > 15 + invalid_properties.push('invalid value for "refund_amount", the character length must be smaller than or equal to 15.') + end + + if !@currency.nil? && @currency.to_s.length > 3 + invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@refund_amount.nil? && @refund_amount.to_s.length > 15 + return false if !@currency.nil? && @currency.to_s.length > 3 + true + end + + # Custom attribute writer method with validation + # @param [Object] refund_amount Value to be assigned + def refund_amount=(refund_amount) + if !refund_amount.nil? && refund_amount.to_s.length > 15 + fail ArgumentError, 'invalid value for "refund_amount", the character length must be smaller than or equal to 15.' + end + + @refund_amount = refund_amount + end + + # Custom attribute writer method with validation + # @param [Object] currency Value to be assigned + def currency=(currency) + if !currency.nil? && currency.to_s.length > 3 + fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.' + end + + @currency = currency + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + refund_amount == o.refund_amount && + currency == o.currency + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [refund_amount, currency].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_refund_post400_response.rb b/lib/cybersource_rest_client/models/pts_v2_payments_refund_post400_response.rb new file mode 100644 index 00000000..77323a6e --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_refund_post400_response.rb @@ -0,0 +1,271 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsRefundPost400Response + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # The status of the submitted transaction. + attr_accessor :status + + # The reason of the status. + attr_accessor :reason + + # The detail message related to the status and reason listed above. + attr_accessor :message + + attr_accessor :details + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'submit_time_utc' => :'submitTimeUtc', + :'status' => :'status', + :'reason' => :'reason', + :'message' => :'message', + :'details' => :'details' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'submit_time_utc' => :'String', + :'status' => :'String', + :'reason' => :'String', + :'message' => :'String', + :'details' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'reason') + self.reason = attributes[:'reason'] + end + + if attributes.has_key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.has_key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + status_validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) + return false unless status_validator.valid?(@status) + reason_validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_CARD', 'INVALID_MERCHANT_CONFIGURATION', 'CAPTURE_ALREADY_VOIDED', 'ACCOUNT_NOT_ALLOWED_CREDIT']) + return false unless reason_validator.valid?(@reason) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) + unless validator.valid?(status) + fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' + end + @status = status + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] reason Object to be assigned + def reason=(reason) + validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_CARD', 'INVALID_MERCHANT_CONFIGURATION', 'CAPTURE_ALREADY_VOIDED', 'ACCOUNT_NOT_ALLOWED_CREDIT']) + unless validator.valid?(reason) + fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' + end + @reason = reason + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + submit_time_utc == o.submit_time_utc && + status == o.status && + reason == o.reason && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [submit_time_utc, status, reason, message, details].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response.rb b/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response.rb new file mode 100644 index 00000000..994c2e80 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response.rb @@ -0,0 +1,332 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsReversalsPost201Response + attr_accessor :_links + + # An unique identification number assigned by CyberSource to identify the submitted request. + attr_accessor :id + + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # The status of the submitted transaction. + attr_accessor :status + + # The reconciliation id for the submitted transaction. This value is not returned for all processors. + attr_accessor :reconciliation_id + + attr_accessor :client_reference_information + + attr_accessor :reversal_amount_details + + attr_accessor :processor_information + + attr_accessor :authorization_information + + attr_accessor :point_of_sale_information + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_links' => :'_links', + :'id' => :'id', + :'submit_time_utc' => :'submitTimeUtc', + :'status' => :'status', + :'reconciliation_id' => :'reconciliationId', + :'client_reference_information' => :'clientReferenceInformation', + :'reversal_amount_details' => :'reversalAmountDetails', + :'processor_information' => :'processorInformation', + :'authorization_information' => :'authorizationInformation', + :'point_of_sale_information' => :'pointOfSaleInformation' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_links' => :'PtsV2PaymentsReversalsPost201ResponseLinks', + :'id' => :'String', + :'submit_time_utc' => :'String', + :'status' => :'String', + :'reconciliation_id' => :'String', + :'client_reference_information' => :'PtsV2PaymentsPost201ResponseClientReferenceInformation', + :'reversal_amount_details' => :'PtsV2PaymentsReversalsPost201ResponseReversalAmountDetails', + :'processor_information' => :'PtsV2PaymentsReversalsPost201ResponseProcessorInformation', + :'authorization_information' => :'PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation', + :'point_of_sale_information' => :'Ptsv2paymentsidreversalsPointOfSaleInformation' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'_links') + self._links = attributes[:'_links'] + end + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'reconciliationId') + self.reconciliation_id = attributes[:'reconciliationId'] + end + + if attributes.has_key?(:'clientReferenceInformation') + self.client_reference_information = attributes[:'clientReferenceInformation'] + end + + if attributes.has_key?(:'reversalAmountDetails') + self.reversal_amount_details = attributes[:'reversalAmountDetails'] + end + + if attributes.has_key?(:'processorInformation') + self.processor_information = attributes[:'processorInformation'] + end + + if attributes.has_key?(:'authorizationInformation') + self.authorization_information = attributes[:'authorizationInformation'] + end + + if attributes.has_key?(:'pointOfSaleInformation') + self.point_of_sale_information = attributes[:'pointOfSaleInformation'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@id.nil? && @id.to_s.length > 26 + invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') + end + + if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + invalid_properties.push('invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@id.nil? && @id.to_s.length > 26 + status_validator = EnumAttributeValidator.new('String', ['REVERSED']) + return false unless status_validator.valid?(@status) + return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if !id.nil? && id.to_s.length > 26 + fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' + end + + @id = id + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ['REVERSED']) + unless validator.valid?(status) + fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' + end + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] reconciliation_id Value to be assigned + def reconciliation_id=(reconciliation_id) + if !reconciliation_id.nil? && reconciliation_id.to_s.length > 60 + fail ArgumentError, 'invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.' + end + + @reconciliation_id = reconciliation_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _links == o._links && + id == o.id && + submit_time_utc == o.submit_time_utc && + status == o.status && + reconciliation_id == o.reconciliation_id && + client_reference_information == o.client_reference_information && + reversal_amount_details == o.reversal_amount_details && + processor_information == o.processor_information && + authorization_information == o.authorization_information && + point_of_sale_information == o.point_of_sale_information + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [_links, id, submit_time_utc, status, reconciliation_id, client_reference_information, reversal_amount_details, processor_information, authorization_information, point_of_sale_information].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response__links.rb b/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response__links.rb new file mode 100644 index 00000000..69381460 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response__links.rb @@ -0,0 +1,183 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsReversalsPost201ResponseLinks + attr_accessor :_self + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_self' => :'self' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_self' => :'PtsV2PaymentsPost201ResponseLinksSelf' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'self') + self._self = attributes[:'self'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _self == o._self + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [_self].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_authorization_information.rb b/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_authorization_information.rb new file mode 100644 index 00000000..5a74a1da --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_authorization_information.rb @@ -0,0 +1,224 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation + # The authorization code returned by the processor. + attr_accessor :approval_code + + # Reply flag for the original transaction. + attr_accessor :reason_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'approval_code' => :'approvalCode', + :'reason_code' => :'reasonCode' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'approval_code' => :'String', + :'reason_code' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'approvalCode') + self.approval_code = attributes[:'approvalCode'] + end + + if attributes.has_key?(:'reasonCode') + self.reason_code = attributes[:'reasonCode'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@approval_code.nil? && @approval_code.to_s.length > 6 + invalid_properties.push('invalid value for "approval_code", the character length must be smaller than or equal to 6.') + end + + if !@reason_code.nil? && @reason_code.to_s.length > 50 + invalid_properties.push('invalid value for "reason_code", the character length must be smaller than or equal to 50.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@approval_code.nil? && @approval_code.to_s.length > 6 + return false if !@reason_code.nil? && @reason_code.to_s.length > 50 + true + end + + # Custom attribute writer method with validation + # @param [Object] approval_code Value to be assigned + def approval_code=(approval_code) + if !approval_code.nil? && approval_code.to_s.length > 6 + fail ArgumentError, 'invalid value for "approval_code", the character length must be smaller than or equal to 6.' + end + + @approval_code = approval_code + end + + # Custom attribute writer method with validation + # @param [Object] reason_code Value to be assigned + def reason_code=(reason_code) + if !reason_code.nil? && reason_code.to_s.length > 50 + fail ArgumentError, 'invalid value for "reason_code", the character length must be smaller than or equal to 50.' + end + + @reason_code = reason_code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + approval_code == o.approval_code && + reason_code == o.reason_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [approval_code, reason_code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_processor_information.rb b/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_processor_information.rb new file mode 100644 index 00000000..25620b9d --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_processor_information.rb @@ -0,0 +1,324 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsReversalsPost201ResponseProcessorInformation + # Processor transaction ID. This value identifies the transaction on a host system. This value is supported only for Moneris. It contains this information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003: - Terminal ID = 66012345 - Shift number = 001 - Batch number = 069 - Transaction number = 003 + attr_accessor :transaction_id + + # For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of the authorization. + attr_accessor :response_code + + # Processor-defined response category code. The associated detail error code is in the auth_auth_response field or the auth_reversal_auth_ response field depending on which service you requested. This field is supported only for: - Japanese issuers - Domestic transactions in Japan - Comercio Latino—processor transaction ID required for troubleshooting **Maximum length for processors**: - Comercio Latino: 32 - All other processors: 3 + attr_accessor :response_category_code + + # Name of the Japanese acquirer that processed the transaction. Returned only for CCS (CAFIS) and JCN Gateway. Please contact the CyberSource Japan Support Group for more information. + attr_accessor :forwarded_acquirer_code + + # Mastercard service that was used for the transaction. Mastercard provides this value to CyberSource. Possible value: - 53: Mastercard card-on-file token service + attr_accessor :master_card_service_code + + # Result of the Mastercard card-on-file token service. Mastercard provides this value to CyberSource. Possible values: - **C**: Service completed successfully. - **F**: One of the following: - Incorrect Mastercard POS entry mode. The Mastercard POS entry mode should be 81 for an authorization or authorization reversal. - Incorrect Mastercard POS entry mode. The Mastercard POS entry mode should be 01 for a tokenized request. - Token requestor ID is missing or formatted incorrectly. - **I**: One of the following: - Invalid token requestor ID. - Suspended or deactivated token. - Invalid token (not in mapping table). - **T**: Invalid combination of token requestor ID and token. - **U**: Expired token. - **W**: Primary account number (PAN) listed in electronic warning bulletin. Note This field is returned only for **CyberSource through VisaNet**. + attr_accessor :master_card_service_reply_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'transaction_id' => :'transactionId', + :'response_code' => :'responseCode', + :'response_category_code' => :'responseCategoryCode', + :'forwarded_acquirer_code' => :'forwardedAcquirerCode', + :'master_card_service_code' => :'masterCardServiceCode', + :'master_card_service_reply_code' => :'masterCardServiceReplyCode' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'transaction_id' => :'String', + :'response_code' => :'String', + :'response_category_code' => :'String', + :'forwarded_acquirer_code' => :'String', + :'master_card_service_code' => :'String', + :'master_card_service_reply_code' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'transactionId') + self.transaction_id = attributes[:'transactionId'] + end + + if attributes.has_key?(:'responseCode') + self.response_code = attributes[:'responseCode'] + end + + if attributes.has_key?(:'responseCategoryCode') + self.response_category_code = attributes[:'responseCategoryCode'] + end + + if attributes.has_key?(:'forwardedAcquirerCode') + self.forwarded_acquirer_code = attributes[:'forwardedAcquirerCode'] + end + + if attributes.has_key?(:'masterCardServiceCode') + self.master_card_service_code = attributes[:'masterCardServiceCode'] + end + + if attributes.has_key?(:'masterCardServiceReplyCode') + self.master_card_service_reply_code = attributes[:'masterCardServiceReplyCode'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@transaction_id.nil? && @transaction_id.to_s.length > 18 + invalid_properties.push('invalid value for "transaction_id", the character length must be smaller than or equal to 18.') + end + + if !@response_code.nil? && @response_code.to_s.length > 10 + invalid_properties.push('invalid value for "response_code", the character length must be smaller than or equal to 10.') + end + + if !@response_category_code.nil? && @response_category_code.to_s.length > 32 + invalid_properties.push('invalid value for "response_category_code", the character length must be smaller than or equal to 32.') + end + + if !@forwarded_acquirer_code.nil? && @forwarded_acquirer_code.to_s.length > 32 + invalid_properties.push('invalid value for "forwarded_acquirer_code", the character length must be smaller than or equal to 32.') + end + + if !@master_card_service_code.nil? && @master_card_service_code.to_s.length > 2 + invalid_properties.push('invalid value for "master_card_service_code", the character length must be smaller than or equal to 2.') + end + + if !@master_card_service_reply_code.nil? && @master_card_service_reply_code.to_s.length > 1 + invalid_properties.push('invalid value for "master_card_service_reply_code", the character length must be smaller than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@transaction_id.nil? && @transaction_id.to_s.length > 18 + return false if !@response_code.nil? && @response_code.to_s.length > 10 + return false if !@response_category_code.nil? && @response_category_code.to_s.length > 32 + return false if !@forwarded_acquirer_code.nil? && @forwarded_acquirer_code.to_s.length > 32 + return false if !@master_card_service_code.nil? && @master_card_service_code.to_s.length > 2 + return false if !@master_card_service_reply_code.nil? && @master_card_service_reply_code.to_s.length > 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] transaction_id Value to be assigned + def transaction_id=(transaction_id) + if !transaction_id.nil? && transaction_id.to_s.length > 18 + fail ArgumentError, 'invalid value for "transaction_id", the character length must be smaller than or equal to 18.' + end + + @transaction_id = transaction_id + end + + # Custom attribute writer method with validation + # @param [Object] response_code Value to be assigned + def response_code=(response_code) + if !response_code.nil? && response_code.to_s.length > 10 + fail ArgumentError, 'invalid value for "response_code", the character length must be smaller than or equal to 10.' + end + + @response_code = response_code + end + + # Custom attribute writer method with validation + # @param [Object] response_category_code Value to be assigned + def response_category_code=(response_category_code) + if !response_category_code.nil? && response_category_code.to_s.length > 32 + fail ArgumentError, 'invalid value for "response_category_code", the character length must be smaller than or equal to 32.' + end + + @response_category_code = response_category_code + end + + # Custom attribute writer method with validation + # @param [Object] forwarded_acquirer_code Value to be assigned + def forwarded_acquirer_code=(forwarded_acquirer_code) + if !forwarded_acquirer_code.nil? && forwarded_acquirer_code.to_s.length > 32 + fail ArgumentError, 'invalid value for "forwarded_acquirer_code", the character length must be smaller than or equal to 32.' + end + + @forwarded_acquirer_code = forwarded_acquirer_code + end + + # Custom attribute writer method with validation + # @param [Object] master_card_service_code Value to be assigned + def master_card_service_code=(master_card_service_code) + if !master_card_service_code.nil? && master_card_service_code.to_s.length > 2 + fail ArgumentError, 'invalid value for "master_card_service_code", the character length must be smaller than or equal to 2.' + end + + @master_card_service_code = master_card_service_code + end + + # Custom attribute writer method with validation + # @param [Object] master_card_service_reply_code Value to be assigned + def master_card_service_reply_code=(master_card_service_reply_code) + if !master_card_service_reply_code.nil? && master_card_service_reply_code.to_s.length > 1 + fail ArgumentError, 'invalid value for "master_card_service_reply_code", the character length must be smaller than or equal to 1.' + end + + @master_card_service_reply_code = master_card_service_reply_code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + transaction_id == o.transaction_id && + response_code == o.response_code && + response_category_code == o.response_category_code && + forwarded_acquirer_code == o.forwarded_acquirer_code && + master_card_service_code == o.master_card_service_code && + master_card_service_reply_code == o.master_card_service_reply_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [transaction_id, response_code, response_category_code, forwarded_acquirer_code, master_card_service_code, master_card_service_reply_code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_reversal_amount_details.rb b/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_reversal_amount_details.rb new file mode 100644 index 00000000..b04d0301 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_reversal_amount_details.rb @@ -0,0 +1,249 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsReversalsPost201ResponseReversalAmountDetails + # Total reversed amount. + attr_accessor :reversed_amount + + # Amount of the original transaction. + attr_accessor :original_transaction_amount + + # Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. + attr_accessor :currency + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reversed_amount' => :'reversedAmount', + :'original_transaction_amount' => :'originalTransactionAmount', + :'currency' => :'currency' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'reversed_amount' => :'String', + :'original_transaction_amount' => :'String', + :'currency' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'reversedAmount') + self.reversed_amount = attributes[:'reversedAmount'] + end + + if attributes.has_key?(:'originalTransactionAmount') + self.original_transaction_amount = attributes[:'originalTransactionAmount'] + end + + if attributes.has_key?(:'currency') + self.currency = attributes[:'currency'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@reversed_amount.nil? && @reversed_amount.to_s.length > 15 + invalid_properties.push('invalid value for "reversed_amount", the character length must be smaller than or equal to 15.') + end + + if !@original_transaction_amount.nil? && @original_transaction_amount.to_s.length > 15 + invalid_properties.push('invalid value for "original_transaction_amount", the character length must be smaller than or equal to 15.') + end + + if !@currency.nil? && @currency.to_s.length > 3 + invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@reversed_amount.nil? && @reversed_amount.to_s.length > 15 + return false if !@original_transaction_amount.nil? && @original_transaction_amount.to_s.length > 15 + return false if !@currency.nil? && @currency.to_s.length > 3 + true + end + + # Custom attribute writer method with validation + # @param [Object] reversed_amount Value to be assigned + def reversed_amount=(reversed_amount) + if !reversed_amount.nil? && reversed_amount.to_s.length > 15 + fail ArgumentError, 'invalid value for "reversed_amount", the character length must be smaller than or equal to 15.' + end + + @reversed_amount = reversed_amount + end + + # Custom attribute writer method with validation + # @param [Object] original_transaction_amount Value to be assigned + def original_transaction_amount=(original_transaction_amount) + if !original_transaction_amount.nil? && original_transaction_amount.to_s.length > 15 + fail ArgumentError, 'invalid value for "original_transaction_amount", the character length must be smaller than or equal to 15.' + end + + @original_transaction_amount = original_transaction_amount + end + + # Custom attribute writer method with validation + # @param [Object] currency Value to be assigned + def currency=(currency) + if !currency.nil? && currency.to_s.length > 3 + fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.' + end + + @currency = currency + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + reversed_amount == o.reversed_amount && + original_transaction_amount == o.original_transaction_amount && + currency == o.currency + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [reversed_amount, original_transaction_amount, currency].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post400_response.rb b/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post400_response.rb new file mode 100644 index 00000000..fe728ffd --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post400_response.rb @@ -0,0 +1,271 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsReversalsPost400Response + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # The status of the submitted transaction. + attr_accessor :status + + # The reason of the status. + attr_accessor :reason + + # The detail message related to the status and reason listed above. + attr_accessor :message + + attr_accessor :details + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'submit_time_utc' => :'submitTimeUtc', + :'status' => :'status', + :'reason' => :'reason', + :'message' => :'message', + :'details' => :'details' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'submit_time_utc' => :'String', + :'status' => :'String', + :'reason' => :'String', + :'message' => :'String', + :'details' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'reason') + self.reason = attributes[:'reason'] + end + + if attributes.has_key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.has_key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + status_validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) + return false unless status_validator.valid?(@status) + reason_validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'AUTH_ALREADY_REVERSED', 'MISSING_AUTH', 'TRANSACTION_ALREADY_REVERSED_OR_SETTLED']) + return false unless reason_validator.valid?(@reason) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) + unless validator.valid?(status) + fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' + end + @status = status + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] reason Object to be assigned + def reason=(reason) + validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'AUTH_ALREADY_REVERSED', 'MISSING_AUTH', 'TRANSACTION_ALREADY_REVERSED_OR_SETTLED']) + unless validator.valid?(reason) + fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' + end + @reason = reason + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + submit_time_utc == o.submit_time_utc && + status == o.status && + reason == o.reason && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [submit_time_utc, status, reason, message, details].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response.rb b/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response.rb new file mode 100644 index 00000000..469e097d --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response.rb @@ -0,0 +1,280 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsVoidsPost201Response + attr_accessor :_links + + # An unique identification number assigned by CyberSource to identify the submitted request. + attr_accessor :id + + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # The status of the submitted transaction. + attr_accessor :status + + attr_accessor :client_reference_information + + attr_accessor :void_amount_details + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_links' => :'_links', + :'id' => :'id', + :'submit_time_utc' => :'submitTimeUtc', + :'status' => :'status', + :'client_reference_information' => :'clientReferenceInformation', + :'void_amount_details' => :'voidAmountDetails' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_links' => :'PtsV2PaymentsReversalsPost201ResponseLinks', + :'id' => :'String', + :'submit_time_utc' => :'String', + :'status' => :'String', + :'client_reference_information' => :'PtsV2PaymentsPost201ResponseClientReferenceInformation', + :'void_amount_details' => :'PtsV2PaymentsVoidsPost201ResponseVoidAmountDetails' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'_links') + self._links = attributes[:'_links'] + end + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'clientReferenceInformation') + self.client_reference_information = attributes[:'clientReferenceInformation'] + end + + if attributes.has_key?(:'voidAmountDetails') + self.void_amount_details = attributes[:'voidAmountDetails'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@id.nil? && @id.to_s.length > 26 + invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@id.nil? && @id.to_s.length > 26 + status_validator = EnumAttributeValidator.new('String', ['VOIDED']) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if !id.nil? && id.to_s.length > 26 + fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' + end + + @id = id + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ['VOIDED']) + unless validator.valid?(status) + fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _links == o._links && + id == o.id && + submit_time_utc == o.submit_time_utc && + status == o.status && + client_reference_information == o.client_reference_information && + void_amount_details == o.void_amount_details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [_links, id, submit_time_utc, status, client_reference_information, void_amount_details].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response_void_amount_details.rb b/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response_void_amount_details.rb new file mode 100644 index 00000000..fe643e88 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response_void_amount_details.rb @@ -0,0 +1,219 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsVoidsPost201ResponseVoidAmountDetails + # Total amount of the void. + attr_accessor :void_amount + + # Amount of the original transaction. + attr_accessor :original_transaction_amount + + # Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. + attr_accessor :currency + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'void_amount' => :'voidAmount', + :'original_transaction_amount' => :'originalTransactionAmount', + :'currency' => :'currency' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'void_amount' => :'String', + :'original_transaction_amount' => :'String', + :'currency' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'voidAmount') + self.void_amount = attributes[:'voidAmount'] + end + + if attributes.has_key?(:'originalTransactionAmount') + self.original_transaction_amount = attributes[:'originalTransactionAmount'] + end + + if attributes.has_key?(:'currency') + self.currency = attributes[:'currency'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@currency.nil? && @currency.to_s.length > 3 + invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@currency.nil? && @currency.to_s.length > 3 + true + end + + # Custom attribute writer method with validation + # @param [Object] currency Value to be assigned + def currency=(currency) + if !currency.nil? && currency.to_s.length > 3 + fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.' + end + + @currency = currency + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + void_amount == o.void_amount && + original_transaction_amount == o.original_transaction_amount && + currency == o.currency + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [void_amount, original_transaction_amount, currency].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payments_voids_post400_response.rb b/lib/cybersource_rest_client/models/pts_v2_payments_voids_post400_response.rb new file mode 100644 index 00000000..a45c2ff5 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payments_voids_post400_response.rb @@ -0,0 +1,271 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PaymentsVoidsPost400Response + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # The status of the submitted transaction. + attr_accessor :status + + # The reason of the status. + attr_accessor :reason + + # The detail message related to the status and reason listed above. + attr_accessor :message + + attr_accessor :details + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'submit_time_utc' => :'submitTimeUtc', + :'status' => :'status', + :'reason' => :'reason', + :'message' => :'message', + :'details' => :'details' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'submit_time_utc' => :'String', + :'status' => :'String', + :'reason' => :'String', + :'message' => :'String', + :'details' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'reason') + self.reason = attributes[:'reason'] + end + + if attributes.has_key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.has_key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + status_validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) + return false unless status_validator.valid?(@status) + reason_validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'NOT_VOIDABLE']) + return false unless reason_validator.valid?(@reason) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) + unless validator.valid?(status) + fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' + end + @status = status + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] reason Object to be assigned + def reason=(reason) + validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'NOT_VOIDABLE']) + unless validator.valid?(reason) + fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' + end + @reason = reason + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + submit_time_utc == o.submit_time_utc && + status == o.status && + reason == o.reason && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [submit_time_utc, status, reason, message, details].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payouts_post400_response.rb b/lib/cybersource_rest_client/models/pts_v2_payouts_post400_response.rb new file mode 100644 index 00000000..379ec5c5 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payouts_post400_response.rb @@ -0,0 +1,259 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PayoutsPost400Response + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # The status of the submitted transaction. + attr_accessor :status + + # The reason of the status. + attr_accessor :reason + + # The detail message related to the status and reason listed above. Possible value is: - Your aggregator or acquirer is not accepting transactions from you at this time. - Your aggregator or acquirer is not accepting this transaction. - CyberSource declined the request because the credit card has expired. You might also receive this value if the expiration date you provided does not match the date the issuing bank has on file. - The bank declined the transaction. - The merchant reference number for this authorization request matches the merchant reference number of another authorization request that you sent within the past 15 minutes. Resend the request with a unique merchant reference number. - The credit card number did not pass CyberSource basic checks. - Data provided is not consistent with the request. For example, you requested a product with negative cost. - The request is missing a required field. + attr_accessor :message + + attr_accessor :details + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'submit_time_utc' => :'submitTimeUtc', + :'status' => :'status', + :'reason' => :'reason', + :'message' => :'message', + :'details' => :'details' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'submit_time_utc' => :'String', + :'status' => :'String', + :'reason' => :'String', + :'message' => :'String', + :'details' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'reason') + self.reason = attributes[:'reason'] + end + + if attributes.has_key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.has_key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + reason_validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'INVALID_AMOUNT', 'DEBIT_CARD_USEAGE_EXCEEDD_LIMIT']) + return false unless reason_validator.valid?(@reason) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] reason Object to be assigned + def reason=(reason) + validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'INVALID_AMOUNT', 'DEBIT_CARD_USEAGE_EXCEEDD_LIMIT']) + unless validator.valid?(reason) + fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' + end + @reason = reason + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + submit_time_utc == o.submit_time_utc && + status == o.status && + reason == o.reason && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [submit_time_utc, status, reason, message, details].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/pts_v2_payouts_post_response.rb b/lib/cybersource_rest_client/models/pts_v2_payouts_post_response.rb new file mode 100644 index 00000000..3c28bb39 --- /dev/null +++ b/lib/cybersource_rest_client/models/pts_v2_payouts_post_response.rb @@ -0,0 +1,237 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class PtsV2PayoutsPostResponse + attr_accessor :client_reference_information + + attr_accessor :order_information + + attr_accessor :merchant_information + + attr_accessor :recipient_information + + attr_accessor :sender_information + + attr_accessor :processing_information + + attr_accessor :payment_information + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_reference_information' => :'clientReferenceInformation', + :'order_information' => :'orderInformation', + :'merchant_information' => :'merchantInformation', + :'recipient_information' => :'recipientInformation', + :'sender_information' => :'senderInformation', + :'processing_information' => :'processingInformation', + :'payment_information' => :'paymentInformation' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'client_reference_information' => :'PtsV2PaymentsPost201ResponseClientReferenceInformation', + :'order_information' => :'Ptsv2payoutsOrderInformation', + :'merchant_information' => :'Ptsv2payoutsMerchantInformation', + :'recipient_information' => :'Ptsv2payoutsRecipientInformation', + :'sender_information' => :'Ptsv2payoutsSenderInformation', + :'processing_information' => :'Ptsv2payoutsProcessingInformation', + :'payment_information' => :'Ptsv2payoutsPaymentInformation' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'clientReferenceInformation') + self.client_reference_information = attributes[:'clientReferenceInformation'] + end + + if attributes.has_key?(:'orderInformation') + self.order_information = attributes[:'orderInformation'] + end + + if attributes.has_key?(:'merchantInformation') + self.merchant_information = attributes[:'merchantInformation'] + end + + if attributes.has_key?(:'recipientInformation') + self.recipient_information = attributes[:'recipientInformation'] + end + + if attributes.has_key?(:'senderInformation') + self.sender_information = attributes[:'senderInformation'] + end + + if attributes.has_key?(:'processingInformation') + self.processing_information = attributes[:'processingInformation'] + end + + if attributes.has_key?(:'paymentInformation') + self.payment_information = attributes[:'paymentInformation'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + client_reference_information == o.client_reference_information && + order_information == o.order_information && + merchant_information == o.merchant_information && + recipient_information == o.recipient_information && + sender_information == o.sender_information && + processing_information == o.processing_information && + payment_information == o.payment_information + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [client_reference_information, order_information, merchant_information, recipient_information, sender_information, processing_information, payment_information].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_point_of_sale_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_point_of_sale_information.rb index b7ef1876..127e4bb8 100644 --- a/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_point_of_sale_information.rb +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_point_of_sale_information.rb @@ -26,7 +26,7 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'emv' => :'InlineResponse201PointOfSaleInformationEmv' + :'emv' => :'PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv' } end diff --git a/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_information.rb index 66b821a2..cbb4ba2e 100644 --- a/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_information.rb +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_information.rb @@ -56,8 +56,6 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - # ansuguma - # if !@reason.nil? && @reason.to_s.length > 3 # invalid_properties.push('invalid value for "reason", the character length must be smaller than or equal to 3.') # end @@ -68,8 +66,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - # ansuguma - # return false if !@reason.nil? && @reason.to_s.length > 3 true end @@ -77,8 +73,6 @@ def valid? # Custom attribute writer method with validation # @param [Object] reason Value to be assigned def reason=(reason) - # ansuguma - # if !reason.nil? && reason.to_s.length > 3 # fail ArgumentError, 'invalid value for "reason", the character length must be smaller than or equal to 3.' # end diff --git a/lib/cybersource_rest_client/models/reporting_v3_notificationof_changes_get200_response.rb b/lib/cybersource_rest_client/models/reporting_v3_notificationof_changes_get200_response.rb new file mode 100644 index 00000000..23c9fe30 --- /dev/null +++ b/lib/cybersource_rest_client/models/reporting_v3_notificationof_changes_get200_response.rb @@ -0,0 +1,186 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class ReportingV3NotificationofChangesGet200Response + # List of Notification Of Change Info values + attr_accessor :notification_of_changes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'notification_of_changes' => :'notificationOfChanges' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'notification_of_changes' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'notificationOfChanges') + if (value = attributes[:'notificationOfChanges']).is_a?(Array) + self.notification_of_changes = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + notification_of_changes == o.notification_of_changes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [notification_of_changes].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/reporting_v3_notificationof_changes_get200_response_notification_of_changes.rb b/lib/cybersource_rest_client/models/reporting_v3_notificationof_changes_get200_response_notification_of_changes.rb new file mode 100644 index 00000000..d4b1a1df --- /dev/null +++ b/lib/cybersource_rest_client/models/reporting_v3_notificationof_changes_get200_response_notification_of_changes.rb @@ -0,0 +1,255 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + # Notification Of Change + class ReportingV3NotificationofChangesGet200ResponseNotificationOfChanges + # Merchant Reference Number + attr_accessor :merchant_reference_number + + # Transaction Reference Number + attr_accessor :transaction_reference_number + + # Notification Of Change Date(ISO 8601 Extended) + attr_accessor :time + + # Merchant Reference Number + attr_accessor :code + + # Account Type + attr_accessor :account_type + + # Routing Number + attr_accessor :routing_number + + # Account Number + attr_accessor :account_number + + # Consumer Name + attr_accessor :consumer_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'merchant_reference_number' => :'merchantReferenceNumber', + :'transaction_reference_number' => :'transactionReferenceNumber', + :'time' => :'time', + :'code' => :'code', + :'account_type' => :'accountType', + :'routing_number' => :'routingNumber', + :'account_number' => :'accountNumber', + :'consumer_name' => :'consumerName' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'merchant_reference_number' => :'String', + :'transaction_reference_number' => :'String', + :'time' => :'DateTime', + :'code' => :'String', + :'account_type' => :'String', + :'routing_number' => :'String', + :'account_number' => :'String', + :'consumer_name' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'merchantReferenceNumber') + self.merchant_reference_number = attributes[:'merchantReferenceNumber'] + end + + if attributes.has_key?(:'transactionReferenceNumber') + self.transaction_reference_number = attributes[:'transactionReferenceNumber'] + end + + if attributes.has_key?(:'time') + self.time = attributes[:'time'] + end + + if attributes.has_key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.has_key?(:'accountType') + self.account_type = attributes[:'accountType'] + end + + if attributes.has_key?(:'routingNumber') + self.routing_number = attributes[:'routingNumber'] + end + + if attributes.has_key?(:'accountNumber') + self.account_number = attributes[:'accountNumber'] + end + + if attributes.has_key?(:'consumerName') + self.consumer_name = attributes[:'consumerName'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + merchant_reference_number == o.merchant_reference_number && + transaction_reference_number == o.transaction_reference_number && + time == o.time && + code == o.code && + account_type == o.account_type && + routing_number == o.routing_number && + account_number == o.account_number && + consumer_name == o.consumer_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [merchant_reference_number, transaction_reference_number, time, code, account_type, routing_number, account_number, consumer_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/reporting_v3_notificationof_changes_get400_response.rb b/lib/cybersource_rest_client/models/reporting_v3_notificationof_changes_get400_response.rb new file mode 100644 index 00000000..c99dcdd1 --- /dev/null +++ b/lib/cybersource_rest_client/models/reporting_v3_notificationof_changes_get400_response.rb @@ -0,0 +1,247 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + # Error Bean + class ReportingV3NotificationofChangesGet400Response + # Error code + attr_accessor :code + + # Error message + attr_accessor :message + + # Localization Key Name + attr_accessor :localization_key + + # Correlation Id + attr_accessor :correlation_id + + # Error Detail + attr_accessor :detail + + # Error fields List + attr_accessor :fields + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'message' => :'message', + :'localization_key' => :'localizationKey', + :'correlation_id' => :'correlationId', + :'detail' => :'detail', + :'fields' => :'fields' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'String', + :'message' => :'String', + :'localization_key' => :'String', + :'correlation_id' => :'String', + :'detail' => :'String', + :'fields' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.has_key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.has_key?(:'localizationKey') + self.localization_key = attributes[:'localizationKey'] + end + + if attributes.has_key?(:'correlationId') + self.correlation_id = attributes[:'correlationId'] + end + + if attributes.has_key?(:'detail') + self.detail = attributes[:'detail'] + end + + if attributes.has_key?(:'fields') + if (value = attributes[:'fields']).is_a?(Array) + self.fields = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @code.nil? + invalid_properties.push('invalid value for "code", code cannot be nil.') + end + + if @message.nil? + invalid_properties.push('invalid value for "message", message cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @code.nil? + return false if @message.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + message == o.message && + localization_key == o.localization_key && + correlation_id == o.correlation_id && + detail == o.detail && + fields == o.fields + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code, message, localization_key, correlation_id, detail, fields].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/reporting_v3_notificationof_changes_get400_response_fields.rb b/lib/cybersource_rest_client/models/reporting_v3_notificationof_changes_get400_response_fields.rb new file mode 100644 index 00000000..aec189ad --- /dev/null +++ b/lib/cybersource_rest_client/models/reporting_v3_notificationof_changes_get400_response_fields.rb @@ -0,0 +1,205 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + # Provide validation failed input field details + class ReportingV3NotificationofChangesGet400ResponseFields + # Path of the failed property + attr_accessor :path + + # Error description about validation failed field + attr_accessor :message + + # Localized Key Name + attr_accessor :localization_key + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'path' => :'path', + :'message' => :'message', + :'localization_key' => :'localizationKey' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'path' => :'String', + :'message' => :'String', + :'localization_key' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'path') + self.path = attributes[:'path'] + end + + if attributes.has_key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.has_key?(:'localizationKey') + self.localization_key = attributes[:'localizationKey'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + path == o.path && + message == o.message && + localization_key == o.localization_key + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [path, message, localization_key].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/reporting_v3_report_definitions_get200_response.rb b/lib/cybersource_rest_client/models/reporting_v3_report_definitions_get200_response.rb new file mode 100644 index 00000000..e755a7c3 --- /dev/null +++ b/lib/cybersource_rest_client/models/reporting_v3_report_definitions_get200_response.rb @@ -0,0 +1,185 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class ReportingV3ReportDefinitionsGet200Response + attr_accessor :report_definitions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'report_definitions' => :'reportDefinitions' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'report_definitions' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'reportDefinitions') + if (value = attributes[:'reportDefinitions']).is_a?(Array) + self.report_definitions = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + report_definitions == o.report_definitions + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [report_definitions].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/reporting_v3_report_definitions_get200_response_report_definitions.rb b/lib/cybersource_rest_client/models/reporting_v3_report_definitions_get200_response_report_definitions.rb new file mode 100644 index 00000000..c4b82430 --- /dev/null +++ b/lib/cybersource_rest_client/models/reporting_v3_report_definitions_get200_response_report_definitions.rb @@ -0,0 +1,243 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class ReportingV3ReportDefinitionsGet200ResponseReportDefinitions + attr_accessor :type + + attr_accessor :report_definition_id + + attr_accessor :report_defintion_name + + attr_accessor :supported_formats + + attr_accessor :description + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'report_definition_id' => :'reportDefinitionId', + :'report_defintion_name' => :'reportDefintionName', + :'supported_formats' => :'supportedFormats', + :'description' => :'description' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'type' => :'String', + :'report_definition_id' => :'Integer', + :'report_defintion_name' => :'String', + :'supported_formats' => :'Array', + :'description' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.has_key?(:'reportDefinitionId') + self.report_definition_id = attributes[:'reportDefinitionId'] + end + + if attributes.has_key?(:'reportDefintionName') + self.report_defintion_name = attributes[:'reportDefintionName'] + end + + if attributes.has_key?(:'supportedFormats') + if (value = attributes[:'supportedFormats']).is_a?(Array) + self.supported_formats = value + end + end + + if attributes.has_key?(:'description') + self.description = attributes[:'description'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + report_definition_id == o.report_definition_id && + report_defintion_name == o.report_defintion_name && + supported_formats == o.supported_formats && + description == o.description + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [type, report_definition_id, report_defintion_name, supported_formats, description].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response.rb b/lib/cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response.rb new file mode 100644 index 00000000..6c67c775 --- /dev/null +++ b/lib/cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response.rb @@ -0,0 +1,254 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class ReportingV3ReportDefinitionsNameGet200Response + attr_accessor :type + + attr_accessor :report_definition_id + + attr_accessor :report_defintion_name + + attr_accessor :attributes + + attr_accessor :supported_formats + + attr_accessor :description + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'report_definition_id' => :'reportDefinitionId', + :'report_defintion_name' => :'reportDefintionName', + :'attributes' => :'attributes', + :'supported_formats' => :'supportedFormats', + :'description' => :'description' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'type' => :'String', + :'report_definition_id' => :'Integer', + :'report_defintion_name' => :'String', + :'attributes' => :'Array', + :'supported_formats' => :'Array', + :'description' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.has_key?(:'reportDefinitionId') + self.report_definition_id = attributes[:'reportDefinitionId'] + end + + if attributes.has_key?(:'reportDefintionName') + self.report_defintion_name = attributes[:'reportDefintionName'] + end + + if attributes.has_key?(:'attributes') + if (value = attributes[:'attributes']).is_a?(Array) + self.attributes = value + end + end + + if attributes.has_key?(:'supportedFormats') + if (value = attributes[:'supportedFormats']).is_a?(Array) + self.supported_formats = value + end + end + + if attributes.has_key?(:'description') + self.description = attributes[:'description'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + report_definition_id == o.report_definition_id && + report_defintion_name == o.report_defintion_name && + attributes == o.attributes && + supported_formats == o.supported_formats && + description == o.description + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [type, report_definition_id, report_defintion_name, attributes, supported_formats, description].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response_attributes.rb b/lib/cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response_attributes.rb new file mode 100644 index 00000000..ef91e811 --- /dev/null +++ b/lib/cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response_attributes.rb @@ -0,0 +1,237 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class ReportingV3ReportDefinitionsNameGet200ResponseAttributes + attr_accessor :id + + attr_accessor :name + + attr_accessor :description + + attr_accessor :filter_type + + attr_accessor :default + + attr_accessor :required + + attr_accessor :supported_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'description' => :'description', + :'filter_type' => :'filterType', + :'default' => :'default', + :'required' => :'required', + :'supported_type' => :'supportedType' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'id' => :'String', + :'name' => :'String', + :'description' => :'String', + :'filter_type' => :'String', + :'default' => :'BOOLEAN', + :'required' => :'BOOLEAN', + :'supported_type' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.has_key?(:'filterType') + self.filter_type = attributes[:'filterType'] + end + + if attributes.has_key?(:'default') + self.default = attributes[:'default'] + end + + if attributes.has_key?(:'required') + self.required = attributes[:'required'] + end + + if attributes.has_key?(:'supportedType') + self.supported_type = attributes[:'supportedType'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + description == o.description && + filter_type == o.filter_type && + default == o.default && + required == o.required && + supported_type == o.supported_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [id, name, description, filter_type, default, required, supported_type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response.rb b/lib/cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response.rb new file mode 100644 index 00000000..18379bb9 --- /dev/null +++ b/lib/cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response.rb @@ -0,0 +1,185 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class ReportingV3ReportSubscriptionsGet200Response + attr_accessor :subscriptions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'subscriptions' => :'subscriptions' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'subscriptions' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'subscriptions') + if (value = attributes[:'subscriptions']).is_a?(Array) + self.subscriptions = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + subscriptions == o.subscriptions + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [subscriptions].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response_report_preferences.rb b/lib/cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response_report_preferences.rb new file mode 100644 index 00000000..88fc982e --- /dev/null +++ b/lib/cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response_report_preferences.rb @@ -0,0 +1,229 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + # Report Preferences + class ReportingV3ReportSubscriptionsGet200ResponseReportPreferences + # Indicator to determine whether negative sign infron of amount for all refunded transaction + attr_accessor :signed_amounts + + # Specify the field naming convention to be followed in reports (applicable to only csv report formats + attr_accessor :field_name_convention + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'signed_amounts' => :'signedAmounts', + :'field_name_convention' => :'fieldNameConvention' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'signed_amounts' => :'BOOLEAN', + :'field_name_convention' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'signedAmounts') + self.signed_amounts = attributes[:'signedAmounts'] + end + + if attributes.has_key?(:'fieldNameConvention') + self.field_name_convention = attributes[:'fieldNameConvention'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + field_name_convention_validator = EnumAttributeValidator.new('String', ['SOAPI', 'SCMP']) + return false unless field_name_convention_validator.valid?(@field_name_convention) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] field_name_convention Object to be assigned + def field_name_convention=(field_name_convention) + validator = EnumAttributeValidator.new('String', ['SOAPI', 'SCMP']) + unless validator.valid?(field_name_convention) + fail ArgumentError, 'invalid value for "field_name_convention", must be one of #{validator.allowable_values}.' + end + @field_name_convention = field_name_convention + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + signed_amounts == o.signed_amounts && + field_name_convention == o.field_name_convention + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [signed_amounts, field_name_convention].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response_subscriptions.rb b/lib/cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response_subscriptions.rb new file mode 100644 index 00000000..d6484676 --- /dev/null +++ b/lib/cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response_subscriptions.rb @@ -0,0 +1,354 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + # Subscription Details + class ReportingV3ReportSubscriptionsGet200ResponseSubscriptions + # Organization Id + attr_accessor :organization_id + + # Report Definition Id + attr_accessor :report_definition_id + + # Report Definition + attr_accessor :report_definition_name + + # Report Format + attr_accessor :report_mime_type + + # Report Frequency + attr_accessor :report_frequency + + # Report Name + attr_accessor :report_name + + # Time Zone + attr_accessor :timezone + + # Start Time + attr_accessor :start_time + + # Start Day + attr_accessor :start_day + + # List of all fields String values + attr_accessor :report_fields + + # List of filters to apply + attr_accessor :report_filters + + attr_accessor :report_preferences + + # Selected name of the group. + attr_accessor :selected_merchant_group_name + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId', + :'report_definition_id' => :'reportDefinitionId', + :'report_definition_name' => :'reportDefinitionName', + :'report_mime_type' => :'reportMimeType', + :'report_frequency' => :'reportFrequency', + :'report_name' => :'reportName', + :'timezone' => :'timezone', + :'start_time' => :'startTime', + :'start_day' => :'startDay', + :'report_fields' => :'reportFields', + :'report_filters' => :'reportFilters', + :'report_preferences' => :'reportPreferences', + :'selected_merchant_group_name' => :'selectedMerchantGroupName' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'organization_id' => :'String', + :'report_definition_id' => :'String', + :'report_definition_name' => :'String', + :'report_mime_type' => :'String', + :'report_frequency' => :'String', + :'report_name' => :'String', + :'timezone' => :'String', + :'start_time' => :'DateTime', + :'start_day' => :'Integer', + :'report_fields' => :'Array', + :'report_filters' => :'Array', + :'report_preferences' => :'ReportingV3ReportSubscriptionsGet200ResponseReportPreferences', + :'selected_merchant_group_name' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'organizationId') + self.organization_id = attributes[:'organizationId'] + end + + if attributes.has_key?(:'reportDefinitionId') + self.report_definition_id = attributes[:'reportDefinitionId'] + end + + if attributes.has_key?(:'reportDefinitionName') + self.report_definition_name = attributes[:'reportDefinitionName'] + end + + if attributes.has_key?(:'reportMimeType') + self.report_mime_type = attributes[:'reportMimeType'] + end + + if attributes.has_key?(:'reportFrequency') + self.report_frequency = attributes[:'reportFrequency'] + end + + if attributes.has_key?(:'reportName') + self.report_name = attributes[:'reportName'] + end + + if attributes.has_key?(:'timezone') + self.timezone = attributes[:'timezone'] + end + + if attributes.has_key?(:'startTime') + self.start_time = attributes[:'startTime'] + end + + if attributes.has_key?(:'startDay') + self.start_day = attributes[:'startDay'] + end + + if attributes.has_key?(:'reportFields') + if (value = attributes[:'reportFields']).is_a?(Array) + self.report_fields = value + end + end + + if attributes.has_key?(:'reportFilters') + if (value = attributes[:'reportFilters']).is_a?(Array) + self.report_filters = value + end + end + + if attributes.has_key?(:'reportPreferences') + self.report_preferences = attributes[:'reportPreferences'] + end + + if attributes.has_key?(:'selectedMerchantGroupName') + self.selected_merchant_group_name = attributes[:'selectedMerchantGroupName'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + report_mime_type_validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv']) + return false unless report_mime_type_validator.valid?(@report_mime_type) + report_frequency_validator = EnumAttributeValidator.new('String', ['DAILY', 'WEEKLY', 'MONTHLY']) + return false unless report_frequency_validator.valid?(@report_frequency) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] report_mime_type Object to be assigned + def report_mime_type=(report_mime_type) + validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv']) + unless validator.valid?(report_mime_type) + fail ArgumentError, 'invalid value for "report_mime_type", must be one of #{validator.allowable_values}.' + end + @report_mime_type = report_mime_type + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] report_frequency Object to be assigned + def report_frequency=(report_frequency) + validator = EnumAttributeValidator.new('String', ['DAILY', 'WEEKLY', 'MONTHLY']) + unless validator.valid?(report_frequency) + fail ArgumentError, 'invalid value for "report_frequency", must be one of #{validator.allowable_values}.' + end + @report_frequency = report_frequency + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id && + report_definition_id == o.report_definition_id && + report_definition_name == o.report_definition_name && + report_mime_type == o.report_mime_type && + report_frequency == o.report_frequency && + report_name == o.report_name && + timezone == o.timezone && + start_time == o.start_time && + start_day == o.start_day && + report_fields == o.report_fields && + report_filters == o.report_filters && + report_preferences == o.report_preferences && + selected_merchant_group_name == o.selected_merchant_group_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [organization_id, report_definition_id, report_definition_name, report_mime_type, report_frequency, report_name, timezone, start_time, start_day, report_fields, report_filters, report_preferences, selected_merchant_group_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response.rb b/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response.rb new file mode 100644 index 00000000..7b4bdd62 --- /dev/null +++ b/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response.rb @@ -0,0 +1,185 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class ReportingV3ReportsGet200Response + attr_accessor :reports + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reports' => :'reports' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'reports' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'reports') + if (value = attributes[:'reports']).is_a?(Array) + self.reports = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + reports == o.reports + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [reports].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response_reports.rb b/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response_reports.rb new file mode 100644 index 00000000..da95a98c --- /dev/null +++ b/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response_reports.rb @@ -0,0 +1,373 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + # Report Search Result Bean + class ReportingV3ReportsGet200ResponseReports + # Unique Report Identifier of each report type + attr_accessor :report_definition_id + + # Name of the report specified by merchant while creating the report + attr_accessor :report_name + + # Format of the report to get generated + attr_accessor :report_mime_type + + # Frequency of the report to get generated + attr_accessor :report_frequency + + # Status of the report + attr_accessor :status + + # Specifies the report start time in ISO 8601 format + attr_accessor :report_start_time + + # Specifies the report end time in ISO 8601 format + attr_accessor :report_end_time + + # Time Zone + attr_accessor :timezone + + # Unique identifier generated for every reports + attr_accessor :report_id + + # CyberSource Merchant Id + attr_accessor :organization_id + + # Specifies the time of the report in queued in ISO 8601 format + attr_accessor :queued_time + + # Specifies the time of the report started to generate in ISO 8601 format + attr_accessor :report_generating_time + + # Specifies the time of the report completed the generation in ISO 8601 format + attr_accessor :report_completed_time + + # Selected name of the group + attr_accessor :selected_merchant_group_name + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'report_definition_id' => :'reportDefinitionId', + :'report_name' => :'reportName', + :'report_mime_type' => :'reportMimeType', + :'report_frequency' => :'reportFrequency', + :'status' => :'status', + :'report_start_time' => :'reportStartTime', + :'report_end_time' => :'reportEndTime', + :'timezone' => :'timezone', + :'report_id' => :'reportId', + :'organization_id' => :'organizationId', + :'queued_time' => :'queuedTime', + :'report_generating_time' => :'reportGeneratingTime', + :'report_completed_time' => :'reportCompletedTime', + :'selected_merchant_group_name' => :'selectedMerchantGroupName' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'report_definition_id' => :'String', + :'report_name' => :'String', + :'report_mime_type' => :'String', + :'report_frequency' => :'String', + :'status' => :'String', + :'report_start_time' => :'DateTime', + :'report_end_time' => :'DateTime', + :'timezone' => :'String', + :'report_id' => :'String', + :'organization_id' => :'String', + :'queued_time' => :'DateTime', + :'report_generating_time' => :'DateTime', + :'report_completed_time' => :'DateTime', + :'selected_merchant_group_name' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'reportDefinitionId') + self.report_definition_id = attributes[:'reportDefinitionId'] + end + + if attributes.has_key?(:'reportName') + self.report_name = attributes[:'reportName'] + end + + if attributes.has_key?(:'reportMimeType') + self.report_mime_type = attributes[:'reportMimeType'] + end + + if attributes.has_key?(:'reportFrequency') + self.report_frequency = attributes[:'reportFrequency'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'reportStartTime') + self.report_start_time = attributes[:'reportStartTime'] + end + + if attributes.has_key?(:'reportEndTime') + self.report_end_time = attributes[:'reportEndTime'] + end + + if attributes.has_key?(:'timezone') + self.timezone = attributes[:'timezone'] + end + + if attributes.has_key?(:'reportId') + self.report_id = attributes[:'reportId'] + end + + if attributes.has_key?(:'organizationId') + self.organization_id = attributes[:'organizationId'] + end + + if attributes.has_key?(:'queuedTime') + self.queued_time = attributes[:'queuedTime'] + end + + if attributes.has_key?(:'reportGeneratingTime') + self.report_generating_time = attributes[:'reportGeneratingTime'] + end + + if attributes.has_key?(:'reportCompletedTime') + self.report_completed_time = attributes[:'reportCompletedTime'] + end + + if attributes.has_key?(:'selectedMerchantGroupName') + self.selected_merchant_group_name = attributes[:'selectedMerchantGroupName'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + report_mime_type_validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv']) + return false unless report_mime_type_validator.valid?(@report_mime_type) + report_frequency_validator = EnumAttributeValidator.new('String', ['DAILY', 'WEEKLY', 'MONTHLY', 'ADHOC']) + return false unless report_frequency_validator.valid?(@report_frequency) + status_validator = EnumAttributeValidator.new('String', ['COMPLETED', 'PENDING', 'QUEUED', 'RUNNING', 'ERROR', 'NO_DATA']) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] report_mime_type Object to be assigned + def report_mime_type=(report_mime_type) + validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv']) + unless validator.valid?(report_mime_type) + fail ArgumentError, 'invalid value for "report_mime_type", must be one of #{validator.allowable_values}.' + end + @report_mime_type = report_mime_type + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] report_frequency Object to be assigned + def report_frequency=(report_frequency) + validator = EnumAttributeValidator.new('String', ['DAILY', 'WEEKLY', 'MONTHLY', 'ADHOC']) + unless validator.valid?(report_frequency) + fail ArgumentError, 'invalid value for "report_frequency", must be one of #{validator.allowable_values}.' + end + @report_frequency = report_frequency + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ['COMPLETED', 'PENDING', 'QUEUED', 'RUNNING', 'ERROR', 'NO_DATA']) + unless validator.valid?(status) + fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + report_definition_id == o.report_definition_id && + report_name == o.report_name && + report_mime_type == o.report_mime_type && + report_frequency == o.report_frequency && + status == o.status && + report_start_time == o.report_start_time && + report_end_time == o.report_end_time && + timezone == o.timezone && + report_id == o.report_id && + organization_id == o.organization_id && + queued_time == o.queued_time && + report_generating_time == o.report_generating_time && + report_completed_time == o.report_completed_time && + selected_merchant_group_name == o.selected_merchant_group_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [report_definition_id, report_name, report_mime_type, report_frequency, status, report_start_time, report_end_time, timezone, report_id, organization_id, queued_time, report_generating_time, report_completed_time, selected_merchant_group_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/reporting_v3_reports_id_get200_response.rb b/lib/cybersource_rest_client/models/reporting_v3_reports_id_get200_response.rb new file mode 100644 index 00000000..3f2e4f14 --- /dev/null +++ b/lib/cybersource_rest_client/models/reporting_v3_reports_id_get200_response.rb @@ -0,0 +1,376 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + # Report Log + class ReportingV3ReportsIdGet200Response + # CyberSource merchant id + attr_accessor :organization_id + + # Report ID Value + attr_accessor :report_id + + # Report definition Id + attr_accessor :report_definition_id + + # Report Name + attr_accessor :report_name + + # Report Format + attr_accessor :report_mime_type + + # Report Frequency Value + attr_accessor :report_frequency + + # List of Integer Values + attr_accessor :report_fields + + # Report Status Value + attr_accessor :report_status + + # Report Start Time Value + attr_accessor :report_start_time + + # Report End Time Value + attr_accessor :report_end_time + + # Time Zone Value + attr_accessor :timezone + + # Report Filters + attr_accessor :report_filters + + attr_accessor :report_preferences + + # Selected Merchant Group name + attr_accessor :selected_merchant_group_name + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId', + :'report_id' => :'reportId', + :'report_definition_id' => :'reportDefinitionId', + :'report_name' => :'reportName', + :'report_mime_type' => :'reportMimeType', + :'report_frequency' => :'reportFrequency', + :'report_fields' => :'reportFields', + :'report_status' => :'reportStatus', + :'report_start_time' => :'reportStartTime', + :'report_end_time' => :'reportEndTime', + :'timezone' => :'timezone', + :'report_filters' => :'reportFilters', + :'report_preferences' => :'reportPreferences', + :'selected_merchant_group_name' => :'selectedMerchantGroupName' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'organization_id' => :'String', + :'report_id' => :'String', + :'report_definition_id' => :'String', + :'report_name' => :'String', + :'report_mime_type' => :'String', + :'report_frequency' => :'String', + :'report_fields' => :'Array', + :'report_status' => :'String', + :'report_start_time' => :'DateTime', + :'report_end_time' => :'DateTime', + :'timezone' => :'String', + :'report_filters' => :'Hash>', + :'report_preferences' => :'ReportingV3ReportSubscriptionsGet200ResponseReportPreferences', + :'selected_merchant_group_name' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'organizationId') + self.organization_id = attributes[:'organizationId'] + end + + if attributes.has_key?(:'reportId') + self.report_id = attributes[:'reportId'] + end + + if attributes.has_key?(:'reportDefinitionId') + self.report_definition_id = attributes[:'reportDefinitionId'] + end + + if attributes.has_key?(:'reportName') + self.report_name = attributes[:'reportName'] + end + + if attributes.has_key?(:'reportMimeType') + self.report_mime_type = attributes[:'reportMimeType'] + end + + if attributes.has_key?(:'reportFrequency') + self.report_frequency = attributes[:'reportFrequency'] + end + + if attributes.has_key?(:'reportFields') + if (value = attributes[:'reportFields']).is_a?(Array) + self.report_fields = value + end + end + + if attributes.has_key?(:'reportStatus') + self.report_status = attributes[:'reportStatus'] + end + + if attributes.has_key?(:'reportStartTime') + self.report_start_time = attributes[:'reportStartTime'] + end + + if attributes.has_key?(:'reportEndTime') + self.report_end_time = attributes[:'reportEndTime'] + end + + if attributes.has_key?(:'timezone') + self.timezone = attributes[:'timezone'] + end + + if attributes.has_key?(:'reportFilters') + if (value = attributes[:'reportFilters']).is_a?(Hash) + self.report_filters = value + end + end + + if attributes.has_key?(:'reportPreferences') + self.report_preferences = attributes[:'reportPreferences'] + end + + if attributes.has_key?(:'selectedMerchantGroupName') + self.selected_merchant_group_name = attributes[:'selectedMerchantGroupName'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + report_mime_type_validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv']) + return false unless report_mime_type_validator.valid?(@report_mime_type) + report_frequency_validator = EnumAttributeValidator.new('String', ['DAILY', 'WEEKLY', 'MONTHLY']) + return false unless report_frequency_validator.valid?(@report_frequency) + report_status_validator = EnumAttributeValidator.new('String', ['COMPLETED', 'PENDING', 'QUEUED', 'RUNNING', 'ERROR', 'NO_DATA', 'RERUN']) + return false unless report_status_validator.valid?(@report_status) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] report_mime_type Object to be assigned + def report_mime_type=(report_mime_type) + validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv']) + unless validator.valid?(report_mime_type) + fail ArgumentError, 'invalid value for "report_mime_type", must be one of #{validator.allowable_values}.' + end + @report_mime_type = report_mime_type + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] report_frequency Object to be assigned + def report_frequency=(report_frequency) + validator = EnumAttributeValidator.new('String', ['DAILY', 'WEEKLY', 'MONTHLY']) + # unless validator.valid?(report_frequency) + # fail ArgumentError, 'invalid value for "report_frequency", must be one of #{validator.allowable_values}.' + # end + @report_frequency = report_frequency + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] report_status Object to be assigned + def report_status=(report_status) + validator = EnumAttributeValidator.new('String', ['COMPLETED', 'PENDING', 'QUEUED', 'RUNNING', 'ERROR', 'NO_DATA', 'RERUN']) + unless validator.valid?(report_status) + fail ArgumentError, 'invalid value for "report_status", must be one of #{validator.allowable_values}.' + end + @report_status = report_status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id && + report_id == o.report_id && + report_definition_id == o.report_definition_id && + report_name == o.report_name && + report_mime_type == o.report_mime_type && + report_frequency == o.report_frequency && + report_fields == o.report_fields && + report_status == o.report_status && + report_start_time == o.report_start_time && + report_end_time == o.report_end_time && + timezone == o.timezone && + report_filters == o.report_filters && + report_preferences == o.report_preferences && + selected_merchant_group_name == o.selected_merchant_group_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [organization_id, report_id, report_definition_id, report_name, report_mime_type, report_frequency, report_fields, report_status, report_start_time, report_end_time, timezone, report_filters, report_preferences, selected_merchant_group_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/request_body.rb b/lib/cybersource_rest_client/models/request_body.rb index 31394447..36a78e08 100644 --- a/lib/cybersource_rest_client/models/request_body.rb +++ b/lib/cybersource_rest_client/models/request_body.rb @@ -91,7 +91,7 @@ def self.swagger_types :'start_time' => :'DateTime', :'start_day' => :'Integer', :'report_filters' => :'Hash>', - :'report_preferences' => :'InlineResponse2006ReportPreferences', + :'report_preferences' => :'ReportingV3ReportSubscriptionsGet200ResponseReportPreferences', :'selected_merchant_group_name' => :'String' } end diff --git a/lib/cybersource_rest_client/models/request_body_1.rb b/lib/cybersource_rest_client/models/request_body_1.rb index 9b114a78..7dc18675 100644 --- a/lib/cybersource_rest_client/models/request_body_1.rb +++ b/lib/cybersource_rest_client/models/request_body_1.rb @@ -95,7 +95,7 @@ def self.swagger_types :'report_start_time' => :'DateTime', :'report_end_time' => :'DateTime', :'report_filters' => :'Hash>', - :'report_preferences' => :'InlineResponse2006ReportPreferences', + :'report_preferences' => :'ReportingV3ReportSubscriptionsGet200ResponseReportPreferences', :'selected_merchant_group_name' => :'String' } end diff --git a/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_delete409_response.rb b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_delete409_response.rb new file mode 100644 index 00000000..850391fd --- /dev/null +++ b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_delete409_response.rb @@ -0,0 +1,183 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TmsV1InstrumentidentifiersDelete409Response + attr_accessor :_links + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_links' => :'_links' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_links' => :'TmsV1InstrumentidentifiersDelete409ResponseLinks' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'_links') + self._links = attributes[:'_links'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _links == o._links + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [_links].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_delete409_response__links.rb b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_delete409_response__links.rb new file mode 100644 index 00000000..be9e9cbf --- /dev/null +++ b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_delete409_response__links.rb @@ -0,0 +1,183 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TmsV1InstrumentidentifiersDelete409ResponseLinks + attr_accessor :payment_instruments + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'payment_instruments' => :'paymentInstruments' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'payment_instruments' => :'TmsV1InstrumentidentifiersDelete409ResponseLinksPaymentInstruments' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'paymentInstruments') + self.payment_instruments = attributes[:'paymentInstruments'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + payment_instruments == o.payment_instruments + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [payment_instruments].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_delete409_response__links_payment_instruments.rb b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_delete409_response__links_payment_instruments.rb new file mode 100644 index 00000000..93bfd12a --- /dev/null +++ b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_delete409_response__links_payment_instruments.rb @@ -0,0 +1,183 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TmsV1InstrumentidentifiersDelete409ResponseLinksPaymentInstruments + attr_accessor :href + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'href' => :'href' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'href' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'href') + self.href = attributes[:'href'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + href == o.href + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [href].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response.rb b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response.rb new file mode 100644 index 00000000..9ec0ed6a --- /dev/null +++ b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response.rb @@ -0,0 +1,277 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response + attr_accessor :_links + + # Shows the response is a collection of objects. + attr_accessor :object + + # The offset parameter supplied in the request. + attr_accessor :offset + + # The limit parameter supplied in the request. + attr_accessor :limit + + # The number of Payment Instruments returned in the array. + attr_accessor :count + + # The total number of Payment Instruments associated with the Instrument Identifier in the zero-based dataset. + attr_accessor :total + + # Array of Payment Instruments returned for the supplied Instrument Identifier. + attr_accessor :_embedded + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_links' => :'_links', + :'object' => :'object', + :'offset' => :'offset', + :'limit' => :'limit', + :'count' => :'count', + :'total' => :'total', + :'_embedded' => :'_embedded' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_links' => :'TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinks', + :'object' => :'String', + :'offset' => :'String', + :'limit' => :'String', + :'count' => :'String', + :'total' => :'String', + :'_embedded' => :'Object' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'_links') + self._links = attributes[:'_links'] + end + + if attributes.has_key?(:'object') + self.object = attributes[:'object'] + end + + if attributes.has_key?(:'offset') + self.offset = attributes[:'offset'] + end + + if attributes.has_key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.has_key?(:'count') + self.count = attributes[:'count'] + end + + if attributes.has_key?(:'total') + self.total = attributes[:'total'] + end + + if attributes.has_key?(:'_embedded') + self._embedded = attributes[:'_embedded'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + object_validator = EnumAttributeValidator.new('String', ['collection']) + return false unless object_validator.valid?(@object) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] object Object to be assigned + def object=(object) + validator = EnumAttributeValidator.new('String', ['collection']) + unless validator.valid?(object) + fail ArgumentError, 'invalid value for "object", must be one of #{validator.allowable_values}.' + end + @object = object + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _links == o._links && + object == o.object && + offset == o.offset && + limit == o.limit && + count == o.count && + total == o.total && + _embedded == o._embedded + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [_links, object, offset, limit, count, total, _embedded].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links.rb b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links.rb new file mode 100644 index 00000000..48e07cb8 --- /dev/null +++ b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links.rb @@ -0,0 +1,219 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinks + attr_accessor :_self + + attr_accessor :first + + attr_accessor :prev + + attr_accessor :_next + + attr_accessor :last + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_self' => :'self', + :'first' => :'first', + :'prev' => :'prev', + :'_next' => :'next', + :'last' => :'last' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_self' => :'TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksSelf', + :'first' => :'TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksFirst', + :'prev' => :'TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksPrev', + :'_next' => :'TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksNext', + :'last' => :'TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksLast' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'self') + self._self = attributes[:'self'] + end + + if attributes.has_key?(:'first') + self.first = attributes[:'first'] + end + + if attributes.has_key?(:'prev') + self.prev = attributes[:'prev'] + end + + if attributes.has_key?(:'next') + self._next = attributes[:'next'] + end + + if attributes.has_key?(:'last') + self.last = attributes[:'last'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _self == o._self && + first == o.first && + prev == o.prev && + _next == o._next && + last == o.last + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [_self, first, prev, _next, last].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_first.rb b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_first.rb new file mode 100644 index 00000000..54745419 --- /dev/null +++ b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_first.rb @@ -0,0 +1,184 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksFirst + # A link to the collection starting at offset zero for the supplied limit. + attr_accessor :href + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'href' => :'href' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'href' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'href') + self.href = attributes[:'href'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + href == o.href + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [href].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_last.rb b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_last.rb new file mode 100644 index 00000000..dfaabba3 --- /dev/null +++ b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_last.rb @@ -0,0 +1,184 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksLast + # A link to the last collection containing the remaining objects. + attr_accessor :href + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'href' => :'href' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'href' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'href') + self.href = attributes[:'href'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + href == o.href + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [href].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_next.rb b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_next.rb new file mode 100644 index 00000000..835f7fc6 --- /dev/null +++ b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_next.rb @@ -0,0 +1,184 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksNext + # A link to the next collection starting at the supplied offset plus the supplied limit. + attr_accessor :href + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'href' => :'href' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'href' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'href') + self.href = attributes[:'href'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + href == o.href + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [href].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_prev.rb b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_prev.rb new file mode 100644 index 00000000..95521285 --- /dev/null +++ b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_prev.rb @@ -0,0 +1,184 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + # A link to the previous collection starting at the supplied offset minus the supplied limit. + class TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksPrev + attr_accessor :href + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'href' => :'href' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'href' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'href') + self.href = attributes[:'href'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + href == o.href + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [href].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_self.rb b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_self.rb new file mode 100644 index 00000000..888bad36 --- /dev/null +++ b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_self.rb @@ -0,0 +1,184 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksSelf + # A link to the current requested collection. + attr_accessor :href + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'href' => :'href' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'href' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'href') + self.href = attributes[:'href'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + href == o.href + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [href].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_post200_response.rb b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_post200_response.rb new file mode 100644 index 00000000..6dcac60d --- /dev/null +++ b/lib/cybersource_rest_client/models/tms_v1_instrumentidentifiers_post200_response.rb @@ -0,0 +1,295 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TmsV1InstrumentidentifiersPost200Response + attr_accessor :_links + + # Unique identification number assigned by CyberSource to the submitted request. + attr_accessor :id + + # Describes type of token. For example: customer, paymentInstrument or instrumentIdentifier. + attr_accessor :object + + # Current state of the token. + attr_accessor :state + + attr_accessor :card + + attr_accessor :bank_account + + attr_accessor :processing_information + + attr_accessor :metadata + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_links' => :'_links', + :'id' => :'id', + :'object' => :'object', + :'state' => :'state', + :'card' => :'card', + :'bank_account' => :'bankAccount', + :'processing_information' => :'processingInformation', + :'metadata' => :'metadata' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_links' => :'Tmsv1instrumentidentifiersLinks', + :'id' => :'String', + :'object' => :'String', + :'state' => :'String', + :'card' => :'Tmsv1instrumentidentifiersCard', + :'bank_account' => :'Tmsv1instrumentidentifiersBankAccount', + :'processing_information' => :'Tmsv1instrumentidentifiersProcessingInformation', + :'metadata' => :'Tmsv1instrumentidentifiersMetadata' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'_links') + self._links = attributes[:'_links'] + end + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'object') + self.object = attributes[:'object'] + end + + if attributes.has_key?(:'state') + self.state = attributes[:'state'] + end + + if attributes.has_key?(:'card') + self.card = attributes[:'card'] + end + + if attributes.has_key?(:'bankAccount') + self.bank_account = attributes[:'bankAccount'] + end + + if attributes.has_key?(:'processingInformation') + self.processing_information = attributes[:'processingInformation'] + end + + if attributes.has_key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + object_validator = EnumAttributeValidator.new('String', ['instrumentIdentifier']) + return false unless object_validator.valid?(@object) + state_validator = EnumAttributeValidator.new('String', ['ACTIVE', 'CLOSED']) + return false unless state_validator.valid?(@state) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] object Object to be assigned + def object=(object) + validator = EnumAttributeValidator.new('String', ['instrumentIdentifier']) + unless validator.valid?(object) + fail ArgumentError, 'invalid value for "object", must be one of #{validator.allowable_values}.' + end + @object = object + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] state Object to be assigned + def state=(state) + validator = EnumAttributeValidator.new('String', ['ACTIVE', 'CLOSED']) + unless validator.valid?(state) + fail ArgumentError, 'invalid value for "state", must be one of #{validator.allowable_values}.' + end + @state = state + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _links == o._links && + id == o.id && + object == o.object && + state == o.state && + card == o.card && + bank_account == o.bank_account && + processing_information == o.processing_information && + metadata == o.metadata + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [_links, id, object, state, card, bank_account, processing_information, metadata].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tms_v1_paymentinstruments_post201_response.rb b/lib/cybersource_rest_client/models/tms_v1_paymentinstruments_post201_response.rb new file mode 100644 index 00000000..b725b84c --- /dev/null +++ b/lib/cybersource_rest_client/models/tms_v1_paymentinstruments_post201_response.rb @@ -0,0 +1,331 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TmsV1PaymentinstrumentsPost201Response + attr_accessor :_links + + # Unique identification number assigned by CyberSource to the submitted request. + attr_accessor :id + + # Describes type of token. For example: customer, paymentInstrument or instrumentIdentifier. + attr_accessor :object + + # Current state of the token. + attr_accessor :state + + attr_accessor :bank_account + + attr_accessor :card + + attr_accessor :buyer_information + + attr_accessor :bill_to + + attr_accessor :processing_information + + attr_accessor :merchant_information + + attr_accessor :meta_data + + attr_accessor :instrument_identifier + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_links' => :'_links', + :'id' => :'id', + :'object' => :'object', + :'state' => :'state', + :'bank_account' => :'bankAccount', + :'card' => :'card', + :'buyer_information' => :'buyerInformation', + :'bill_to' => :'billTo', + :'processing_information' => :'processingInformation', + :'merchant_information' => :'merchantInformation', + :'meta_data' => :'metaData', + :'instrument_identifier' => :'instrumentIdentifier' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_links' => :'Tmsv1instrumentidentifiersLinks', + :'id' => :'String', + :'object' => :'String', + :'state' => :'String', + :'bank_account' => :'Tmsv1paymentinstrumentsBankAccount', + :'card' => :'Tmsv1paymentinstrumentsCard', + :'buyer_information' => :'Tmsv1paymentinstrumentsBuyerInformation', + :'bill_to' => :'Tmsv1paymentinstrumentsBillTo', + :'processing_information' => :'Tmsv1paymentinstrumentsProcessingInformation', + :'merchant_information' => :'Tmsv1paymentinstrumentsMerchantInformation', + :'meta_data' => :'Tmsv1instrumentidentifiersMetadata', + :'instrument_identifier' => :'Tmsv1paymentinstrumentsInstrumentIdentifier' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'_links') + self._links = attributes[:'_links'] + end + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'object') + self.object = attributes[:'object'] + end + + if attributes.has_key?(:'state') + self.state = attributes[:'state'] + end + + if attributes.has_key?(:'bankAccount') + self.bank_account = attributes[:'bankAccount'] + end + + if attributes.has_key?(:'card') + self.card = attributes[:'card'] + end + + if attributes.has_key?(:'buyerInformation') + self.buyer_information = attributes[:'buyerInformation'] + end + + if attributes.has_key?(:'billTo') + self.bill_to = attributes[:'billTo'] + end + + if attributes.has_key?(:'processingInformation') + self.processing_information = attributes[:'processingInformation'] + end + + if attributes.has_key?(:'merchantInformation') + self.merchant_information = attributes[:'merchantInformation'] + end + + if attributes.has_key?(:'metaData') + self.meta_data = attributes[:'metaData'] + end + + if attributes.has_key?(:'instrumentIdentifier') + self.instrument_identifier = attributes[:'instrumentIdentifier'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + object_validator = EnumAttributeValidator.new('String', ['paymentInstrument']) + return false unless object_validator.valid?(@object) + state_validator = EnumAttributeValidator.new('String', ['ACTIVE', 'CLOSED']) + return false unless state_validator.valid?(@state) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] object Object to be assigned + def object=(object) + validator = EnumAttributeValidator.new('String', ['paymentInstrument']) + unless validator.valid?(object) + fail ArgumentError, 'invalid value for "object", must be one of #{validator.allowable_values}.' + end + @object = object + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] state Object to be assigned + def state=(state) + validator = EnumAttributeValidator.new('String', ['ACTIVE', 'CLOSED']) + unless validator.valid?(state) + fail ArgumentError, 'invalid value for "state", must be one of #{validator.allowable_values}.' + end + @state = state + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _links == o._links && + id == o.id && + object == o.object && + state == o.state && + bank_account == o.bank_account && + card == o.card && + buyer_information == o.buyer_information && + bill_to == o.bill_to && + processing_information == o.processing_information && + merchant_information == o.merchant_information && + meta_data == o.meta_data && + instrument_identifier == o.instrument_identifier + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [_links, id, object, state, bank_account, card, buyer_information, bill_to, processing_information, merchant_information, meta_data, instrument_identifier].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_processing_information_authorization_options_initiator.rb b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_processing_information_authorization_options_initiator.rb index 9c821f4d..7126344d 100644 --- a/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_processing_information_authorization_options_initiator.rb +++ b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_processing_information_authorization_options_initiator.rb @@ -26,7 +26,7 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'merchant_initiated_transaction' => :'Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction' + :'merchant_initiated_transaction' => :'Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator' } end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response.rb new file mode 100644 index 00000000..d47f4ba0 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response.rb @@ -0,0 +1,444 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200Response + # An unique identification number assigned by CyberSource to identify the submitted request. + attr_accessor :id + + # Payment Request Id + attr_accessor :root_id + + # The reconciliation id for the submitted transaction. This value is not returned for all processors. + attr_accessor :reconciliation_id + + # The description for this field is not available. + attr_accessor :merchant_id + + # The status of the submitted transaction. + attr_accessor :status + + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + attr_accessor :application_information + + attr_accessor :buyer_information + + attr_accessor :client_reference_information + + attr_accessor :consumer_authentication_information + + attr_accessor :device_information + + attr_accessor :error_information + + attr_accessor :installment_information + + attr_accessor :fraud_marking_information + + # The description for this field is not available. + attr_accessor :merchant_defined_information + + attr_accessor :merchant_information + + attr_accessor :order_information + + attr_accessor :payment_information + + attr_accessor :processing_information + + attr_accessor :processor_information + + attr_accessor :point_of_sale_information + + attr_accessor :risk_information + + attr_accessor :sender_information + + attr_accessor :_links + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'root_id' => :'rootId', + :'reconciliation_id' => :'reconciliationId', + :'merchant_id' => :'merchantId', + :'status' => :'status', + :'submit_time_utc' => :'submitTimeUtc', + :'application_information' => :'applicationInformation', + :'buyer_information' => :'buyerInformation', + :'client_reference_information' => :'clientReferenceInformation', + :'consumer_authentication_information' => :'consumerAuthenticationInformation', + :'device_information' => :'deviceInformation', + :'error_information' => :'errorInformation', + :'installment_information' => :'installmentInformation', + :'fraud_marking_information' => :'fraudMarkingInformation', + :'merchant_defined_information' => :'merchantDefinedInformation', + :'merchant_information' => :'merchantInformation', + :'order_information' => :'orderInformation', + :'payment_information' => :'paymentInformation', + :'processing_information' => :'processingInformation', + :'processor_information' => :'processorInformation', + :'point_of_sale_information' => :'pointOfSaleInformation', + :'risk_information' => :'riskInformation', + :'sender_information' => :'senderInformation', + :'_links' => :'_links' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'id' => :'String', + :'root_id' => :'String', + :'reconciliation_id' => :'String', + :'merchant_id' => :'String', + :'status' => :'String', + :'submit_time_utc' => :'String', + :'application_information' => :'TssV2TransactionsGet200ResponseApplicationInformation', + :'buyer_information' => :'TssV2TransactionsGet200ResponseBuyerInformation', + :'client_reference_information' => :'TssV2TransactionsGet200ResponseClientReferenceInformation', + :'consumer_authentication_information' => :'TssV2TransactionsGet200ResponseConsumerAuthenticationInformation', + :'device_information' => :'TssV2TransactionsGet200ResponseDeviceInformation', + :'error_information' => :'TssV2TransactionsGet200ResponseErrorInformation', + :'installment_information' => :'TssV2TransactionsGet200ResponseInstallmentInformation', + :'fraud_marking_information' => :'TssV2TransactionsGet200ResponseFraudMarkingInformation', + :'merchant_defined_information' => :'Array', + :'merchant_information' => :'TssV2TransactionsGet200ResponseMerchantInformation', + :'order_information' => :'TssV2TransactionsGet200ResponseOrderInformation', + :'payment_information' => :'TssV2TransactionsGet200ResponsePaymentInformation', + :'processing_information' => :'TssV2TransactionsGet200ResponseProcessingInformation', + :'processor_information' => :'TssV2TransactionsGet200ResponseProcessorInformation', + :'point_of_sale_information' => :'TssV2TransactionsGet200ResponsePointOfSaleInformation', + :'risk_information' => :'TssV2TransactionsGet200ResponseRiskInformation', + :'sender_information' => :'TssV2TransactionsGet200ResponseSenderInformation', + :'_links' => :'PtsV2PaymentsReversalsPost201ResponseLinks' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'rootId') + self.root_id = attributes[:'rootId'] + end + + if attributes.has_key?(:'reconciliationId') + self.reconciliation_id = attributes[:'reconciliationId'] + end + + if attributes.has_key?(:'merchantId') + self.merchant_id = attributes[:'merchantId'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + + if attributes.has_key?(:'applicationInformation') + self.application_information = attributes[:'applicationInformation'] + end + + if attributes.has_key?(:'buyerInformation') + self.buyer_information = attributes[:'buyerInformation'] + end + + if attributes.has_key?(:'clientReferenceInformation') + self.client_reference_information = attributes[:'clientReferenceInformation'] + end + + if attributes.has_key?(:'consumerAuthenticationInformation') + self.consumer_authentication_information = attributes[:'consumerAuthenticationInformation'] + end + + if attributes.has_key?(:'deviceInformation') + self.device_information = attributes[:'deviceInformation'] + end + + if attributes.has_key?(:'errorInformation') + self.error_information = attributes[:'errorInformation'] + end + + if attributes.has_key?(:'installmentInformation') + self.installment_information = attributes[:'installmentInformation'] + end + + if attributes.has_key?(:'fraudMarkingInformation') + self.fraud_marking_information = attributes[:'fraudMarkingInformation'] + end + + if attributes.has_key?(:'merchantDefinedInformation') + if (value = attributes[:'merchantDefinedInformation']).is_a?(Array) + self.merchant_defined_information = value + end + end + + if attributes.has_key?(:'merchantInformation') + self.merchant_information = attributes[:'merchantInformation'] + end + + if attributes.has_key?(:'orderInformation') + self.order_information = attributes[:'orderInformation'] + end + + if attributes.has_key?(:'paymentInformation') + self.payment_information = attributes[:'paymentInformation'] + end + + if attributes.has_key?(:'processingInformation') + self.processing_information = attributes[:'processingInformation'] + end + + if attributes.has_key?(:'processorInformation') + self.processor_information = attributes[:'processorInformation'] + end + + if attributes.has_key?(:'pointOfSaleInformation') + self.point_of_sale_information = attributes[:'pointOfSaleInformation'] + end + + if attributes.has_key?(:'riskInformation') + self.risk_information = attributes[:'riskInformation'] + end + + if attributes.has_key?(:'senderInformation') + self.sender_information = attributes[:'senderInformation'] + end + + if attributes.has_key?(:'_links') + self._links = attributes[:'_links'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@id.nil? && @id.to_s.length > 26 + invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') + end + + if !@root_id.nil? && @root_id.to_s.length > 26 + invalid_properties.push('invalid value for "root_id", the character length must be smaller than or equal to 26.') + end + + if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + invalid_properties.push('invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@id.nil? && @id.to_s.length > 26 + return false if !@root_id.nil? && @root_id.to_s.length > 26 + return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if !id.nil? && id.to_s.length > 26 + fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] root_id Value to be assigned + def root_id=(root_id) + if !root_id.nil? && root_id.to_s.length > 26 + fail ArgumentError, 'invalid value for "root_id", the character length must be smaller than or equal to 26.' + end + + @root_id = root_id + end + + # Custom attribute writer method with validation + # @param [Object] reconciliation_id Value to be assigned + def reconciliation_id=(reconciliation_id) + if !reconciliation_id.nil? && reconciliation_id.to_s.length > 60 + fail ArgumentError, 'invalid value for "reconciliation_id", the character length must be smaller than or equal to 60.' + end + + @reconciliation_id = reconciliation_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + root_id == o.root_id && + reconciliation_id == o.reconciliation_id && + merchant_id == o.merchant_id && + status == o.status && + submit_time_utc == o.submit_time_utc && + application_information == o.application_information && + buyer_information == o.buyer_information && + client_reference_information == o.client_reference_information && + consumer_authentication_information == o.consumer_authentication_information && + device_information == o.device_information && + error_information == o.error_information && + installment_information == o.installment_information && + fraud_marking_information == o.fraud_marking_information && + merchant_defined_information == o.merchant_defined_information && + merchant_information == o.merchant_information && + order_information == o.order_information && + payment_information == o.payment_information && + processing_information == o.processing_information && + processor_information == o.processor_information && + point_of_sale_information == o.point_of_sale_information && + risk_information == o.risk_information && + sender_information == o.sender_information && + _links == o._links + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [id, root_id, reconciliation_id, merchant_id, status, submit_time_utc, application_information, buyer_information, client_reference_information, consumer_authentication_information, device_information, error_information, installment_information, fraud_marking_information, merchant_defined_information, merchant_information, order_information, payment_information, processing_information, processor_information, point_of_sale_information, risk_information, sender_information, _links].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_application_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_application_information.rb new file mode 100644 index 00000000..f0b22227 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_application_information.rb @@ -0,0 +1,225 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseApplicationInformation + # The status of the submitted transaction. + attr_accessor :status + + # The description for this field is not available. + attr_accessor :reason_code + + # The description for this field is not available. + attr_accessor :r_code + + # The description for this field is not available. + attr_accessor :r_flag + + attr_accessor :applications + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'reason_code' => :'reasonCode', + :'r_code' => :'rCode', + :'r_flag' => :'rFlag', + :'applications' => :'applications' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'status' => :'String', + :'reason_code' => :'String', + :'r_code' => :'String', + :'r_flag' => :'String', + :'applications' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'reasonCode') + self.reason_code = attributes[:'reasonCode'] + end + + if attributes.has_key?(:'rCode') + self.r_code = attributes[:'rCode'] + end + + if attributes.has_key?(:'rFlag') + self.r_flag = attributes[:'rFlag'] + end + + if attributes.has_key?(:'applications') + if (value = attributes[:'applications']).is_a?(Array) + self.applications = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + reason_code == o.reason_code && + r_code == o.r_code && + r_flag == o.r_flag && + applications == o.applications + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [status, reason_code, r_code, r_flag, applications].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_application_information_applications.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_application_information_applications.rb new file mode 100644 index 00000000..ce7d179c --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_application_information_applications.rb @@ -0,0 +1,254 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseApplicationInformationApplications + # The description for this field is not available. + attr_accessor :name + + # The description for this field is not available. + attr_accessor :status + + # The description for this field is not available. + attr_accessor :reason_code + + # The description for this field is not available. + attr_accessor :r_code + + # The description for this field is not available. + attr_accessor :r_flag + + # The description for this field is not available. + attr_accessor :reconciliation_id + + # The description for this field is not available. + attr_accessor :r_message + + # The description for this field is not available. + attr_accessor :return_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'status' => :'status', + :'reason_code' => :'reasonCode', + :'r_code' => :'rCode', + :'r_flag' => :'rFlag', + :'reconciliation_id' => :'reconciliationId', + :'r_message' => :'rMessage', + :'return_code' => :'returnCode' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'name' => :'String', + :'status' => :'String', + :'reason_code' => :'String', + :'r_code' => :'String', + :'r_flag' => :'String', + :'reconciliation_id' => :'String', + :'r_message' => :'String', + :'return_code' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'reasonCode') + self.reason_code = attributes[:'reasonCode'] + end + + if attributes.has_key?(:'rCode') + self.r_code = attributes[:'rCode'] + end + + if attributes.has_key?(:'rFlag') + self.r_flag = attributes[:'rFlag'] + end + + if attributes.has_key?(:'reconciliationId') + self.reconciliation_id = attributes[:'reconciliationId'] + end + + if attributes.has_key?(:'rMessage') + self.r_message = attributes[:'rMessage'] + end + + if attributes.has_key?(:'returnCode') + self.return_code = attributes[:'returnCode'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + status == o.status && + reason_code == o.reason_code && + r_code == o.r_code && + r_flag == o.r_flag && + reconciliation_id == o.reconciliation_id && + r_message == o.r_message && + return_code == o.return_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [name, status, reason_code, r_code, r_flag, reconciliation_id, r_message, return_code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_buyer_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_buyer_information.rb new file mode 100644 index 00000000..57b6a2dd --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_buyer_information.rb @@ -0,0 +1,224 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseBuyerInformation + # Your identifier for the customer. For processor-specific information, see the customer_account_id field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :merchant_customer_id + + # The description for this field is not available. + attr_accessor :hashed_password + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'merchant_customer_id' => :'merchantCustomerId', + :'hashed_password' => :'hashedPassword' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'merchant_customer_id' => :'String', + :'hashed_password' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'merchantCustomerId') + self.merchant_customer_id = attributes[:'merchantCustomerId'] + end + + if attributes.has_key?(:'hashedPassword') + self.hashed_password = attributes[:'hashedPassword'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@merchant_customer_id.nil? && @merchant_customer_id.to_s.length > 100 + invalid_properties.push('invalid value for "merchant_customer_id", the character length must be smaller than or equal to 100.') + end + + if !@hashed_password.nil? && @hashed_password.to_s.length > 100 + invalid_properties.push('invalid value for "hashed_password", the character length must be smaller than or equal to 100.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@merchant_customer_id.nil? && @merchant_customer_id.to_s.length > 100 + return false if !@hashed_password.nil? && @hashed_password.to_s.length > 100 + true + end + + # Custom attribute writer method with validation + # @param [Object] merchant_customer_id Value to be assigned + def merchant_customer_id=(merchant_customer_id) + if !merchant_customer_id.nil? && merchant_customer_id.to_s.length > 100 + fail ArgumentError, 'invalid value for "merchant_customer_id", the character length must be smaller than or equal to 100.' + end + + @merchant_customer_id = merchant_customer_id + end + + # Custom attribute writer method with validation + # @param [Object] hashed_password Value to be assigned + def hashed_password=(hashed_password) + if !hashed_password.nil? && hashed_password.to_s.length > 100 + fail ArgumentError, 'invalid value for "hashed_password", the character length must be smaller than or equal to 100.' + end + + @hashed_password = hashed_password + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + merchant_customer_id == o.merchant_customer_id && + hashed_password == o.hashed_password + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [merchant_customer_id, hashed_password].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_client_reference_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_client_reference_information.rb new file mode 100644 index 00000000..2c95c189 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_client_reference_information.rb @@ -0,0 +1,239 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseClientReferenceInformation + # Client-generated order reference or tracking number. CyberSource recommends that you send a unique value for each transaction so that you can perform meaningful searches for the transaction. + attr_accessor :code + + # The description for this field is not available. + attr_accessor :application_version + + # The application name of client which is used to submit the request. + attr_accessor :application_name + + # The description for this field is not available. + attr_accessor :application_user + + # The description for this field is not available. + attr_accessor :comments + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'application_version' => :'applicationVersion', + :'application_name' => :'applicationName', + :'application_user' => :'applicationUser', + :'comments' => :'comments' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'String', + :'application_version' => :'String', + :'application_name' => :'String', + :'application_user' => :'String', + :'comments' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.has_key?(:'applicationVersion') + self.application_version = attributes[:'applicationVersion'] + end + + if attributes.has_key?(:'applicationName') + self.application_name = attributes[:'applicationName'] + end + + if attributes.has_key?(:'applicationUser') + self.application_user = attributes[:'applicationUser'] + end + + if attributes.has_key?(:'comments') + self.comments = attributes[:'comments'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@code.nil? && @code.to_s.length > 50 + invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 50.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@code.nil? && @code.to_s.length > 50 + true + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if !code.nil? && code.to_s.length > 50 + fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 50.' + end + + @code = code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + application_version == o.application_version && + application_name == o.application_name && + application_user == o.application_user && + comments == o.comments + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code, application_version, application_name, application_user, comments].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_consumer_authentication_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_consumer_authentication_information.rb new file mode 100644 index 00000000..3c710a39 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_consumer_authentication_information.rb @@ -0,0 +1,259 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseConsumerAuthenticationInformation + # Raw electronic commerce indicator (ECI). + attr_accessor :eci_raw + + # Cardholder authentication verification value (CAVV). + attr_accessor :cavv + + # Transaction identifier. + attr_accessor :xid + + # Payer auth Transaction identifier. + attr_accessor :transaction_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'eci_raw' => :'eciRaw', + :'cavv' => :'cavv', + :'xid' => :'xid', + :'transaction_id' => :'transactionId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'eci_raw' => :'String', + :'cavv' => :'String', + :'xid' => :'String', + :'transaction_id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'eciRaw') + self.eci_raw = attributes[:'eciRaw'] + end + + if attributes.has_key?(:'cavv') + self.cavv = attributes[:'cavv'] + end + + if attributes.has_key?(:'xid') + self.xid = attributes[:'xid'] + end + + if attributes.has_key?(:'transactionId') + self.transaction_id = attributes[:'transactionId'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@eci_raw.nil? && @eci_raw.to_s.length > 2 + invalid_properties.push('invalid value for "eci_raw", the character length must be smaller than or equal to 2.') + end + + if !@cavv.nil? && @cavv.to_s.length > 40 + invalid_properties.push('invalid value for "cavv", the character length must be smaller than or equal to 40.') + end + + if !@xid.nil? && @xid.to_s.length > 40 + invalid_properties.push('invalid value for "xid", the character length must be smaller than or equal to 40.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@eci_raw.nil? && @eci_raw.to_s.length > 2 + return false if !@cavv.nil? && @cavv.to_s.length > 40 + return false if !@xid.nil? && @xid.to_s.length > 40 + true + end + + # Custom attribute writer method with validation + # @param [Object] eci_raw Value to be assigned + def eci_raw=(eci_raw) + if !eci_raw.nil? && eci_raw.to_s.length > 2 + fail ArgumentError, 'invalid value for "eci_raw", the character length must be smaller than or equal to 2.' + end + + @eci_raw = eci_raw + end + + # Custom attribute writer method with validation + # @param [Object] cavv Value to be assigned + def cavv=(cavv) + if !cavv.nil? && cavv.to_s.length > 40 + fail ArgumentError, 'invalid value for "cavv", the character length must be smaller than or equal to 40.' + end + + @cavv = cavv + end + + # Custom attribute writer method with validation + # @param [Object] xid Value to be assigned + def xid=(xid) + if !xid.nil? && xid.to_s.length > 40 + fail ArgumentError, 'invalid value for "xid", the character length must be smaller than or equal to 40.' + end + + @xid = xid + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + eci_raw == o.eci_raw && + cavv == o.cavv && + xid == o.xid && + transaction_id == o.transaction_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [eci_raw, cavv, xid, transaction_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_device_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_device_information.rb new file mode 100644 index 00000000..98215978 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_device_information.rb @@ -0,0 +1,234 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseDeviceInformation + # IP address of the customer. + attr_accessor :ip_address + + # DNS resolved hostname from above _ipAddress_. + attr_accessor :host_name + + # The description for this field is not available. + attr_accessor :cookies_accepted + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ip_address' => :'ipAddress', + :'host_name' => :'hostName', + :'cookies_accepted' => :'cookiesAccepted' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'ip_address' => :'String', + :'host_name' => :'String', + :'cookies_accepted' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'ipAddress') + self.ip_address = attributes[:'ipAddress'] + end + + if attributes.has_key?(:'hostName') + self.host_name = attributes[:'hostName'] + end + + if attributes.has_key?(:'cookiesAccepted') + self.cookies_accepted = attributes[:'cookiesAccepted'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@ip_address.nil? && @ip_address.to_s.length > 15 + invalid_properties.push('invalid value for "ip_address", the character length must be smaller than or equal to 15.') + end + + if !@host_name.nil? && @host_name.to_s.length > 60 + invalid_properties.push('invalid value for "host_name", the character length must be smaller than or equal to 60.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@ip_address.nil? && @ip_address.to_s.length > 15 + return false if !@host_name.nil? && @host_name.to_s.length > 60 + true + end + + # Custom attribute writer method with validation + # @param [Object] ip_address Value to be assigned + def ip_address=(ip_address) + if !ip_address.nil? && ip_address.to_s.length > 15 + fail ArgumentError, 'invalid value for "ip_address", the character length must be smaller than or equal to 15.' + end + + @ip_address = ip_address + end + + # Custom attribute writer method with validation + # @param [Object] host_name Value to be assigned + def host_name=(host_name) + if !host_name.nil? && host_name.to_s.length > 60 + fail ArgumentError, 'invalid value for "host_name", the character length must be smaller than or equal to 60.' + end + + @host_name = host_name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ip_address == o.ip_address && + host_name == o.host_name && + cookies_accepted == o.cookies_accepted + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [ip_address, host_name, cookies_accepted].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_error_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_error_information.rb new file mode 100644 index 00000000..8942f989 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_error_information.rb @@ -0,0 +1,205 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseErrorInformation + # The description for this field is not available. + attr_accessor :reason + + # The description for this field is not available. + attr_accessor :message + + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reason' => :'reason', + :'message' => :'message', + :'details' => :'details' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'reason' => :'String', + :'message' => :'String', + :'details' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'reason') + self.reason = attributes[:'reason'] + end + + if attributes.has_key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.has_key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + reason == o.reason && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [reason, message, details].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_fraud_marking_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_fraud_marking_information.rb new file mode 100644 index 00000000..0e2a654c --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_fraud_marking_information.rb @@ -0,0 +1,184 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseFraudMarkingInformation + # The description for this field is not available. + attr_accessor :reason + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reason' => :'reason' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'reason' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'reason') + self.reason = attributes[:'reason'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + reason == o.reason + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [reason].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_installment_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_installment_information.rb new file mode 100644 index 00000000..97b9c934 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_installment_information.rb @@ -0,0 +1,184 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseInstallmentInformation + # Number of Installments. + attr_accessor :number_of_installments + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number_of_installments' => :'numberOfInstallments' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'number_of_installments' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'numberOfInstallments') + self.number_of_installments = attributes[:'numberOfInstallments'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + number_of_installments == o.number_of_installments + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [number_of_installments].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_merchant_defined_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_merchant_defined_information.rb new file mode 100644 index 00000000..af1aaba3 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_merchant_defined_information.rb @@ -0,0 +1,224 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseMerchantDefinedInformation + # The description for this field is not available. + attr_accessor :key + + # The description for this field is not available. + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'key' => :'key', + :'value' => :'value' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'key' => :'String', + :'value' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'key') + self.key = attributes[:'key'] + end + + if attributes.has_key?(:'value') + self.value = attributes[:'value'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@key.nil? && @key.to_s.length > 50 + invalid_properties.push('invalid value for "key", the character length must be smaller than or equal to 50.') + end + + if !@value.nil? && @value.to_s.length > 255 + invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 255.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@key.nil? && @key.to_s.length > 50 + return false if !@value.nil? && @value.to_s.length > 255 + true + end + + # Custom attribute writer method with validation + # @param [Object] key Value to be assigned + def key=(key) + if !key.nil? && key.to_s.length > 50 + fail ArgumentError, 'invalid value for "key", the character length must be smaller than or equal to 50.' + end + + @key = key + end + + # Custom attribute writer method with validation + # @param [Object] value Value to be assigned + def value=(value) + if !value.nil? && value.to_s.length > 255 + fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 255.' + end + + @value = value + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + key == o.key && + value == o.value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [key, value].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_merchant_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_merchant_information.rb new file mode 100644 index 00000000..4b3e787b --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_merchant_information.rb @@ -0,0 +1,183 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseMerchantInformation + attr_accessor :merchant_descriptor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'merchant_descriptor' => :'merchantDescriptor' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'merchant_descriptor' => :'TssV2TransactionsGet200ResponseMerchantInformationMerchantDescriptor' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'merchantDescriptor') + self.merchant_descriptor = attributes[:'merchantDescriptor'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + merchant_descriptor == o.merchant_descriptor + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [merchant_descriptor].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_merchant_information_merchant_descriptor.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_merchant_information_merchant_descriptor.rb new file mode 100644 index 00000000..165d973d --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_merchant_information_merchant_descriptor.rb @@ -0,0 +1,199 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseMerchantInformationMerchantDescriptor + # For the descriptions, used-by information, data types, and lengths for these fields, see Merchant Descriptors in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) For Payouts: * Paymentech (22) + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'name' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@name.nil? && @name.to_s.length > 23 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 23.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@name.nil? && @name.to_s.length > 23 + true + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if !name.nil? && name.to_s.length > 23 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 23.' + end + + @name = name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information.rb new file mode 100644 index 00000000..0c710e6a --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information.rb @@ -0,0 +1,222 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseOrderInformation + attr_accessor :bill_to + + attr_accessor :ship_to + + # Transaction Line Item data. + attr_accessor :line_items + + attr_accessor :amount_details + + attr_accessor :shipping_details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'bill_to' => :'billTo', + :'ship_to' => :'shipTo', + :'line_items' => :'lineItems', + :'amount_details' => :'amountDetails', + :'shipping_details' => :'shippingDetails' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'bill_to' => :'TssV2TransactionsGet200ResponseOrderInformationBillTo', + :'ship_to' => :'TssV2TransactionsGet200ResponseOrderInformationShipTo', + :'line_items' => :'Array', + :'amount_details' => :'TssV2TransactionsGet200ResponseOrderInformationAmountDetails', + :'shipping_details' => :'TssV2TransactionsGet200ResponseOrderInformationShippingDetails' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'billTo') + self.bill_to = attributes[:'billTo'] + end + + if attributes.has_key?(:'shipTo') + self.ship_to = attributes[:'shipTo'] + end + + if attributes.has_key?(:'lineItems') + if (value = attributes[:'lineItems']).is_a?(Array) + self.line_items = value + end + end + + if attributes.has_key?(:'amountDetails') + self.amount_details = attributes[:'amountDetails'] + end + + if attributes.has_key?(:'shippingDetails') + self.shipping_details = attributes[:'shippingDetails'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + bill_to == o.bill_to && + ship_to == o.ship_to && + line_items == o.line_items && + amount_details == o.amount_details && + shipping_details == o.shipping_details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [bill_to, ship_to, line_items, amount_details, shipping_details].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_amount_details.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_amount_details.rb new file mode 100644 index 00000000..02d5935a --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_amount_details.rb @@ -0,0 +1,274 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseOrderInformationAmountDetails + # Grand total for the order. You can include a decimal point (.), but no other special characters. CyberSource truncates the amount to the correct number of decimal places. * CTV, FDCCompass, Paymentech (<= 12) For processor-specific information, see the grand_total_amount field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :total_amount + + # Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API. + attr_accessor :currency + + # Total tax amount for all the items in the order. For processor-specific information, see the total_tax_amount field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) + attr_accessor :tax_amount + + # Amount that was authorized. + attr_accessor :authorized_amount + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'total_amount' => :'totalAmount', + :'currency' => :'currency', + :'tax_amount' => :'taxAmount', + :'authorized_amount' => :'authorizedAmount' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'total_amount' => :'String', + :'currency' => :'String', + :'tax_amount' => :'String', + :'authorized_amount' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'totalAmount') + self.total_amount = attributes[:'totalAmount'] + end + + if attributes.has_key?(:'currency') + self.currency = attributes[:'currency'] + end + + if attributes.has_key?(:'taxAmount') + self.tax_amount = attributes[:'taxAmount'] + end + + if attributes.has_key?(:'authorizedAmount') + self.authorized_amount = attributes[:'authorizedAmount'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@total_amount.nil? && @total_amount.to_s.length > 19 + invalid_properties.push('invalid value for "total_amount", the character length must be smaller than or equal to 19.') + end + + if !@currency.nil? && @currency.to_s.length > 3 + invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.') + end + + if !@tax_amount.nil? && @tax_amount.to_s.length > 12 + invalid_properties.push('invalid value for "tax_amount", the character length must be smaller than or equal to 12.') + end + + if !@authorized_amount.nil? && @authorized_amount.to_s.length > 15 + invalid_properties.push('invalid value for "authorized_amount", the character length must be smaller than or equal to 15.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@total_amount.nil? && @total_amount.to_s.length > 19 + return false if !@currency.nil? && @currency.to_s.length > 3 + return false if !@tax_amount.nil? && @tax_amount.to_s.length > 12 + return false if !@authorized_amount.nil? && @authorized_amount.to_s.length > 15 + true + end + + # Custom attribute writer method with validation + # @param [Object] total_amount Value to be assigned + def total_amount=(total_amount) + if !total_amount.nil? && total_amount.to_s.length > 19 + fail ArgumentError, 'invalid value for "total_amount", the character length must be smaller than or equal to 19.' + end + + @total_amount = total_amount + end + + # Custom attribute writer method with validation + # @param [Object] currency Value to be assigned + def currency=(currency) + if !currency.nil? && currency.to_s.length > 3 + fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.' + end + + @currency = currency + end + + # Custom attribute writer method with validation + # @param [Object] tax_amount Value to be assigned + def tax_amount=(tax_amount) + if !tax_amount.nil? && tax_amount.to_s.length > 12 + fail ArgumentError, 'invalid value for "tax_amount", the character length must be smaller than or equal to 12.' + end + + @tax_amount = tax_amount + end + + # Custom attribute writer method with validation + # @param [Object] authorized_amount Value to be assigned + def authorized_amount=(authorized_amount) + if !authorized_amount.nil? && authorized_amount.to_s.length > 15 + fail ArgumentError, 'invalid value for "authorized_amount", the character length must be smaller than or equal to 15.' + end + + @authorized_amount = authorized_amount + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + total_amount == o.total_amount && + currency == o.currency && + tax_amount == o.tax_amount && + authorized_amount == o.authorized_amount + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [total_amount, currency, tax_amount, authorized_amount].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_bill_to.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_bill_to.rb new file mode 100644 index 00000000..f697de64 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_bill_to.rb @@ -0,0 +1,524 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseOrderInformationBillTo + # Customer’s first name. This name must be the same as the name on the card. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the customer_firstname field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :first_name + + # Customer’s last name. This name must be the same as the name on the card. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the customer_lastname field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :last_name + + # Customer’s middle name. + attr_accessor :middel_name + + # Customer’s name suffix. + attr_accessor :name_suffix + + # First line of the billing street address as it appears on the credit card issuer’s records. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_address1 field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :address1 + + # Additional address information. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_address2 field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :address2 + + # City of the billing address. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_city field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :locality + + # State or province of the billing address. Use the State, Province, and Territory Codes for the United States and Canada. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_state field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :administrative_area + + # Postal code for the billing address. The postal code must consist of 5 to 9 digits. When the billing country is the U.S., the 9-digit postal code must follow this format: [5 digits][dash][4 digits] Example 12345-6789 When the billing country is Canada, the 6-digit postal code must follow this format: [alpha][numeric][alpha][space][numeric][alpha][numeric] Example A1B 2C3 For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the bill_zip field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :postal_code + + # Name of the customer’s company. For processor-specific information, see the company_name field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :company + + # Customer's email address, including the full domain name. For processor-specific information, see the customer_email field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :email + + # Country of the billing address. Use the two-character ISO Standard Country Codes. For processor-specific information, see the bill_country field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :country + + # Title. + attr_accessor :title + + # Customer’s phone number. For Payouts: This field may be sent only for FDC Compass. CyberSource recommends that you include the country code when the order is from outside the U.S. For processor-specific information, see the customer_phone field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :phone_number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'first_name' => :'firstName', + :'last_name' => :'lastName', + :'middel_name' => :'middelName', + :'name_suffix' => :'nameSuffix', + :'address1' => :'address1', + :'address2' => :'address2', + :'locality' => :'locality', + :'administrative_area' => :'administrativeArea', + :'postal_code' => :'postalCode', + :'company' => :'company', + :'email' => :'email', + :'country' => :'country', + :'title' => :'title', + :'phone_number' => :'phoneNumber' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'first_name' => :'String', + :'last_name' => :'String', + :'middel_name' => :'String', + :'name_suffix' => :'String', + :'address1' => :'String', + :'address2' => :'String', + :'locality' => :'String', + :'administrative_area' => :'String', + :'postal_code' => :'String', + :'company' => :'String', + :'email' => :'String', + :'country' => :'String', + :'title' => :'String', + :'phone_number' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'firstName') + self.first_name = attributes[:'firstName'] + end + + if attributes.has_key?(:'lastName') + self.last_name = attributes[:'lastName'] + end + + if attributes.has_key?(:'middelName') + self.middel_name = attributes[:'middelName'] + end + + if attributes.has_key?(:'nameSuffix') + self.name_suffix = attributes[:'nameSuffix'] + end + + if attributes.has_key?(:'address1') + self.address1 = attributes[:'address1'] + end + + if attributes.has_key?(:'address2') + self.address2 = attributes[:'address2'] + end + + if attributes.has_key?(:'locality') + self.locality = attributes[:'locality'] + end + + if attributes.has_key?(:'administrativeArea') + self.administrative_area = attributes[:'administrativeArea'] + end + + if attributes.has_key?(:'postalCode') + self.postal_code = attributes[:'postalCode'] + end + + if attributes.has_key?(:'company') + self.company = attributes[:'company'] + end + + if attributes.has_key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.has_key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.has_key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.has_key?(:'phoneNumber') + self.phone_number = attributes[:'phoneNumber'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@first_name.nil? && @first_name.to_s.length > 60 + invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 60.') + end + + if !@last_name.nil? && @last_name.to_s.length > 60 + invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 60.') + end + + if !@middel_name.nil? && @middel_name.to_s.length > 60 + invalid_properties.push('invalid value for "middel_name", the character length must be smaller than or equal to 60.') + end + + if !@name_suffix.nil? && @name_suffix.to_s.length > 60 + invalid_properties.push('invalid value for "name_suffix", the character length must be smaller than or equal to 60.') + end + + if !@address1.nil? && @address1.to_s.length > 60 + invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 60.') + end + + if !@address2.nil? && @address2.to_s.length > 60 + invalid_properties.push('invalid value for "address2", the character length must be smaller than or equal to 60.') + end + + if !@locality.nil? && @locality.to_s.length > 50 + invalid_properties.push('invalid value for "locality", the character length must be smaller than or equal to 50.') + end + + if !@administrative_area.nil? && @administrative_area.to_s.length > 2 + invalid_properties.push('invalid value for "administrative_area", the character length must be smaller than or equal to 2.') + end + + if !@postal_code.nil? && @postal_code.to_s.length > 10 + invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 10.') + end + + if !@company.nil? && @company.to_s.length > 60 + invalid_properties.push('invalid value for "company", the character length must be smaller than or equal to 60.') + end + + if !@email.nil? && @email.to_s.length > 255 + invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 255.') + end + + if !@country.nil? && @country.to_s.length > 2 + invalid_properties.push('invalid value for "country", the character length must be smaller than or equal to 2.') + end + + if !@title.nil? && @title.to_s.length > 60 + invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 60.') + end + + if !@phone_number.nil? && @phone_number.to_s.length > 15 + invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 15.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@first_name.nil? && @first_name.to_s.length > 60 + return false if !@last_name.nil? && @last_name.to_s.length > 60 + return false if !@middel_name.nil? && @middel_name.to_s.length > 60 + return false if !@name_suffix.nil? && @name_suffix.to_s.length > 60 + return false if !@address1.nil? && @address1.to_s.length > 60 + return false if !@address2.nil? && @address2.to_s.length > 60 + return false if !@locality.nil? && @locality.to_s.length > 50 + return false if !@administrative_area.nil? && @administrative_area.to_s.length > 2 + return false if !@postal_code.nil? && @postal_code.to_s.length > 10 + return false if !@company.nil? && @company.to_s.length > 60 + return false if !@email.nil? && @email.to_s.length > 255 + return false if !@country.nil? && @country.to_s.length > 2 + return false if !@title.nil? && @title.to_s.length > 60 + return false if !@phone_number.nil? && @phone_number.to_s.length > 15 + true + end + + # Custom attribute writer method with validation + # @param [Object] first_name Value to be assigned + def first_name=(first_name) + if !first_name.nil? && first_name.to_s.length > 60 + fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 60.' + end + + @first_name = first_name + end + + # Custom attribute writer method with validation + # @param [Object] last_name Value to be assigned + def last_name=(last_name) + if !last_name.nil? && last_name.to_s.length > 60 + fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 60.' + end + + @last_name = last_name + end + + # Custom attribute writer method with validation + # @param [Object] middel_name Value to be assigned + def middel_name=(middel_name) + if !middel_name.nil? && middel_name.to_s.length > 60 + fail ArgumentError, 'invalid value for "middel_name", the character length must be smaller than or equal to 60.' + end + + @middel_name = middel_name + end + + # Custom attribute writer method with validation + # @param [Object] name_suffix Value to be assigned + def name_suffix=(name_suffix) + if !name_suffix.nil? && name_suffix.to_s.length > 60 + fail ArgumentError, 'invalid value for "name_suffix", the character length must be smaller than or equal to 60.' + end + + @name_suffix = name_suffix + end + + # Custom attribute writer method with validation + # @param [Object] address1 Value to be assigned + def address1=(address1) + if !address1.nil? && address1.to_s.length > 60 + fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 60.' + end + + @address1 = address1 + end + + # Custom attribute writer method with validation + # @param [Object] address2 Value to be assigned + def address2=(address2) + if !address2.nil? && address2.to_s.length > 60 + fail ArgumentError, 'invalid value for "address2", the character length must be smaller than or equal to 60.' + end + + @address2 = address2 + end + + # Custom attribute writer method with validation + # @param [Object] locality Value to be assigned + def locality=(locality) + if !locality.nil? && locality.to_s.length > 50 + fail ArgumentError, 'invalid value for "locality", the character length must be smaller than or equal to 50.' + end + + @locality = locality + end + + # Custom attribute writer method with validation + # @param [Object] administrative_area Value to be assigned + def administrative_area=(administrative_area) + if !administrative_area.nil? && administrative_area.to_s.length > 2 + fail ArgumentError, 'invalid value for "administrative_area", the character length must be smaller than or equal to 2.' + end + + @administrative_area = administrative_area + end + + # Custom attribute writer method with validation + # @param [Object] postal_code Value to be assigned + def postal_code=(postal_code) + if !postal_code.nil? && postal_code.to_s.length > 10 + fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 10.' + end + + @postal_code = postal_code + end + + # Custom attribute writer method with validation + # @param [Object] company Value to be assigned + def company=(company) + if !company.nil? && company.to_s.length > 60 + fail ArgumentError, 'invalid value for "company", the character length must be smaller than or equal to 60.' + end + + @company = company + end + + # Custom attribute writer method with validation + # @param [Object] email Value to be assigned + def email=(email) + if !email.nil? && email.to_s.length > 255 + fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 255.' + end + + @email = email + end + + # Custom attribute writer method with validation + # @param [Object] country Value to be assigned + def country=(country) + if !country.nil? && country.to_s.length > 2 + fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 2.' + end + + @country = country + end + + # Custom attribute writer method with validation + # @param [Object] title Value to be assigned + def title=(title) + if !title.nil? && title.to_s.length > 60 + fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 60.' + end + + @title = title + end + + # Custom attribute writer method with validation + # @param [Object] phone_number Value to be assigned + def phone_number=(phone_number) + if !phone_number.nil? && phone_number.to_s.length > 15 + fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 15.' + end + + @phone_number = phone_number + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + first_name == o.first_name && + last_name == o.last_name && + middel_name == o.middel_name && + name_suffix == o.name_suffix && + address1 == o.address1 && + address2 == o.address2 && + locality == o.locality && + administrative_area == o.administrative_area && + postal_code == o.postal_code && + company == o.company && + email == o.email && + country == o.country && + title == o.title && + phone_number == o.phone_number + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [first_name, last_name, middel_name, name_suffix, address1, address2, locality, administrative_area, postal_code, company, email, country, title, phone_number].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_line_items.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_line_items.rb new file mode 100644 index 00000000..a1f1da34 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_line_items.rb @@ -0,0 +1,343 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseOrderInformationLineItems + # Type of product. This value is used to determine the category that the product is in: electronic, handling, physical, service, or shipping. The default value is **default**. For a payment, when you set this field to a value other than default or any of the values related to shipping and handling, below fields _quantity_, _productName_, and _productSKU_ are required. + attr_accessor :product_code + + # For PAYMENT and CAPTURE API, this field is required when above _productCode_ is not **default** or one of the values related to shipping and handling. + attr_accessor :product_name + + # Identification code for the product. For PAYMENT and CAPTURE API, this field is required when above _productCode_ is not **default** or one of the values related to shipping and/or handling. + attr_accessor :product_sku + + # Total tax to apply to the product. This value cannot be negative. The tax amount and the offer amount must be in the same currency. The tax amount field is additive. The following example uses a two-exponent currency such as USD: 1. You include each line item in your request. ..- 1st line item has amount=10.00, quantity=1, and taxAmount=0.80 ..- 2nd line item has amount=20.00, quantity=1, and taxAmount=1.60 2. The total amount authorized will be 32.40, not 30.00 with 2.40 of tax included. This field is frequently used for Level II and Level III transactions. + attr_accessor :tax_amount + + # For a payment or capture, this field is required when _productCode_ is not **default** or one of the values related to shipping and handling. + attr_accessor :quantity + + # Per-item price of the product. This value cannot be negative. You can include a decimal point (.), but you cannot include any other special characters. CyberSource truncates the amount to the correct number of decimal places. For processor-specific information, see the amount field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :unit_price + + # The description for this field is not available. + attr_accessor :fulfillment_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'product_code' => :'productCode', + :'product_name' => :'productName', + :'product_sku' => :'productSku', + :'tax_amount' => :'taxAmount', + :'quantity' => :'quantity', + :'unit_price' => :'unitPrice', + :'fulfillment_type' => :'fulfillmentType' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'product_code' => :'String', + :'product_name' => :'String', + :'product_sku' => :'String', + :'tax_amount' => :'String', + :'quantity' => :'Float', + :'unit_price' => :'String', + :'fulfillment_type' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'productCode') + self.product_code = attributes[:'productCode'] + end + + if attributes.has_key?(:'productName') + self.product_name = attributes[:'productName'] + end + + if attributes.has_key?(:'productSku') + self.product_sku = attributes[:'productSku'] + end + + if attributes.has_key?(:'taxAmount') + self.tax_amount = attributes[:'taxAmount'] + end + + if attributes.has_key?(:'quantity') + self.quantity = attributes[:'quantity'] + end + + if attributes.has_key?(:'unitPrice') + self.unit_price = attributes[:'unitPrice'] + end + + if attributes.has_key?(:'fulfillmentType') + self.fulfillment_type = attributes[:'fulfillmentType'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@product_code.nil? && @product_code.to_s.length > 255 + invalid_properties.push('invalid value for "product_code", the character length must be smaller than or equal to 255.') + end + + if !@product_name.nil? && @product_name.to_s.length > 255 + invalid_properties.push('invalid value for "product_name", the character length must be smaller than or equal to 255.') + end + + if !@product_sku.nil? && @product_sku.to_s.length > 255 + invalid_properties.push('invalid value for "product_sku", the character length must be smaller than or equal to 255.') + end + + if !@tax_amount.nil? && @tax_amount.to_s.length > 15 + invalid_properties.push('invalid value for "tax_amount", the character length must be smaller than or equal to 15.') + end + + if !@quantity.nil? && @quantity > 9999999999 + invalid_properties.push('invalid value for "quantity", must be smaller than or equal to 9999999999.') + end + + if !@quantity.nil? && @quantity < 1 + invalid_properties.push('invalid value for "quantity", must be greater than or equal to 1.') + end + + if !@unit_price.nil? && @unit_price.to_s.length > 15 + invalid_properties.push('invalid value for "unit_price", the character length must be smaller than or equal to 15.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@product_code.nil? && @product_code.to_s.length > 255 + return false if !@product_name.nil? && @product_name.to_s.length > 255 + return false if !@product_sku.nil? && @product_sku.to_s.length > 255 + return false if !@tax_amount.nil? && @tax_amount.to_s.length > 15 + return false if !@quantity.nil? && @quantity > 9999999999 + return false if !@quantity.nil? && @quantity < 1 + return false if !@unit_price.nil? && @unit_price.to_s.length > 15 + true + end + + # Custom attribute writer method with validation + # @param [Object] product_code Value to be assigned + def product_code=(product_code) + if !product_code.nil? && product_code.to_s.length > 255 + fail ArgumentError, 'invalid value for "product_code", the character length must be smaller than or equal to 255.' + end + + @product_code = product_code + end + + # Custom attribute writer method with validation + # @param [Object] product_name Value to be assigned + def product_name=(product_name) + if !product_name.nil? && product_name.to_s.length > 255 + fail ArgumentError, 'invalid value for "product_name", the character length must be smaller than or equal to 255.' + end + + @product_name = product_name + end + + # Custom attribute writer method with validation + # @param [Object] product_sku Value to be assigned + def product_sku=(product_sku) + if !product_sku.nil? && product_sku.to_s.length > 255 + fail ArgumentError, 'invalid value for "product_sku", the character length must be smaller than or equal to 255.' + end + + @product_sku = product_sku + end + + # Custom attribute writer method with validation + # @param [Object] tax_amount Value to be assigned + def tax_amount=(tax_amount) + if !tax_amount.nil? && tax_amount.to_s.length > 15 + fail ArgumentError, 'invalid value for "tax_amount", the character length must be smaller than or equal to 15.' + end + + @tax_amount = tax_amount + end + + # Custom attribute writer method with validation + # @param [Object] quantity Value to be assigned + def quantity=(quantity) + if !quantity.nil? && quantity > 9999999999 + fail ArgumentError, 'invalid value for "quantity", must be smaller than or equal to 9999999999.' + end + + if !quantity.nil? && quantity < 1 + fail ArgumentError, 'invalid value for "quantity", must be greater than or equal to 1.' + end + + @quantity = quantity + end + + # Custom attribute writer method with validation + # @param [Object] unit_price Value to be assigned + def unit_price=(unit_price) + if !unit_price.nil? && unit_price.to_s.length > 15 + fail ArgumentError, 'invalid value for "unit_price", the character length must be smaller than or equal to 15.' + end + + @unit_price = unit_price + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + product_code == o.product_code && + product_name == o.product_name && + product_sku == o.product_sku && + tax_amount == o.tax_amount && + quantity == o.quantity && + unit_price == o.unit_price && + fulfillment_type == o.fulfillment_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [product_code, product_name, product_sku, tax_amount, quantity, unit_price, fulfillment_type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_ship_to.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_ship_to.rb new file mode 100644 index 00000000..a42818e0 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_ship_to.rb @@ -0,0 +1,424 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseOrderInformationShipTo + # First name of the recipient. **Processor specific maximum length** - Litle: 25 - All other processors: 60 + attr_accessor :first_name + + # Last name of the recipient. **Processor specific maximum length** - Litle: 25 - All other processors: 60 + attr_accessor :last_name + + # First line of the shipping address. + attr_accessor :address1 + + # Second line of the shipping address. + attr_accessor :address2 + + # City of the shipping address. + attr_accessor :locality + + # State or province of the shipping address. Use the State, Province, and Territory Codes for the United States and Canada. + attr_accessor :administrative_area + + # Postal code for the shipping address. The postal code must consist of 5 to 9 digits. When the billing country is the U.S., the 9-digit postal code must follow this format: [5 digits][dash][4 digits] Example 12345-6789 When the billing country is Canada, the 6-digit postal code must follow this format: [alpha][numeric][alpha][space][numeric][alpha][numeric] Example A1B 2C3 + attr_accessor :postal_code + + # Name of the customer’s company. For processor-specific information, see the company_name field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :company + + # Country of the shipping address. Use the two character ISO Standard Country Codes. + attr_accessor :country + + # Phone number for the shipping address. + attr_accessor :phone_number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'first_name' => :'firstName', + :'last_name' => :'lastName', + :'address1' => :'address1', + :'address2' => :'address2', + :'locality' => :'locality', + :'administrative_area' => :'administrativeArea', + :'postal_code' => :'postalCode', + :'company' => :'company', + :'country' => :'country', + :'phone_number' => :'phoneNumber' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'first_name' => :'String', + :'last_name' => :'String', + :'address1' => :'String', + :'address2' => :'String', + :'locality' => :'String', + :'administrative_area' => :'String', + :'postal_code' => :'String', + :'company' => :'String', + :'country' => :'String', + :'phone_number' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'firstName') + self.first_name = attributes[:'firstName'] + end + + if attributes.has_key?(:'lastName') + self.last_name = attributes[:'lastName'] + end + + if attributes.has_key?(:'address1') + self.address1 = attributes[:'address1'] + end + + if attributes.has_key?(:'address2') + self.address2 = attributes[:'address2'] + end + + if attributes.has_key?(:'locality') + self.locality = attributes[:'locality'] + end + + if attributes.has_key?(:'administrativeArea') + self.administrative_area = attributes[:'administrativeArea'] + end + + if attributes.has_key?(:'postalCode') + self.postal_code = attributes[:'postalCode'] + end + + if attributes.has_key?(:'company') + self.company = attributes[:'company'] + end + + if attributes.has_key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.has_key?(:'phoneNumber') + self.phone_number = attributes[:'phoneNumber'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@first_name.nil? && @first_name.to_s.length > 60 + invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 60.') + end + + if !@last_name.nil? && @last_name.to_s.length > 60 + invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 60.') + end + + if !@address1.nil? && @address1.to_s.length > 60 + invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 60.') + end + + if !@address2.nil? && @address2.to_s.length > 60 + invalid_properties.push('invalid value for "address2", the character length must be smaller than or equal to 60.') + end + + if !@locality.nil? && @locality.to_s.length > 50 + invalid_properties.push('invalid value for "locality", the character length must be smaller than or equal to 50.') + end + + if !@administrative_area.nil? && @administrative_area.to_s.length > 2 + invalid_properties.push('invalid value for "administrative_area", the character length must be smaller than or equal to 2.') + end + + if !@postal_code.nil? && @postal_code.to_s.length > 10 + invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 10.') + end + + if !@company.nil? && @company.to_s.length > 60 + invalid_properties.push('invalid value for "company", the character length must be smaller than or equal to 60.') + end + + if !@country.nil? && @country.to_s.length > 2 + invalid_properties.push('invalid value for "country", the character length must be smaller than or equal to 2.') + end + + if !@phone_number.nil? && @phone_number.to_s.length > 15 + invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 15.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@first_name.nil? && @first_name.to_s.length > 60 + return false if !@last_name.nil? && @last_name.to_s.length > 60 + return false if !@address1.nil? && @address1.to_s.length > 60 + return false if !@address2.nil? && @address2.to_s.length > 60 + return false if !@locality.nil? && @locality.to_s.length > 50 + return false if !@administrative_area.nil? && @administrative_area.to_s.length > 2 + return false if !@postal_code.nil? && @postal_code.to_s.length > 10 + return false if !@company.nil? && @company.to_s.length > 60 + return false if !@country.nil? && @country.to_s.length > 2 + return false if !@phone_number.nil? && @phone_number.to_s.length > 15 + true + end + + # Custom attribute writer method with validation + # @param [Object] first_name Value to be assigned + def first_name=(first_name) + if !first_name.nil? && first_name.to_s.length > 60 + fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 60.' + end + + @first_name = first_name + end + + # Custom attribute writer method with validation + # @param [Object] last_name Value to be assigned + def last_name=(last_name) + if !last_name.nil? && last_name.to_s.length > 60 + fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 60.' + end + + @last_name = last_name + end + + # Custom attribute writer method with validation + # @param [Object] address1 Value to be assigned + def address1=(address1) + if !address1.nil? && address1.to_s.length > 60 + fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 60.' + end + + @address1 = address1 + end + + # Custom attribute writer method with validation + # @param [Object] address2 Value to be assigned + def address2=(address2) + if !address2.nil? && address2.to_s.length > 60 + fail ArgumentError, 'invalid value for "address2", the character length must be smaller than or equal to 60.' + end + + @address2 = address2 + end + + # Custom attribute writer method with validation + # @param [Object] locality Value to be assigned + def locality=(locality) + if !locality.nil? && locality.to_s.length > 50 + fail ArgumentError, 'invalid value for "locality", the character length must be smaller than or equal to 50.' + end + + @locality = locality + end + + # Custom attribute writer method with validation + # @param [Object] administrative_area Value to be assigned + def administrative_area=(administrative_area) + if !administrative_area.nil? && administrative_area.to_s.length > 2 + fail ArgumentError, 'invalid value for "administrative_area", the character length must be smaller than or equal to 2.' + end + + @administrative_area = administrative_area + end + + # Custom attribute writer method with validation + # @param [Object] postal_code Value to be assigned + def postal_code=(postal_code) + if !postal_code.nil? && postal_code.to_s.length > 10 + fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 10.' + end + + @postal_code = postal_code + end + + # Custom attribute writer method with validation + # @param [Object] company Value to be assigned + def company=(company) + if !company.nil? && company.to_s.length > 60 + fail ArgumentError, 'invalid value for "company", the character length must be smaller than or equal to 60.' + end + + @company = company + end + + # Custom attribute writer method with validation + # @param [Object] country Value to be assigned + def country=(country) + if !country.nil? && country.to_s.length > 2 + fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 2.' + end + + @country = country + end + + # Custom attribute writer method with validation + # @param [Object] phone_number Value to be assigned + def phone_number=(phone_number) + if !phone_number.nil? && phone_number.to_s.length > 15 + fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 15.' + end + + @phone_number = phone_number + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + first_name == o.first_name && + last_name == o.last_name && + address1 == o.address1 && + address2 == o.address2 && + locality == o.locality && + administrative_area == o.administrative_area && + postal_code == o.postal_code && + company == o.company && + country == o.country && + phone_number == o.phone_number + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [first_name, last_name, address1, address2, locality, administrative_area, postal_code, company, country, phone_number].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_shipping_details.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_shipping_details.rb new file mode 100644 index 00000000..92132d0b --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_shipping_details.rb @@ -0,0 +1,209 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseOrderInformationShippingDetails + # The description for this field is not available. + attr_accessor :gift_wrap + + # Shipping method for the product. Possible values: - lowcost: Lowest-cost service - sameday: Courier or same-day service - oneday: Next-day or overnight service - twoday: Two-day service - threeday: Three-day service - pickup: Store pick-up - other: Other shipping method - none: No shipping method because product is a service or subscription + attr_accessor :shipping_method + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'gift_wrap' => :'giftWrap', + :'shipping_method' => :'shippingMethod' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'gift_wrap' => :'BOOLEAN', + :'shipping_method' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'giftWrap') + self.gift_wrap = attributes[:'giftWrap'] + end + + if attributes.has_key?(:'shippingMethod') + self.shipping_method = attributes[:'shippingMethod'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@shipping_method.nil? && @shipping_method.to_s.length > 10 + invalid_properties.push('invalid value for "shipping_method", the character length must be smaller than or equal to 10.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@shipping_method.nil? && @shipping_method.to_s.length > 10 + true + end + + # Custom attribute writer method with validation + # @param [Object] shipping_method Value to be assigned + def shipping_method=(shipping_method) + if !shipping_method.nil? && shipping_method.to_s.length > 10 + fail ArgumentError, 'invalid value for "shipping_method", the character length must be smaller than or equal to 10.' + end + + @shipping_method = shipping_method + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + gift_wrap == o.gift_wrap && + shipping_method == o.shipping_method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [gift_wrap, shipping_method].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information.rb new file mode 100644 index 00000000..904bfab4 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information.rb @@ -0,0 +1,228 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponsePaymentInformation + attr_accessor :payment_type + + attr_accessor :customer + + attr_accessor :card + + attr_accessor :invoice + + attr_accessor :bank + + attr_accessor :account_features + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'payment_type' => :'paymentType', + :'customer' => :'customer', + :'card' => :'card', + :'invoice' => :'invoice', + :'bank' => :'bank', + :'account_features' => :'accountFeatures' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'payment_type' => :'TssV2TransactionsGet200ResponsePaymentInformationPaymentType', + :'customer' => :'Ptsv2paymentsPaymentInformationCustomer', + :'card' => :'TssV2TransactionsGet200ResponsePaymentInformationCard', + :'invoice' => :'TssV2TransactionsGet200ResponsePaymentInformationInvoice', + :'bank' => :'TssV2TransactionsGet200ResponsePaymentInformationBank', + :'account_features' => :'TssV2TransactionsGet200ResponsePaymentInformationAccountFeatures' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'paymentType') + self.payment_type = attributes[:'paymentType'] + end + + if attributes.has_key?(:'customer') + self.customer = attributes[:'customer'] + end + + if attributes.has_key?(:'card') + self.card = attributes[:'card'] + end + + if attributes.has_key?(:'invoice') + self.invoice = attributes[:'invoice'] + end + + if attributes.has_key?(:'bank') + self.bank = attributes[:'bank'] + end + + if attributes.has_key?(:'accountFeatures') + self.account_features = attributes[:'accountFeatures'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + payment_type == o.payment_type && + customer == o.customer && + card == o.card && + invoice == o.invoice && + bank == o.bank && + account_features == o.account_features + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [payment_type, customer, card, invoice, bank, account_features].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_account_features.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_account_features.rb new file mode 100644 index 00000000..27e4651f --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_account_features.rb @@ -0,0 +1,249 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponsePaymentInformationAccountFeatures + # Remaining balance on the account. + attr_accessor :balance_amount + + # Remaining balance on the account. + attr_accessor :previous_balance_amount + + # Currency of the remaining balance on the account. For the possible values, see the ISO Standard Currency Codes. + attr_accessor :currency + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'balance_amount' => :'balanceAmount', + :'previous_balance_amount' => :'previousBalanceAmount', + :'currency' => :'currency' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'balance_amount' => :'String', + :'previous_balance_amount' => :'String', + :'currency' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'balanceAmount') + self.balance_amount = attributes[:'balanceAmount'] + end + + if attributes.has_key?(:'previousBalanceAmount') + self.previous_balance_amount = attributes[:'previousBalanceAmount'] + end + + if attributes.has_key?(:'currency') + self.currency = attributes[:'currency'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@balance_amount.nil? && @balance_amount.to_s.length > 12 + invalid_properties.push('invalid value for "balance_amount", the character length must be smaller than or equal to 12.') + end + + if !@previous_balance_amount.nil? && @previous_balance_amount.to_s.length > 12 + invalid_properties.push('invalid value for "previous_balance_amount", the character length must be smaller than or equal to 12.') + end + + if !@currency.nil? && @currency.to_s.length > 5 + invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 5.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@balance_amount.nil? && @balance_amount.to_s.length > 12 + return false if !@previous_balance_amount.nil? && @previous_balance_amount.to_s.length > 12 + return false if !@currency.nil? && @currency.to_s.length > 5 + true + end + + # Custom attribute writer method with validation + # @param [Object] balance_amount Value to be assigned + def balance_amount=(balance_amount) + if !balance_amount.nil? && balance_amount.to_s.length > 12 + fail ArgumentError, 'invalid value for "balance_amount", the character length must be smaller than or equal to 12.' + end + + @balance_amount = balance_amount + end + + # Custom attribute writer method with validation + # @param [Object] previous_balance_amount Value to be assigned + def previous_balance_amount=(previous_balance_amount) + if !previous_balance_amount.nil? && previous_balance_amount.to_s.length > 12 + fail ArgumentError, 'invalid value for "previous_balance_amount", the character length must be smaller than or equal to 12.' + end + + @previous_balance_amount = previous_balance_amount + end + + # Custom attribute writer method with validation + # @param [Object] currency Value to be assigned + def currency=(currency) + if !currency.nil? && currency.to_s.length > 5 + fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 5.' + end + + @currency = currency + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + balance_amount == o.balance_amount && + previous_balance_amount == o.previous_balance_amount && + currency == o.currency + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [balance_amount, previous_balance_amount, currency].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank.rb new file mode 100644 index 00000000..1f739a69 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank.rb @@ -0,0 +1,242 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponsePaymentInformationBank + # The description for this field is not available. + attr_accessor :routing_number + + # The description for this field is not available. + attr_accessor :branch_code + + # The description for this field is not available. + attr_accessor :swift_code + + # The description for this field is not available. + attr_accessor :bank_code + + # The description for this field is not available. + attr_accessor :iban + + attr_accessor :account + + attr_accessor :mandate + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'routing_number' => :'routingNumber', + :'branch_code' => :'branchCode', + :'swift_code' => :'swiftCode', + :'bank_code' => :'bankCode', + :'iban' => :'iban', + :'account' => :'account', + :'mandate' => :'mandate' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'routing_number' => :'String', + :'branch_code' => :'String', + :'swift_code' => :'String', + :'bank_code' => :'String', + :'iban' => :'String', + :'account' => :'TssV2TransactionsGet200ResponsePaymentInformationBankAccount', + :'mandate' => :'TssV2TransactionsGet200ResponsePaymentInformationBankMandate' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'routingNumber') + self.routing_number = attributes[:'routingNumber'] + end + + if attributes.has_key?(:'branchCode') + self.branch_code = attributes[:'branchCode'] + end + + if attributes.has_key?(:'swiftCode') + self.swift_code = attributes[:'swiftCode'] + end + + if attributes.has_key?(:'bankCode') + self.bank_code = attributes[:'bankCode'] + end + + if attributes.has_key?(:'iban') + self.iban = attributes[:'iban'] + end + + if attributes.has_key?(:'account') + self.account = attributes[:'account'] + end + + if attributes.has_key?(:'mandate') + self.mandate = attributes[:'mandate'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + routing_number == o.routing_number && + branch_code == o.branch_code && + swift_code == o.swift_code && + bank_code == o.bank_code && + iban == o.iban && + account == o.account && + mandate == o.mandate + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [routing_number, branch_code, swift_code, bank_code, iban, account, mandate].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank_account.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank_account.rb new file mode 100644 index 00000000..fb314cf6 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank_account.rb @@ -0,0 +1,244 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponsePaymentInformationBankAccount + # The description for this field is not available. + attr_accessor :suffix + + # The description for this field is not available. + attr_accessor :prefix + + # The description for this field is not available. + attr_accessor :check_number + + # The description for this field is not available. + attr_accessor :type + + # The description for this field is not available. + attr_accessor :name + + # The description for this field is not available. + attr_accessor :check_digit + + # The description for this field is not available. + attr_accessor :encoder_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'suffix' => :'suffix', + :'prefix' => :'prefix', + :'check_number' => :'checkNumber', + :'type' => :'type', + :'name' => :'name', + :'check_digit' => :'checkDigit', + :'encoder_id' => :'encoderId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'suffix' => :'String', + :'prefix' => :'String', + :'check_number' => :'String', + :'type' => :'String', + :'name' => :'String', + :'check_digit' => :'String', + :'encoder_id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'suffix') + self.suffix = attributes[:'suffix'] + end + + if attributes.has_key?(:'prefix') + self.prefix = attributes[:'prefix'] + end + + if attributes.has_key?(:'checkNumber') + self.check_number = attributes[:'checkNumber'] + end + + if attributes.has_key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'checkDigit') + self.check_digit = attributes[:'checkDigit'] + end + + if attributes.has_key?(:'encoderId') + self.encoder_id = attributes[:'encoderId'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + suffix == o.suffix && + prefix == o.prefix && + check_number == o.check_number && + type == o.type && + name == o.name && + check_digit == o.check_digit && + encoder_id == o.encoder_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [suffix, prefix, check_number, type, name, check_digit, encoder_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank_mandate.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank_mandate.rb new file mode 100644 index 00000000..695c842e --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank_mandate.rb @@ -0,0 +1,204 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponsePaymentInformationBankMandate + # The description for this field is not available. + attr_accessor :reference_number + + # The description for this field is not available. + attr_accessor :recurring_type + + # The description for this field is not available. + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reference_number' => :'referenceNumber', + :'recurring_type' => :'recurringType', + :'id' => :'id' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'reference_number' => :'String', + :'recurring_type' => :'String', + :'id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'referenceNumber') + self.reference_number = attributes[:'referenceNumber'] + end + + if attributes.has_key?(:'recurringType') + self.recurring_type = attributes[:'recurringType'] + end + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + reference_number == o.reference_number && + recurring_type == o.recurring_type && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [reference_number, recurring_type, id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_card.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_card.rb new file mode 100644 index 00000000..13df7f2e --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_card.rb @@ -0,0 +1,424 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponsePaymentInformationCard + # Last four digits of the cardholder’s account number. This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. + attr_accessor :suffix + + # The description for this field is not available. + attr_accessor :prefix + + # Two-digit month in which the credit card expires. `Format: MM`. Possible values: 01 through 12. **Encoded Account Numbers** For encoded account numbers (_type_=039), if there is no expiration date on the card, use 12. For processor-specific information, see the customer_cc_expmo field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :expiration_month + + # Four-digit year in which the credit card expires. `Format: YYYY`. **Encoded Account Numbers** For encoded account numbers (_type_=039), if there is no expiration date on the card, use 2021. For processor-specific information, see the customer_cc_expyr field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :expiration_year + + # Month of the start of the Maestro (UK Domestic) card validity period. Do not include the field, even with a blank value, if the card is not a Maestro (UK Domestic) card. `Format: MM`. Possible values: 01 through 12. The start date is not required for Maestro (UK Domestic) transactions. + attr_accessor :start_month + + # Year of the start of the Maestro (UK Domestic) card validity period. Do not include the field, even with a blank value, if the card is not a Maestro (UK Domestic) card. `Format: YYYY`. The start date is not required for Maestro (UK Domestic) transactions. + attr_accessor :start_year + + # Number of times a Maestro (UK Domestic) card has been issued to the account holder. The card might or might not have an issue number. The number can consist of one or two digits, and the first digit might be a zero. When you include this value in your request, include exactly what is printed on the card. A value of 2 is different than a value of 02. Do not include the field, even with a blank value, if the card is not a Maestro (UK Domestic) card. The issue number is not required for Maestro (UK Domestic) transactions. + attr_accessor :issue_number + + # Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover + attr_accessor :type + + # Identifier for the issuing bank that provided the customer’s encoded account number. Contact your processor for the bank’s ID. + attr_accessor :account_encoder_id + + # Flag that specifies the type of account associated with the card. The cardholder provides this information during the payment process. **Cielo** and **Comercio Latino** Possible values: - CREDIT: Credit card - DEBIT: Debit card This field is required for: - Debit transactions on Cielo and Comercio Latino. - Transactions with Brazilian-issued cards on CyberSource through VisaNet. + attr_accessor :use_as + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'suffix' => :'suffix', + :'prefix' => :'prefix', + :'expiration_month' => :'expirationMonth', + :'expiration_year' => :'expirationYear', + :'start_month' => :'startMonth', + :'start_year' => :'startYear', + :'issue_number' => :'issueNumber', + :'type' => :'type', + :'account_encoder_id' => :'accountEncoderId', + :'use_as' => :'useAs' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'suffix' => :'String', + :'prefix' => :'String', + :'expiration_month' => :'String', + :'expiration_year' => :'String', + :'start_month' => :'String', + :'start_year' => :'String', + :'issue_number' => :'String', + :'type' => :'String', + :'account_encoder_id' => :'String', + :'use_as' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'suffix') + self.suffix = attributes[:'suffix'] + end + + if attributes.has_key?(:'prefix') + self.prefix = attributes[:'prefix'] + end + + if attributes.has_key?(:'expirationMonth') + self.expiration_month = attributes[:'expirationMonth'] + end + + if attributes.has_key?(:'expirationYear') + self.expiration_year = attributes[:'expirationYear'] + end + + if attributes.has_key?(:'startMonth') + self.start_month = attributes[:'startMonth'] + end + + if attributes.has_key?(:'startYear') + self.start_year = attributes[:'startYear'] + end + + if attributes.has_key?(:'issueNumber') + self.issue_number = attributes[:'issueNumber'] + end + + if attributes.has_key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.has_key?(:'accountEncoderId') + self.account_encoder_id = attributes[:'accountEncoderId'] + end + + if attributes.has_key?(:'useAs') + self.use_as = attributes[:'useAs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@suffix.nil? && @suffix.to_s.length > 4 + invalid_properties.push('invalid value for "suffix", the character length must be smaller than or equal to 4.') + end + + if !@prefix.nil? && @prefix.to_s.length > 6 + invalid_properties.push('invalid value for "prefix", the character length must be smaller than or equal to 6.') + end + + if !@expiration_month.nil? && @expiration_month.to_s.length > 2 + invalid_properties.push('invalid value for "expiration_month", the character length must be smaller than or equal to 2.') + end + + if !@expiration_year.nil? && @expiration_year.to_s.length > 4 + invalid_properties.push('invalid value for "expiration_year", the character length must be smaller than or equal to 4.') + end + + if !@start_month.nil? && @start_month.to_s.length > 2 + invalid_properties.push('invalid value for "start_month", the character length must be smaller than or equal to 2.') + end + + if !@start_year.nil? && @start_year.to_s.length > 4 + invalid_properties.push('invalid value for "start_year", the character length must be smaller than or equal to 4.') + end + + if !@issue_number.nil? && @issue_number.to_s.length > 5 + invalid_properties.push('invalid value for "issue_number", the character length must be smaller than or equal to 5.') + end + + # if !@type.nil? && @type.to_s.length > 3 + # invalid_properties.push('invalid value for "type", the character length must be smaller than or equal to 3.') + # end + + if !@account_encoder_id.nil? && @account_encoder_id.to_s.length > 3 + invalid_properties.push('invalid value for "account_encoder_id", the character length must be smaller than or equal to 3.') + end + + if !@use_as.nil? && @use_as.to_s.length > 2 + invalid_properties.push('invalid value for "use_as", the character length must be smaller than or equal to 2.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@suffix.nil? && @suffix.to_s.length > 4 + return false if !@prefix.nil? && @prefix.to_s.length > 6 + return false if !@expiration_month.nil? && @expiration_month.to_s.length > 2 + return false if !@expiration_year.nil? && @expiration_year.to_s.length > 4 + return false if !@start_month.nil? && @start_month.to_s.length > 2 + return false if !@start_year.nil? && @start_year.to_s.length > 4 + return false if !@issue_number.nil? && @issue_number.to_s.length > 5 + # return false if !@type.nil? && @type.to_s.length > 3 + return false if !@account_encoder_id.nil? && @account_encoder_id.to_s.length > 3 + return false if !@use_as.nil? && @use_as.to_s.length > 2 + true + end + + # Custom attribute writer method with validation + # @param [Object] suffix Value to be assigned + def suffix=(suffix) + if !suffix.nil? && suffix.to_s.length > 4 + fail ArgumentError, 'invalid value for "suffix", the character length must be smaller than or equal to 4.' + end + + @suffix = suffix + end + + # Custom attribute writer method with validation + # @param [Object] prefix Value to be assigned + def prefix=(prefix) + if !prefix.nil? && prefix.to_s.length > 6 + fail ArgumentError, 'invalid value for "prefix", the character length must be smaller than or equal to 6.' + end + + @prefix = prefix + end + + # Custom attribute writer method with validation + # @param [Object] expiration_month Value to be assigned + def expiration_month=(expiration_month) + if !expiration_month.nil? && expiration_month.to_s.length > 2 + fail ArgumentError, 'invalid value for "expiration_month", the character length must be smaller than or equal to 2.' + end + + @expiration_month = expiration_month + end + + # Custom attribute writer method with validation + # @param [Object] expiration_year Value to be assigned + def expiration_year=(expiration_year) + if !expiration_year.nil? && expiration_year.to_s.length > 4 + fail ArgumentError, 'invalid value for "expiration_year", the character length must be smaller than or equal to 4.' + end + + @expiration_year = expiration_year + end + + # Custom attribute writer method with validation + # @param [Object] start_month Value to be assigned + def start_month=(start_month) + if !start_month.nil? && start_month.to_s.length > 2 + fail ArgumentError, 'invalid value for "start_month", the character length must be smaller than or equal to 2.' + end + + @start_month = start_month + end + + # Custom attribute writer method with validation + # @param [Object] start_year Value to be assigned + def start_year=(start_year) + if !start_year.nil? && start_year.to_s.length > 4 + fail ArgumentError, 'invalid value for "start_year", the character length must be smaller than or equal to 4.' + end + + @start_year = start_year + end + + # Custom attribute writer method with validation + # @param [Object] issue_number Value to be assigned + def issue_number=(issue_number) + if !issue_number.nil? && issue_number.to_s.length > 5 + fail ArgumentError, 'invalid value for "issue_number", the character length must be smaller than or equal to 5.' + end + + @issue_number = issue_number + end + + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + # if !type.nil? && type.to_s.length > 3 + # fail ArgumentError, 'invalid value for "type", the character length must be smaller than or equal to 3.' + # end + + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] account_encoder_id Value to be assigned + def account_encoder_id=(account_encoder_id) + if !account_encoder_id.nil? && account_encoder_id.to_s.length > 3 + fail ArgumentError, 'invalid value for "account_encoder_id", the character length must be smaller than or equal to 3.' + end + + @account_encoder_id = account_encoder_id + end + + # Custom attribute writer method with validation + # @param [Object] use_as Value to be assigned + def use_as=(use_as) + if !use_as.nil? && use_as.to_s.length > 2 + fail ArgumentError, 'invalid value for "use_as", the character length must be smaller than or equal to 2.' + end + + @use_as = use_as + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + suffix == o.suffix && + prefix == o.prefix && + expiration_month == o.expiration_month && + expiration_year == o.expiration_year && + start_month == o.start_month && + start_year == o.start_year && + issue_number == o.issue_number && + type == o.type && + account_encoder_id == o.account_encoder_id && + use_as == o.use_as + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [suffix, prefix, expiration_month, expiration_year, start_month, start_year, issue_number, type, account_encoder_id, use_as].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_invoice.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_invoice.rb new file mode 100644 index 00000000..eb49b530 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_invoice.rb @@ -0,0 +1,204 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponsePaymentInformationInvoice + # Invoice Number. + attr_accessor :number + + # Barcode Number. + attr_accessor :barcode_number + + # Expiration Date. + attr_accessor :expiration_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number' => :'number', + :'barcode_number' => :'barcodeNumber', + :'expiration_date' => :'expirationDate' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'number' => :'String', + :'barcode_number' => :'String', + :'expiration_date' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'number') + self.number = attributes[:'number'] + end + + if attributes.has_key?(:'barcodeNumber') + self.barcode_number = attributes[:'barcodeNumber'] + end + + if attributes.has_key?(:'expirationDate') + self.expiration_date = attributes[:'expirationDate'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + number == o.number && + barcode_number == o.barcode_number && + expiration_date == o.expiration_date + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [number, barcode_number, expiration_date].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_payment_type.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_payment_type.rb new file mode 100644 index 00000000..253c4497 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_payment_type.rb @@ -0,0 +1,244 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponsePaymentInformationPaymentType + # The description for this field is not available. + attr_accessor :name + + # The description for this field is not available. + attr_accessor :type + + # The description for this field is not available. + attr_accessor :sub_type + + # The description for this field is not available. + attr_accessor :method + + # The description for this field is not available. + attr_accessor :funding_source + + # The description for this field is not available. + attr_accessor :funding_source_affiliation + + # The description for this field is not available. + attr_accessor :credential + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'type' => :'type', + :'sub_type' => :'subType', + :'method' => :'method', + :'funding_source' => :'fundingSource', + :'funding_source_affiliation' => :'fundingSourceAffiliation', + :'credential' => :'credential' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'name' => :'String', + :'type' => :'String', + :'sub_type' => :'String', + :'method' => :'String', + :'funding_source' => :'String', + :'funding_source_affiliation' => :'String', + :'credential' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.has_key?(:'subType') + self.sub_type = attributes[:'subType'] + end + + if attributes.has_key?(:'method') + self.method = attributes[:'method'] + end + + if attributes.has_key?(:'fundingSource') + self.funding_source = attributes[:'fundingSource'] + end + + if attributes.has_key?(:'fundingSourceAffiliation') + self.funding_source_affiliation = attributes[:'fundingSourceAffiliation'] + end + + if attributes.has_key?(:'credential') + self.credential = attributes[:'credential'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + type == o.type && + sub_type == o.sub_type && + method == o.method && + funding_source == o.funding_source && + funding_source_affiliation == o.funding_source_affiliation && + credential == o.credential + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [name, type, sub_type, method, funding_source, funding_source_affiliation, credential].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_point_of_sale_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_point_of_sale_information.rb new file mode 100644 index 00000000..bfbb6b6c --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_point_of_sale_information.rb @@ -0,0 +1,233 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponsePointOfSaleInformation + # Method of entering credit card information into the POS terminal. Possible values: - contact: Read from direct contact with chip card. - contactless: Read from a contactless interface using chip data. - keyed: Manually keyed into POS terminal. - msd: Read from a contactless interface using magnetic stripe data (MSD). - swiped: Read from credit card magnetic stripe. The contact, contactless, and msd values are supported only for EMV transactions. * Applicable only for CTV for Payouts. + attr_accessor :entry_mode + + # POS terminal’s capability. Possible values: - 1: Terminal has a magnetic stripe reader only. - 2: Terminal has a magnetic stripe reader and manual entry capability. - 3: Terminal has manual entry capability only. - 4: Terminal can read chip cards. - 5: Terminal can read contactless chip cards. The values of 4 and 5 are supported only for EMV transactions. * Applicable only for CTV for Payouts. + attr_accessor :terminal_capability + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'entry_mode' => :'entryMode', + :'terminal_capability' => :'terminalCapability' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'entry_mode' => :'String', + :'terminal_capability' => :'Integer' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'entryMode') + self.entry_mode = attributes[:'entryMode'] + end + + if attributes.has_key?(:'terminalCapability') + self.terminal_capability = attributes[:'terminalCapability'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@entry_mode.nil? && @entry_mode.to_s.length > 11 + invalid_properties.push('invalid value for "entry_mode", the character length must be smaller than or equal to 11.') + end + + if !@terminal_capability.nil? && @terminal_capability > 5 + invalid_properties.push('invalid value for "terminal_capability", must be smaller than or equal to 5.') + end + + if !@terminal_capability.nil? && @terminal_capability < 1 + invalid_properties.push('invalid value for "terminal_capability", must be greater than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@entry_mode.nil? && @entry_mode.to_s.length > 11 + return false if !@terminal_capability.nil? && @terminal_capability > 5 + return false if !@terminal_capability.nil? && @terminal_capability < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] entry_mode Value to be assigned + def entry_mode=(entry_mode) + if !entry_mode.nil? && entry_mode.to_s.length > 11 + fail ArgumentError, 'invalid value for "entry_mode", the character length must be smaller than or equal to 11.' + end + + @entry_mode = entry_mode + end + + # Custom attribute writer method with validation + # @param [Object] terminal_capability Value to be assigned + def terminal_capability=(terminal_capability) + if !terminal_capability.nil? && terminal_capability > 5 + fail ArgumentError, 'invalid value for "terminal_capability", must be smaller than or equal to 5.' + end + + if !terminal_capability.nil? && terminal_capability < 1 + fail ArgumentError, 'invalid value for "terminal_capability", must be greater than or equal to 1.' + end + + @terminal_capability = terminal_capability + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + entry_mode == o.entry_mode && + terminal_capability == o.terminal_capability + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [entry_mode, terminal_capability].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information.rb new file mode 100644 index 00000000..dffba10e --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information.rb @@ -0,0 +1,252 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseProcessingInformation + # Type of digital payment solution that is being used for the transaction. Possible Values: - **visacheckout**: Visa Checkout. - **001**: Apple Pay. - **005**: Masterpass. Required for Masterpass transactions on OmniPay Direct. - **006**: Android Pay. - **008**: Samsung Pay. + attr_accessor :payment_solution + + # Type of transaction. Some payment card companies use this information when determining discount rates. When you omit this field for **Ingenico ePayments**, the processor uses the default transaction type they have on file for you instead of the default value listed here. + attr_accessor :commerce_indicator + + # The description for this field is not available. + attr_accessor :business_application_id + + attr_accessor :authorization_options + + attr_accessor :bank_transfer_options + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'payment_solution' => :'paymentSolution', + :'commerce_indicator' => :'commerceIndicator', + :'business_application_id' => :'businessApplicationId', + :'authorization_options' => :'authorizationOptions', + :'bank_transfer_options' => :'bankTransferOptions' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'payment_solution' => :'String', + :'commerce_indicator' => :'String', + :'business_application_id' => :'String', + :'authorization_options' => :'TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions', + :'bank_transfer_options' => :'TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'paymentSolution') + self.payment_solution = attributes[:'paymentSolution'] + end + + if attributes.has_key?(:'commerceIndicator') + self.commerce_indicator = attributes[:'commerceIndicator'] + end + + if attributes.has_key?(:'businessApplicationId') + self.business_application_id = attributes[:'businessApplicationId'] + end + + if attributes.has_key?(:'authorizationOptions') + self.authorization_options = attributes[:'authorizationOptions'] + end + + if attributes.has_key?(:'bankTransferOptions') + self.bank_transfer_options = attributes[:'bankTransferOptions'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@payment_solution.nil? && @payment_solution.to_s.length > 12 + invalid_properties.push('invalid value for "payment_solution", the character length must be smaller than or equal to 12.') + end + + if !@commerce_indicator.nil? && @commerce_indicator.to_s.length > 20 + invalid_properties.push('invalid value for "commerce_indicator", the character length must be smaller than or equal to 20.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@payment_solution.nil? && @payment_solution.to_s.length > 12 + return false if !@commerce_indicator.nil? && @commerce_indicator.to_s.length > 20 + true + end + + # Custom attribute writer method with validation + # @param [Object] payment_solution Value to be assigned + def payment_solution=(payment_solution) + if !payment_solution.nil? && payment_solution.to_s.length > 12 + fail ArgumentError, 'invalid value for "payment_solution", the character length must be smaller than or equal to 12.' + end + + @payment_solution = payment_solution + end + + # Custom attribute writer method with validation + # @param [Object] commerce_indicator Value to be assigned + def commerce_indicator=(commerce_indicator) + if !commerce_indicator.nil? && commerce_indicator.to_s.length > 20 + fail ArgumentError, 'invalid value for "commerce_indicator", the character length must be smaller than or equal to 20.' + end + + @commerce_indicator = commerce_indicator + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + payment_solution == o.payment_solution && + commerce_indicator == o.commerce_indicator && + business_application_id == o.business_application_id && + authorization_options == o.authorization_options && + bank_transfer_options == o.bank_transfer_options + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [payment_solution, commerce_indicator, business_application_id, authorization_options, bank_transfer_options].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_authorization_options.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_authorization_options.rb new file mode 100644 index 00000000..213d2021 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_authorization_options.rb @@ -0,0 +1,199 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions + # 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) + attr_accessor :auth_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'auth_type' => :'authType' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'auth_type' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'authType') + self.auth_type = attributes[:'authType'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@auth_type.nil? && @auth_type.to_s.length > 15 + invalid_properties.push('invalid value for "auth_type", the character length must be smaller than or equal to 15.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@auth_type.nil? && @auth_type.to_s.length > 15 + true + end + + # Custom attribute writer method with validation + # @param [Object] auth_type Value to be assigned + def auth_type=(auth_type) + if !auth_type.nil? && auth_type.to_s.length > 15 + fail ArgumentError, 'invalid value for "auth_type", the character length must be smaller than or equal to 15.' + end + + @auth_type = auth_type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + auth_type == o.auth_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [auth_type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_bank_transfer_options.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_bank_transfer_options.rb new file mode 100644 index 00000000..6f629c5d --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_bank_transfer_options.rb @@ -0,0 +1,184 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions + # The description for this field is not available. + attr_accessor :sec_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sec_code' => :'secCode' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'sec_code' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'secCode') + self.sec_code = attributes[:'secCode'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sec_code == o.sec_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [sec_code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information.rb new file mode 100644 index 00000000..bcd96137 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information.rb @@ -0,0 +1,309 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseProcessorInformation + attr_accessor :processor + + # Network transaction identifier (TID). You can use this value to identify a specific transaction when you are discussing the transaction with your processor. Not all processors provide this value. + attr_accessor :transaction_id + + # The description for this field is not available. + attr_accessor :network_transaction_id + + # The description for this field is not available. + attr_accessor :response_id + + # The description for this field is not available. + attr_accessor :provider_transaction_id + + # Authorization code. Returned only when the processor returns this value. + attr_accessor :approval_code + + # For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of the authorization. + attr_accessor :response_code + + attr_accessor :avs + + attr_accessor :card_verification + + attr_accessor :ach_verification + + attr_accessor :electronic_verification_results + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'processor' => :'processor', + :'transaction_id' => :'transactionId', + :'network_transaction_id' => :'networkTransactionId', + :'response_id' => :'responseId', + :'provider_transaction_id' => :'providerTransactionId', + :'approval_code' => :'approvalCode', + :'response_code' => :'responseCode', + :'avs' => :'avs', + :'card_verification' => :'cardVerification', + :'ach_verification' => :'achVerification', + :'electronic_verification_results' => :'electronicVerificationResults' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'processor' => :'TssV2TransactionsGet200ResponseProcessorInformationProcessor', + :'transaction_id' => :'String', + :'network_transaction_id' => :'String', + :'response_id' => :'String', + :'provider_transaction_id' => :'String', + :'approval_code' => :'String', + :'response_code' => :'String', + :'avs' => :'PtsV2PaymentsPost201ResponseProcessorInformationAvs', + :'card_verification' => :'TssV2TransactionsGet200ResponseProcessorInformationCardVerification', + :'ach_verification' => :'TssV2TransactionsGet200ResponseProcessorInformationAchVerification', + :'electronic_verification_results' => :'TssV2TransactionsGet200ResponseProcessorInformationElectronicVerificationResults' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'processor') + self.processor = attributes[:'processor'] + end + + if attributes.has_key?(:'transactionId') + self.transaction_id = attributes[:'transactionId'] + end + + if attributes.has_key?(:'networkTransactionId') + self.network_transaction_id = attributes[:'networkTransactionId'] + end + + if attributes.has_key?(:'responseId') + self.response_id = attributes[:'responseId'] + end + + if attributes.has_key?(:'providerTransactionId') + self.provider_transaction_id = attributes[:'providerTransactionId'] + end + + if attributes.has_key?(:'approvalCode') + self.approval_code = attributes[:'approvalCode'] + end + + if attributes.has_key?(:'responseCode') + self.response_code = attributes[:'responseCode'] + end + + if attributes.has_key?(:'avs') + self.avs = attributes[:'avs'] + end + + if attributes.has_key?(:'cardVerification') + self.card_verification = attributes[:'cardVerification'] + end + + if attributes.has_key?(:'achVerification') + self.ach_verification = attributes[:'achVerification'] + end + + if attributes.has_key?(:'electronicVerificationResults') + self.electronic_verification_results = attributes[:'electronicVerificationResults'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@transaction_id.nil? && @transaction_id.to_s.length > 50 + invalid_properties.push('invalid value for "transaction_id", the character length must be smaller than or equal to 50.') + end + + if !@response_code.nil? && @response_code.to_s.length > 10 + invalid_properties.push('invalid value for "response_code", the character length must be smaller than or equal to 10.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@transaction_id.nil? && @transaction_id.to_s.length > 50 + return false if !@response_code.nil? && @response_code.to_s.length > 10 + true + end + + # Custom attribute writer method with validation + # @param [Object] transaction_id Value to be assigned + def transaction_id=(transaction_id) + if !transaction_id.nil? && transaction_id.to_s.length > 50 + fail ArgumentError, 'invalid value for "transaction_id", the character length must be smaller than or equal to 50.' + end + + @transaction_id = transaction_id + end + + # Custom attribute writer method with validation + # @param [Object] response_code Value to be assigned + def response_code=(response_code) + if !response_code.nil? && response_code.to_s.length > 10 + fail ArgumentError, 'invalid value for "response_code", the character length must be smaller than or equal to 10.' + end + + @response_code = response_code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + processor == o.processor && + transaction_id == o.transaction_id && + network_transaction_id == o.network_transaction_id && + response_id == o.response_id && + provider_transaction_id == o.provider_transaction_id && + approval_code == o.approval_code && + response_code == o.response_code && + avs == o.avs && + card_verification == o.card_verification && + ach_verification == o.ach_verification && + electronic_verification_results == o.electronic_verification_results + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [processor, transaction_id, network_transaction_id, response_id, provider_transaction_id, approval_code, response_code, avs, card_verification, ach_verification, electronic_verification_results].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_ach_verification.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_ach_verification.rb new file mode 100644 index 00000000..1adb4d4c --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_ach_verification.rb @@ -0,0 +1,224 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseProcessorInformationAchVerification + # The description for this field is not available.. + attr_accessor :result_code + + # The description for this field is not available. + attr_accessor :result_code_raw + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'result_code' => :'resultCode', + :'result_code_raw' => :'resultCodeRaw' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'result_code' => :'String', + :'result_code_raw' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'resultCode') + self.result_code = attributes[:'resultCode'] + end + + if attributes.has_key?(:'resultCodeRaw') + self.result_code_raw = attributes[:'resultCodeRaw'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@result_code.nil? && @result_code.to_s.length > 1 + invalid_properties.push('invalid value for "result_code", the character length must be smaller than or equal to 1.') + end + + if !@result_code_raw.nil? && @result_code_raw.to_s.length > 10 + invalid_properties.push('invalid value for "result_code_raw", the character length must be smaller than or equal to 10.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@result_code.nil? && @result_code.to_s.length > 1 + return false if !@result_code_raw.nil? && @result_code_raw.to_s.length > 10 + true + end + + # Custom attribute writer method with validation + # @param [Object] result_code Value to be assigned + def result_code=(result_code) + if !result_code.nil? && result_code.to_s.length > 1 + fail ArgumentError, 'invalid value for "result_code", the character length must be smaller than or equal to 1.' + end + + @result_code = result_code + end + + # Custom attribute writer method with validation + # @param [Object] result_code_raw Value to be assigned + def result_code_raw=(result_code_raw) + if !result_code_raw.nil? && result_code_raw.to_s.length > 10 + fail ArgumentError, 'invalid value for "result_code_raw", the character length must be smaller than or equal to 10.' + end + + @result_code_raw = result_code_raw + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + result_code == o.result_code && + result_code_raw == o.result_code_raw + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [result_code, result_code_raw].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_card_verification.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_card_verification.rb new file mode 100644 index 00000000..17f7fa8e --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_card_verification.rb @@ -0,0 +1,199 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseProcessorInformationCardVerification + # CVN result code. + attr_accessor :result_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'result_code' => :'resultCode' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'result_code' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'resultCode') + self.result_code = attributes[:'resultCode'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@result_code.nil? && @result_code.to_s.length > 1 + invalid_properties.push('invalid value for "result_code", the character length must be smaller than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@result_code.nil? && @result_code.to_s.length > 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] result_code Value to be assigned + def result_code=(result_code) + if !result_code.nil? && result_code.to_s.length > 1 + fail ArgumentError, 'invalid value for "result_code", the character length must be smaller than or equal to 1.' + end + + @result_code = result_code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + result_code == o.result_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [result_code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_electronic_verification_results.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_electronic_verification_results.rb new file mode 100644 index 00000000..7c8e1f7e --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_electronic_verification_results.rb @@ -0,0 +1,424 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseProcessorInformationElectronicVerificationResults + # Mapped Electronic Verification response code for the customer’s email address. + attr_accessor :email + + # Raw Electronic Verification response code from the processor for the customer’s email address. + attr_accessor :email_raw + + # The description for this field is not available. + attr_accessor :name + + # The description for this field is not available. + attr_accessor :name_raw + + # Mapped Electronic Verification response code for the customer’s phone number. + attr_accessor :phone_number + + # Raw Electronic Verification response code from the processor for the customer’s phone number. + attr_accessor :phone_number_raw + + # Mapped Electronic Verification response code for the customer’s street address. + attr_accessor :street + + # Raw Electronic Verification response code from the processor for the customer’s street address. + attr_accessor :street_raw + + # Mapped Electronic Verification response code for the customer’s postal code. + attr_accessor :postal_code + + # Raw Electronic Verification response code from the processor for the customer’s postal code. + attr_accessor :postal_code_raw + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'email' => :'email', + :'email_raw' => :'emailRaw', + :'name' => :'name', + :'name_raw' => :'nameRaw', + :'phone_number' => :'phoneNumber', + :'phone_number_raw' => :'phoneNumberRaw', + :'street' => :'street', + :'street_raw' => :'streetRaw', + :'postal_code' => :'postalCode', + :'postal_code_raw' => :'postalCodeRaw' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'email' => :'String', + :'email_raw' => :'String', + :'name' => :'String', + :'name_raw' => :'String', + :'phone_number' => :'String', + :'phone_number_raw' => :'String', + :'street' => :'String', + :'street_raw' => :'String', + :'postal_code' => :'String', + :'postal_code_raw' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.has_key?(:'emailRaw') + self.email_raw = attributes[:'emailRaw'] + end + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'nameRaw') + self.name_raw = attributes[:'nameRaw'] + end + + if attributes.has_key?(:'phoneNumber') + self.phone_number = attributes[:'phoneNumber'] + end + + if attributes.has_key?(:'phoneNumberRaw') + self.phone_number_raw = attributes[:'phoneNumberRaw'] + end + + if attributes.has_key?(:'street') + self.street = attributes[:'street'] + end + + if attributes.has_key?(:'streetRaw') + self.street_raw = attributes[:'streetRaw'] + end + + if attributes.has_key?(:'postalCode') + self.postal_code = attributes[:'postalCode'] + end + + if attributes.has_key?(:'postalCodeRaw') + self.postal_code_raw = attributes[:'postalCodeRaw'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@email.nil? && @email.to_s.length > 1 + invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 1.') + end + + if !@email_raw.nil? && @email_raw.to_s.length > 1 + invalid_properties.push('invalid value for "email_raw", the character length must be smaller than or equal to 1.') + end + + if !@name.nil? && @name.to_s.length > 30 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 30.') + end + + if !@name_raw.nil? && @name_raw.to_s.length > 30 + invalid_properties.push('invalid value for "name_raw", the character length must be smaller than or equal to 30.') + end + + if !@phone_number.nil? && @phone_number.to_s.length > 1 + invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 1.') + end + + if !@phone_number_raw.nil? && @phone_number_raw.to_s.length > 1 + invalid_properties.push('invalid value for "phone_number_raw", the character length must be smaller than or equal to 1.') + end + + if !@street.nil? && @street.to_s.length > 1 + invalid_properties.push('invalid value for "street", the character length must be smaller than or equal to 1.') + end + + if !@street_raw.nil? && @street_raw.to_s.length > 1 + invalid_properties.push('invalid value for "street_raw", the character length must be smaller than or equal to 1.') + end + + if !@postal_code.nil? && @postal_code.to_s.length > 1 + invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 1.') + end + + if !@postal_code_raw.nil? && @postal_code_raw.to_s.length > 1 + invalid_properties.push('invalid value for "postal_code_raw", the character length must be smaller than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@email.nil? && @email.to_s.length > 1 + return false if !@email_raw.nil? && @email_raw.to_s.length > 1 + return false if !@name.nil? && @name.to_s.length > 30 + return false if !@name_raw.nil? && @name_raw.to_s.length > 30 + return false if !@phone_number.nil? && @phone_number.to_s.length > 1 + return false if !@phone_number_raw.nil? && @phone_number_raw.to_s.length > 1 + return false if !@street.nil? && @street.to_s.length > 1 + return false if !@street_raw.nil? && @street_raw.to_s.length > 1 + return false if !@postal_code.nil? && @postal_code.to_s.length > 1 + return false if !@postal_code_raw.nil? && @postal_code_raw.to_s.length > 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] email Value to be assigned + def email=(email) + if !email.nil? && email.to_s.length > 1 + fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 1.' + end + + @email = email + end + + # Custom attribute writer method with validation + # @param [Object] email_raw Value to be assigned + def email_raw=(email_raw) + if !email_raw.nil? && email_raw.to_s.length > 1 + fail ArgumentError, 'invalid value for "email_raw", the character length must be smaller than or equal to 1.' + end + + @email_raw = email_raw + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if !name.nil? && name.to_s.length > 30 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 30.' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] name_raw Value to be assigned + def name_raw=(name_raw) + if !name_raw.nil? && name_raw.to_s.length > 30 + fail ArgumentError, 'invalid value for "name_raw", the character length must be smaller than or equal to 30.' + end + + @name_raw = name_raw + end + + # Custom attribute writer method with validation + # @param [Object] phone_number Value to be assigned + def phone_number=(phone_number) + if !phone_number.nil? && phone_number.to_s.length > 1 + fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 1.' + end + + @phone_number = phone_number + end + + # Custom attribute writer method with validation + # @param [Object] phone_number_raw Value to be assigned + def phone_number_raw=(phone_number_raw) + if !phone_number_raw.nil? && phone_number_raw.to_s.length > 1 + fail ArgumentError, 'invalid value for "phone_number_raw", the character length must be smaller than or equal to 1.' + end + + @phone_number_raw = phone_number_raw + end + + # Custom attribute writer method with validation + # @param [Object] street Value to be assigned + def street=(street) + if !street.nil? && street.to_s.length > 1 + fail ArgumentError, 'invalid value for "street", the character length must be smaller than or equal to 1.' + end + + @street = street + end + + # Custom attribute writer method with validation + # @param [Object] street_raw Value to be assigned + def street_raw=(street_raw) + if !street_raw.nil? && street_raw.to_s.length > 1 + fail ArgumentError, 'invalid value for "street_raw", the character length must be smaller than or equal to 1.' + end + + @street_raw = street_raw + end + + # Custom attribute writer method with validation + # @param [Object] postal_code Value to be assigned + def postal_code=(postal_code) + if !postal_code.nil? && postal_code.to_s.length > 1 + fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 1.' + end + + @postal_code = postal_code + end + + # Custom attribute writer method with validation + # @param [Object] postal_code_raw Value to be assigned + def postal_code_raw=(postal_code_raw) + if !postal_code_raw.nil? && postal_code_raw.to_s.length > 1 + fail ArgumentError, 'invalid value for "postal_code_raw", the character length must be smaller than or equal to 1.' + end + + @postal_code_raw = postal_code_raw + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email == o.email && + email_raw == o.email_raw && + name == o.name && + name_raw == o.name_raw && + phone_number == o.phone_number && + phone_number_raw == o.phone_number_raw && + street == o.street && + street_raw == o.street_raw && + postal_code == o.postal_code && + postal_code_raw == o.postal_code_raw + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [email, email_raw, name, name_raw, phone_number, phone_number_raw, street, street_raw, postal_code, postal_code_raw].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_processor.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_processor.rb new file mode 100644 index 00000000..7f3e6cb1 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_processor.rb @@ -0,0 +1,199 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseProcessorInformationProcessor + # Name of the Processor. + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'name' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@name.nil? && @name.to_s.length > 30 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 30.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@name.nil? && @name.to_s.length > 30 + true + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if !name.nil? && name.to_s.length > 30 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 30.' + end + + @name = name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_risk_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_risk_information.rb new file mode 100644 index 00000000..98cac23f --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_risk_information.rb @@ -0,0 +1,233 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseRiskInformation + attr_accessor :profile + + attr_accessor :rules + + attr_accessor :passive_profile + + attr_accessor :passive_rules + + attr_accessor :score + + # Time that the transaction was submitted in local time.. + attr_accessor :local_time + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'profile' => :'profile', + :'rules' => :'rules', + :'passive_profile' => :'passiveProfile', + :'passive_rules' => :'passiveRules', + :'score' => :'score', + :'local_time' => :'localTime' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'profile' => :'TssV2TransactionsGet200ResponseRiskInformationProfile', + :'rules' => :'Array', + :'passive_profile' => :'TssV2TransactionsGet200ResponseRiskInformationProfile', + :'passive_rules' => :'Array', + :'score' => :'TssV2TransactionsGet200ResponseRiskInformationScore', + :'local_time' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'profile') + self.profile = attributes[:'profile'] + end + + if attributes.has_key?(:'rules') + if (value = attributes[:'rules']).is_a?(Array) + self.rules = value + end + end + + if attributes.has_key?(:'passiveProfile') + self.passive_profile = attributes[:'passiveProfile'] + end + + if attributes.has_key?(:'passiveRules') + if (value = attributes[:'passiveRules']).is_a?(Array) + self.passive_rules = value + end + end + + if attributes.has_key?(:'score') + self.score = attributes[:'score'] + end + + if attributes.has_key?(:'localTime') + self.local_time = attributes[:'localTime'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + profile == o.profile && + rules == o.rules && + passive_profile == o.passive_profile && + passive_rules == o.passive_rules && + score == o.score && + local_time == o.local_time + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [profile, rules, passive_profile, passive_rules, score, local_time].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_risk_information_profile.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_risk_information_profile.rb new file mode 100644 index 00000000..b0c4f1cc --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_risk_information_profile.rb @@ -0,0 +1,194 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseRiskInformationProfile + # The description for this field is not available. + attr_accessor :name + + # The description for this field is not available. + attr_accessor :decision + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'decision' => :'decision' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'name' => :'String', + :'decision' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'decision') + self.decision = attributes[:'decision'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + decision == o.decision + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [name, decision].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_risk_information_score.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_risk_information_score.rb new file mode 100644 index 00000000..5870e909 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_risk_information_score.rb @@ -0,0 +1,196 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseRiskInformationScore + # Array of factor codes. + attr_accessor :factor_codes + + # The description for this field is not available. + attr_accessor :result + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'factor_codes' => :'factorCodes', + :'result' => :'result' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'factor_codes' => :'Array', + :'result' => :'Integer' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'factorCodes') + if (value = attributes[:'factorCodes']).is_a?(Array) + self.factor_codes = value + end + end + + if attributes.has_key?(:'result') + self.result = attributes[:'result'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + factor_codes == o.factor_codes && + result == o.result + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [factor_codes, result].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_sender_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_sender_information.rb new file mode 100644 index 00000000..4458f0aa --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_sender_information.rb @@ -0,0 +1,199 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsGet200ResponseSenderInformation + # Reference number generated by you that uniquely identifies the sender. + attr_accessor :reference_number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reference_number' => :'referenceNumber' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'reference_number' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'referenceNumber') + self.reference_number = attributes[:'referenceNumber'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@reference_number.nil? && @reference_number.to_s.length > 19 + invalid_properties.push('invalid value for "reference_number", the character length must be smaller than or equal to 19.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@reference_number.nil? && @reference_number.to_s.length > 19 + true + end + + # Custom attribute writer method with validation + # @param [Object] reference_number Value to be assigned + def reference_number=(reference_number) + if !reference_number.nil? && reference_number.to_s.length > 19 + fail ArgumentError, 'invalid value for "reference_number", the character length must be smaller than or equal to 19.' + end + + @reference_number = reference_number + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + reference_number == o.reference_number + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [reference_number].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response.rb new file mode 100644 index 00000000..0cc05453 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response.rb @@ -0,0 +1,317 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201Response + # An unique identification number assigned by CyberSource to identify the submitted request. + attr_accessor :id + + # save or not save. + attr_accessor :save + + # The description for this field is not available. + attr_accessor :name + + # Time Zone. + attr_accessor :timezone + + # transaction search query string. + attr_accessor :query + + # offset. + attr_accessor :offset + + # limit on number of results. + attr_accessor :limit + + # A comma separated list of the following form - fieldName1 asc or desc, fieldName2 asc or desc, etc. + attr_accessor :sort + + # Results for this page, this could be below the limit. + attr_accessor :count + + # total number of results. + attr_accessor :total_count + + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + attr_accessor :_embedded + + attr_accessor :_links + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'save' => :'save', + :'name' => :'name', + :'timezone' => :'timezone', + :'query' => :'query', + :'offset' => :'offset', + :'limit' => :'limit', + :'sort' => :'sort', + :'count' => :'count', + :'total_count' => :'totalCount', + :'submit_time_utc' => :'submitTimeUtc', + :'_embedded' => :'_embedded', + :'_links' => :'_links' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'id' => :'String', + :'save' => :'BOOLEAN', + :'name' => :'String', + :'timezone' => :'String', + :'query' => :'String', + :'offset' => :'Integer', + :'limit' => :'Integer', + :'sort' => :'String', + :'count' => :'Integer', + :'total_count' => :'Integer', + :'submit_time_utc' => :'String', + :'_embedded' => :'TssV2TransactionsPost201ResponseEmbedded', + :'_links' => :'PtsV2PaymentsReversalsPost201ResponseLinks' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'save') + self.save = attributes[:'save'] + end + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'timezone') + self.timezone = attributes[:'timezone'] + end + + if attributes.has_key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.has_key?(:'offset') + self.offset = attributes[:'offset'] + end + + if attributes.has_key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.has_key?(:'sort') + self.sort = attributes[:'sort'] + end + + if attributes.has_key?(:'count') + self.count = attributes[:'count'] + end + + if attributes.has_key?(:'totalCount') + self.total_count = attributes[:'totalCount'] + end + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + + if attributes.has_key?(:'_embedded') + self._embedded = attributes[:'_embedded'] + end + + if attributes.has_key?(:'_links') + self._links = attributes[:'_links'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@id.nil? && @id.to_s.length > 26 + invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@id.nil? && @id.to_s.length > 26 + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if !id.nil? && id.to_s.length > 26 + fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' + end + + @id = id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + save == o.save && + name == o.name && + timezone == o.timezone && + query == o.query && + offset == o.offset && + limit == o.limit && + sort == o.sort && + count == o.count && + total_count == o.total_count && + submit_time_utc == o.submit_time_utc && + _embedded == o._embedded && + _links == o._links + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [id, save, name, timezone, query, offset, limit, sort, count, total_count, submit_time_utc, _embedded, _links].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded.rb new file mode 100644 index 00000000..d3638eea --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded.rb @@ -0,0 +1,186 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbedded + # transaction search summary + attr_accessor :transaction_summaries + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'transaction_summaries' => :'transactionSummaries' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'transaction_summaries' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'transactionSummaries') + if (value = attributes[:'transactionSummaries']).is_a?(Array) + self.transaction_summaries = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + transaction_summaries == o.transaction_summaries + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [transaction_summaries].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded__links.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded__links.rb new file mode 100644 index 00000000..df3473ff --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded__links.rb @@ -0,0 +1,183 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedLinks + attr_accessor :transaction_detail + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'transaction_detail' => :'transactionDetail' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'transaction_detail' => :'PtsV2PaymentsPost201ResponseLinksSelf' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'transactionDetail') + self.transaction_detail = attributes[:'transactionDetail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + transaction_detail == o.transaction_detail + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [transaction_detail].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_buyer_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_buyer_information.rb new file mode 100644 index 00000000..1a24f75c --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_buyer_information.rb @@ -0,0 +1,199 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedBuyerInformation + # Your identifier for the customer. For processor-specific information, see the customer_account_id field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :merchant_customer_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'merchant_customer_id' => :'merchantCustomerId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'merchant_customer_id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'merchantCustomerId') + self.merchant_customer_id = attributes[:'merchantCustomerId'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@merchant_customer_id.nil? && @merchant_customer_id.to_s.length > 100 + invalid_properties.push('invalid value for "merchant_customer_id", the character length must be smaller than or equal to 100.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@merchant_customer_id.nil? && @merchant_customer_id.to_s.length > 100 + true + end + + # Custom attribute writer method with validation + # @param [Object] merchant_customer_id Value to be assigned + def merchant_customer_id=(merchant_customer_id) + if !merchant_customer_id.nil? && merchant_customer_id.to_s.length > 100 + fail ArgumentError, 'invalid value for "merchant_customer_id", the character length must be smaller than or equal to 100.' + end + + @merchant_customer_id = merchant_customer_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + merchant_customer_id == o.merchant_customer_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [merchant_customer_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_client_reference_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_client_reference_information.rb new file mode 100644 index 00000000..0383e6f0 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_client_reference_information.rb @@ -0,0 +1,219 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedClientReferenceInformation + # Client-generated order reference or tracking number. CyberSource recommends that you send a unique value for each transaction so that you can perform meaningful searches for the transaction. + attr_accessor :code + + # The application name of client which is used to submit the request. + attr_accessor :application_name + + # The description for this field is not available. + attr_accessor :application_user + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'application_name' => :'applicationName', + :'application_user' => :'applicationUser' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'String', + :'application_name' => :'String', + :'application_user' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.has_key?(:'applicationName') + self.application_name = attributes[:'applicationName'] + end + + if attributes.has_key?(:'applicationUser') + self.application_user = attributes[:'applicationUser'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@code.nil? && @code.to_s.length > 50 + invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 50.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@code.nil? && @code.to_s.length > 50 + true + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if !code.nil? && code.to_s.length > 50 + fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 50.' + end + + @code = code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + application_name == o.application_name && + application_user == o.application_user + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code, application_name, application_user].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_consumer_authentication_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_consumer_authentication_information.rb new file mode 100644 index 00000000..52f3609e --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_consumer_authentication_information.rb @@ -0,0 +1,209 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedConsumerAuthenticationInformation + # Transaction identifier. + attr_accessor :xid + + # Payer auth Transaction identifier. + attr_accessor :transaction_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'xid' => :'xid', + :'transaction_id' => :'transactionId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'xid' => :'String', + :'transaction_id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'xid') + self.xid = attributes[:'xid'] + end + + if attributes.has_key?(:'transactionId') + self.transaction_id = attributes[:'transactionId'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@xid.nil? && @xid.to_s.length > 40 + invalid_properties.push('invalid value for "xid", the character length must be smaller than or equal to 40.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@xid.nil? && @xid.to_s.length > 40 + true + end + + # Custom attribute writer method with validation + # @param [Object] xid Value to be assigned + def xid=(xid) + if !xid.nil? && xid.to_s.length > 40 + fail ArgumentError, 'invalid value for "xid", the character length must be smaller than or equal to 40.' + end + + @xid = xid + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + xid == o.xid && + transaction_id == o.transaction_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [xid, transaction_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_device_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_device_information.rb new file mode 100644 index 00000000..ae271d5c --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_device_information.rb @@ -0,0 +1,199 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedDeviceInformation + # IP address of the customer. + attr_accessor :ip_address + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ip_address' => :'ipAddress' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'ip_address' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'ipAddress') + self.ip_address = attributes[:'ipAddress'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@ip_address.nil? && @ip_address.to_s.length > 15 + invalid_properties.push('invalid value for "ip_address", the character length must be smaller than or equal to 15.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@ip_address.nil? && @ip_address.to_s.length > 15 + true + end + + # Custom attribute writer method with validation + # @param [Object] ip_address Value to be assigned + def ip_address=(ip_address) + if !ip_address.nil? && ip_address.to_s.length > 15 + fail ArgumentError, 'invalid value for "ip_address", the character length must be smaller than or equal to 15.' + end + + @ip_address = ip_address + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ip_address == o.ip_address + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [ip_address].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_merchant_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_merchant_information.rb new file mode 100644 index 00000000..cdf5ec18 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_merchant_information.rb @@ -0,0 +1,199 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedMerchantInformation + # An unique identification number assigned by CyberSource to identify the submitted request. + attr_accessor :reseller_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reseller_id' => :'resellerId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'reseller_id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'resellerId') + self.reseller_id = attributes[:'resellerId'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@reseller_id.nil? && @reseller_id.to_s.length > 26 + invalid_properties.push('invalid value for "reseller_id", the character length must be smaller than or equal to 26.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@reseller_id.nil? && @reseller_id.to_s.length > 26 + true + end + + # Custom attribute writer method with validation + # @param [Object] reseller_id Value to be assigned + def reseller_id=(reseller_id) + if !reseller_id.nil? && reseller_id.to_s.length > 26 + fail ArgumentError, 'invalid value for "reseller_id", the character length must be smaller than or equal to 26.' + end + + @reseller_id = reseller_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + reseller_id == o.reseller_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [reseller_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information.rb new file mode 100644 index 00000000..35787b51 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information.rb @@ -0,0 +1,201 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedOrderInformation + attr_accessor :bill_to + + attr_accessor :ship_to + + attr_accessor :amount_details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'bill_to' => :'billTo', + :'ship_to' => :'shipTo', + :'amount_details' => :'amountDetails' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'bill_to' => :'TssV2TransactionsPost201ResponseEmbeddedOrderInformationBillTo', + :'ship_to' => :'TssV2TransactionsPost201ResponseEmbeddedOrderInformationShipTo', + :'amount_details' => :'Ptsv2paymentsidreversalsReversalInformationAmountDetails' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'billTo') + self.bill_to = attributes[:'billTo'] + end + + if attributes.has_key?(:'shipTo') + self.ship_to = attributes[:'shipTo'] + end + + if attributes.has_key?(:'amountDetails') + self.amount_details = attributes[:'amountDetails'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + bill_to == o.bill_to && + ship_to == o.ship_to && + amount_details == o.amount_details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [bill_to, ship_to, amount_details].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information_bill_to.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information_bill_to.rb new file mode 100644 index 00000000..c8f2f15d --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information_bill_to.rb @@ -0,0 +1,299 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedOrderInformationBillTo + # Customer’s first name. This name must be the same as the name on the card. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the customer_firstname field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :first_name + + # Customer’s last name. This name must be the same as the name on the card. For Payouts: This field may be sent only for FDC Compass. For processor-specific information, see the customer_lastname field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :last_name + + # Customer's email address, including the full domain name. For processor-specific information, see the customer_email field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :email + + # Country of the billing address. Use the two-character ISO Standard Country Codes. For processor-specific information, see the bill_country field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :country + + # Customer’s phone number. For Payouts: This field may be sent only for FDC Compass. CyberSource recommends that you include the country code when the order is from outside the U.S. For processor-specific information, see the customer_phone field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :phone_number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'first_name' => :'firstName', + :'last_name' => :'lastName', + :'email' => :'email', + :'country' => :'country', + :'phone_number' => :'phoneNumber' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'first_name' => :'String', + :'last_name' => :'String', + :'email' => :'String', + :'country' => :'String', + :'phone_number' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'firstName') + self.first_name = attributes[:'firstName'] + end + + if attributes.has_key?(:'lastName') + self.last_name = attributes[:'lastName'] + end + + if attributes.has_key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.has_key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.has_key?(:'phoneNumber') + self.phone_number = attributes[:'phoneNumber'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@first_name.nil? && @first_name.to_s.length > 60 + invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 60.') + end + + if !@last_name.nil? && @last_name.to_s.length > 60 + invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 60.') + end + + if !@email.nil? && @email.to_s.length > 255 + invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 255.') + end + + if !@country.nil? && @country.to_s.length > 2 + invalid_properties.push('invalid value for "country", the character length must be smaller than or equal to 2.') + end + + if !@phone_number.nil? && @phone_number.to_s.length > 15 + invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 15.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@first_name.nil? && @first_name.to_s.length > 60 + return false if !@last_name.nil? && @last_name.to_s.length > 60 + return false if !@email.nil? && @email.to_s.length > 255 + return false if !@country.nil? && @country.to_s.length > 2 + return false if !@phone_number.nil? && @phone_number.to_s.length > 15 + true + end + + # Custom attribute writer method with validation + # @param [Object] first_name Value to be assigned + def first_name=(first_name) + if !first_name.nil? && first_name.to_s.length > 60 + fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 60.' + end + + @first_name = first_name + end + + # Custom attribute writer method with validation + # @param [Object] last_name Value to be assigned + def last_name=(last_name) + if !last_name.nil? && last_name.to_s.length > 60 + fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 60.' + end + + @last_name = last_name + end + + # Custom attribute writer method with validation + # @param [Object] email Value to be assigned + def email=(email) + if !email.nil? && email.to_s.length > 255 + fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 255.' + end + + @email = email + end + + # Custom attribute writer method with validation + # @param [Object] country Value to be assigned + def country=(country) + if !country.nil? && country.to_s.length > 2 + fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 2.' + end + + @country = country + end + + # Custom attribute writer method with validation + # @param [Object] phone_number Value to be assigned + def phone_number=(phone_number) + if !phone_number.nil? && phone_number.to_s.length > 15 + fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 15.' + end + + @phone_number = phone_number + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + first_name == o.first_name && + last_name == o.last_name && + email == o.email && + country == o.country && + phone_number == o.phone_number + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [first_name, last_name, email, country, phone_number].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information_ship_to.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information_ship_to.rb new file mode 100644 index 00000000..ff431813 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information_ship_to.rb @@ -0,0 +1,299 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedOrderInformationShipTo + # First name of the recipient. **Processor specific maximum length** - Litle: 25 - All other processors: 60 + attr_accessor :first_name + + # Last name of the recipient. **Processor specific maximum length** - Litle: 25 - All other processors: 60 + attr_accessor :last_name + + # First line of the shipping address. + attr_accessor :address1 + + # Country of the shipping address. Use the two character ISO Standard Country Codes. + attr_accessor :country + + # Phone number for the shipping address. + attr_accessor :phone_number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'first_name' => :'firstName', + :'last_name' => :'lastName', + :'address1' => :'address1', + :'country' => :'country', + :'phone_number' => :'phoneNumber' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'first_name' => :'String', + :'last_name' => :'String', + :'address1' => :'String', + :'country' => :'String', + :'phone_number' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'firstName') + self.first_name = attributes[:'firstName'] + end + + if attributes.has_key?(:'lastName') + self.last_name = attributes[:'lastName'] + end + + if attributes.has_key?(:'address1') + self.address1 = attributes[:'address1'] + end + + if attributes.has_key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.has_key?(:'phoneNumber') + self.phone_number = attributes[:'phoneNumber'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@first_name.nil? && @first_name.to_s.length > 60 + invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 60.') + end + + if !@last_name.nil? && @last_name.to_s.length > 60 + invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 60.') + end + + if !@address1.nil? && @address1.to_s.length > 60 + invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 60.') + end + + if !@country.nil? && @country.to_s.length > 2 + invalid_properties.push('invalid value for "country", the character length must be smaller than or equal to 2.') + end + + if !@phone_number.nil? && @phone_number.to_s.length > 15 + invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 15.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@first_name.nil? && @first_name.to_s.length > 60 + return false if !@last_name.nil? && @last_name.to_s.length > 60 + return false if !@address1.nil? && @address1.to_s.length > 60 + return false if !@country.nil? && @country.to_s.length > 2 + return false if !@phone_number.nil? && @phone_number.to_s.length > 15 + true + end + + # Custom attribute writer method with validation + # @param [Object] first_name Value to be assigned + def first_name=(first_name) + if !first_name.nil? && first_name.to_s.length > 60 + fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 60.' + end + + @first_name = first_name + end + + # Custom attribute writer method with validation + # @param [Object] last_name Value to be assigned + def last_name=(last_name) + if !last_name.nil? && last_name.to_s.length > 60 + fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 60.' + end + + @last_name = last_name + end + + # Custom attribute writer method with validation + # @param [Object] address1 Value to be assigned + def address1=(address1) + if !address1.nil? && address1.to_s.length > 60 + fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 60.' + end + + @address1 = address1 + end + + # Custom attribute writer method with validation + # @param [Object] country Value to be assigned + def country=(country) + if !country.nil? && country.to_s.length > 2 + fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 2.' + end + + @country = country + end + + # Custom attribute writer method with validation + # @param [Object] phone_number Value to be assigned + def phone_number=(phone_number) + if !phone_number.nil? && phone_number.to_s.length > 15 + fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 15.' + end + + @phone_number = phone_number + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + first_name == o.first_name && + last_name == o.last_name && + address1 == o.address1 && + country == o.country && + phone_number == o.phone_number + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [first_name, last_name, address1, country, phone_number].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information.rb new file mode 100644 index 00000000..8cfba88f --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information.rb @@ -0,0 +1,201 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedPaymentInformation + attr_accessor :payment_method + + attr_accessor :customer + + attr_accessor :card + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'payment_method' => :'paymentMethod', + :'customer' => :'customer', + :'card' => :'card' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'payment_method' => :'TssV2TransactionsPost201ResponseEmbeddedPaymentInformationPaymentMethod', + :'customer' => :'Ptsv2paymentsPaymentInformationCustomer', + :'card' => :'TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCard' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'paymentMethod') + self.payment_method = attributes[:'paymentMethod'] + end + + if attributes.has_key?(:'customer') + self.customer = attributes[:'customer'] + end + + if attributes.has_key?(:'card') + self.card = attributes[:'card'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + payment_method == o.payment_method && + customer == o.customer && + card == o.card + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [payment_method, customer, card].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_card.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_card.rb new file mode 100644 index 00000000..9e2851cf --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_card.rb @@ -0,0 +1,249 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCard + # Last four digits of the cardholder’s account number. This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. + attr_accessor :suffix + + # The description for this field is not available. + attr_accessor :prefix + + # Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'suffix' => :'suffix', + :'prefix' => :'prefix', + :'type' => :'type' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'suffix' => :'String', + :'prefix' => :'String', + :'type' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'suffix') + self.suffix = attributes[:'suffix'] + end + + if attributes.has_key?(:'prefix') + self.prefix = attributes[:'prefix'] + end + + if attributes.has_key?(:'type') + self.type = attributes[:'type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@suffix.nil? && @suffix.to_s.length > 4 + invalid_properties.push('invalid value for "suffix", the character length must be smaller than or equal to 4.') + end + + if !@prefix.nil? && @prefix.to_s.length > 6 + invalid_properties.push('invalid value for "prefix", the character length must be smaller than or equal to 6.') + end + + if !@type.nil? && @type.to_s.length > 3 + invalid_properties.push('invalid value for "type", the character length must be smaller than or equal to 3.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@suffix.nil? && @suffix.to_s.length > 4 + return false if !@prefix.nil? && @prefix.to_s.length > 6 + return false if !@type.nil? && @type.to_s.length > 3 + true + end + + # Custom attribute writer method with validation + # @param [Object] suffix Value to be assigned + def suffix=(suffix) + if !suffix.nil? && suffix.to_s.length > 4 + fail ArgumentError, 'invalid value for "suffix", the character length must be smaller than or equal to 4.' + end + + @suffix = suffix + end + + # Custom attribute writer method with validation + # @param [Object] prefix Value to be assigned + def prefix=(prefix) + if !prefix.nil? && prefix.to_s.length > 6 + fail ArgumentError, 'invalid value for "prefix", the character length must be smaller than or equal to 6.' + end + + @prefix = prefix + end + + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if !type.nil? && type.to_s.length > 3 + fail ArgumentError, 'invalid value for "type", the character length must be smaller than or equal to 3.' + end + + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + suffix == o.suffix && + prefix == o.prefix && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [suffix, prefix, type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_payment_method.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_payment_method.rb new file mode 100644 index 00000000..d28b7a8b --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_payment_method.rb @@ -0,0 +1,184 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedPaymentInformationPaymentMethod + # The description for this field is not available. + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'type' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'type') + self.type = attributes[:'type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information.rb new file mode 100644 index 00000000..c1f108c1 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information.rb @@ -0,0 +1,228 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformation + # Identifier for the terminal at your retail location. You can define this value yourself, but consult the processor for requirements. For Payouts: This field is applicable for CtV. + attr_accessor :terminal_id + + # The description for this field is not available. + attr_accessor :terminal_serial_number + + # The description for this field is not available. + attr_accessor :device_id + + attr_accessor :partner + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'terminal_id' => :'terminalId', + :'terminal_serial_number' => :'terminalSerialNumber', + :'device_id' => :'deviceId', + :'partner' => :'partner' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'terminal_id' => :'String', + :'terminal_serial_number' => :'String', + :'device_id' => :'String', + :'partner' => :'TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformationPartner' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'terminalId') + self.terminal_id = attributes[:'terminalId'] + end + + if attributes.has_key?(:'terminalSerialNumber') + self.terminal_serial_number = attributes[:'terminalSerialNumber'] + end + + if attributes.has_key?(:'deviceId') + self.device_id = attributes[:'deviceId'] + end + + if attributes.has_key?(:'partner') + self.partner = attributes[:'partner'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@terminal_id.nil? && @terminal_id.to_s.length > 8 + invalid_properties.push('invalid value for "terminal_id", the character length must be smaller than or equal to 8.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@terminal_id.nil? && @terminal_id.to_s.length > 8 + true + end + + # Custom attribute writer method with validation + # @param [Object] terminal_id Value to be assigned + def terminal_id=(terminal_id) + if !terminal_id.nil? && terminal_id.to_s.length > 8 + fail ArgumentError, 'invalid value for "terminal_id", the character length must be smaller than or equal to 8.' + end + + @terminal_id = terminal_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + terminal_id == o.terminal_id && + terminal_serial_number == o.terminal_serial_number && + device_id == o.device_id && + partner == o.partner + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [terminal_id, terminal_serial_number, device_id, partner].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information_partner.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information_partner.rb new file mode 100644 index 00000000..732a1e14 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information_partner.rb @@ -0,0 +1,199 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformationPartner + # Network transaction identifier (TID). You can use this value to identify a specific transaction when you are discussing the transaction with your processor. Not all processors provide this value. + attr_accessor :original_transaction_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'original_transaction_id' => :'originalTransactionId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'original_transaction_id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'originalTransactionId') + self.original_transaction_id = attributes[:'originalTransactionId'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@original_transaction_id.nil? && @original_transaction_id.to_s.length > 50 + invalid_properties.push('invalid value for "original_transaction_id", the character length must be smaller than or equal to 50.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@original_transaction_id.nil? && @original_transaction_id.to_s.length > 50 + true + end + + # Custom attribute writer method with validation + # @param [Object] original_transaction_id Value to be assigned + def original_transaction_id=(original_transaction_id) + if !original_transaction_id.nil? && original_transaction_id.to_s.length > 50 + fail ArgumentError, 'invalid value for "original_transaction_id", the character length must be smaller than or equal to 50.' + end + + @original_transaction_id = original_transaction_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + original_transaction_id == o.original_transaction_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [original_transaction_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processing_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processing_information.rb new file mode 100644 index 00000000..1f15b3a2 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processing_information.rb @@ -0,0 +1,209 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedProcessingInformation + # Type of digital payment solution that is being used for the transaction. Possible Values: - **visacheckout**: Visa Checkout. - **001**: Apple Pay. - **005**: Masterpass. Required for Masterpass transactions on OmniPay Direct. - **006**: Android Pay. - **008**: Samsung Pay. + attr_accessor :payment_solution + + # The description for this field is not available. + attr_accessor :business_application_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'payment_solution' => :'paymentSolution', + :'business_application_id' => :'businessApplicationId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'payment_solution' => :'String', + :'business_application_id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'paymentSolution') + self.payment_solution = attributes[:'paymentSolution'] + end + + if attributes.has_key?(:'businessApplicationId') + self.business_application_id = attributes[:'businessApplicationId'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@payment_solution.nil? && @payment_solution.to_s.length > 12 + invalid_properties.push('invalid value for "payment_solution", the character length must be smaller than or equal to 12.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@payment_solution.nil? && @payment_solution.to_s.length > 12 + true + end + + # Custom attribute writer method with validation + # @param [Object] payment_solution Value to be assigned + def payment_solution=(payment_solution) + if !payment_solution.nil? && payment_solution.to_s.length > 12 + fail ArgumentError, 'invalid value for "payment_solution", the character length must be smaller than or equal to 12.' + end + + @payment_solution = payment_solution + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + payment_solution == o.payment_solution && + business_application_id == o.business_application_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [payment_solution, business_application_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processor_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processor_information.rb new file mode 100644 index 00000000..44025744 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processor_information.rb @@ -0,0 +1,183 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedProcessorInformation + attr_accessor :processor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'processor' => :'processor' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'processor' => :'TssV2TransactionsGet200ResponseProcessorInformationProcessor' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'processor') + self.processor = attributes[:'processor'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + processor == o.processor + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [processor].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_risk_information.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_risk_information.rb new file mode 100644 index 00000000..2cab7dd8 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_risk_information.rb @@ -0,0 +1,183 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedRiskInformation + attr_accessor :providers + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'providers' => :'providers' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'providers' => :'TssV2TransactionsPost201ResponseEmbeddedRiskInformationProviders' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'providers') + self.providers = attributes[:'providers'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + providers == o.providers + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [providers].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_risk_information_providers.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_risk_information_providers.rb new file mode 100644 index 00000000..53496f6b --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_risk_information_providers.rb @@ -0,0 +1,183 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedRiskInformationProviders + attr_accessor :fingerprint + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fingerprint' => :'fingerprint' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'fingerprint' => :'TssV2TransactionsPost201ResponseEmbeddedRiskInformationProvidersFingerprint' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'fingerprint') + self.fingerprint = attributes[:'fingerprint'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + fingerprint == o.fingerprint + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [fingerprint].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_risk_information_providers_fingerprint.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_risk_information_providers_fingerprint.rb new file mode 100644 index 00000000..1be00032 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_risk_information_providers_fingerprint.rb @@ -0,0 +1,249 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedRiskInformationProvidersFingerprint + # The description for this field is not available. + attr_accessor :true_ipaddress + + # The description for this field is not available. + attr_accessor :hash + + # The description for this field is not available. + attr_accessor :smart_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'true_ipaddress' => :'true_ipaddress', + :'hash' => :'hash', + :'smart_id' => :'smartId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'true_ipaddress' => :'String', + :'hash' => :'String', + :'smart_id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'true_ipaddress') + self.true_ipaddress = attributes[:'true_ipaddress'] + end + + if attributes.has_key?(:'hash') + self.hash = attributes[:'hash'] + end + + if attributes.has_key?(:'smartId') + self.smart_id = attributes[:'smartId'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@true_ipaddress.nil? && @true_ipaddress.to_s.length > 255 + invalid_properties.push('invalid value for "true_ipaddress", the character length must be smaller than or equal to 255.') + end + + if !@hash.nil? && @hash.to_s.length > 255 + invalid_properties.push('invalid value for "hash", the character length must be smaller than or equal to 255.') + end + + if !@smart_id.nil? && @smart_id.to_s.length > 255 + invalid_properties.push('invalid value for "smart_id", the character length must be smaller than or equal to 255.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@true_ipaddress.nil? && @true_ipaddress.to_s.length > 255 + return false if !@hash.nil? && @hash.to_s.length > 255 + return false if !@smart_id.nil? && @smart_id.to_s.length > 255 + true + end + + # Custom attribute writer method with validation + # @param [Object] true_ipaddress Value to be assigned + def true_ipaddress=(true_ipaddress) + if !true_ipaddress.nil? && true_ipaddress.to_s.length > 255 + fail ArgumentError, 'invalid value for "true_ipaddress", the character length must be smaller than or equal to 255.' + end + + @true_ipaddress = true_ipaddress + end + + # Custom attribute writer method with validation + # @param [Object] hash Value to be assigned + def hash=(hash) + if !hash.nil? && hash.to_s.length > 255 + fail ArgumentError, 'invalid value for "hash", the character length must be smaller than or equal to 255.' + end + + @hash = hash + end + + # Custom attribute writer method with validation + # @param [Object] smart_id Value to be assigned + def smart_id=(smart_id) + if !smart_id.nil? && smart_id.to_s.length > 255 + fail ArgumentError, 'invalid value for "smart_id", the character length must be smaller than or equal to 255.' + end + + @smart_id = smart_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + true_ipaddress == o.true_ipaddress && + hash == o.hash && + smart_id == o.smart_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [true_ipaddress, hash, smart_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_transaction_summaries.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_transaction_summaries.rb new file mode 100644 index 00000000..58afae0b --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_transaction_summaries.rb @@ -0,0 +1,357 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost201ResponseEmbeddedTransactionSummaries + # An unique identification number assigned by CyberSource to identify the submitted request. + attr_accessor :id + + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # The description for this field is not available. + attr_accessor :merchant_id + + attr_accessor :application_information + + attr_accessor :buyer_information + + attr_accessor :client_reference_information + + attr_accessor :consumer_authentication_information + + attr_accessor :device_information + + attr_accessor :fraud_marking_information + + # The description for this field is not available. + attr_accessor :merchant_defined_information + + attr_accessor :merchant_information + + attr_accessor :order_information + + attr_accessor :payment_information + + attr_accessor :processing_information + + attr_accessor :processor_information + + attr_accessor :point_of_sale_information + + attr_accessor :risk_information + + attr_accessor :_links + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'submit_time_utc' => :'submitTimeUtc', + :'merchant_id' => :'merchantId', + :'application_information' => :'applicationInformation', + :'buyer_information' => :'buyerInformation', + :'client_reference_information' => :'clientReferenceInformation', + :'consumer_authentication_information' => :'consumerAuthenticationInformation', + :'device_information' => :'deviceInformation', + :'fraud_marking_information' => :'fraudMarkingInformation', + :'merchant_defined_information' => :'merchantDefinedInformation', + :'merchant_information' => :'merchantInformation', + :'order_information' => :'orderInformation', + :'payment_information' => :'paymentInformation', + :'processing_information' => :'processingInformation', + :'processor_information' => :'processorInformation', + :'point_of_sale_information' => :'pointOfSaleInformation', + :'risk_information' => :'riskInformation', + :'_links' => :'_links' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'id' => :'String', + :'submit_time_utc' => :'String', + :'merchant_id' => :'String', + :'application_information' => :'TssV2TransactionsGet200ResponseApplicationInformation', + :'buyer_information' => :'TssV2TransactionsPost201ResponseEmbeddedBuyerInformation', + :'client_reference_information' => :'TssV2TransactionsPost201ResponseEmbeddedClientReferenceInformation', + :'consumer_authentication_information' => :'TssV2TransactionsPost201ResponseEmbeddedConsumerAuthenticationInformation', + :'device_information' => :'TssV2TransactionsPost201ResponseEmbeddedDeviceInformation', + :'fraud_marking_information' => :'TssV2TransactionsGet200ResponseFraudMarkingInformation', + :'merchant_defined_information' => :'Array', + :'merchant_information' => :'TssV2TransactionsPost201ResponseEmbeddedMerchantInformation', + :'order_information' => :'TssV2TransactionsPost201ResponseEmbeddedOrderInformation', + :'payment_information' => :'TssV2TransactionsPost201ResponseEmbeddedPaymentInformation', + :'processing_information' => :'TssV2TransactionsPost201ResponseEmbeddedProcessingInformation', + :'processor_information' => :'TssV2TransactionsPost201ResponseEmbeddedProcessorInformation', + :'point_of_sale_information' => :'TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformation', + :'risk_information' => :'TssV2TransactionsPost201ResponseEmbeddedRiskInformation', + :'_links' => :'TssV2TransactionsPost201ResponseEmbeddedLinks' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + + if attributes.has_key?(:'merchantId') + self.merchant_id = attributes[:'merchantId'] + end + + if attributes.has_key?(:'applicationInformation') + self.application_information = attributes[:'applicationInformation'] + end + + if attributes.has_key?(:'buyerInformation') + self.buyer_information = attributes[:'buyerInformation'] + end + + if attributes.has_key?(:'clientReferenceInformation') + self.client_reference_information = attributes[:'clientReferenceInformation'] + end + + if attributes.has_key?(:'consumerAuthenticationInformation') + self.consumer_authentication_information = attributes[:'consumerAuthenticationInformation'] + end + + if attributes.has_key?(:'deviceInformation') + self.device_information = attributes[:'deviceInformation'] + end + + if attributes.has_key?(:'fraudMarkingInformation') + self.fraud_marking_information = attributes[:'fraudMarkingInformation'] + end + + if attributes.has_key?(:'merchantDefinedInformation') + if (value = attributes[:'merchantDefinedInformation']).is_a?(Array) + self.merchant_defined_information = value + end + end + + if attributes.has_key?(:'merchantInformation') + self.merchant_information = attributes[:'merchantInformation'] + end + + if attributes.has_key?(:'orderInformation') + self.order_information = attributes[:'orderInformation'] + end + + if attributes.has_key?(:'paymentInformation') + self.payment_information = attributes[:'paymentInformation'] + end + + if attributes.has_key?(:'processingInformation') + self.processing_information = attributes[:'processingInformation'] + end + + if attributes.has_key?(:'processorInformation') + self.processor_information = attributes[:'processorInformation'] + end + + if attributes.has_key?(:'pointOfSaleInformation') + self.point_of_sale_information = attributes[:'pointOfSaleInformation'] + end + + if attributes.has_key?(:'riskInformation') + self.risk_information = attributes[:'riskInformation'] + end + + if attributes.has_key?(:'_links') + self._links = attributes[:'_links'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@id.nil? && @id.to_s.length > 26 + invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@id.nil? && @id.to_s.length > 26 + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if !id.nil? && id.to_s.length > 26 + fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.' + end + + @id = id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + submit_time_utc == o.submit_time_utc && + merchant_id == o.merchant_id && + application_information == o.application_information && + buyer_information == o.buyer_information && + client_reference_information == o.client_reference_information && + consumer_authentication_information == o.consumer_authentication_information && + device_information == o.device_information && + fraud_marking_information == o.fraud_marking_information && + merchant_defined_information == o.merchant_defined_information && + merchant_information == o.merchant_information && + order_information == o.order_information && + payment_information == o.payment_information && + processing_information == o.processing_information && + processor_information == o.processor_information && + point_of_sale_information == o.point_of_sale_information && + risk_information == o.risk_information && + _links == o._links + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [id, submit_time_utc, merchant_id, application_information, buyer_information, client_reference_information, consumer_authentication_information, device_information, fraud_marking_information, merchant_defined_information, merchant_information, order_information, payment_information, processing_information, processor_information, point_of_sale_information, risk_information, _links].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post400_response.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post400_response.rb new file mode 100644 index 00000000..22e5402a --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post400_response.rb @@ -0,0 +1,249 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPost400Response + # Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. + attr_accessor :submit_time_utc + + # The status of the submitted transaction. + attr_accessor :status + + # The detail message related to the status and reason listed above. + attr_accessor :message + + attr_accessor :details + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'submit_time_utc' => :'submitTimeUtc', + :'status' => :'status', + :'message' => :'message', + :'details' => :'details' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'submit_time_utc' => :'String', + :'status' => :'String', + :'message' => :'String', + :'details' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'submitTimeUtc') + self.submit_time_utc = attributes[:'submitTimeUtc'] + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.has_key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + status_validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST']) + unless validator.valid?(status) + fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + submit_time_utc == o.submit_time_utc && + status == o.status && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [submit_time_utc, status, message, details].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tss_v2_transactions_post_response.rb b/lib/cybersource_rest_client/models/tss_v2_transactions_post_response.rb new file mode 100644 index 00000000..374ba965 --- /dev/null +++ b/lib/cybersource_rest_client/models/tss_v2_transactions_post_response.rb @@ -0,0 +1,244 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class TssV2TransactionsPostResponse + # save or not save. + attr_accessor :save + + # The description for this field is not available. + attr_accessor :name + + # Time Zone. + attr_accessor :timezone + + # transaction search query string. + attr_accessor :query + + # offset. + attr_accessor :offset + + # limit on number of results. + attr_accessor :limit + + # A comma separated list of the following form - fieldName1 asc or desc, fieldName2 asc or desc, etc. + attr_accessor :sort + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'save' => :'save', + :'name' => :'name', + :'timezone' => :'timezone', + :'query' => :'query', + :'offset' => :'offset', + :'limit' => :'limit', + :'sort' => :'sort' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'save' => :'BOOLEAN', + :'name' => :'String', + :'timezone' => :'String', + :'query' => :'String', + :'offset' => :'Integer', + :'limit' => :'Integer', + :'sort' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'save') + self.save = attributes[:'save'] + end + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'timezone') + self.timezone = attributes[:'timezone'] + end + + if attributes.has_key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.has_key?(:'offset') + self.offset = attributes[:'offset'] + end + + if attributes.has_key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.has_key?(:'sort') + self.sort = attributes[:'sort'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + save == o.save && + name == o.name && + timezone == o.timezone && + query == o.query && + offset == o.offset && + limit == o.limit && + sort == o.sort + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [save, name, timezone, query, offset, limit, sort].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ums_v1_users_get200_response.rb b/lib/cybersource_rest_client/models/ums_v1_users_get200_response.rb new file mode 100644 index 00000000..8de0e748 --- /dev/null +++ b/lib/cybersource_rest_client/models/ums_v1_users_get200_response.rb @@ -0,0 +1,185 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class UmsV1UsersGet200Response + attr_accessor :users + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'users' => :'users' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'users' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'users') + if (value = attributes[:'users']).is_a?(Array) + self.users = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + users == o.users + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [users].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ums_v1_users_get200_response_account_information.rb b/lib/cybersource_rest_client/models/ums_v1_users_get200_response_account_information.rb new file mode 100644 index 00000000..aa7dfac1 --- /dev/null +++ b/lib/cybersource_rest_client/models/ums_v1_users_get200_response_account_information.rb @@ -0,0 +1,282 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class UmsV1UsersGet200ResponseAccountInformation + attr_accessor :user_name + + attr_accessor :role_id + + attr_accessor :permissions + + attr_accessor :status + + attr_accessor :created_time + + attr_accessor :last_access_time + + attr_accessor :language_preference + + attr_accessor :timezone + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_name' => :'userName', + :'role_id' => :'roleId', + :'permissions' => :'permissions', + :'status' => :'status', + :'created_time' => :'createdTime', + :'last_access_time' => :'lastAccessTime', + :'language_preference' => :'languagePreference', + :'timezone' => :'timezone' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'user_name' => :'String', + :'role_id' => :'String', + :'permissions' => :'Array', + :'status' => :'String', + :'created_time' => :'DateTime', + :'last_access_time' => :'DateTime', + :'language_preference' => :'String', + :'timezone' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'userName') + self.user_name = attributes[:'userName'] + end + + if attributes.has_key?(:'roleId') + self.role_id = attributes[:'roleId'] + end + + if attributes.has_key?(:'permissions') + if (value = attributes[:'permissions']).is_a?(Array) + self.permissions = value + end + end + + if attributes.has_key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.has_key?(:'createdTime') + self.created_time = attributes[:'createdTime'] + end + + if attributes.has_key?(:'lastAccessTime') + self.last_access_time = attributes[:'lastAccessTime'] + end + + if attributes.has_key?(:'languagePreference') + self.language_preference = attributes[:'languagePreference'] + end + + if attributes.has_key?(:'timezone') + self.timezone = attributes[:'timezone'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + status_validator = EnumAttributeValidator.new('String', ['active', 'inactive', 'locked', 'disabled', 'forgotpassword', 'deleted']) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ['active', 'inactive', 'locked', 'disabled', 'forgotpassword', 'deleted']) + unless validator.valid?(status) + fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.' + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_name == o.user_name && + role_id == o.role_id && + permissions == o.permissions && + status == o.status && + created_time == o.created_time && + last_access_time == o.last_access_time && + language_preference == o.language_preference && + timezone == o.timezone + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [user_name, role_id, permissions, status, created_time, last_access_time, language_preference, timezone].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ums_v1_users_get200_response_contact_information.rb b/lib/cybersource_rest_client/models/ums_v1_users_get200_response_contact_information.rb new file mode 100644 index 00000000..766f437a --- /dev/null +++ b/lib/cybersource_rest_client/models/ums_v1_users_get200_response_contact_information.rb @@ -0,0 +1,210 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class UmsV1UsersGet200ResponseContactInformation + attr_accessor :email + + attr_accessor :phone_number + + attr_accessor :first_name + + attr_accessor :last_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'email' => :'email', + :'phone_number' => :'phoneNumber', + :'first_name' => :'firstName', + :'last_name' => :'lastName' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'email' => :'String', + :'phone_number' => :'String', + :'first_name' => :'String', + :'last_name' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.has_key?(:'phoneNumber') + self.phone_number = attributes[:'phoneNumber'] + end + + if attributes.has_key?(:'firstName') + self.first_name = attributes[:'firstName'] + end + + if attributes.has_key?(:'lastName') + self.last_name = attributes[:'lastName'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email == o.email && + phone_number == o.phone_number && + first_name == o.first_name && + last_name == o.last_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [email, phone_number, first_name, last_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ums_v1_users_get200_response_organization_information.rb b/lib/cybersource_rest_client/models/ums_v1_users_get200_response_organization_information.rb new file mode 100644 index 00000000..18ce92f0 --- /dev/null +++ b/lib/cybersource_rest_client/models/ums_v1_users_get200_response_organization_information.rb @@ -0,0 +1,183 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class UmsV1UsersGet200ResponseOrganizationInformation + attr_accessor :organization_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'organization_id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'organizationId') + self.organization_id = attributes[:'organizationId'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [organization_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ums_v1_users_get200_response_users.rb b/lib/cybersource_rest_client/models/ums_v1_users_get200_response_users.rb new file mode 100644 index 00000000..1c3c76b9 --- /dev/null +++ b/lib/cybersource_rest_client/models/ums_v1_users_get200_response_users.rb @@ -0,0 +1,201 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class UmsV1UsersGet200ResponseUsers + attr_accessor :account_information + + attr_accessor :organization_information + + attr_accessor :contact_information + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'account_information' => :'accountInformation', + :'organization_information' => :'organizationInformation', + :'contact_information' => :'contactInformation' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'account_information' => :'UmsV1UsersGet200ResponseAccountInformation', + :'organization_information' => :'UmsV1UsersGet200ResponseOrganizationInformation', + :'contact_information' => :'UmsV1UsersGet200ResponseContactInformation' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'accountInformation') + self.account_information = attributes[:'accountInformation'] + end + + if attributes.has_key?(:'organizationInformation') + self.organization_information = attributes[:'organizationInformation'] + end + + if attributes.has_key?(:'contactInformation') + self.contact_information = attributes[:'contactInformation'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_information == o.account_information && + organization_information == o.organization_information && + contact_information == o.contact_information + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [account_information, organization_information, contact_information].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/v1_file_details_get200_response.rb b/lib/cybersource_rest_client/models/v1_file_details_get200_response.rb new file mode 100644 index 00000000..ed355854 --- /dev/null +++ b/lib/cybersource_rest_client/models/v1_file_details_get200_response.rb @@ -0,0 +1,194 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class V1FileDetailsGet200Response + attr_accessor :file_details + + attr_accessor :_links + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'file_details' => :'fileDetails', + :'_links' => :'_links' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'file_details' => :'Array', + :'_links' => :'V1FileDetailsGet200ResponseLinks' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'fileDetails') + if (value = attributes[:'fileDetails']).is_a?(Array) + self.file_details = value + end + end + + if attributes.has_key?(:'_links') + self._links = attributes[:'_links'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + file_details == o.file_details && + _links == o._links + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [file_details, _links].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/v1_file_details_get200_response__links.rb b/lib/cybersource_rest_client/models/v1_file_details_get200_response__links.rb new file mode 100644 index 00000000..791af8dc --- /dev/null +++ b/lib/cybersource_rest_client/models/v1_file_details_get200_response__links.rb @@ -0,0 +1,194 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class V1FileDetailsGet200ResponseLinks + attr_accessor :_self + + attr_accessor :files + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_self' => :'self', + :'files' => :'files' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_self' => :'V1FileDetailsGet200ResponseLinksSelf', + :'files' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'self') + self._self = attributes[:'self'] + end + + if attributes.has_key?(:'files') + if (value = attributes[:'files']).is_a?(Array) + self.files = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _self == o._self && + files == o.files + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [_self, files].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/v1_file_details_get200_response__links_files.rb b/lib/cybersource_rest_client/models/v1_file_details_get200_response__links_files.rb new file mode 100644 index 00000000..9cd4a98e --- /dev/null +++ b/lib/cybersource_rest_client/models/v1_file_details_get200_response__links_files.rb @@ -0,0 +1,202 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class V1FileDetailsGet200ResponseLinksFiles + # Unique identifier for each file + attr_accessor :file_id + + attr_accessor :href + + attr_accessor :method + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'file_id' => :'fileId', + :'href' => :'href', + :'method' => :'method' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'file_id' => :'String', + :'href' => :'String', + :'method' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'fileId') + self.file_id = attributes[:'fileId'] + end + + if attributes.has_key?(:'href') + self.href = attributes[:'href'] + end + + if attributes.has_key?(:'method') + self.method = attributes[:'method'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + file_id == o.file_id && + href == o.href && + method == o.method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [file_id, href, method].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/v1_file_details_get200_response__links_self.rb b/lib/cybersource_rest_client/models/v1_file_details_get200_response__links_self.rb new file mode 100644 index 00000000..9b4cfcdb --- /dev/null +++ b/lib/cybersource_rest_client/models/v1_file_details_get200_response__links_self.rb @@ -0,0 +1,192 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class V1FileDetailsGet200ResponseLinksSelf + attr_accessor :href + + attr_accessor :method + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'href' => :'href', + :'method' => :'method' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'href' => :'String', + :'method' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'href') + self.href = attributes[:'href'] + end + + if attributes.has_key?(:'method') + self.method = attributes[:'method'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + href == o.href && + method == o.method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [href, method].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/v1_file_details_get200_response_file_details.rb b/lib/cybersource_rest_client/models/v1_file_details_get200_response_file_details.rb new file mode 100644 index 00000000..61b75ec0 --- /dev/null +++ b/lib/cybersource_rest_client/models/v1_file_details_get200_response_file_details.rb @@ -0,0 +1,278 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class V1FileDetailsGet200ResponseFileDetails + # Unique identifier of a file + attr_accessor :file_id + + # Name of the file + attr_accessor :name + + # Date and time for the file in PST + attr_accessor :created_time + + # Date and time for the file in PST + attr_accessor :last_modified_time + + # Date and time for the file in PST + attr_accessor :date + + # File extension + attr_accessor :mime_type + + # Size of the file in bytes + attr_accessor :size + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'file_id' => :'fileId', + :'name' => :'name', + :'created_time' => :'createdTime', + :'last_modified_time' => :'lastModifiedTime', + :'date' => :'date', + :'mime_type' => :'mimeType', + :'size' => :'size' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'file_id' => :'String', + :'name' => :'String', + :'created_time' => :'DateTime', + :'last_modified_time' => :'DateTime', + :'date' => :'Date', + :'mime_type' => :'String', + :'size' => :'Integer' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'fileId') + self.file_id = attributes[:'fileId'] + end + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'createdTime') + self.created_time = attributes[:'createdTime'] + end + + if attributes.has_key?(:'lastModifiedTime') + self.last_modified_time = attributes[:'lastModifiedTime'] + end + + if attributes.has_key?(:'date') + self.date = attributes[:'date'] + end + + if attributes.has_key?(:'mimeType') + self.mime_type = attributes[:'mimeType'] + end + + if attributes.has_key?(:'size') + self.size = attributes[:'size'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + mime_type_validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv', 'application/pdf', 'application/octet-stream']) + return false unless mime_type_validator.valid?(@mime_type) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] mime_type Object to be assigned + def mime_type=(mime_type) + validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv', 'application/pdf', 'application/octet-stream']) + unless validator.valid?(mime_type) + fail ArgumentError, 'invalid value for "mime_type", must be one of #{validator.allowable_values}.' + end + @mime_type = mime_type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + file_id == o.file_id && + name == o.name && + created_time == o.created_time && + last_modified_time == o.last_modified_time && + date == o.date && + mime_type == o.mime_type && + size == o.size + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [file_id, name, created_time, last_modified_time, date, mime_type, size].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/spec/api/capture_api_spec.rb b/spec/api/capture_api_spec.rb index b1d26f2f..831860c4 100644 --- a/spec/api/capture_api_spec.rb +++ b/spec/api/capture_api_spec.rb @@ -38,7 +38,7 @@ # @param capture_payment_request # @param id The payment ID returned from a previous payment request. This ID links the capture to the payment. # @param [Hash] opts the optional parameters - # @return [InlineResponse2012] + # @return [PtsV2PaymentsCapturesPost201Response] describe 'capture_payment test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/credit_api_spec.rb b/spec/api/credit_api_spec.rb index ddb34b3a..afe8d1e6 100644 --- a/spec/api/credit_api_spec.rb +++ b/spec/api/credit_api_spec.rb @@ -37,7 +37,7 @@ # POST to the credit resource to credit funds to a specified credit card. # @param create_credit_request # @param [Hash] opts the optional parameters - # @return [InlineResponse2014] + # @return [PtsV2CreditsPost201Response] describe 'create_credit test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/flex_token_api_spec.rb b/spec/api/flex_token_api_spec.rb index a6f20d74..507e9499 100644 --- a/spec/api/flex_token_api_spec.rb +++ b/spec/api/flex_token_api_spec.rb @@ -37,7 +37,7 @@ # Returns a token representing the supplied card details. The token replaces card data and can be used as the Subscription ID in the CyberSource Simple Order API or SCMP API. This is an unauthenticated call that you should initiate from your customer’s device or browser. # @param [Hash] opts the optional parameters # @option opts [TokenizeRequest] :tokenize_request - # @return [InlineResponse2001] + # @return [FlexV1TokensPost200Response] describe 'tokenize test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/instrument_identifier_api_spec.rb b/spec/api/instrument_identifier_api_spec.rb index 6283bdcd..a3ca5821 100644 --- a/spec/api/instrument_identifier_api_spec.rb +++ b/spec/api/instrument_identifier_api_spec.rb @@ -49,7 +49,7 @@ # @param profile_id The id of a profile containing user specific TMS configuration. # @param token_id The TokenId of an Instrument Identifier. # @param [Hash] opts the optional parameters - # @return [InlineResponse20010] + # @return [TmsV1InstrumentidentifiersPost200Response] describe 'tms_v1_instrumentidentifiers_token_id_get test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -62,7 +62,7 @@ # @param token_id The TokenId of an Instrument Identifier. # @param body Please specify the previous transaction Id to update. # @param [Hash] opts the optional parameters - # @return [InlineResponse20010] + # @return [TmsV1InstrumentidentifiersPost200Response] describe 'tms_v1_instrumentidentifiers_token_id_patch test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/instrument_identifiers_api_spec.rb b/spec/api/instrument_identifiers_api_spec.rb index 09717345..d5413d72 100644 --- a/spec/api/instrument_identifiers_api_spec.rb +++ b/spec/api/instrument_identifiers_api_spec.rb @@ -37,7 +37,7 @@ # @param profile_id The id of a profile containing user specific TMS configuration. # @param body Please specify either a Card or Bank Account. # @param [Hash] opts the optional parameters - # @return [InlineResponse20010] + # @return [TmsV1InstrumentidentifiersPost200Response] describe 'tms_v1_instrumentidentifiers_post test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/key_generation_api_spec.rb b/spec/api/key_generation_api_spec.rb index 2a92f45a..1d7dca6e 100644 --- a/spec/api/key_generation_api_spec.rb +++ b/spec/api/key_generation_api_spec.rb @@ -37,7 +37,7 @@ # Generate a one-time use public key and key ID to encrypt the card number in the follow-on Tokenize Card request. The key used to encrypt the card number on the cardholder’s device or browser is valid for 15 minutes and must be used to verify the signature in the response message. CyberSource recommends creating a new key for each order. Generating a key is an authenticated request initiated from your servers, prior to requesting to tokenize the card data from your customer’s device or browser. # @param [Hash] opts the optional parameters # @option opts [GeneratePublicKeyRequest] :generate_public_key_request - # @return [InlineResponse200] + # @return [FlexV1KeysPost200Response] describe 'generate_public_key test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/notification_of_changes_api_spec.rb b/spec/api/notification_of_changes_api_spec.rb index 581e8e62..ae1499d5 100644 --- a/spec/api/notification_of_changes_api_spec.rb +++ b/spec/api/notification_of_changes_api_spec.rb @@ -38,7 +38,7 @@ # @param start_time Valid report Start Time in **ISO 8601 format** Please refer the following link to know more about ISO 8601 format. - https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14 **Example date format:** - yyyy-MM-dd'T'HH:mm:ssXXX # @param end_time Valid report End Time in **ISO 8601 format** Please refer the following link to know more about ISO 8601 format. - https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14 **Example date format:** - yyyy-MM-dd'T'HH:mm:ssXXX # @param [Hash] opts the optional parameters - # @return [InlineResponse2003] + # @return [ReportingV3NotificationofChangesGet200Response] describe 'get_notification_of_change_report test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/payment_instruments_api_spec.rb b/spec/api/payment_instruments_api_spec.rb index 03b00c7e..c647e2e8 100644 --- a/spec/api/payment_instruments_api_spec.rb +++ b/spec/api/payment_instruments_api_spec.rb @@ -39,7 +39,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :offset Starting Payment Instrument record in zero-based dataset that should be returned as the first object in the array. Default is 0. # @option opts [String] :limit The maximum number of Payment Instruments that can be returned in the array starting from the offset record in zero-based dataset. Default is 20, maximum is 100. - # @return [InlineResponse20011] + # @return [TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response] describe 'tms_v1_instrumentidentifiers_token_id_paymentinstruments_get test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -51,7 +51,7 @@ # @param profile_id The id of a profile containing user specific TMS configuration. # @param body Please specify the customers payment details for card or bank account. # @param [Hash] opts the optional parameters - # @return [InlineResponse2016] + # @return [TmsV1PaymentinstrumentsPost201Response] describe 'tms_v1_paymentinstruments_post test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -75,7 +75,7 @@ # @param profile_id The id of a profile containing user specific TMS configuration. # @param token_id The TokenId of a Payment Instrument. # @param [Hash] opts the optional parameters - # @return [InlineResponse2016] + # @return [TmsV1PaymentinstrumentsPost201Response] describe 'tms_v1_paymentinstruments_token_id_get test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -88,7 +88,7 @@ # @param token_id The TokenId of a Payment Instrument. # @param body Please specify the customers payment details. # @param [Hash] opts the optional parameters - # @return [InlineResponse2016] + # @return [TmsV1PaymentinstrumentsPost201Response] describe 'tms_v1_paymentinstruments_token_id_patch test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/payments_api_spec.rb b/spec/api/payments_api_spec.rb index 3fb84898..17b8a882 100644 --- a/spec/api/payments_api_spec.rb +++ b/spec/api/payments_api_spec.rb @@ -37,7 +37,7 @@ # Authorize the payment for the transaction. # @param create_payment_request # @param [Hash] opts the optional parameters - # @return [InlineResponse201] + # @return [PtsV2PaymentsPost201Response] describe 'create_payment test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/refund_api_spec.rb b/spec/api/refund_api_spec.rb index 5a56cf66..e7b6a260 100644 --- a/spec/api/refund_api_spec.rb +++ b/spec/api/refund_api_spec.rb @@ -38,7 +38,7 @@ # @param refund_capture_request # @param id The capture ID. This ID is returned from a previous capture request. # @param [Hash] opts the optional parameters - # @return [InlineResponse2013] + # @return [PtsV2PaymentsRefundPost201Response] describe 'refund_capture test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -51,7 +51,7 @@ # @param refund_payment_request # @param id The payment ID. This ID is returned from a previous payment request. # @param [Hash] opts the optional parameters - # @return [InlineResponse2013] + # @return [PtsV2PaymentsRefundPost201Response] describe 'refund_payment test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/report_definitions_api_spec.rb b/spec/api/report_definitions_api_spec.rb index db8c4dfb..7fdb1547 100644 --- a/spec/api/report_definitions_api_spec.rb +++ b/spec/api/report_definitions_api_spec.rb @@ -38,7 +38,7 @@ # @param report_definition_name Name of the Report definition to retrieve # @param [Hash] opts the optional parameters # @option opts [String] :organization_id Valid Cybersource Organization Id - # @return [InlineResponse2005] + # @return [ReportingV3ReportDefinitionsNameGet200Response] describe 'get_resource_info_by_report_definition test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -50,7 +50,7 @@ # # @param [Hash] opts the optional parameters # @option opts [String] :organization_id Valid Cybersource Organization Id - # @return [InlineResponse2004] + # @return [ReportingV3ReportDefinitionsGet200Response] describe 'get_resource_v2_info test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/report_subscriptions_api_spec.rb b/spec/api/report_subscriptions_api_spec.rb index 2718ffb8..cc4b5520 100644 --- a/spec/api/report_subscriptions_api_spec.rb +++ b/spec/api/report_subscriptions_api_spec.rb @@ -61,7 +61,7 @@ # Retrieve all subscriptions by organization # # @param [Hash] opts the optional parameters - # @return [InlineResponse2006] + # @return [ReportingV3ReportSubscriptionsGet200Response] describe 'get_all_subscriptions test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -73,7 +73,7 @@ # # @param report_name Name of the Report to Retrieve # @param [Hash] opts the optional parameters - # @return [InlineResponse2006Subscriptions] + # @return [ReportingV3ReportSubscriptionsGet200ResponseSubscriptions] describe 'get_subscription test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/reports_api_spec.rb b/spec/api/reports_api_spec.rb index 234f61fb..169acad5 100644 --- a/spec/api/reports_api_spec.rb +++ b/spec/api/reports_api_spec.rb @@ -50,7 +50,7 @@ # @param report_id Valid Report Id # @param [Hash] opts the optional parameters # @option opts [String] :organization_id Valid Cybersource Organization Id - # @return [InlineResponse2008] + # @return [ReportingV3ReportsIdGet200Response] describe 'get_report_by_report_id test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -70,7 +70,7 @@ # @option opts [String] :report_name Valid Report Name # @option opts [Integer] :report_definition_id Valid Report Definition Id # @option opts [String] :report_status Valid Report Status - # @return [InlineResponse2007] + # @return [ReportingV3ReportsGet200Response] describe 'search_reports test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/reversal_api_spec.rb b/spec/api/reversal_api_spec.rb index d6e06f51..8d069ab5 100644 --- a/spec/api/reversal_api_spec.rb +++ b/spec/api/reversal_api_spec.rb @@ -38,7 +38,7 @@ # @param id The payment ID returned from a previous payment request. # @param auth_reversal_request # @param [Hash] opts the optional parameters - # @return [InlineResponse2011] + # @return [PtsV2PaymentsReversalsPost201Response] describe 'auth_reversal test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/search_transactions_api_spec.rb b/spec/api/search_transactions_api_spec.rb index 70806777..f2e938f8 100644 --- a/spec/api/search_transactions_api_spec.rb +++ b/spec/api/search_transactions_api_spec.rb @@ -37,7 +37,7 @@ # Create a search request. # @param create_search_request # @param [Hash] opts the optional parameters - # @return [InlineResponse2017] + # @return [TssV2TransactionsPost201Response] describe 'create_search test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -49,7 +49,7 @@ # Include the Search ID in the GET request to retrieve the search results. # @param id Search ID. # @param [Hash] opts the optional parameters - # @return [InlineResponse2017] + # @return [TssV2TransactionsPost201Response] describe 'get_search test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/secure_file_share_api_spec.rb b/spec/api/secure_file_share_api_spec.rb index 4adaf9be..b35c69e4 100644 --- a/spec/api/secure_file_share_api_spec.rb +++ b/spec/api/secure_file_share_api_spec.rb @@ -52,7 +52,7 @@ # @param end_date Valid end date in **ISO 8601 format** Please refer the following link to know more about ISO 8601 format. - https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14 **Example date format:** - yyyy-MM-dd # @param [Hash] opts the optional parameters # @option opts [String] :organization_id Valid Cybersource Organization Id - # @return [InlineResponse2009] + # @return [V1FileDetailsGet200Response] describe 'get_file_details test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/transaction_batches_api_spec.rb b/spec/api/transaction_batches_api_spec.rb index ae7f1080..58417b9d 100644 --- a/spec/api/transaction_batches_api_spec.rb +++ b/spec/api/transaction_batches_api_spec.rb @@ -38,7 +38,7 @@ # @param start_time Valid report Start Time in **ISO 8601 format** Please refer the following link to know more about ISO 8601 format. - https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14 **Example date format:** - yyyy-MM-dd'T'HH:mm:ss.SSSZZ # @param end_time Valid report End Time in **ISO 8601 format** Please refer the following link to know more about ISO 8601 format. - https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14 **Example date format:** - yyyy-MM-dd'T'HH:mm:ss.SSSZZ # @param [Hash] opts the optional parameters - # @return [InlineResponse2002] + # @return [PtsV1TransactionBatchesGet200Response] describe 'pts_v1_transaction_batches_get test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/transaction_details_api_spec.rb b/spec/api/transaction_details_api_spec.rb index 0014351a..6757434b 100644 --- a/spec/api/transaction_details_api_spec.rb +++ b/spec/api/transaction_details_api_spec.rb @@ -37,7 +37,7 @@ # Include the Request ID in the GET request to retrieve the transaction details. # @param id Request ID. # @param [Hash] opts the optional parameters - # @return [InlineResponse20012] + # @return [TssV2TransactionsGet200Response] describe 'get_transaction test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/user_management_api_spec.rb b/spec/api/user_management_api_spec.rb index 2b1e4955..d18a8f7c 100644 --- a/spec/api/user_management_api_spec.rb +++ b/spec/api/user_management_api_spec.rb @@ -40,7 +40,7 @@ # @option opts [String] :user_name User ID of the user you want to get details on. # @option opts [String] :permission_id permission that you are trying to search user on. # @option opts [String] :role_id role of the user you are trying to search on. - # @return [InlineResponse20013] + # @return [UmsV1UsersGet200Response] describe 'get_users test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/api/void_api_spec.rb b/spec/api/void_api_spec.rb index f25e2e0b..311e0e6c 100644 --- a/spec/api/void_api_spec.rb +++ b/spec/api/void_api_spec.rb @@ -38,7 +38,7 @@ # @param void_capture_request # @param id The capture ID returned from a previous capture request. # @param [Hash] opts the optional parameters - # @return [InlineResponse2015] + # @return [PtsV2PaymentsVoidsPost201Response] describe 'void_capture test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -51,7 +51,7 @@ # @param void_credit_request # @param id The credit ID returned from a previous credit request. # @param [Hash] opts the optional parameters - # @return [InlineResponse2015] + # @return [PtsV2PaymentsVoidsPost201Response] describe 'void_credit test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -64,7 +64,7 @@ # @param void_payment_request # @param id The payment ID returned from a previous payment request. # @param [Hash] opts the optional parameters - # @return [InlineResponse2015] + # @return [PtsV2PaymentsVoidsPost201Response] describe 'void_payment test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -77,7 +77,7 @@ # @param void_refund_request # @param id The refund ID returned from a previous refund request. # @param [Hash] opts the optional parameters - # @return [InlineResponse2015] + # @return [PtsV2PaymentsVoidsPost201Response] describe 'void_refund test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/create_search_request_spec.rb b/spec/models/create_search_request_spec.rb deleted file mode 100644 index e969092f..00000000 --- a/spec/models/create_search_request_spec.rb +++ /dev/null @@ -1,77 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::CreateSearchRequest -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'CreateSearchRequest' do - before do - # run before each test - @instance = CyberSource::CreateSearchRequest.new - end - - after do - # run after each test - end - - describe 'test an instance of CreateSearchRequest' do - it 'should create an instance of CreateSearchRequest' do - expect(@instance).to be_instance_of(CyberSource::CreateSearchRequest) - end - end - describe 'test attribute "save"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "timezone"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "query"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "offset"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "limit"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "sort"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/flex_v1_keys_post200_response_der_spec.rb b/spec/models/flex_v1_keys_post200_response_der_spec.rb new file mode 100644 index 00000000..784a1d49 --- /dev/null +++ b/spec/models/flex_v1_keys_post200_response_der_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::FlexV1KeysPost200ResponseDer +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'FlexV1KeysPost200ResponseDer' do + before do + # run before each test + @instance = CyberSource::FlexV1KeysPost200ResponseDer.new + end + + after do + # run after each test + end + + describe 'test an instance of FlexV1KeysPost200ResponseDer' do + it 'should create an instance of FlexV1KeysPost200ResponseDer' do + expect(@instance).to be_instance_of(CyberSource::FlexV1KeysPost200ResponseDer) + end + end + describe 'test attribute "format"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "algorithm"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "public_key"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/flex_v1_keys_post200_response_jwk_spec.rb b/spec/models/flex_v1_keys_post200_response_jwk_spec.rb new file mode 100644 index 00000000..7dd66404 --- /dev/null +++ b/spec/models/flex_v1_keys_post200_response_jwk_spec.rb @@ -0,0 +1,65 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::FlexV1KeysPost200ResponseJwk +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'FlexV1KeysPost200ResponseJwk' do + before do + # run before each test + @instance = CyberSource::FlexV1KeysPost200ResponseJwk.new + end + + after do + # run after each test + end + + describe 'test an instance of FlexV1KeysPost200ResponseJwk' do + it 'should create an instance of FlexV1KeysPost200ResponseJwk' do + expect(@instance).to be_instance_of(CyberSource::FlexV1KeysPost200ResponseJwk) + end + end + describe 'test attribute "kty"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "use"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "kid"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "n"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "e"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/flex_v1_keys_post200_response_spec.rb b/spec/models/flex_v1_keys_post200_response_spec.rb new file mode 100644 index 00000000..a2cb824b --- /dev/null +++ b/spec/models/flex_v1_keys_post200_response_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::FlexV1KeysPost200Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'FlexV1KeysPost200Response' do + before do + # run before each test + @instance = CyberSource::FlexV1KeysPost200Response.new + end + + after do + # run after each test + end + + describe 'test an instance of FlexV1KeysPost200Response' do + it 'should create an instance of FlexV1KeysPost200Response' do + expect(@instance).to be_instance_of(CyberSource::FlexV1KeysPost200Response) + end + end + describe 'test attribute "key_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "der"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "jwk"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/flex_v1_tokens_post200_response_spec.rb b/spec/models/flex_v1_tokens_post200_response_spec.rb new file mode 100644 index 00000000..431cf15d --- /dev/null +++ b/spec/models/flex_v1_tokens_post200_response_spec.rb @@ -0,0 +1,83 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::FlexV1TokensPost200Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'FlexV1TokensPost200Response' do + before do + # run before each test + @instance = CyberSource::FlexV1TokensPost200Response.new + end + + after do + # run after each test + end + + describe 'test an instance of FlexV1TokensPost200Response' do + it 'should create an instance of FlexV1TokensPost200Response' do + expect(@instance).to be_instance_of(CyberSource::FlexV1TokensPost200Response) + end + end + describe 'test attribute "key_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "token"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "masked_pan"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "card_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "timestamp"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "signed_fields"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "signature"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "discoverable_services"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/inline_response_200_10_spec.rb b/spec/models/inline_response_200_10_spec.rb deleted file mode 100644 index 63c6d01b..00000000 --- a/spec/models/inline_response_200_10_spec.rb +++ /dev/null @@ -1,91 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20010 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20010' do - before do - # run before each test - @instance = CyberSource::InlineResponse20010.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20010' do - it 'should create an instance of InlineResponse20010' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20010) - end - end - describe 'test attribute "_links"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "object"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["instrumentIdentifier"]) - # validator.allowable_values.each do |value| - # expect { @instance.object = value }.not_to raise_error - # end - end - end - - describe 'test attribute "state"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ACTIVE", "CLOSED"]) - # validator.allowable_values.each do |value| - # expect { @instance.state = value }.not_to raise_error - # end - end - end - - describe 'test attribute "card"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "bank_account"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "processing_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "metadata"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_11__links_first_spec.rb b/spec/models/inline_response_200_11__links_first_spec.rb deleted file mode 100644 index 22c636e2..00000000 --- a/spec/models/inline_response_200_11__links_first_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20011LinksFirst -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20011LinksFirst' do - before do - # run before each test - @instance = CyberSource::InlineResponse20011LinksFirst.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20011LinksFirst' do - it 'should create an instance of InlineResponse20011LinksFirst' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20011LinksFirst) - end - end - describe 'test attribute "href"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_11__links_last_spec.rb b/spec/models/inline_response_200_11__links_last_spec.rb deleted file mode 100644 index af8e8f3b..00000000 --- a/spec/models/inline_response_200_11__links_last_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20011LinksLast -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20011LinksLast' do - before do - # run before each test - @instance = CyberSource::InlineResponse20011LinksLast.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20011LinksLast' do - it 'should create an instance of InlineResponse20011LinksLast' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20011LinksLast) - end - end - describe 'test attribute "href"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_11__links_next_spec.rb b/spec/models/inline_response_200_11__links_next_spec.rb deleted file mode 100644 index 8378f7f3..00000000 --- a/spec/models/inline_response_200_11__links_next_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20011LinksNext -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20011LinksNext' do - before do - # run before each test - @instance = CyberSource::InlineResponse20011LinksNext.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20011LinksNext' do - it 'should create an instance of InlineResponse20011LinksNext' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20011LinksNext) - end - end - describe 'test attribute "href"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_11__links_prev_spec.rb b/spec/models/inline_response_200_11__links_prev_spec.rb deleted file mode 100644 index cda7f3c3..00000000 --- a/spec/models/inline_response_200_11__links_prev_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20011LinksPrev -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20011LinksPrev' do - before do - # run before each test - @instance = CyberSource::InlineResponse20011LinksPrev.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20011LinksPrev' do - it 'should create an instance of InlineResponse20011LinksPrev' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20011LinksPrev) - end - end - describe 'test attribute "href"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_11__links_self_spec.rb b/spec/models/inline_response_200_11__links_self_spec.rb deleted file mode 100644 index 70cf61d8..00000000 --- a/spec/models/inline_response_200_11__links_self_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20011LinksSelf -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20011LinksSelf' do - before do - # run before each test - @instance = CyberSource::InlineResponse20011LinksSelf.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20011LinksSelf' do - it 'should create an instance of InlineResponse20011LinksSelf' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20011LinksSelf) - end - end - describe 'test attribute "href"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_11__links_spec.rb b/spec/models/inline_response_200_11__links_spec.rb deleted file mode 100644 index de798bc2..00000000 --- a/spec/models/inline_response_200_11__links_spec.rb +++ /dev/null @@ -1,65 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20011Links -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20011Links' do - before do - # run before each test - @instance = CyberSource::InlineResponse20011Links.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20011Links' do - it 'should create an instance of InlineResponse20011Links' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20011Links) - end - end - describe 'test attribute "_self"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "first"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "prev"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "_next"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "last"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_11_spec.rb b/spec/models/inline_response_200_11_spec.rb deleted file mode 100644 index 53046dcf..00000000 --- a/spec/models/inline_response_200_11_spec.rb +++ /dev/null @@ -1,81 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20011 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20011' do - before do - # run before each test - @instance = CyberSource::InlineResponse20011.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20011' do - it 'should create an instance of InlineResponse20011' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20011) - end - end - describe 'test attribute "_links"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "object"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["collection"]) - # validator.allowable_values.each do |value| - # expect { @instance.object = value }.not_to raise_error - # end - end - end - - describe 'test attribute "offset"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "limit"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "count"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "total"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "_embedded"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_application_information_applications_spec.rb b/spec/models/inline_response_200_12_application_information_applications_spec.rb deleted file mode 100644 index 55605b80..00000000 --- a/spec/models/inline_response_200_12_application_information_applications_spec.rb +++ /dev/null @@ -1,83 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012ApplicationInformationApplications -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012ApplicationInformationApplications' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012ApplicationInformationApplications.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012ApplicationInformationApplications' do - it 'should create an instance of InlineResponse20012ApplicationInformationApplications' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012ApplicationInformationApplications) - end - end - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "reason_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "r_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "r_flag"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "reconciliation_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "r_message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "return_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_application_information_spec.rb b/spec/models/inline_response_200_12_application_information_spec.rb deleted file mode 100644 index c8886f61..00000000 --- a/spec/models/inline_response_200_12_application_information_spec.rb +++ /dev/null @@ -1,65 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012ApplicationInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012ApplicationInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012ApplicationInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012ApplicationInformation' do - it 'should create an instance of InlineResponse20012ApplicationInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012ApplicationInformation) - end - end - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "reason_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "r_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "r_flag"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "applications"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_buyer_information_spec.rb b/spec/models/inline_response_200_12_buyer_information_spec.rb deleted file mode 100644 index 786068c9..00000000 --- a/spec/models/inline_response_200_12_buyer_information_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012BuyerInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012BuyerInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012BuyerInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012BuyerInformation' do - it 'should create an instance of InlineResponse20012BuyerInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012BuyerInformation) - end - end - describe 'test attribute "merchant_customer_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "hashed_password"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_client_reference_information_spec.rb b/spec/models/inline_response_200_12_client_reference_information_spec.rb deleted file mode 100644 index e7f730f1..00000000 --- a/spec/models/inline_response_200_12_client_reference_information_spec.rb +++ /dev/null @@ -1,65 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012ClientReferenceInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012ClientReferenceInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012ClientReferenceInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012ClientReferenceInformation' do - it 'should create an instance of InlineResponse20012ClientReferenceInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012ClientReferenceInformation) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "application_version"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "application_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "application_user"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "comments"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_consumer_authentication_information_spec.rb b/spec/models/inline_response_200_12_consumer_authentication_information_spec.rb deleted file mode 100644 index 26f36435..00000000 --- a/spec/models/inline_response_200_12_consumer_authentication_information_spec.rb +++ /dev/null @@ -1,59 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012ConsumerAuthenticationInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012ConsumerAuthenticationInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012ConsumerAuthenticationInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012ConsumerAuthenticationInformation' do - it 'should create an instance of InlineResponse20012ConsumerAuthenticationInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012ConsumerAuthenticationInformation) - end - end - describe 'test attribute "eci_raw"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "cavv"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "xid"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "transaction_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_device_information_spec.rb b/spec/models/inline_response_200_12_device_information_spec.rb deleted file mode 100644 index e2d2aa03..00000000 --- a/spec/models/inline_response_200_12_device_information_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012DeviceInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012DeviceInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012DeviceInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012DeviceInformation' do - it 'should create an instance of InlineResponse20012DeviceInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012DeviceInformation) - end - end - describe 'test attribute "ip_address"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "host_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "cookies_accepted"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_error_information_spec.rb b/spec/models/inline_response_200_12_error_information_spec.rb deleted file mode 100644 index 2ea44ce9..00000000 --- a/spec/models/inline_response_200_12_error_information_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012ErrorInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012ErrorInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012ErrorInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012ErrorInformation' do - it 'should create an instance of InlineResponse20012ErrorInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012ErrorInformation) - end - end - describe 'test attribute "reason"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_fraud_marking_information_spec.rb b/spec/models/inline_response_200_12_fraud_marking_information_spec.rb deleted file mode 100644 index cba8292f..00000000 --- a/spec/models/inline_response_200_12_fraud_marking_information_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012FraudMarkingInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012FraudMarkingInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012FraudMarkingInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012FraudMarkingInformation' do - it 'should create an instance of InlineResponse20012FraudMarkingInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012FraudMarkingInformation) - end - end - describe 'test attribute "reason"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_installment_information_spec.rb b/spec/models/inline_response_200_12_installment_information_spec.rb deleted file mode 100644 index cc7575e6..00000000 --- a/spec/models/inline_response_200_12_installment_information_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012InstallmentInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012InstallmentInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012InstallmentInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012InstallmentInformation' do - it 'should create an instance of InlineResponse20012InstallmentInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012InstallmentInformation) - end - end - describe 'test attribute "number_of_installments"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_merchant_defined_information_spec.rb b/spec/models/inline_response_200_12_merchant_defined_information_spec.rb deleted file mode 100644 index 11c2dbd1..00000000 --- a/spec/models/inline_response_200_12_merchant_defined_information_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012MerchantDefinedInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012MerchantDefinedInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012MerchantDefinedInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012MerchantDefinedInformation' do - it 'should create an instance of InlineResponse20012MerchantDefinedInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012MerchantDefinedInformation) - end - end - describe 'test attribute "key"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "value"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_merchant_information_merchant_descriptor_spec.rb b/spec/models/inline_response_200_12_merchant_information_merchant_descriptor_spec.rb deleted file mode 100644 index 79caa7bd..00000000 --- a/spec/models/inline_response_200_12_merchant_information_merchant_descriptor_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012MerchantInformationMerchantDescriptor -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012MerchantInformationMerchantDescriptor' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012MerchantInformationMerchantDescriptor.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012MerchantInformationMerchantDescriptor' do - it 'should create an instance of InlineResponse20012MerchantInformationMerchantDescriptor' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012MerchantInformationMerchantDescriptor) - end - end - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_merchant_information_spec.rb b/spec/models/inline_response_200_12_merchant_information_spec.rb deleted file mode 100644 index d77a2016..00000000 --- a/spec/models/inline_response_200_12_merchant_information_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012MerchantInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012MerchantInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012MerchantInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012MerchantInformation' do - it 'should create an instance of InlineResponse20012MerchantInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012MerchantInformation) - end - end - describe 'test attribute "merchant_descriptor"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_order_information_amount_details_spec.rb b/spec/models/inline_response_200_12_order_information_amount_details_spec.rb deleted file mode 100644 index 910fb5d4..00000000 --- a/spec/models/inline_response_200_12_order_information_amount_details_spec.rb +++ /dev/null @@ -1,59 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012OrderInformationAmountDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012OrderInformationAmountDetails' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012OrderInformationAmountDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012OrderInformationAmountDetails' do - it 'should create an instance of InlineResponse20012OrderInformationAmountDetails' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012OrderInformationAmountDetails) - end - end - describe 'test attribute "total_amount"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "currency"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "tax_amount"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "authorized_amount"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_order_information_bill_to_spec.rb b/spec/models/inline_response_200_12_order_information_bill_to_spec.rb deleted file mode 100644 index e125c615..00000000 --- a/spec/models/inline_response_200_12_order_information_bill_to_spec.rb +++ /dev/null @@ -1,119 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012OrderInformationBillTo -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012OrderInformationBillTo' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012OrderInformationBillTo.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012OrderInformationBillTo' do - it 'should create an instance of InlineResponse20012OrderInformationBillTo' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012OrderInformationBillTo) - end - end - describe 'test attribute "first_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "last_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "middel_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name_suffix"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "address1"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "address2"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "locality"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "administrative_area"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "postal_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "company"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "email"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "country"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "title"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "phone_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_order_information_line_items_spec.rb b/spec/models/inline_response_200_12_order_information_line_items_spec.rb deleted file mode 100644 index 0f68f3d9..00000000 --- a/spec/models/inline_response_200_12_order_information_line_items_spec.rb +++ /dev/null @@ -1,77 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012OrderInformationLineItems -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012OrderInformationLineItems' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012OrderInformationLineItems.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012OrderInformationLineItems' do - it 'should create an instance of InlineResponse20012OrderInformationLineItems' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012OrderInformationLineItems) - end - end - describe 'test attribute "product_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "product_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "product_sku"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "tax_amount"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "quantity"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "unit_price"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "fulfillment_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_order_information_ship_to_spec.rb b/spec/models/inline_response_200_12_order_information_ship_to_spec.rb deleted file mode 100644 index 355b58ab..00000000 --- a/spec/models/inline_response_200_12_order_information_ship_to_spec.rb +++ /dev/null @@ -1,95 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012OrderInformationShipTo -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012OrderInformationShipTo' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012OrderInformationShipTo.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012OrderInformationShipTo' do - it 'should create an instance of InlineResponse20012OrderInformationShipTo' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012OrderInformationShipTo) - end - end - describe 'test attribute "first_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "last_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "address1"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "address2"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "locality"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "administrative_area"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "postal_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "company"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "country"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "phone_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_order_information_shipping_details_spec.rb b/spec/models/inline_response_200_12_order_information_shipping_details_spec.rb deleted file mode 100644 index 57d8fb05..00000000 --- a/spec/models/inline_response_200_12_order_information_shipping_details_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012OrderInformationShippingDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012OrderInformationShippingDetails' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012OrderInformationShippingDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012OrderInformationShippingDetails' do - it 'should create an instance of InlineResponse20012OrderInformationShippingDetails' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012OrderInformationShippingDetails) - end - end - describe 'test attribute "gift_wrap"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "shipping_method"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_order_information_spec.rb b/spec/models/inline_response_200_12_order_information_spec.rb deleted file mode 100644 index 9c157adf..00000000 --- a/spec/models/inline_response_200_12_order_information_spec.rb +++ /dev/null @@ -1,65 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012OrderInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012OrderInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012OrderInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012OrderInformation' do - it 'should create an instance of InlineResponse20012OrderInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012OrderInformation) - end - end - describe 'test attribute "bill_to"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "ship_to"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "line_items"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "amount_details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "shipping_details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_payment_information_account_features_spec.rb b/spec/models/inline_response_200_12_payment_information_account_features_spec.rb deleted file mode 100644 index 12d39bbe..00000000 --- a/spec/models/inline_response_200_12_payment_information_account_features_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012PaymentInformationAccountFeatures -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012PaymentInformationAccountFeatures' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012PaymentInformationAccountFeatures.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012PaymentInformationAccountFeatures' do - it 'should create an instance of InlineResponse20012PaymentInformationAccountFeatures' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012PaymentInformationAccountFeatures) - end - end - describe 'test attribute "balance_amount"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "previous_balance_amount"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "currency"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_payment_information_bank_account_spec.rb b/spec/models/inline_response_200_12_payment_information_bank_account_spec.rb deleted file mode 100644 index 9cdce1c2..00000000 --- a/spec/models/inline_response_200_12_payment_information_bank_account_spec.rb +++ /dev/null @@ -1,77 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012PaymentInformationBankAccount -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012PaymentInformationBankAccount' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012PaymentInformationBankAccount.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012PaymentInformationBankAccount' do - it 'should create an instance of InlineResponse20012PaymentInformationBankAccount' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012PaymentInformationBankAccount) - end - end - describe 'test attribute "suffix"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "prefix"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "check_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "check_digit"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "encoder_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_payment_information_bank_mandate_spec.rb b/spec/models/inline_response_200_12_payment_information_bank_mandate_spec.rb deleted file mode 100644 index 062abfc3..00000000 --- a/spec/models/inline_response_200_12_payment_information_bank_mandate_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012PaymentInformationBankMandate -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012PaymentInformationBankMandate' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012PaymentInformationBankMandate.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012PaymentInformationBankMandate' do - it 'should create an instance of InlineResponse20012PaymentInformationBankMandate' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012PaymentInformationBankMandate) - end - end - describe 'test attribute "reference_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "recurring_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_payment_information_bank_spec.rb b/spec/models/inline_response_200_12_payment_information_bank_spec.rb deleted file mode 100644 index 7bbabcee..00000000 --- a/spec/models/inline_response_200_12_payment_information_bank_spec.rb +++ /dev/null @@ -1,77 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012PaymentInformationBank -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012PaymentInformationBank' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012PaymentInformationBank.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012PaymentInformationBank' do - it 'should create an instance of InlineResponse20012PaymentInformationBank' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012PaymentInformationBank) - end - end - describe 'test attribute "routing_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "branch_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "swift_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "bank_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "iban"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "account"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "mandate"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_payment_information_card_spec.rb b/spec/models/inline_response_200_12_payment_information_card_spec.rb deleted file mode 100644 index 850e1b50..00000000 --- a/spec/models/inline_response_200_12_payment_information_card_spec.rb +++ /dev/null @@ -1,95 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012PaymentInformationCard -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012PaymentInformationCard' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012PaymentInformationCard.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012PaymentInformationCard' do - it 'should create an instance of InlineResponse20012PaymentInformationCard' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012PaymentInformationCard) - end - end - describe 'test attribute "suffix"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "prefix"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "expiration_month"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "expiration_year"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "start_month"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "start_year"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "issue_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "account_encoder_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "use_as"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_payment_information_invoice_spec.rb b/spec/models/inline_response_200_12_payment_information_invoice_spec.rb deleted file mode 100644 index b18ed82f..00000000 --- a/spec/models/inline_response_200_12_payment_information_invoice_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012PaymentInformationInvoice -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012PaymentInformationInvoice' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012PaymentInformationInvoice.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012PaymentInformationInvoice' do - it 'should create an instance of InlineResponse20012PaymentInformationInvoice' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012PaymentInformationInvoice) - end - end - describe 'test attribute "number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "barcode_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "expiration_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_payment_information_payment_type_spec.rb b/spec/models/inline_response_200_12_payment_information_payment_type_spec.rb deleted file mode 100644 index 03c4363d..00000000 --- a/spec/models/inline_response_200_12_payment_information_payment_type_spec.rb +++ /dev/null @@ -1,77 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012PaymentInformationPaymentType -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012PaymentInformationPaymentType' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012PaymentInformationPaymentType.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012PaymentInformationPaymentType' do - it 'should create an instance of InlineResponse20012PaymentInformationPaymentType' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012PaymentInformationPaymentType) - end - end - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "sub_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "method"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "funding_source"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "funding_source_affiliation"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "credential"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_payment_information_spec.rb b/spec/models/inline_response_200_12_payment_information_spec.rb deleted file mode 100644 index 6cf6bdb2..00000000 --- a/spec/models/inline_response_200_12_payment_information_spec.rb +++ /dev/null @@ -1,71 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012PaymentInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012PaymentInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012PaymentInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012PaymentInformation' do - it 'should create an instance of InlineResponse20012PaymentInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012PaymentInformation) - end - end - describe 'test attribute "payment_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "customer"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "card"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "invoice"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "bank"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "account_features"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_point_of_sale_information_spec.rb b/spec/models/inline_response_200_12_point_of_sale_information_spec.rb deleted file mode 100644 index 5075d815..00000000 --- a/spec/models/inline_response_200_12_point_of_sale_information_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012PointOfSaleInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012PointOfSaleInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012PointOfSaleInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012PointOfSaleInformation' do - it 'should create an instance of InlineResponse20012PointOfSaleInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012PointOfSaleInformation) - end - end - describe 'test attribute "entry_mode"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "terminal_capability"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_processing_information_authorization_options_spec.rb b/spec/models/inline_response_200_12_processing_information_authorization_options_spec.rb deleted file mode 100644 index 24698e96..00000000 --- a/spec/models/inline_response_200_12_processing_information_authorization_options_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012ProcessingInformationAuthorizationOptions -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012ProcessingInformationAuthorizationOptions' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012ProcessingInformationAuthorizationOptions.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012ProcessingInformationAuthorizationOptions' do - it 'should create an instance of InlineResponse20012ProcessingInformationAuthorizationOptions' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012ProcessingInformationAuthorizationOptions) - end - end - describe 'test attribute "auth_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_processing_information_bank_transfer_options_spec.rb b/spec/models/inline_response_200_12_processing_information_bank_transfer_options_spec.rb deleted file mode 100644 index d259d369..00000000 --- a/spec/models/inline_response_200_12_processing_information_bank_transfer_options_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012ProcessingInformationBankTransferOptions -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012ProcessingInformationBankTransferOptions' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012ProcessingInformationBankTransferOptions.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012ProcessingInformationBankTransferOptions' do - it 'should create an instance of InlineResponse20012ProcessingInformationBankTransferOptions' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012ProcessingInformationBankTransferOptions) - end - end - describe 'test attribute "sec_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_processing_information_spec.rb b/spec/models/inline_response_200_12_processing_information_spec.rb deleted file mode 100644 index ec58d782..00000000 --- a/spec/models/inline_response_200_12_processing_information_spec.rb +++ /dev/null @@ -1,65 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012ProcessingInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012ProcessingInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012ProcessingInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012ProcessingInformation' do - it 'should create an instance of InlineResponse20012ProcessingInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012ProcessingInformation) - end - end - describe 'test attribute "payment_solution"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "commerce_indicator"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "business_application_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "authorization_options"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "bank_transfer_options"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_processor_information_ach_verification_spec.rb b/spec/models/inline_response_200_12_processor_information_ach_verification_spec.rb deleted file mode 100644 index 53dd5072..00000000 --- a/spec/models/inline_response_200_12_processor_information_ach_verification_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012ProcessorInformationAchVerification -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012ProcessorInformationAchVerification' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012ProcessorInformationAchVerification.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012ProcessorInformationAchVerification' do - it 'should create an instance of InlineResponse20012ProcessorInformationAchVerification' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012ProcessorInformationAchVerification) - end - end - describe 'test attribute "result_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "result_code_raw"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_processor_information_card_verification_spec.rb b/spec/models/inline_response_200_12_processor_information_card_verification_spec.rb deleted file mode 100644 index 02a81d1c..00000000 --- a/spec/models/inline_response_200_12_processor_information_card_verification_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012ProcessorInformationCardVerification -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012ProcessorInformationCardVerification' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012ProcessorInformationCardVerification.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012ProcessorInformationCardVerification' do - it 'should create an instance of InlineResponse20012ProcessorInformationCardVerification' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012ProcessorInformationCardVerification) - end - end - describe 'test attribute "result_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_processor_information_electronic_verification_results_spec.rb b/spec/models/inline_response_200_12_processor_information_electronic_verification_results_spec.rb deleted file mode 100644 index a71a9507..00000000 --- a/spec/models/inline_response_200_12_processor_information_electronic_verification_results_spec.rb +++ /dev/null @@ -1,95 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012ProcessorInformationElectronicVerificationResults -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012ProcessorInformationElectronicVerificationResults' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012ProcessorInformationElectronicVerificationResults.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012ProcessorInformationElectronicVerificationResults' do - it 'should create an instance of InlineResponse20012ProcessorInformationElectronicVerificationResults' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012ProcessorInformationElectronicVerificationResults) - end - end - describe 'test attribute "email"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "email_raw"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name_raw"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "phone_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "phone_number_raw"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "street"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "street_raw"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "postal_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "postal_code_raw"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_processor_information_processor_spec.rb b/spec/models/inline_response_200_12_processor_information_processor_spec.rb deleted file mode 100644 index eed08872..00000000 --- a/spec/models/inline_response_200_12_processor_information_processor_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012ProcessorInformationProcessor -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012ProcessorInformationProcessor' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012ProcessorInformationProcessor.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012ProcessorInformationProcessor' do - it 'should create an instance of InlineResponse20012ProcessorInformationProcessor' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012ProcessorInformationProcessor) - end - end - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_processor_information_spec.rb b/spec/models/inline_response_200_12_processor_information_spec.rb deleted file mode 100644 index 594952fb..00000000 --- a/spec/models/inline_response_200_12_processor_information_spec.rb +++ /dev/null @@ -1,101 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012ProcessorInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012ProcessorInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012ProcessorInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012ProcessorInformation' do - it 'should create an instance of InlineResponse20012ProcessorInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012ProcessorInformation) - end - end - describe 'test attribute "processor"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "transaction_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "network_transaction_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "response_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "provider_transaction_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "approval_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "response_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "avs"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "card_verification"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "ach_verification"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "electronic_verification_results"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_risk_information_profile_spec.rb b/spec/models/inline_response_200_12_risk_information_profile_spec.rb deleted file mode 100644 index a9f82432..00000000 --- a/spec/models/inline_response_200_12_risk_information_profile_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012RiskInformationProfile -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012RiskInformationProfile' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012RiskInformationProfile.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012RiskInformationProfile' do - it 'should create an instance of InlineResponse20012RiskInformationProfile' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012RiskInformationProfile) - end - end - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "decision"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_risk_information_score_spec.rb b/spec/models/inline_response_200_12_risk_information_score_spec.rb deleted file mode 100644 index 345cc404..00000000 --- a/spec/models/inline_response_200_12_risk_information_score_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012RiskInformationScore -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012RiskInformationScore' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012RiskInformationScore.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012RiskInformationScore' do - it 'should create an instance of InlineResponse20012RiskInformationScore' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012RiskInformationScore) - end - end - describe 'test attribute "factor_codes"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "result"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_risk_information_spec.rb b/spec/models/inline_response_200_12_risk_information_spec.rb deleted file mode 100644 index 9855ba05..00000000 --- a/spec/models/inline_response_200_12_risk_information_spec.rb +++ /dev/null @@ -1,71 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012RiskInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012RiskInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012RiskInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012RiskInformation' do - it 'should create an instance of InlineResponse20012RiskInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012RiskInformation) - end - end - describe 'test attribute "profile"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "rules"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "passive_profile"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "passive_rules"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "score"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "local_time"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_sender_information_spec.rb b/spec/models/inline_response_200_12_sender_information_spec.rb deleted file mode 100644 index ee21a23e..00000000 --- a/spec/models/inline_response_200_12_sender_information_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012SenderInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012SenderInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012SenderInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012SenderInformation' do - it 'should create an instance of InlineResponse20012SenderInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012SenderInformation) - end - end - describe 'test attribute "reference_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_12_spec.rb b/spec/models/inline_response_200_12_spec.rb deleted file mode 100644 index 90c91e34..00000000 --- a/spec/models/inline_response_200_12_spec.rb +++ /dev/null @@ -1,179 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20012 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20012' do - before do - # run before each test - @instance = CyberSource::InlineResponse20012.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20012' do - it 'should create an instance of InlineResponse20012' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20012) - end - end - describe 'test attribute "id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "root_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "reconciliation_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "merchant_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "application_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "buyer_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "client_reference_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "consumer_authentication_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "device_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "error_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "installment_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "fraud_marking_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "merchant_defined_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "merchant_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "order_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "payment_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "processing_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "processor_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "point_of_sale_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "risk_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "sender_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "_links"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_13_account_information_spec.rb b/spec/models/inline_response_200_13_account_information_spec.rb deleted file mode 100644 index 89e89357..00000000 --- a/spec/models/inline_response_200_13_account_information_spec.rb +++ /dev/null @@ -1,87 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20013AccountInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20013AccountInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20013AccountInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20013AccountInformation' do - it 'should create an instance of InlineResponse20013AccountInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20013AccountInformation) - end - end - describe 'test attribute "user_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "role_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "permissions"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["active", "inactive", "locked", "disabled", "forgotpassword", "deleted"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "created_time"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "last_access_time"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "language_preference"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "timezone"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_13_contact_information_spec.rb b/spec/models/inline_response_200_13_contact_information_spec.rb deleted file mode 100644 index 08c117e8..00000000 --- a/spec/models/inline_response_200_13_contact_information_spec.rb +++ /dev/null @@ -1,59 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20013ContactInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20013ContactInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20013ContactInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20013ContactInformation' do - it 'should create an instance of InlineResponse20013ContactInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20013ContactInformation) - end - end - describe 'test attribute "email"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "phone_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "first_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "last_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_13_organization_information_spec.rb b/spec/models/inline_response_200_13_organization_information_spec.rb deleted file mode 100644 index 4d19458d..00000000 --- a/spec/models/inline_response_200_13_organization_information_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20013OrganizationInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20013OrganizationInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse20013OrganizationInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20013OrganizationInformation' do - it 'should create an instance of InlineResponse20013OrganizationInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20013OrganizationInformation) - end - end - describe 'test attribute "organization_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_13_spec.rb b/spec/models/inline_response_200_13_spec.rb deleted file mode 100644 index 531cc57a..00000000 --- a/spec/models/inline_response_200_13_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20013 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20013' do - before do - # run before each test - @instance = CyberSource::InlineResponse20013.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20013' do - it 'should create an instance of InlineResponse20013' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20013) - end - end - describe 'test attribute "users"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_13_users_spec.rb b/spec/models/inline_response_200_13_users_spec.rb deleted file mode 100644 index fcf20a00..00000000 --- a/spec/models/inline_response_200_13_users_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse20013Users -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse20013Users' do - before do - # run before each test - @instance = CyberSource::InlineResponse20013Users.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse20013Users' do - it 'should create an instance of InlineResponse20013Users' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse20013Users) - end - end - describe 'test attribute "account_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "organization_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "contact_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_1_spec.rb b/spec/models/inline_response_200_1_spec.rb deleted file mode 100644 index 0466eb31..00000000 --- a/spec/models/inline_response_200_1_spec.rb +++ /dev/null @@ -1,83 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2001 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2001' do - before do - # run before each test - @instance = CyberSource::InlineResponse2001.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2001' do - it 'should create an instance of InlineResponse2001' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2001) - end - end - describe 'test attribute "key_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "token"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "masked_pan"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "card_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "timestamp"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "signed_fields"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "signature"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "discoverable_services"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_2__links_self_spec.rb b/spec/models/inline_response_200_2__links_self_spec.rb deleted file mode 100644 index 9d941468..00000000 --- a/spec/models/inline_response_200_2__links_self_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2002LinksSelf -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002LinksSelf' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002LinksSelf.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002LinksSelf' do - it 'should create an instance of InlineResponse2002LinksSelf' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002LinksSelf) - end - end - describe 'test attribute "href"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "method"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_2__links_spec.rb b/spec/models/inline_response_200_2__links_spec.rb deleted file mode 100644 index de7446e9..00000000 --- a/spec/models/inline_response_200_2__links_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2002Links -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002Links' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002Links.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002Links' do - it 'should create an instance of InlineResponse2002Links' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002Links) - end - end - describe 'test attribute "_self"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_2_spec.rb b/spec/models/inline_response_200_2_spec.rb deleted file mode 100644 index 9f8a3840..00000000 --- a/spec/models/inline_response_200_2_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2002 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002' do - it 'should create an instance of InlineResponse2002' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002) - end - end - describe 'test attribute "transaction_batches"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "_links"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_2_transaction_batches_spec.rb b/spec/models/inline_response_200_2_transaction_batches_spec.rb deleted file mode 100644 index 8db07aa6..00000000 --- a/spec/models/inline_response_200_2_transaction_batches_spec.rb +++ /dev/null @@ -1,77 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2002TransactionBatches -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002TransactionBatches' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002TransactionBatches.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002TransactionBatches' do - it 'should create an instance of InlineResponse2002TransactionBatches' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002TransactionBatches) - end - end - describe 'test attribute "id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "upload_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "completion_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "transaction_count"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "accepted_transaction_count"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "rejected_transaction_count"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_3_notification_of_changes_spec.rb b/spec/models/inline_response_200_3_notification_of_changes_spec.rb deleted file mode 100644 index bee30198..00000000 --- a/spec/models/inline_response_200_3_notification_of_changes_spec.rb +++ /dev/null @@ -1,83 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2003NotificationOfChanges -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2003NotificationOfChanges' do - before do - # run before each test - @instance = CyberSource::InlineResponse2003NotificationOfChanges.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2003NotificationOfChanges' do - it 'should create an instance of InlineResponse2003NotificationOfChanges' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2003NotificationOfChanges) - end - end - describe 'test attribute "merchant_reference_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "transaction_reference_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "time"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "account_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "routing_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "account_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "consumer_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_3_spec.rb b/spec/models/inline_response_200_3_spec.rb deleted file mode 100644 index 1f46f7c1..00000000 --- a/spec/models/inline_response_200_3_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2003 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2003' do - before do - # run before each test - @instance = CyberSource::InlineResponse2003.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2003' do - it 'should create an instance of InlineResponse2003' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2003) - end - end - describe 'test attribute "notification_of_changes"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_4_report_definitions_spec.rb b/spec/models/inline_response_200_4_report_definitions_spec.rb deleted file mode 100644 index 8a830eeb..00000000 --- a/spec/models/inline_response_200_4_report_definitions_spec.rb +++ /dev/null @@ -1,69 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2004ReportDefinitions -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2004ReportDefinitions' do - before do - # run before each test - @instance = CyberSource::InlineResponse2004ReportDefinitions.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2004ReportDefinitions' do - it 'should create an instance of InlineResponse2004ReportDefinitions' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2004ReportDefinitions) - end - end - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_definition_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_defintion_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "supported_formats"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('Array', ["application/xml", "text/csv"]) - # validator.allowable_values.each do |value| - # expect { @instance.supported_formats = value }.not_to raise_error - # end - end - end - - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_4_spec.rb b/spec/models/inline_response_200_4_spec.rb deleted file mode 100644 index b286e4e3..00000000 --- a/spec/models/inline_response_200_4_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2004 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2004' do - before do - # run before each test - @instance = CyberSource::InlineResponse2004.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2004' do - it 'should create an instance of InlineResponse2004' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2004) - end - end - describe 'test attribute "report_definitions"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_5_attributes_spec.rb b/spec/models/inline_response_200_5_attributes_spec.rb deleted file mode 100644 index 82c4ea77..00000000 --- a/spec/models/inline_response_200_5_attributes_spec.rb +++ /dev/null @@ -1,77 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2005Attributes -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2005Attributes' do - before do - # run before each test - @instance = CyberSource::InlineResponse2005Attributes.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2005Attributes' do - it 'should create an instance of InlineResponse2005Attributes' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2005Attributes) - end - end - describe 'test attribute "id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "filter_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "default"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "required"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "supported_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_5_spec.rb b/spec/models/inline_response_200_5_spec.rb deleted file mode 100644 index 3adb9460..00000000 --- a/spec/models/inline_response_200_5_spec.rb +++ /dev/null @@ -1,75 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2005 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2005' do - before do - # run before each test - @instance = CyberSource::InlineResponse2005.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2005' do - it 'should create an instance of InlineResponse2005' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2005) - end - end - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_definition_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_defintion_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "attributes"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "supported_formats"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('Array', ["application/xml", "text/csv"]) - # validator.allowable_values.each do |value| - # expect { @instance.supported_formats = value }.not_to raise_error - # end - end - end - - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_6_report_preferences_spec.rb b/spec/models/inline_response_200_6_report_preferences_spec.rb deleted file mode 100644 index f084bd63..00000000 --- a/spec/models/inline_response_200_6_report_preferences_spec.rb +++ /dev/null @@ -1,51 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2006ReportPreferences -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2006ReportPreferences' do - before do - # run before each test - @instance = CyberSource::InlineResponse2006ReportPreferences.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2006ReportPreferences' do - it 'should create an instance of InlineResponse2006ReportPreferences' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2006ReportPreferences) - end - end - describe 'test attribute "signed_amounts"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "field_name_convention"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["SOAPI", "SCMP"]) - # validator.allowable_values.each do |value| - # expect { @instance.field_name_convention = value }.not_to raise_error - # end - end - end - -end diff --git a/spec/models/inline_response_200_6_spec.rb b/spec/models/inline_response_200_6_spec.rb deleted file mode 100644 index 033e8821..00000000 --- a/spec/models/inline_response_200_6_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2006 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2006' do - before do - # run before each test - @instance = CyberSource::InlineResponse2006.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2006' do - it 'should create an instance of InlineResponse2006' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2006) - end - end - describe 'test attribute "subscriptions"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_6_subscriptions_spec.rb b/spec/models/inline_response_200_6_subscriptions_spec.rb deleted file mode 100644 index 3426c985..00000000 --- a/spec/models/inline_response_200_6_subscriptions_spec.rb +++ /dev/null @@ -1,121 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2006Subscriptions -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2006Subscriptions' do - before do - # run before each test - @instance = CyberSource::InlineResponse2006Subscriptions.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2006Subscriptions' do - it 'should create an instance of InlineResponse2006Subscriptions' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2006Subscriptions) - end - end - describe 'test attribute "organization_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_definition_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_definition_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_mime_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["application/xml", "text/csv"]) - # validator.allowable_values.each do |value| - # expect { @instance.report_mime_type = value }.not_to raise_error - # end - end - end - - describe 'test attribute "report_frequency"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["DAILY", "WEEKLY", "MONTHLY"]) - # validator.allowable_values.each do |value| - # expect { @instance.report_frequency = value }.not_to raise_error - # end - end - end - - describe 'test attribute "report_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "timezone"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "start_time"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "start_day"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_fields"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_filters"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_preferences"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "selected_merchant_group_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_7_reports_spec.rb b/spec/models/inline_response_200_7_reports_spec.rb deleted file mode 100644 index 2bdfd5f5..00000000 --- a/spec/models/inline_response_200_7_reports_spec.rb +++ /dev/null @@ -1,131 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2007Reports -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2007Reports' do - before do - # run before each test - @instance = CyberSource::InlineResponse2007Reports.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2007Reports' do - it 'should create an instance of InlineResponse2007Reports' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2007Reports) - end - end - describe 'test attribute "report_definition_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_mime_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["application/xml", "text/csv"]) - # validator.allowable_values.each do |value| - # expect { @instance.report_mime_type = value }.not_to raise_error - # end - end - end - - describe 'test attribute "report_frequency"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["DAILY", "WEEKLY", "MONTHLY", "ADHOC"]) - # validator.allowable_values.each do |value| - # expect { @instance.report_frequency = value }.not_to raise_error - # end - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["COMPLETED", "PENDING", "QUEUED", "RUNNING", "ERROR", "NO_DATA"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "report_start_time"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_end_time"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "timezone"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "organization_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "queued_time"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_generating_time"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_completed_time"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "selected_merchant_group_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_7_spec.rb b/spec/models/inline_response_200_7_spec.rb deleted file mode 100644 index 600bb958..00000000 --- a/spec/models/inline_response_200_7_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2007 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2007' do - before do - # run before each test - @instance = CyberSource::InlineResponse2007.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2007' do - it 'should create an instance of InlineResponse2007' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2007) - end - end - describe 'test attribute "reports"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_8_spec.rb b/spec/models/inline_response_200_8_spec.rb deleted file mode 100644 index ac474d0f..00000000 --- a/spec/models/inline_response_200_8_spec.rb +++ /dev/null @@ -1,131 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2008 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2008' do - before do - # run before each test - @instance = CyberSource::InlineResponse2008.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2008' do - it 'should create an instance of InlineResponse2008' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2008) - end - end - describe 'test attribute "organization_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_definition_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_mime_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["application/xml", "text/csv"]) - # validator.allowable_values.each do |value| - # expect { @instance.report_mime_type = value }.not_to raise_error - # end - end - end - - describe 'test attribute "report_frequency"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["DAILY", "WEEKLY", "MONTHLY"]) - # validator.allowable_values.each do |value| - # expect { @instance.report_frequency = value }.not_to raise_error - # end - end - end - - describe 'test attribute "report_fields"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["COMPLETED", "PENDING", "QUEUED", "RUNNING", "ERROR", "NO_DATA", "RERUN"]) - # validator.allowable_values.each do |value| - # expect { @instance.report_status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "report_start_time"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_end_time"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "timezone"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_filters"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "report_preferences"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "selected_merchant_group_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_9__links_files_spec.rb b/spec/models/inline_response_200_9__links_files_spec.rb deleted file mode 100644 index 36598be0..00000000 --- a/spec/models/inline_response_200_9__links_files_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2009LinksFiles -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2009LinksFiles' do - before do - # run before each test - @instance = CyberSource::InlineResponse2009LinksFiles.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2009LinksFiles' do - it 'should create an instance of InlineResponse2009LinksFiles' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2009LinksFiles) - end - end - describe 'test attribute "file_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "href"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "method"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_9__links_self_spec.rb b/spec/models/inline_response_200_9__links_self_spec.rb deleted file mode 100644 index 96a10b04..00000000 --- a/spec/models/inline_response_200_9__links_self_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2009LinksSelf -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2009LinksSelf' do - before do - # run before each test - @instance = CyberSource::InlineResponse2009LinksSelf.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2009LinksSelf' do - it 'should create an instance of InlineResponse2009LinksSelf' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2009LinksSelf) - end - end - describe 'test attribute "href"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "method"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_9__links_spec.rb b/spec/models/inline_response_200_9__links_spec.rb deleted file mode 100644 index d92b185f..00000000 --- a/spec/models/inline_response_200_9__links_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2009Links -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2009Links' do - before do - # run before each test - @instance = CyberSource::InlineResponse2009Links.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2009Links' do - it 'should create an instance of InlineResponse2009Links' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2009Links) - end - end - describe 'test attribute "_self"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "files"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_9_file_details_spec.rb b/spec/models/inline_response_200_9_file_details_spec.rb deleted file mode 100644 index 1b0131f5..00000000 --- a/spec/models/inline_response_200_9_file_details_spec.rb +++ /dev/null @@ -1,81 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2009FileDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2009FileDetails' do - before do - # run before each test - @instance = CyberSource::InlineResponse2009FileDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2009FileDetails' do - it 'should create an instance of InlineResponse2009FileDetails' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2009FileDetails) - end - end - describe 'test attribute "file_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "created_time"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "last_modified_time"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "mime_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["application/xml", "text/csv", "application/pdf", "application/octet-stream"]) - # validator.allowable_values.each do |value| - # expect { @instance.mime_type = value }.not_to raise_error - # end - end - end - - describe 'test attribute "size"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_9_spec.rb b/spec/models/inline_response_200_9_spec.rb deleted file mode 100644 index e4ca7942..00000000 --- a/spec/models/inline_response_200_9_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2009 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2009' do - before do - # run before each test - @instance = CyberSource::InlineResponse2009.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2009' do - it 'should create an instance of InlineResponse2009' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2009) - end - end - describe 'test attribute "file_details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "_links"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_der_spec.rb b/spec/models/inline_response_200_der_spec.rb deleted file mode 100644 index 741347d1..00000000 --- a/spec/models/inline_response_200_der_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse200Der -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse200Der' do - before do - # run before each test - @instance = CyberSource::InlineResponse200Der.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse200Der' do - it 'should create an instance of InlineResponse200Der' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse200Der) - end - end - describe 'test attribute "format"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "algorithm"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "public_key"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_jwk_spec.rb b/spec/models/inline_response_200_jwk_spec.rb deleted file mode 100644 index 67845bfd..00000000 --- a/spec/models/inline_response_200_jwk_spec.rb +++ /dev/null @@ -1,65 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse200Jwk -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse200Jwk' do - before do - # run before each test - @instance = CyberSource::InlineResponse200Jwk.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse200Jwk' do - it 'should create an instance of InlineResponse200Jwk' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse200Jwk) - end - end - describe 'test attribute "kty"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "use"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "kid"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "n"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "e"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_200_spec.rb b/spec/models/inline_response_200_spec.rb deleted file mode 100644 index f5e09407..00000000 --- a/spec/models/inline_response_200_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse200 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse200' do - before do - # run before each test - @instance = CyberSource::InlineResponse200.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse200' do - it 'should create an instance of InlineResponse200' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse200) - end - end - describe 'test attribute "key_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "der"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "jwk"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_1__links_spec.rb b/spec/models/inline_response_201_1__links_spec.rb deleted file mode 100644 index 846c895c..00000000 --- a/spec/models/inline_response_201_1__links_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2011Links -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2011Links' do - before do - # run before each test - @instance = CyberSource::InlineResponse2011Links.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2011Links' do - it 'should create an instance of InlineResponse2011Links' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2011Links) - end - end - describe 'test attribute "_self"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_1_authorization_information_spec.rb b/spec/models/inline_response_201_1_authorization_information_spec.rb deleted file mode 100644 index 0829093f..00000000 --- a/spec/models/inline_response_201_1_authorization_information_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2011AuthorizationInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2011AuthorizationInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2011AuthorizationInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2011AuthorizationInformation' do - it 'should create an instance of InlineResponse2011AuthorizationInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2011AuthorizationInformation) - end - end - describe 'test attribute "approval_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "reason_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_1_processor_information_spec.rb b/spec/models/inline_response_201_1_processor_information_spec.rb deleted file mode 100644 index 5ef556e4..00000000 --- a/spec/models/inline_response_201_1_processor_information_spec.rb +++ /dev/null @@ -1,71 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2011ProcessorInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2011ProcessorInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2011ProcessorInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2011ProcessorInformation' do - it 'should create an instance of InlineResponse2011ProcessorInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2011ProcessorInformation) - end - end - describe 'test attribute "transaction_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "response_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "response_category_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "forwarded_acquirer_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "master_card_service_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "master_card_service_reply_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_1_reversal_amount_details_spec.rb b/spec/models/inline_response_201_1_reversal_amount_details_spec.rb deleted file mode 100644 index d9c85e82..00000000 --- a/spec/models/inline_response_201_1_reversal_amount_details_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2011ReversalAmountDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2011ReversalAmountDetails' do - before do - # run before each test - @instance = CyberSource::InlineResponse2011ReversalAmountDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2011ReversalAmountDetails' do - it 'should create an instance of InlineResponse2011ReversalAmountDetails' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2011ReversalAmountDetails) - end - end - describe 'test attribute "reversed_amount"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "original_transaction_amount"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "currency"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_1_spec.rb b/spec/models/inline_response_201_1_spec.rb deleted file mode 100644 index 10d4ad3d..00000000 --- a/spec/models/inline_response_201_1_spec.rb +++ /dev/null @@ -1,99 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2011 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2011' do - before do - # run before each test - @instance = CyberSource::InlineResponse2011.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2011' do - it 'should create an instance of InlineResponse2011' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2011) - end - end - describe 'test attribute "_links"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["REVERSED"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "reconciliation_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "client_reference_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "reversal_amount_details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "processor_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "authorization_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "point_of_sale_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_2__links_spec.rb b/spec/models/inline_response_201_2__links_spec.rb deleted file mode 100644 index 2a00101f..00000000 --- a/spec/models/inline_response_201_2__links_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2012Links -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2012Links' do - before do - # run before each test - @instance = CyberSource::InlineResponse2012Links.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2012Links' do - it 'should create an instance of InlineResponse2012Links' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2012Links) - end - end - describe 'test attribute "_self"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "void"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "refund"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_2_order_information_amount_details_spec.rb b/spec/models/inline_response_201_2_order_information_amount_details_spec.rb deleted file mode 100644 index 1c6b61f1..00000000 --- a/spec/models/inline_response_201_2_order_information_amount_details_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2012OrderInformationAmountDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2012OrderInformationAmountDetails' do - before do - # run before each test - @instance = CyberSource::InlineResponse2012OrderInformationAmountDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2012OrderInformationAmountDetails' do - it 'should create an instance of InlineResponse2012OrderInformationAmountDetails' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2012OrderInformationAmountDetails) - end - end - describe 'test attribute "total_amount"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "currency"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_2_order_information_spec.rb b/spec/models/inline_response_201_2_order_information_spec.rb deleted file mode 100644 index a1cd37a6..00000000 --- a/spec/models/inline_response_201_2_order_information_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2012OrderInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2012OrderInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2012OrderInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2012OrderInformation' do - it 'should create an instance of InlineResponse2012OrderInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2012OrderInformation) - end - end - describe 'test attribute "amount_details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "invoice_details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_2_processor_information_spec.rb b/spec/models/inline_response_201_2_processor_information_spec.rb deleted file mode 100644 index 2fe141c8..00000000 --- a/spec/models/inline_response_201_2_processor_information_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2012ProcessorInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2012ProcessorInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2012ProcessorInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2012ProcessorInformation' do - it 'should create an instance of InlineResponse2012ProcessorInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2012ProcessorInformation) - end - end - describe 'test attribute "transaction_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_2_spec.rb b/spec/models/inline_response_201_2_spec.rb deleted file mode 100644 index 20e091bb..00000000 --- a/spec/models/inline_response_201_2_spec.rb +++ /dev/null @@ -1,87 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2012 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2012' do - before do - # run before each test - @instance = CyberSource::InlineResponse2012.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2012' do - it 'should create an instance of InlineResponse2012' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2012) - end - end - describe 'test attribute "_links"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PENDING"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "reconciliation_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "client_reference_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "processor_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "order_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_3__links_spec.rb b/spec/models/inline_response_201_3__links_spec.rb deleted file mode 100644 index 4326d38e..00000000 --- a/spec/models/inline_response_201_3__links_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2013Links -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2013Links' do - before do - # run before each test - @instance = CyberSource::InlineResponse2013Links.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2013Links' do - it 'should create an instance of InlineResponse2013Links' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2013Links) - end - end - describe 'test attribute "_self"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "void"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_3_order_information_spec.rb b/spec/models/inline_response_201_3_order_information_spec.rb deleted file mode 100644 index 0d051fe8..00000000 --- a/spec/models/inline_response_201_3_order_information_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2013OrderInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2013OrderInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2013OrderInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2013OrderInformation' do - it 'should create an instance of InlineResponse2013OrderInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2013OrderInformation) - end - end - describe 'test attribute "invoice_details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_3_processor_information_spec.rb b/spec/models/inline_response_201_3_processor_information_spec.rb deleted file mode 100644 index 3646a06d..00000000 --- a/spec/models/inline_response_201_3_processor_information_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2013ProcessorInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2013ProcessorInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2013ProcessorInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2013ProcessorInformation' do - it 'should create an instance of InlineResponse2013ProcessorInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2013ProcessorInformation) - end - end - describe 'test attribute "transaction_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "forwarded_acquirer_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_3_refund_amount_details_spec.rb b/spec/models/inline_response_201_3_refund_amount_details_spec.rb deleted file mode 100644 index 1d973516..00000000 --- a/spec/models/inline_response_201_3_refund_amount_details_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2013RefundAmountDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2013RefundAmountDetails' do - before do - # run before each test - @instance = CyberSource::InlineResponse2013RefundAmountDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2013RefundAmountDetails' do - it 'should create an instance of InlineResponse2013RefundAmountDetails' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2013RefundAmountDetails) - end - end - describe 'test attribute "refund_amount"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "currency"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_3_spec.rb b/spec/models/inline_response_201_3_spec.rb deleted file mode 100644 index b4329074..00000000 --- a/spec/models/inline_response_201_3_spec.rb +++ /dev/null @@ -1,93 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2013 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2013' do - before do - # run before each test - @instance = CyberSource::InlineResponse2013.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2013' do - it 'should create an instance of InlineResponse2013' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2013) - end - end - describe 'test attribute "_links"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PENDING"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "reconciliation_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "client_reference_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "refund_amount_details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "processor_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "order_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_4_credit_amount_details_spec.rb b/spec/models/inline_response_201_4_credit_amount_details_spec.rb deleted file mode 100644 index c4d1b0c6..00000000 --- a/spec/models/inline_response_201_4_credit_amount_details_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2014CreditAmountDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2014CreditAmountDetails' do - before do - # run before each test - @instance = CyberSource::InlineResponse2014CreditAmountDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2014CreditAmountDetails' do - it 'should create an instance of InlineResponse2014CreditAmountDetails' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2014CreditAmountDetails) - end - end - describe 'test attribute "credit_amount"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "currency"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_4_spec.rb b/spec/models/inline_response_201_4_spec.rb deleted file mode 100644 index d950f9dc..00000000 --- a/spec/models/inline_response_201_4_spec.rb +++ /dev/null @@ -1,93 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2014 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2014' do - before do - # run before each test - @instance = CyberSource::InlineResponse2014.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2014' do - it 'should create an instance of InlineResponse2014' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2014) - end - end - describe 'test attribute "_links"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PENDING"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "reconciliation_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "client_reference_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "credit_amount_details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "processor_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "order_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_5_spec.rb b/spec/models/inline_response_201_5_spec.rb deleted file mode 100644 index 868bd22b..00000000 --- a/spec/models/inline_response_201_5_spec.rb +++ /dev/null @@ -1,75 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2015 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2015' do - before do - # run before each test - @instance = CyberSource::InlineResponse2015.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2015' do - it 'should create an instance of InlineResponse2015' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2015) - end - end - describe 'test attribute "_links"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["VOIDED"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "client_reference_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "void_amount_details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_5_void_amount_details_spec.rb b/spec/models/inline_response_201_5_void_amount_details_spec.rb deleted file mode 100644 index 9a75ac3f..00000000 --- a/spec/models/inline_response_201_5_void_amount_details_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2015VoidAmountDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2015VoidAmountDetails' do - before do - # run before each test - @instance = CyberSource::InlineResponse2015VoidAmountDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2015VoidAmountDetails' do - it 'should create an instance of InlineResponse2015VoidAmountDetails' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2015VoidAmountDetails) - end - end - describe 'test attribute "void_amount"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "original_transaction_amount"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "currency"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_6_spec.rb b/spec/models/inline_response_201_6_spec.rb deleted file mode 100644 index 2ff2e2b0..00000000 --- a/spec/models/inline_response_201_6_spec.rb +++ /dev/null @@ -1,115 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2016 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2016' do - before do - # run before each test - @instance = CyberSource::InlineResponse2016.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2016' do - it 'should create an instance of InlineResponse2016' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2016) - end - end - describe 'test attribute "_links"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "object"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["paymentInstrument"]) - # validator.allowable_values.each do |value| - # expect { @instance.object = value }.not_to raise_error - # end - end - end - - describe 'test attribute "state"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ACTIVE", "CLOSED"]) - # validator.allowable_values.each do |value| - # expect { @instance.state = value }.not_to raise_error - # end - end - end - - describe 'test attribute "bank_account"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "card"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "buyer_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "bill_to"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "processing_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "merchant_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "meta_data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "instrument_identifier"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded__links_spec.rb b/spec/models/inline_response_201_7__embedded__links_spec.rb deleted file mode 100644 index 0ed8c480..00000000 --- a/spec/models/inline_response_201_7__embedded__links_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedLinks -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedLinks' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedLinks.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedLinks' do - it 'should create an instance of InlineResponse2017EmbeddedLinks' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedLinks) - end - end - describe 'test attribute "transaction_detail"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_buyer_information_spec.rb b/spec/models/inline_response_201_7__embedded_buyer_information_spec.rb deleted file mode 100644 index 8d85a815..00000000 --- a/spec/models/inline_response_201_7__embedded_buyer_information_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedBuyerInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedBuyerInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedBuyerInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedBuyerInformation' do - it 'should create an instance of InlineResponse2017EmbeddedBuyerInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedBuyerInformation) - end - end - describe 'test attribute "merchant_customer_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_client_reference_information_spec.rb b/spec/models/inline_response_201_7__embedded_client_reference_information_spec.rb deleted file mode 100644 index 0e77a5c7..00000000 --- a/spec/models/inline_response_201_7__embedded_client_reference_information_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedClientReferenceInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedClientReferenceInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedClientReferenceInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedClientReferenceInformation' do - it 'should create an instance of InlineResponse2017EmbeddedClientReferenceInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedClientReferenceInformation) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "application_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "application_user"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_consumer_authentication_information_spec.rb b/spec/models/inline_response_201_7__embedded_consumer_authentication_information_spec.rb deleted file mode 100644 index 19283b5a..00000000 --- a/spec/models/inline_response_201_7__embedded_consumer_authentication_information_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedConsumerAuthenticationInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedConsumerAuthenticationInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedConsumerAuthenticationInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedConsumerAuthenticationInformation' do - it 'should create an instance of InlineResponse2017EmbeddedConsumerAuthenticationInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedConsumerAuthenticationInformation) - end - end - describe 'test attribute "xid"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "transaction_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_device_information_spec.rb b/spec/models/inline_response_201_7__embedded_device_information_spec.rb deleted file mode 100644 index 1fd94d15..00000000 --- a/spec/models/inline_response_201_7__embedded_device_information_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedDeviceInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedDeviceInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedDeviceInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedDeviceInformation' do - it 'should create an instance of InlineResponse2017EmbeddedDeviceInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedDeviceInformation) - end - end - describe 'test attribute "ip_address"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_merchant_information_spec.rb b/spec/models/inline_response_201_7__embedded_merchant_information_spec.rb deleted file mode 100644 index 62aa9c27..00000000 --- a/spec/models/inline_response_201_7__embedded_merchant_information_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedMerchantInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedMerchantInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedMerchantInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedMerchantInformation' do - it 'should create an instance of InlineResponse2017EmbeddedMerchantInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedMerchantInformation) - end - end - describe 'test attribute "reseller_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_order_information_bill_to_spec.rb b/spec/models/inline_response_201_7__embedded_order_information_bill_to_spec.rb deleted file mode 100644 index e8ec2126..00000000 --- a/spec/models/inline_response_201_7__embedded_order_information_bill_to_spec.rb +++ /dev/null @@ -1,65 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedOrderInformationBillTo -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedOrderInformationBillTo' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedOrderInformationBillTo.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedOrderInformationBillTo' do - it 'should create an instance of InlineResponse2017EmbeddedOrderInformationBillTo' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedOrderInformationBillTo) - end - end - describe 'test attribute "first_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "last_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "email"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "country"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "phone_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_order_information_ship_to_spec.rb b/spec/models/inline_response_201_7__embedded_order_information_ship_to_spec.rb deleted file mode 100644 index 5efbef80..00000000 --- a/spec/models/inline_response_201_7__embedded_order_information_ship_to_spec.rb +++ /dev/null @@ -1,65 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedOrderInformationShipTo -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedOrderInformationShipTo' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedOrderInformationShipTo.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedOrderInformationShipTo' do - it 'should create an instance of InlineResponse2017EmbeddedOrderInformationShipTo' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedOrderInformationShipTo) - end - end - describe 'test attribute "first_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "last_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "address1"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "country"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "phone_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_order_information_spec.rb b/spec/models/inline_response_201_7__embedded_order_information_spec.rb deleted file mode 100644 index bf56caf0..00000000 --- a/spec/models/inline_response_201_7__embedded_order_information_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedOrderInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedOrderInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedOrderInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedOrderInformation' do - it 'should create an instance of InlineResponse2017EmbeddedOrderInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedOrderInformation) - end - end - describe 'test attribute "bill_to"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "ship_to"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "amount_details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_payment_information_card_spec.rb b/spec/models/inline_response_201_7__embedded_payment_information_card_spec.rb deleted file mode 100644 index 7aa455e0..00000000 --- a/spec/models/inline_response_201_7__embedded_payment_information_card_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedPaymentInformationCard -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedPaymentInformationCard' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedPaymentInformationCard.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedPaymentInformationCard' do - it 'should create an instance of InlineResponse2017EmbeddedPaymentInformationCard' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedPaymentInformationCard) - end - end - describe 'test attribute "suffix"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "prefix"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_payment_information_payment_method_spec.rb b/spec/models/inline_response_201_7__embedded_payment_information_payment_method_spec.rb deleted file mode 100644 index 2db795dc..00000000 --- a/spec/models/inline_response_201_7__embedded_payment_information_payment_method_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedPaymentInformationPaymentMethod -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedPaymentInformationPaymentMethod' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedPaymentInformationPaymentMethod.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedPaymentInformationPaymentMethod' do - it 'should create an instance of InlineResponse2017EmbeddedPaymentInformationPaymentMethod' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedPaymentInformationPaymentMethod) - end - end - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_payment_information_spec.rb b/spec/models/inline_response_201_7__embedded_payment_information_spec.rb deleted file mode 100644 index 73ba8eff..00000000 --- a/spec/models/inline_response_201_7__embedded_payment_information_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedPaymentInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedPaymentInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedPaymentInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedPaymentInformation' do - it 'should create an instance of InlineResponse2017EmbeddedPaymentInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedPaymentInformation) - end - end - describe 'test attribute "payment_method"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "customer"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "card"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_point_of_sale_information_partner_spec.rb b/spec/models/inline_response_201_7__embedded_point_of_sale_information_partner_spec.rb deleted file mode 100644 index fecad03d..00000000 --- a/spec/models/inline_response_201_7__embedded_point_of_sale_information_partner_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedPointOfSaleInformationPartner -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedPointOfSaleInformationPartner' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedPointOfSaleInformationPartner.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedPointOfSaleInformationPartner' do - it 'should create an instance of InlineResponse2017EmbeddedPointOfSaleInformationPartner' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedPointOfSaleInformationPartner) - end - end - describe 'test attribute "original_transaction_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_point_of_sale_information_spec.rb b/spec/models/inline_response_201_7__embedded_point_of_sale_information_spec.rb deleted file mode 100644 index 519e3246..00000000 --- a/spec/models/inline_response_201_7__embedded_point_of_sale_information_spec.rb +++ /dev/null @@ -1,59 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedPointOfSaleInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedPointOfSaleInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedPointOfSaleInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedPointOfSaleInformation' do - it 'should create an instance of InlineResponse2017EmbeddedPointOfSaleInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedPointOfSaleInformation) - end - end - describe 'test attribute "terminal_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "terminal_serial_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "device_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "partner"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_processing_information_spec.rb b/spec/models/inline_response_201_7__embedded_processing_information_spec.rb deleted file mode 100644 index c0cc2c87..00000000 --- a/spec/models/inline_response_201_7__embedded_processing_information_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedProcessingInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedProcessingInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedProcessingInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedProcessingInformation' do - it 'should create an instance of InlineResponse2017EmbeddedProcessingInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedProcessingInformation) - end - end - describe 'test attribute "payment_solution"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "business_application_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_processor_information_spec.rb b/spec/models/inline_response_201_7__embedded_processor_information_spec.rb deleted file mode 100644 index f77c103c..00000000 --- a/spec/models/inline_response_201_7__embedded_processor_information_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedProcessorInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedProcessorInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedProcessorInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedProcessorInformation' do - it 'should create an instance of InlineResponse2017EmbeddedProcessorInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedProcessorInformation) - end - end - describe 'test attribute "processor"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_risk_information_providers_fingerprint_spec.rb b/spec/models/inline_response_201_7__embedded_risk_information_providers_fingerprint_spec.rb deleted file mode 100644 index ee7341e8..00000000 --- a/spec/models/inline_response_201_7__embedded_risk_information_providers_fingerprint_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedRiskInformationProvidersFingerprint -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedRiskInformationProvidersFingerprint' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedRiskInformationProvidersFingerprint.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedRiskInformationProvidersFingerprint' do - it 'should create an instance of InlineResponse2017EmbeddedRiskInformationProvidersFingerprint' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedRiskInformationProvidersFingerprint) - end - end - describe 'test attribute "true_ipaddress"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "hash"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "smart_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_risk_information_providers_spec.rb b/spec/models/inline_response_201_7__embedded_risk_information_providers_spec.rb deleted file mode 100644 index 4244dde1..00000000 --- a/spec/models/inline_response_201_7__embedded_risk_information_providers_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedRiskInformationProviders -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedRiskInformationProviders' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedRiskInformationProviders.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedRiskInformationProviders' do - it 'should create an instance of InlineResponse2017EmbeddedRiskInformationProviders' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedRiskInformationProviders) - end - end - describe 'test attribute "fingerprint"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_risk_information_spec.rb b/spec/models/inline_response_201_7__embedded_risk_information_spec.rb deleted file mode 100644 index 1cacc675..00000000 --- a/spec/models/inline_response_201_7__embedded_risk_information_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedRiskInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedRiskInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedRiskInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedRiskInformation' do - it 'should create an instance of InlineResponse2017EmbeddedRiskInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedRiskInformation) - end - end - describe 'test attribute "providers"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_spec.rb b/spec/models/inline_response_201_7__embedded_spec.rb deleted file mode 100644 index ba1e5a59..00000000 --- a/spec/models/inline_response_201_7__embedded_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017Embedded -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017Embedded' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017Embedded.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017Embedded' do - it 'should create an instance of InlineResponse2017Embedded' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017Embedded) - end - end - describe 'test attribute "transaction_summaries"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7__embedded_transaction_summaries_spec.rb b/spec/models/inline_response_201_7__embedded_transaction_summaries_spec.rb deleted file mode 100644 index c2114dbe..00000000 --- a/spec/models/inline_response_201_7__embedded_transaction_summaries_spec.rb +++ /dev/null @@ -1,143 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017EmbeddedTransactionSummaries -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017EmbeddedTransactionSummaries' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017EmbeddedTransactionSummaries.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017EmbeddedTransactionSummaries' do - it 'should create an instance of InlineResponse2017EmbeddedTransactionSummaries' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017EmbeddedTransactionSummaries) - end - end - describe 'test attribute "id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "merchant_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "application_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "buyer_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "client_reference_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "consumer_authentication_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "device_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "fraud_marking_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "merchant_defined_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "merchant_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "order_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "payment_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "processing_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "processor_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "point_of_sale_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "risk_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "_links"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_7_spec.rb b/spec/models/inline_response_201_7_spec.rb deleted file mode 100644 index bffaf439..00000000 --- a/spec/models/inline_response_201_7_spec.rb +++ /dev/null @@ -1,113 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2017 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2017' do - before do - # run before each test - @instance = CyberSource::InlineResponse2017.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2017' do - it 'should create an instance of InlineResponse2017' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2017) - end - end - describe 'test attribute "id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "save"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "timezone"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "query"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "offset"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "limit"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "sort"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "count"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "total_count"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "_embedded"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "_links"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201__links_self_spec.rb b/spec/models/inline_response_201__links_self_spec.rb deleted file mode 100644 index d8487288..00000000 --- a/spec/models/inline_response_201__links_self_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201LinksSelf -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201LinksSelf' do - before do - # run before each test - @instance = CyberSource::InlineResponse201LinksSelf.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201LinksSelf' do - it 'should create an instance of InlineResponse201LinksSelf' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201LinksSelf) - end - end - describe 'test attribute "href"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "method"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201__links_spec.rb b/spec/models/inline_response_201__links_spec.rb deleted file mode 100644 index ab2e7d2c..00000000 --- a/spec/models/inline_response_201__links_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201Links -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201Links' do - before do - # run before each test - @instance = CyberSource::InlineResponse201Links.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201Links' do - it 'should create an instance of InlineResponse201Links' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201Links) - end - end - describe 'test attribute "_self"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "reversal"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "capture"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_client_reference_information_spec.rb b/spec/models/inline_response_201_client_reference_information_spec.rb deleted file mode 100644 index d3b1d812..00000000 --- a/spec/models/inline_response_201_client_reference_information_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201ClientReferenceInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201ClientReferenceInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse201ClientReferenceInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201ClientReferenceInformation' do - it 'should create an instance of InlineResponse201ClientReferenceInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201ClientReferenceInformation) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_error_information_details_spec.rb b/spec/models/inline_response_201_error_information_details_spec.rb deleted file mode 100644 index 0880818d..00000000 --- a/spec/models/inline_response_201_error_information_details_spec.rb +++ /dev/null @@ -1,51 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201ErrorInformationDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201ErrorInformationDetails' do - before do - # run before each test - @instance = CyberSource::InlineResponse201ErrorInformationDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201ErrorInformationDetails' do - it 'should create an instance of InlineResponse201ErrorInformationDetails' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201ErrorInformationDetails) - end - end - describe 'test attribute "field"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "reason"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["MISSING_FIELD", "INVALID_DATA"]) - # validator.allowable_values.each do |value| - # expect { @instance.reason = value }.not_to raise_error - # end - end - end - -end diff --git a/spec/models/inline_response_201_error_information_spec.rb b/spec/models/inline_response_201_error_information_spec.rb deleted file mode 100644 index 8a255d67..00000000 --- a/spec/models/inline_response_201_error_information_spec.rb +++ /dev/null @@ -1,57 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201ErrorInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201ErrorInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse201ErrorInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201ErrorInformation' do - it 'should create an instance of InlineResponse201ErrorInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201ErrorInformation) - end - end - describe 'test attribute "reason"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["AVS_FAILED", "CONTACT_PROCESSOR", "CV_FAILED", "EXPIRED_CARD", "PROCESSOR_DECLINED", "INSUFFICIENT_FUND", "STOLEN_LOST_CARD", "ISSUER_UNAVAILABLE", "UNAUTHORIZED_CARD", "CVN_NOT_MATCH", "EXCEEDS_CREDIT_LIMIT", "INVALID_CVN", "PAYMENT_REFUSED", "INVALID_ACCOUNT", "GENERAL_DECLINE"]) - # validator.allowable_values.each do |value| - # expect { @instance.reason = value }.not_to raise_error - # end - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_order_information_amount_details_spec.rb b/spec/models/inline_response_201_order_information_amount_details_spec.rb deleted file mode 100644 index fd52209a..00000000 --- a/spec/models/inline_response_201_order_information_amount_details_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201OrderInformationAmountDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201OrderInformationAmountDetails' do - before do - # run before each test - @instance = CyberSource::InlineResponse201OrderInformationAmountDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201OrderInformationAmountDetails' do - it 'should create an instance of InlineResponse201OrderInformationAmountDetails' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201OrderInformationAmountDetails) - end - end - describe 'test attribute "total_amount"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "authorized_amount"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "currency"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_order_information_invoice_details_spec.rb b/spec/models/inline_response_201_order_information_invoice_details_spec.rb deleted file mode 100644 index 832621d6..00000000 --- a/spec/models/inline_response_201_order_information_invoice_details_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201OrderInformationInvoiceDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201OrderInformationInvoiceDetails' do - before do - # run before each test - @instance = CyberSource::InlineResponse201OrderInformationInvoiceDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201OrderInformationInvoiceDetails' do - it 'should create an instance of InlineResponse201OrderInformationInvoiceDetails' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201OrderInformationInvoiceDetails) - end - end - describe 'test attribute "level3_transmission_status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_order_information_spec.rb b/spec/models/inline_response_201_order_information_spec.rb deleted file mode 100644 index c58f6bf9..00000000 --- a/spec/models/inline_response_201_order_information_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201OrderInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201OrderInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse201OrderInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201OrderInformation' do - it 'should create an instance of InlineResponse201OrderInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201OrderInformation) - end - end - describe 'test attribute "amount_details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "invoice_details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_payment_information_account_features_spec.rb b/spec/models/inline_response_201_payment_information_account_features_spec.rb deleted file mode 100644 index 3023139b..00000000 --- a/spec/models/inline_response_201_payment_information_account_features_spec.rb +++ /dev/null @@ -1,141 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201PaymentInformationAccountFeatures -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201PaymentInformationAccountFeatures' do - before do - # run before each test - @instance = CyberSource::InlineResponse201PaymentInformationAccountFeatures.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201PaymentInformationAccountFeatures' do - it 'should create an instance of InlineResponse201PaymentInformationAccountFeatures' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201PaymentInformationAccountFeatures) - end - end - describe 'test attribute "account_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "account_status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "balance_amount"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "balance_amount_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "currency"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "balance_sign"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["+", "-"]) - # validator.allowable_values.each do |value| - # expect { @instance.balance_sign = value }.not_to raise_error - # end - end - end - - describe 'test attribute "affluence_indicator"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "category"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "commercial"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "group"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "health_care"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "payroll"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "level3_eligible"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "pinless_debit"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "signature_debit"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "prepaid"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "regulated"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_payment_information_card_spec.rb b/spec/models/inline_response_201_payment_information_card_spec.rb deleted file mode 100644 index 37254db7..00000000 --- a/spec/models/inline_response_201_payment_information_card_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201PaymentInformationCard -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201PaymentInformationCard' do - before do - # run before each test - @instance = CyberSource::InlineResponse201PaymentInformationCard.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201PaymentInformationCard' do - it 'should create an instance of InlineResponse201PaymentInformationCard' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201PaymentInformationCard) - end - end - describe 'test attribute "suffix"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_payment_information_spec.rb b/spec/models/inline_response_201_payment_information_spec.rb deleted file mode 100644 index ac747266..00000000 --- a/spec/models/inline_response_201_payment_information_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201PaymentInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201PaymentInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse201PaymentInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201PaymentInformation' do - it 'should create an instance of InlineResponse201PaymentInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201PaymentInformation) - end - end - describe 'test attribute "card"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "tokenized_card"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "account_features"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_payment_information_tokenized_card_spec.rb b/spec/models/inline_response_201_payment_information_tokenized_card_spec.rb deleted file mode 100644 index 0fef3c73..00000000 --- a/spec/models/inline_response_201_payment_information_tokenized_card_spec.rb +++ /dev/null @@ -1,77 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201PaymentInformationTokenizedCard -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201PaymentInformationTokenizedCard' do - before do - # run before each test - @instance = CyberSource::InlineResponse201PaymentInformationTokenizedCard.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201PaymentInformationTokenizedCard' do - it 'should create an instance of InlineResponse201PaymentInformationTokenizedCard' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201PaymentInformationTokenizedCard) - end - end - describe 'test attribute "prefix"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "suffix"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "assurance_level"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "expiration_month"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "expiration_year"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "requestor_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_point_of_sale_information_emv_spec.rb b/spec/models/inline_response_201_point_of_sale_information_emv_spec.rb deleted file mode 100644 index 6710b9df..00000000 --- a/spec/models/inline_response_201_point_of_sale_information_emv_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201PointOfSaleInformationEmv -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201PointOfSaleInformationEmv' do - before do - # run before each test - @instance = CyberSource::InlineResponse201PointOfSaleInformationEmv.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201PointOfSaleInformationEmv' do - it 'should create an instance of InlineResponse201PointOfSaleInformationEmv' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201PointOfSaleInformationEmv) - end - end - describe 'test attribute "tags"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_point_of_sale_information_spec.rb b/spec/models/inline_response_201_point_of_sale_information_spec.rb deleted file mode 100644 index 43d713bd..00000000 --- a/spec/models/inline_response_201_point_of_sale_information_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201PointOfSaleInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201PointOfSaleInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse201PointOfSaleInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201PointOfSaleInformation' do - it 'should create an instance of InlineResponse201PointOfSaleInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201PointOfSaleInformation) - end - end - describe 'test attribute "emv"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "amex_capn_data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_processor_information_avs_spec.rb b/spec/models/inline_response_201_processor_information_avs_spec.rb deleted file mode 100644 index 22aa505f..00000000 --- a/spec/models/inline_response_201_processor_information_avs_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201ProcessorInformationAvs -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201ProcessorInformationAvs' do - before do - # run before each test - @instance = CyberSource::InlineResponse201ProcessorInformationAvs.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201ProcessorInformationAvs' do - it 'should create an instance of InlineResponse201ProcessorInformationAvs' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201ProcessorInformationAvs) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "code_raw"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_processor_information_card_verification_spec.rb b/spec/models/inline_response_201_processor_information_card_verification_spec.rb deleted file mode 100644 index 00bfe7b7..00000000 --- a/spec/models/inline_response_201_processor_information_card_verification_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201ProcessorInformationCardVerification -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201ProcessorInformationCardVerification' do - before do - # run before each test - @instance = CyberSource::InlineResponse201ProcessorInformationCardVerification.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201ProcessorInformationCardVerification' do - it 'should create an instance of InlineResponse201ProcessorInformationCardVerification' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201ProcessorInformationCardVerification) - end - end - describe 'test attribute "result_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "result_code_raw"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_processor_information_consumer_authentication_response_spec.rb b/spec/models/inline_response_201_processor_information_consumer_authentication_response_spec.rb deleted file mode 100644 index d5cf535a..00000000 --- a/spec/models/inline_response_201_processor_information_consumer_authentication_response_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201ProcessorInformationConsumerAuthenticationResponse -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201ProcessorInformationConsumerAuthenticationResponse' do - before do - # run before each test - @instance = CyberSource::InlineResponse201ProcessorInformationConsumerAuthenticationResponse.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201ProcessorInformationConsumerAuthenticationResponse' do - it 'should create an instance of InlineResponse201ProcessorInformationConsumerAuthenticationResponse' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201ProcessorInformationConsumerAuthenticationResponse) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "code_raw"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_processor_information_customer_spec.rb b/spec/models/inline_response_201_processor_information_customer_spec.rb deleted file mode 100644 index ed2c6f4c..00000000 --- a/spec/models/inline_response_201_processor_information_customer_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201ProcessorInformationCustomer -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201ProcessorInformationCustomer' do - before do - # run before each test - @instance = CyberSource::InlineResponse201ProcessorInformationCustomer.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201ProcessorInformationCustomer' do - it 'should create an instance of InlineResponse201ProcessorInformationCustomer' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201ProcessorInformationCustomer) - end - end - describe 'test attribute "personal_id_result"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_processor_information_electronic_verification_results_spec.rb b/spec/models/inline_response_201_processor_information_electronic_verification_results_spec.rb deleted file mode 100644 index 35d8c941..00000000 --- a/spec/models/inline_response_201_processor_information_electronic_verification_results_spec.rb +++ /dev/null @@ -1,107 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201ProcessorInformationElectronicVerificationResults -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201ProcessorInformationElectronicVerificationResults' do - before do - # run before each test - @instance = CyberSource::InlineResponse201ProcessorInformationElectronicVerificationResults.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201ProcessorInformationElectronicVerificationResults' do - it 'should create an instance of InlineResponse201ProcessorInformationElectronicVerificationResults' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201ProcessorInformationElectronicVerificationResults) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "code_raw"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "email"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "email_raw"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "phone_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "phone_number_raw"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "postal_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "postal_code_raw"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "street"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "street_raw"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name_raw"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_processor_information_issuer_spec.rb b/spec/models/inline_response_201_processor_information_issuer_spec.rb deleted file mode 100644 index 07b3e45e..00000000 --- a/spec/models/inline_response_201_processor_information_issuer_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201ProcessorInformationIssuer -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201ProcessorInformationIssuer' do - before do - # run before each test - @instance = CyberSource::InlineResponse201ProcessorInformationIssuer.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201ProcessorInformationIssuer' do - it 'should create an instance of InlineResponse201ProcessorInformationIssuer' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201ProcessorInformationIssuer) - end - end - describe 'test attribute "country"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "discretionary_data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_processor_information_merchant_advice_spec.rb b/spec/models/inline_response_201_processor_information_merchant_advice_spec.rb deleted file mode 100644 index e7dc4bc4..00000000 --- a/spec/models/inline_response_201_processor_information_merchant_advice_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201ProcessorInformationMerchantAdvice -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201ProcessorInformationMerchantAdvice' do - before do - # run before each test - @instance = CyberSource::InlineResponse201ProcessorInformationMerchantAdvice.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201ProcessorInformationMerchantAdvice' do - it 'should create an instance of InlineResponse201ProcessorInformationMerchantAdvice' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201ProcessorInformationMerchantAdvice) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "code_raw"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_processor_information_spec.rb b/spec/models/inline_response_201_processor_information_spec.rb deleted file mode 100644 index 021ae881..00000000 --- a/spec/models/inline_response_201_processor_information_spec.rb +++ /dev/null @@ -1,185 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201ProcessorInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201ProcessorInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse201ProcessorInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201ProcessorInformation' do - it 'should create an instance of InlineResponse201ProcessorInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201ProcessorInformation) - end - end - describe 'test attribute "approval_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "transaction_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "network_transaction_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "provider_transaction_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "response_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "response_code_source"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "response_details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "response_category_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "forwarded_acquirer_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "avs"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "card_verification"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "merchant_advice"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "electronic_verification_results"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "customer"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "consumer_authentication_response"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "issuer"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "system_trace_audit_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "payment_account_reference_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "transaction_integrity_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "amex_verbal_auth_reference_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "sales_slip_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "master_card_service_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "master_card_service_reply_code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "master_card_authentication_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_201_spec.rb b/spec/models/inline_response_201_spec.rb deleted file mode 100644 index a34c858c..00000000 --- a/spec/models/inline_response_201_spec.rb +++ /dev/null @@ -1,105 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse201 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201' do - before do - # run before each test - @instance = CyberSource::InlineResponse201.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201' do - it 'should create an instance of InlineResponse201' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201) - end - end - describe 'test attribute "_links"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["AUTHORIZED", "PARTIAL_AUTHORIZED", "AUTHORIZED_PENDING_REVIEW", "DECLINED"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "reconciliation_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "error_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "client_reference_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "processor_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "payment_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "order_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "point_of_sale_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_400_1_spec.rb b/spec/models/inline_response_400_1_spec.rb deleted file mode 100644 index e6b0135b..00000000 --- a/spec/models/inline_response_400_1_spec.rb +++ /dev/null @@ -1,73 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse4001 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse4001' do - before do - # run before each test - @instance = CyberSource::InlineResponse4001.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse4001' do - it 'should create an instance of InlineResponse4001' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse4001) - end - end - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["INVALID_REQUEST"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "reason"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["MISSING_FIELD", "INVALID_DATA", "DUPLICATE_REQUEST", "INVALID_MERCHANT_CONFIGURATION", "AUTH_ALREADY_REVERSED", "MISSING_AUTH", "TRANSACTION_ALREADY_REVERSED_OR_SETTLED"]) - # validator.allowable_values.each do |value| - # expect { @instance.reason = value }.not_to raise_error - # end - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_400_2_spec.rb b/spec/models/inline_response_400_2_spec.rb deleted file mode 100644 index 457353d1..00000000 --- a/spec/models/inline_response_400_2_spec.rb +++ /dev/null @@ -1,73 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse4002 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse4002' do - before do - # run before each test - @instance = CyberSource::InlineResponse4002.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse4002' do - it 'should create an instance of InlineResponse4002' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse4002) - end - end - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["INVALID_REQUEST"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "reason"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["MISSING_FIELD", "INVALID_DATA", "DUPLICATE_REQUEST", "INVALID_MERCHANT_CONFIGURATION", "EXCEEDS_AUTH_AMOUNT", "AUTH_ALREADY_REVERSED", "TRANSACTION_ALREADY_SETTLED", "MISSING_AUTH", "TRANSACTION_ALREADY_REVERSED_OR_SETTLED"]) - # validator.allowable_values.each do |value| - # expect { @instance.reason = value }.not_to raise_error - # end - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_400_3_spec.rb b/spec/models/inline_response_400_3_spec.rb deleted file mode 100644 index 33eb9012..00000000 --- a/spec/models/inline_response_400_3_spec.rb +++ /dev/null @@ -1,73 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse4003 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse4003' do - before do - # run before each test - @instance = CyberSource::InlineResponse4003.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse4003' do - it 'should create an instance of InlineResponse4003' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse4003) - end - end - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["INVALID_REQUEST"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "reason"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["MISSING_FIELD", "INVALID_DATA", "DUPLICATE_REQUEST", "INVALID_CARD", "INVALID_MERCHANT_CONFIGURATION", "CAPTURE_ALREADY_VOIDED", "ACCOUNT_NOT_ALLOWED_CREDIT"]) - # validator.allowable_values.each do |value| - # expect { @instance.reason = value }.not_to raise_error - # end - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_400_4_spec.rb b/spec/models/inline_response_400_4_spec.rb deleted file mode 100644 index 482232bb..00000000 --- a/spec/models/inline_response_400_4_spec.rb +++ /dev/null @@ -1,73 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse4004 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse4004' do - before do - # run before each test - @instance = CyberSource::InlineResponse4004.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse4004' do - it 'should create an instance of InlineResponse4004' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse4004) - end - end - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["INVALID_REQUEST"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "reason"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["MISSING_FIELD", "INVALID_DATA", "DUPLICATE_REQUEST", "INVALID_MERCHANT_CONFIGURATION", "NOT_VOIDABLE"]) - # validator.allowable_values.each do |value| - # expect { @instance.reason = value }.not_to raise_error - # end - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_400_5_error_information_details_spec.rb b/spec/models/inline_response_400_5_error_information_details_spec.rb deleted file mode 100644 index b0c01b2c..00000000 --- a/spec/models/inline_response_400_5_error_information_details_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse4005ErrorInformationDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse4005ErrorInformationDetails' do - before do - # run before each test - @instance = CyberSource::InlineResponse4005ErrorInformationDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse4005ErrorInformationDetails' do - it 'should create an instance of InlineResponse4005ErrorInformationDetails' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse4005ErrorInformationDetails) - end - end - describe 'test attribute "field"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_400_5_error_information_spec.rb b/spec/models/inline_response_400_5_error_information_spec.rb deleted file mode 100644 index 9cded22c..00000000 --- a/spec/models/inline_response_400_5_error_information_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse4005ErrorInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse4005ErrorInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse4005ErrorInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse4005ErrorInformation' do - it 'should create an instance of InlineResponse4005ErrorInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse4005ErrorInformation) - end - end - describe 'test attribute "reason"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_400_5_spec.rb b/spec/models/inline_response_400_5_spec.rb deleted file mode 100644 index 97419880..00000000 --- a/spec/models/inline_response_400_5_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse4005 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse4005' do - before do - # run before each test - @instance = CyberSource::InlineResponse4005.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse4005' do - it 'should create an instance of InlineResponse4005' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse4005) - end - end - describe 'test attribute "error_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_400_6_spec.rb b/spec/models/inline_response_400_6_spec.rb deleted file mode 100644 index 8de36fc4..00000000 --- a/spec/models/inline_response_400_6_spec.rb +++ /dev/null @@ -1,69 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse4006 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse4006' do - before do - # run before each test - @instance = CyberSource::InlineResponse4006.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse4006' do - it 'should create an instance of InlineResponse4006' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse4006) - end - end - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "reason"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["MISSING_FIELD", "INVALID_DATA", "DUPLICATE_REQUEST", "INVALID_MERCHANT_CONFIGURATION", "INVALID_AMOUNT", "DEBIT_CARD_USEAGE_EXCEEDD_LIMIT"]) - # validator.allowable_values.each do |value| - # expect { @instance.reason = value }.not_to raise_error - # end - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_400_7_fields_spec.rb b/spec/models/inline_response_400_7_fields_spec.rb deleted file mode 100644 index 3df8b1d4..00000000 --- a/spec/models/inline_response_400_7_fields_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse4007Fields -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse4007Fields' do - before do - # run before each test - @instance = CyberSource::InlineResponse4007Fields.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse4007Fields' do - it 'should create an instance of InlineResponse4007Fields' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse4007Fields) - end - end - describe 'test attribute "path"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "localization_key"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_400_7_spec.rb b/spec/models/inline_response_400_7_spec.rb deleted file mode 100644 index 7db67fa0..00000000 --- a/spec/models/inline_response_400_7_spec.rb +++ /dev/null @@ -1,71 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse4007 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse4007' do - before do - # run before each test - @instance = CyberSource::InlineResponse4007.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse4007' do - it 'should create an instance of InlineResponse4007' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse4007) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "localization_key"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "correlation_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "detail"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "fields"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_400_8_spec.rb b/spec/models/inline_response_400_8_spec.rb deleted file mode 100644 index 7aa0d9bf..00000000 --- a/spec/models/inline_response_400_8_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse4008 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse4008' do - before do - # run before each test - @instance = CyberSource::InlineResponse4008.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse4008' do - it 'should create an instance of InlineResponse4008' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse4008) - end - end - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_400_9_spec.rb b/spec/models/inline_response_400_9_spec.rb deleted file mode 100644 index 104594b6..00000000 --- a/spec/models/inline_response_400_9_spec.rb +++ /dev/null @@ -1,63 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse4009 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse4009' do - before do - # run before each test - @instance = CyberSource::InlineResponse4009.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse4009' do - it 'should create an instance of InlineResponse4009' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse4009) - end - end - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["INVALID_REQUEST"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "details"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_400_spec.rb b/spec/models/inline_response_400_spec.rb index fe60b0cc..a5e6f704 100644 --- a/spec/models/inline_response_400_spec.rb +++ b/spec/models/inline_response_400_spec.rb @@ -32,32 +32,12 @@ expect(@instance).to be_instance_of(CyberSource::InlineResponse400) end end - describe 'test attribute "submit_time_utc"' do + describe 'test attribute "type"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["INVALID_REQUEST"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "reason"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["MISSING_FIELD", "INVALID_DATA", "DUPLICATE_REQUEST", "INVALID_CARD", "CARD_TYPE_NOT_ACCEPTED", "INVALID_MERCHANT_CONFIGURATION", "PROCESSOR_UNAVAILABLE", "INVALID_AMOUNT", "INVALID_CARD_TYPE", "DEBIT_CARD_USEAGE_EXCEEDD_LIMIT"]) - # validator.allowable_values.each do |value| - # expect { @instance.reason = value }.not_to raise_error - # end - end - end - describe 'test attribute "message"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/inline_response_409__links_payment_instruments_spec.rb b/spec/models/inline_response_409__links_payment_instruments_spec.rb deleted file mode 100644 index 8037b054..00000000 --- a/spec/models/inline_response_409__links_payment_instruments_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse409LinksPaymentInstruments -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse409LinksPaymentInstruments' do - before do - # run before each test - @instance = CyberSource::InlineResponse409LinksPaymentInstruments.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse409LinksPaymentInstruments' do - it 'should create an instance of InlineResponse409LinksPaymentInstruments' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse409LinksPaymentInstruments) - end - end - describe 'test attribute "href"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_409__links_spec.rb b/spec/models/inline_response_409__links_spec.rb deleted file mode 100644 index e909cb16..00000000 --- a/spec/models/inline_response_409__links_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse409Links -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse409Links' do - before do - # run before each test - @instance = CyberSource::InlineResponse409Links.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse409Links' do - it 'should create an instance of InlineResponse409Links' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse409Links) - end - end - describe 'test attribute "payment_instruments"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_409_spec.rb b/spec/models/inline_response_409_spec.rb deleted file mode 100644 index 2d73ef28..00000000 --- a/spec/models/inline_response_409_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse409 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse409' do - before do - # run before each test - @instance = CyberSource::InlineResponse409.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse409' do - it 'should create an instance of InlineResponse409' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse409) - end - end - describe 'test attribute "_links"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_500_error_information_spec.rb b/spec/models/inline_response_500_error_information_spec.rb deleted file mode 100644 index d7e0c6bd..00000000 --- a/spec/models/inline_response_500_error_information_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse500ErrorInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse500ErrorInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse500ErrorInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse500ErrorInformation' do - it 'should create an instance of InlineResponse500ErrorInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse500ErrorInformation) - end - end - describe 'test attribute "reason"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_500_spec.rb b/spec/models/inline_response_500_spec.rb deleted file mode 100644 index 2d79ef55..00000000 --- a/spec/models/inline_response_500_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse500 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse500' do - before do - # run before each test - @instance = CyberSource::InlineResponse500.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse500' do - it 'should create an instance of InlineResponse500' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse500) - end - end - describe 'test attribute "error_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/inline_response_502_spec.rb b/spec/models/inline_response_502_spec.rb deleted file mode 100644 index 1ab421ae..00000000 --- a/spec/models/inline_response_502_spec.rb +++ /dev/null @@ -1,67 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse502 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse502' do - before do - # run before each test - @instance = CyberSource::InlineResponse502.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse502' do - it 'should create an instance of InlineResponse502' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse502) - end - end - describe 'test attribute "submit_time_utc"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["SERVER_ERROR"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "reason"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["SYSTEM_ERROR", "SERVER_TIMEOUT", "SERVICE_TIMEOUT", "PROCESSOR_TIMEOUT"]) - # validator.allowable_values.each do |value| - # expect { @instance.reason = value }.not_to raise_error - # end - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/oct_create_payment_request_spec.rb b/spec/models/oct_create_payment_request_spec.rb deleted file mode 100644 index 0d74cdda..00000000 --- a/spec/models/oct_create_payment_request_spec.rb +++ /dev/null @@ -1,77 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::OctCreatePaymentRequest -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'OctCreatePaymentRequest' do - before do - # run before each test - @instance = CyberSource::OctCreatePaymentRequest.new - end - - after do - # run after each test - end - - describe 'test an instance of OctCreatePaymentRequest' do - it 'should create an instance of OctCreatePaymentRequest' do - expect(@instance).to be_instance_of(CyberSource::OctCreatePaymentRequest) - end - end - describe 'test attribute "client_reference_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "order_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "merchant_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "recipient_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "sender_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "processing_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "payment_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/pts_v1_transaction_batches_get200_response__links_self_spec.rb b/spec/models/pts_v1_transaction_batches_get200_response__links_self_spec.rb new file mode 100644 index 00000000..edd3d3e4 --- /dev/null +++ b/spec/models/pts_v1_transaction_batches_get200_response__links_self_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV1TransactionBatchesGet200ResponseLinksSelf +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV1TransactionBatchesGet200ResponseLinksSelf' do + before do + # run before each test + @instance = CyberSource::PtsV1TransactionBatchesGet200ResponseLinksSelf.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV1TransactionBatchesGet200ResponseLinksSelf' do + it 'should create an instance of PtsV1TransactionBatchesGet200ResponseLinksSelf' do + expect(@instance).to be_instance_of(CyberSource::PtsV1TransactionBatchesGet200ResponseLinksSelf) + end + end + describe 'test attribute "href"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "method"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v1_transaction_batches_get200_response__links_spec.rb b/spec/models/pts_v1_transaction_batches_get200_response__links_spec.rb new file mode 100644 index 00000000..e7971881 --- /dev/null +++ b/spec/models/pts_v1_transaction_batches_get200_response__links_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV1TransactionBatchesGet200ResponseLinks +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV1TransactionBatchesGet200ResponseLinks' do + before do + # run before each test + @instance = CyberSource::PtsV1TransactionBatchesGet200ResponseLinks.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV1TransactionBatchesGet200ResponseLinks' do + it 'should create an instance of PtsV1TransactionBatchesGet200ResponseLinks' do + expect(@instance).to be_instance_of(CyberSource::PtsV1TransactionBatchesGet200ResponseLinks) + end + end + describe 'test attribute "_self"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v1_transaction_batches_get200_response_spec.rb b/spec/models/pts_v1_transaction_batches_get200_response_spec.rb new file mode 100644 index 00000000..6fac5ab1 --- /dev/null +++ b/spec/models/pts_v1_transaction_batches_get200_response_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV1TransactionBatchesGet200Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV1TransactionBatchesGet200Response' do + before do + # run before each test + @instance = CyberSource::PtsV1TransactionBatchesGet200Response.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV1TransactionBatchesGet200Response' do + it 'should create an instance of PtsV1TransactionBatchesGet200Response' do + expect(@instance).to be_instance_of(CyberSource::PtsV1TransactionBatchesGet200Response) + end + end + describe 'test attribute "transaction_batches"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "_links"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v1_transaction_batches_get200_response_transaction_batches_spec.rb b/spec/models/pts_v1_transaction_batches_get200_response_transaction_batches_spec.rb new file mode 100644 index 00000000..7e81b6e2 --- /dev/null +++ b/spec/models/pts_v1_transaction_batches_get200_response_transaction_batches_spec.rb @@ -0,0 +1,77 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV1TransactionBatchesGet200ResponseTransactionBatches +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV1TransactionBatchesGet200ResponseTransactionBatches' do + before do + # run before each test + @instance = CyberSource::PtsV1TransactionBatchesGet200ResponseTransactionBatches.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV1TransactionBatchesGet200ResponseTransactionBatches' do + it 'should create an instance of PtsV1TransactionBatchesGet200ResponseTransactionBatches' do + expect(@instance).to be_instance_of(CyberSource::PtsV1TransactionBatchesGet200ResponseTransactionBatches) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "upload_date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "completion_date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "transaction_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "accepted_transaction_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "rejected_transaction_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v1_transaction_batches_get400_response_error_information_details_spec.rb b/spec/models/pts_v1_transaction_batches_get400_response_error_information_details_spec.rb new file mode 100644 index 00000000..eb46c4a3 --- /dev/null +++ b/spec/models/pts_v1_transaction_batches_get400_response_error_information_details_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV1TransactionBatchesGet400ResponseErrorInformationDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV1TransactionBatchesGet400ResponseErrorInformationDetails' do + before do + # run before each test + @instance = CyberSource::PtsV1TransactionBatchesGet400ResponseErrorInformationDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV1TransactionBatchesGet400ResponseErrorInformationDetails' do + it 'should create an instance of PtsV1TransactionBatchesGet400ResponseErrorInformationDetails' do + expect(@instance).to be_instance_of(CyberSource::PtsV1TransactionBatchesGet400ResponseErrorInformationDetails) + end + end + describe 'test attribute "field"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v1_transaction_batches_get400_response_error_information_spec.rb b/spec/models/pts_v1_transaction_batches_get400_response_error_information_spec.rb new file mode 100644 index 00000000..7e76b2df --- /dev/null +++ b/spec/models/pts_v1_transaction_batches_get400_response_error_information_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV1TransactionBatchesGet400ResponseErrorInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV1TransactionBatchesGet400ResponseErrorInformation' do + before do + # run before each test + @instance = CyberSource::PtsV1TransactionBatchesGet400ResponseErrorInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV1TransactionBatchesGet400ResponseErrorInformation' do + it 'should create an instance of PtsV1TransactionBatchesGet400ResponseErrorInformation' do + expect(@instance).to be_instance_of(CyberSource::PtsV1TransactionBatchesGet400ResponseErrorInformation) + end + end + describe 'test attribute "reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v1_transaction_batches_get400_response_spec.rb b/spec/models/pts_v1_transaction_batches_get400_response_spec.rb new file mode 100644 index 00000000..38931049 --- /dev/null +++ b/spec/models/pts_v1_transaction_batches_get400_response_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV1TransactionBatchesGet400Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV1TransactionBatchesGet400Response' do + before do + # run before each test + @instance = CyberSource::PtsV1TransactionBatchesGet400Response.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV1TransactionBatchesGet400Response' do + it 'should create an instance of PtsV1TransactionBatchesGet400Response' do + expect(@instance).to be_instance_of(CyberSource::PtsV1TransactionBatchesGet400Response) + end + end + describe 'test attribute "error_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v1_transaction_batches_get500_response_error_information_spec.rb b/spec/models/pts_v1_transaction_batches_get500_response_error_information_spec.rb new file mode 100644 index 00000000..d8140b8d --- /dev/null +++ b/spec/models/pts_v1_transaction_batches_get500_response_error_information_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV1TransactionBatchesGet500ResponseErrorInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV1TransactionBatchesGet500ResponseErrorInformation' do + before do + # run before each test + @instance = CyberSource::PtsV1TransactionBatchesGet500ResponseErrorInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV1TransactionBatchesGet500ResponseErrorInformation' do + it 'should create an instance of PtsV1TransactionBatchesGet500ResponseErrorInformation' do + expect(@instance).to be_instance_of(CyberSource::PtsV1TransactionBatchesGet500ResponseErrorInformation) + end + end + describe 'test attribute "reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v1_transaction_batches_get500_response_spec.rb b/spec/models/pts_v1_transaction_batches_get500_response_spec.rb new file mode 100644 index 00000000..2c28e280 --- /dev/null +++ b/spec/models/pts_v1_transaction_batches_get500_response_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV1TransactionBatchesGet500Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV1TransactionBatchesGet500Response' do + before do + # run before each test + @instance = CyberSource::PtsV1TransactionBatchesGet500Response.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV1TransactionBatchesGet500Response' do + it 'should create an instance of PtsV1TransactionBatchesGet500Response' do + expect(@instance).to be_instance_of(CyberSource::PtsV1TransactionBatchesGet500Response) + end + end + describe 'test attribute "error_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_credits_post201_response_credit_amount_details_spec.rb b/spec/models/pts_v2_credits_post201_response_credit_amount_details_spec.rb new file mode 100644 index 00000000..13a9d39a --- /dev/null +++ b/spec/models/pts_v2_credits_post201_response_credit_amount_details_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2CreditsPost201ResponseCreditAmountDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2CreditsPost201ResponseCreditAmountDetails' do + before do + # run before each test + @instance = CyberSource::PtsV2CreditsPost201ResponseCreditAmountDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2CreditsPost201ResponseCreditAmountDetails' do + it 'should create an instance of PtsV2CreditsPost201ResponseCreditAmountDetails' do + expect(@instance).to be_instance_of(CyberSource::PtsV2CreditsPost201ResponseCreditAmountDetails) + end + end + describe 'test attribute "credit_amount"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "currency"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_credits_post201_response_spec.rb b/spec/models/pts_v2_credits_post201_response_spec.rb new file mode 100644 index 00000000..c68e33f4 --- /dev/null +++ b/spec/models/pts_v2_credits_post201_response_spec.rb @@ -0,0 +1,93 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2CreditsPost201Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2CreditsPost201Response' do + before do + # run before each test + @instance = CyberSource::PtsV2CreditsPost201Response.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2CreditsPost201Response' do + it 'should create an instance of PtsV2CreditsPost201Response' do + expect(@instance).to be_instance_of(CyberSource::PtsV2CreditsPost201Response) + end + end + describe 'test attribute "_links"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PENDING"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "reconciliation_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "client_reference_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "credit_amount_details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "processor_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "order_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_captures_post201_response__links_spec.rb b/spec/models/pts_v2_payments_captures_post201_response__links_spec.rb new file mode 100644 index 00000000..f85964b4 --- /dev/null +++ b/spec/models/pts_v2_payments_captures_post201_response__links_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsCapturesPost201ResponseLinks +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsCapturesPost201ResponseLinks' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsCapturesPost201ResponseLinks.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsCapturesPost201ResponseLinks' do + it 'should create an instance of PtsV2PaymentsCapturesPost201ResponseLinks' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsCapturesPost201ResponseLinks) + end + end + describe 'test attribute "_self"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "void"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "refund"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_captures_post201_response_order_information_amount_details_spec.rb b/spec/models/pts_v2_payments_captures_post201_response_order_information_amount_details_spec.rb new file mode 100644 index 00000000..596d2d18 --- /dev/null +++ b/spec/models/pts_v2_payments_captures_post201_response_order_information_amount_details_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsCapturesPost201ResponseOrderInformationAmountDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsCapturesPost201ResponseOrderInformationAmountDetails' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsCapturesPost201ResponseOrderInformationAmountDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsCapturesPost201ResponseOrderInformationAmountDetails' do + it 'should create an instance of PtsV2PaymentsCapturesPost201ResponseOrderInformationAmountDetails' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsCapturesPost201ResponseOrderInformationAmountDetails) + end + end + describe 'test attribute "total_amount"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "currency"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_captures_post201_response_order_information_spec.rb b/spec/models/pts_v2_payments_captures_post201_response_order_information_spec.rb new file mode 100644 index 00000000..63ae1dfd --- /dev/null +++ b/spec/models/pts_v2_payments_captures_post201_response_order_information_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsCapturesPost201ResponseOrderInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsCapturesPost201ResponseOrderInformation' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsCapturesPost201ResponseOrderInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsCapturesPost201ResponseOrderInformation' do + it 'should create an instance of PtsV2PaymentsCapturesPost201ResponseOrderInformation' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsCapturesPost201ResponseOrderInformation) + end + end + describe 'test attribute "amount_details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "invoice_details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_captures_post201_response_processor_information_spec.rb b/spec/models/pts_v2_payments_captures_post201_response_processor_information_spec.rb new file mode 100644 index 00000000..2dd863b3 --- /dev/null +++ b/spec/models/pts_v2_payments_captures_post201_response_processor_information_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsCapturesPost201ResponseProcessorInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsCapturesPost201ResponseProcessorInformation' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsCapturesPost201ResponseProcessorInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsCapturesPost201ResponseProcessorInformation' do + it 'should create an instance of PtsV2PaymentsCapturesPost201ResponseProcessorInformation' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsCapturesPost201ResponseProcessorInformation) + end + end + describe 'test attribute "transaction_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_captures_post201_response_spec.rb b/spec/models/pts_v2_payments_captures_post201_response_spec.rb new file mode 100644 index 00000000..adc9a96f --- /dev/null +++ b/spec/models/pts_v2_payments_captures_post201_response_spec.rb @@ -0,0 +1,87 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsCapturesPost201Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsCapturesPost201Response' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsCapturesPost201Response.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsCapturesPost201Response' do + it 'should create an instance of PtsV2PaymentsCapturesPost201Response' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsCapturesPost201Response) + end + end + describe 'test attribute "_links"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PENDING"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "reconciliation_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "client_reference_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "processor_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "order_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_captures_post400_response_spec.rb b/spec/models/pts_v2_payments_captures_post400_response_spec.rb new file mode 100644 index 00000000..965b64ab --- /dev/null +++ b/spec/models/pts_v2_payments_captures_post400_response_spec.rb @@ -0,0 +1,73 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsCapturesPost400Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsCapturesPost400Response' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsCapturesPost400Response.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsCapturesPost400Response' do + it 'should create an instance of PtsV2PaymentsCapturesPost400Response' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsCapturesPost400Response) + end + end + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["INVALID_REQUEST"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["MISSING_FIELD", "INVALID_DATA", "DUPLICATE_REQUEST", "INVALID_MERCHANT_CONFIGURATION", "EXCEEDS_AUTH_AMOUNT", "AUTH_ALREADY_REVERSED", "TRANSACTION_ALREADY_SETTLED", "MISSING_AUTH", "TRANSACTION_ALREADY_REVERSED_OR_SETTLED"]) + # validator.allowable_values.each do |value| + # expect { @instance.reason = value }.not_to raise_error + # end + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response__links_self_spec.rb b/spec/models/pts_v2_payments_post201_response__links_self_spec.rb new file mode 100644 index 00000000..de7e6a71 --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response__links_self_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponseLinksSelf +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponseLinksSelf' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponseLinksSelf.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponseLinksSelf' do + it 'should create an instance of PtsV2PaymentsPost201ResponseLinksSelf' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponseLinksSelf) + end + end + describe 'test attribute "href"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "method"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response__links_spec.rb b/spec/models/pts_v2_payments_post201_response__links_spec.rb new file mode 100644 index 00000000..d3c75d98 --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response__links_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponseLinks +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponseLinks' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponseLinks.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponseLinks' do + it 'should create an instance of PtsV2PaymentsPost201ResponseLinks' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponseLinks) + end + end + describe 'test attribute "_self"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "reversal"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "capture"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_client_reference_information_spec.rb b/spec/models/pts_v2_payments_post201_response_client_reference_information_spec.rb new file mode 100644 index 00000000..6ffbb0c9 --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_client_reference_information_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponseClientReferenceInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponseClientReferenceInformation' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponseClientReferenceInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponseClientReferenceInformation' do + it 'should create an instance of PtsV2PaymentsPost201ResponseClientReferenceInformation' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponseClientReferenceInformation) + end + end + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_error_information_details_spec.rb b/spec/models/pts_v2_payments_post201_response_error_information_details_spec.rb new file mode 100644 index 00000000..ca094275 --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_error_information_details_spec.rb @@ -0,0 +1,51 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponseErrorInformationDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponseErrorInformationDetails' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponseErrorInformationDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponseErrorInformationDetails' do + it 'should create an instance of PtsV2PaymentsPost201ResponseErrorInformationDetails' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponseErrorInformationDetails) + end + end + describe 'test attribute "field"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["MISSING_FIELD", "INVALID_DATA"]) + # validator.allowable_values.each do |value| + # expect { @instance.reason = value }.not_to raise_error + # end + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_error_information_spec.rb b/spec/models/pts_v2_payments_post201_response_error_information_spec.rb new file mode 100644 index 00000000..d7b4bc9d --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_error_information_spec.rb @@ -0,0 +1,57 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponseErrorInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponseErrorInformation' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponseErrorInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponseErrorInformation' do + it 'should create an instance of PtsV2PaymentsPost201ResponseErrorInformation' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponseErrorInformation) + end + end + describe 'test attribute "reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["AVS_FAILED", "CONTACT_PROCESSOR", "CV_FAILED", "EXPIRED_CARD", "PROCESSOR_DECLINED", "INSUFFICIENT_FUND", "STOLEN_LOST_CARD", "ISSUER_UNAVAILABLE", "UNAUTHORIZED_CARD", "CVN_NOT_MATCH", "EXCEEDS_CREDIT_LIMIT", "INVALID_CVN", "PAYMENT_REFUSED", "INVALID_ACCOUNT", "GENERAL_DECLINE"]) + # validator.allowable_values.each do |value| + # expect { @instance.reason = value }.not_to raise_error + # end + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_order_information_amount_details_spec.rb b/spec/models/pts_v2_payments_post201_response_order_information_amount_details_spec.rb new file mode 100644 index 00000000..63437971 --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_order_information_amount_details_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponseOrderInformationAmountDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponseOrderInformationAmountDetails' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponseOrderInformationAmountDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponseOrderInformationAmountDetails' do + it 'should create an instance of PtsV2PaymentsPost201ResponseOrderInformationAmountDetails' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponseOrderInformationAmountDetails) + end + end + describe 'test attribute "total_amount"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "authorized_amount"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "currency"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_order_information_invoice_details_spec.rb b/spec/models/pts_v2_payments_post201_response_order_information_invoice_details_spec.rb new file mode 100644 index 00000000..757cc811 --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_order_information_invoice_details_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails' do + it 'should create an instance of PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails) + end + end + describe 'test attribute "level3_transmission_status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_order_information_spec.rb b/spec/models/pts_v2_payments_post201_response_order_information_spec.rb new file mode 100644 index 00000000..f44d7b7f --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_order_information_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponseOrderInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponseOrderInformation' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponseOrderInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponseOrderInformation' do + it 'should create an instance of PtsV2PaymentsPost201ResponseOrderInformation' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponseOrderInformation) + end + end + describe 'test attribute "amount_details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "invoice_details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_payment_information_account_features_spec.rb b/spec/models/pts_v2_payments_post201_response_payment_information_account_features_spec.rb new file mode 100644 index 00000000..0ddc0d01 --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_payment_information_account_features_spec.rb @@ -0,0 +1,141 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponsePaymentInformationAccountFeatures +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponsePaymentInformationAccountFeatures' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponsePaymentInformationAccountFeatures.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponsePaymentInformationAccountFeatures' do + it 'should create an instance of PtsV2PaymentsPost201ResponsePaymentInformationAccountFeatures' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponsePaymentInformationAccountFeatures) + end + end + describe 'test attribute "account_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "account_status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "balance_amount"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "balance_amount_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "currency"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "balance_sign"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["+", "-"]) + # validator.allowable_values.each do |value| + # expect { @instance.balance_sign = value }.not_to raise_error + # end + end + end + + describe 'test attribute "affluence_indicator"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "category"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "commercial"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "group"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "health_care"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "payroll"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "level3_eligible"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "pinless_debit"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "signature_debit"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "prepaid"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "regulated"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_payment_information_card_spec.rb b/spec/models/pts_v2_payments_post201_response_payment_information_card_spec.rb new file mode 100644 index 00000000..e5b40391 --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_payment_information_card_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponsePaymentInformationCard +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponsePaymentInformationCard' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponsePaymentInformationCard.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponsePaymentInformationCard' do + it 'should create an instance of PtsV2PaymentsPost201ResponsePaymentInformationCard' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponsePaymentInformationCard) + end + end + describe 'test attribute "suffix"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_payment_information_spec.rb b/spec/models/pts_v2_payments_post201_response_payment_information_spec.rb new file mode 100644 index 00000000..0d0516cb --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_payment_information_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponsePaymentInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponsePaymentInformation' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponsePaymentInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponsePaymentInformation' do + it 'should create an instance of PtsV2PaymentsPost201ResponsePaymentInformation' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponsePaymentInformation) + end + end + describe 'test attribute "card"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "tokenized_card"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "account_features"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_payment_information_tokenized_card_spec.rb b/spec/models/pts_v2_payments_post201_response_payment_information_tokenized_card_spec.rb new file mode 100644 index 00000000..a7b042bc --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_payment_information_tokenized_card_spec.rb @@ -0,0 +1,77 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponsePaymentInformationTokenizedCard +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponsePaymentInformationTokenizedCard' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponsePaymentInformationTokenizedCard.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponsePaymentInformationTokenizedCard' do + it 'should create an instance of PtsV2PaymentsPost201ResponsePaymentInformationTokenizedCard' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponsePaymentInformationTokenizedCard) + end + end + describe 'test attribute "prefix"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "suffix"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "assurance_level"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expiration_month"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expiration_year"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "requestor_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_point_of_sale_information_emv_spec.rb b/spec/models/pts_v2_payments_post201_response_point_of_sale_information_emv_spec.rb new file mode 100644 index 00000000..2bfaf2d6 --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_point_of_sale_information_emv_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv' do + it 'should create an instance of PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv) + end + end + describe 'test attribute "tags"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_point_of_sale_information_spec.rb b/spec/models/pts_v2_payments_post201_response_point_of_sale_information_spec.rb new file mode 100644 index 00000000..d7516fc6 --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_point_of_sale_information_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponsePointOfSaleInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponsePointOfSaleInformation' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponsePointOfSaleInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponsePointOfSaleInformation' do + it 'should create an instance of PtsV2PaymentsPost201ResponsePointOfSaleInformation' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponsePointOfSaleInformation) + end + end + describe 'test attribute "emv"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "amex_capn_data"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_processor_information_avs_spec.rb b/spec/models/pts_v2_payments_post201_response_processor_information_avs_spec.rb new file mode 100644 index 00000000..1ac3c863 --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_processor_information_avs_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationAvs +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponseProcessorInformationAvs' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationAvs.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponseProcessorInformationAvs' do + it 'should create an instance of PtsV2PaymentsPost201ResponseProcessorInformationAvs' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationAvs) + end + end + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "code_raw"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_processor_information_card_verification_spec.rb b/spec/models/pts_v2_payments_post201_response_processor_information_card_verification_spec.rb new file mode 100644 index 00000000..5a8df9a0 --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_processor_information_card_verification_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationCardVerification +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponseProcessorInformationCardVerification' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationCardVerification.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponseProcessorInformationCardVerification' do + it 'should create an instance of PtsV2PaymentsPost201ResponseProcessorInformationCardVerification' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationCardVerification) + end + end + describe 'test attribute "result_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "result_code_raw"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_processor_information_consumer_authentication_response_spec.rb b/spec/models/pts_v2_payments_post201_response_processor_information_consumer_authentication_response_spec.rb new file mode 100644 index 00000000..8d171358 --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_processor_information_consumer_authentication_response_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationConsumerAuthenticationResponse +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponseProcessorInformationConsumerAuthenticationResponse' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationConsumerAuthenticationResponse.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponseProcessorInformationConsumerAuthenticationResponse' do + it 'should create an instance of PtsV2PaymentsPost201ResponseProcessorInformationConsumerAuthenticationResponse' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationConsumerAuthenticationResponse) + end + end + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "code_raw"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_processor_information_customer_spec.rb b/spec/models/pts_v2_payments_post201_response_processor_information_customer_spec.rb new file mode 100644 index 00000000..b9cb6893 --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_processor_information_customer_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationCustomer +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponseProcessorInformationCustomer' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationCustomer.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponseProcessorInformationCustomer' do + it 'should create an instance of PtsV2PaymentsPost201ResponseProcessorInformationCustomer' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationCustomer) + end + end + describe 'test attribute "personal_id_result"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_processor_information_electronic_verification_results_spec.rb b/spec/models/pts_v2_payments_post201_response_processor_information_electronic_verification_results_spec.rb new file mode 100644 index 00000000..8ac846a9 --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_processor_information_electronic_verification_results_spec.rb @@ -0,0 +1,107 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationElectronicVerificationResults +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponseProcessorInformationElectronicVerificationResults' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationElectronicVerificationResults.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponseProcessorInformationElectronicVerificationResults' do + it 'should create an instance of PtsV2PaymentsPost201ResponseProcessorInformationElectronicVerificationResults' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationElectronicVerificationResults) + end + end + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "code_raw"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "email"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "email_raw"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "phone_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "phone_number_raw"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "postal_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "postal_code_raw"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "street"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "street_raw"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name_raw"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_processor_information_issuer_spec.rb b/spec/models/pts_v2_payments_post201_response_processor_information_issuer_spec.rb new file mode 100644 index 00000000..9df7f189 --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_processor_information_issuer_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationIssuer +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponseProcessorInformationIssuer' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationIssuer.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponseProcessorInformationIssuer' do + it 'should create an instance of PtsV2PaymentsPost201ResponseProcessorInformationIssuer' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationIssuer) + end + end + describe 'test attribute "country"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "discretionary_data"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_processor_information_merchant_advice_spec.rb b/spec/models/pts_v2_payments_post201_response_processor_information_merchant_advice_spec.rb new file mode 100644 index 00000000..383e0aac --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_processor_information_merchant_advice_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdvice +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdvice' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdvice.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdvice' do + it 'should create an instance of PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdvice' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdvice) + end + end + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "code_raw"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_processor_information_spec.rb b/spec/models/pts_v2_payments_post201_response_processor_information_spec.rb new file mode 100644 index 00000000..962268aa --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_processor_information_spec.rb @@ -0,0 +1,185 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201ResponseProcessorInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201ResponseProcessorInformation' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201ResponseProcessorInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201ResponseProcessorInformation' do + it 'should create an instance of PtsV2PaymentsPost201ResponseProcessorInformation' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201ResponseProcessorInformation) + end + end + describe 'test attribute "approval_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "transaction_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "network_transaction_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "provider_transaction_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "response_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "response_code_source"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "response_details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "response_category_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "forwarded_acquirer_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "avs"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "card_verification"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "merchant_advice"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "electronic_verification_results"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "customer"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "consumer_authentication_response"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "issuer"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "system_trace_audit_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "payment_account_reference_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "transaction_integrity_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "amex_verbal_auth_reference_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "sales_slip_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "master_card_service_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "master_card_service_reply_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "master_card_authentication_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post201_response_spec.rb b/spec/models/pts_v2_payments_post201_response_spec.rb new file mode 100644 index 00000000..5e544236 --- /dev/null +++ b/spec/models/pts_v2_payments_post201_response_spec.rb @@ -0,0 +1,105 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost201Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost201Response' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost201Response.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost201Response' do + it 'should create an instance of PtsV2PaymentsPost201Response' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost201Response) + end + end + describe 'test attribute "_links"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["AUTHORIZED", "PARTIAL_AUTHORIZED", "AUTHORIZED_PENDING_REVIEW", "DECLINED"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "reconciliation_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "error_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "client_reference_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "processor_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "payment_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "order_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "point_of_sale_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post400_response_spec.rb b/spec/models/pts_v2_payments_post400_response_spec.rb new file mode 100644 index 00000000..ff57bd04 --- /dev/null +++ b/spec/models/pts_v2_payments_post400_response_spec.rb @@ -0,0 +1,73 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost400Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost400Response' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost400Response.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost400Response' do + it 'should create an instance of PtsV2PaymentsPost400Response' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost400Response) + end + end + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["INVALID_REQUEST"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["MISSING_FIELD", "INVALID_DATA", "DUPLICATE_REQUEST", "INVALID_CARD", "CARD_TYPE_NOT_ACCEPTED", "INVALID_MERCHANT_CONFIGURATION", "PROCESSOR_UNAVAILABLE", "INVALID_AMOUNT", "INVALID_CARD_TYPE", "DEBIT_CARD_USEAGE_EXCEEDD_LIMIT"]) + # validator.allowable_values.each do |value| + # expect { @instance.reason = value }.not_to raise_error + # end + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_post502_response_spec.rb b/spec/models/pts_v2_payments_post502_response_spec.rb new file mode 100644 index 00000000..9452270b --- /dev/null +++ b/spec/models/pts_v2_payments_post502_response_spec.rb @@ -0,0 +1,67 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsPost502Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsPost502Response' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsPost502Response.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsPost502Response' do + it 'should create an instance of PtsV2PaymentsPost502Response' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsPost502Response) + end + end + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["SERVER_ERROR"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["SYSTEM_ERROR", "SERVER_TIMEOUT", "SERVICE_TIMEOUT", "PROCESSOR_TIMEOUT"]) + # validator.allowable_values.each do |value| + # expect { @instance.reason = value }.not_to raise_error + # end + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_refund_post201_response__links_spec.rb b/spec/models/pts_v2_payments_refund_post201_response__links_spec.rb new file mode 100644 index 00000000..b22eeff0 --- /dev/null +++ b/spec/models/pts_v2_payments_refund_post201_response__links_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsRefundPost201ResponseLinks +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsRefundPost201ResponseLinks' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsRefundPost201ResponseLinks.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsRefundPost201ResponseLinks' do + it 'should create an instance of PtsV2PaymentsRefundPost201ResponseLinks' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsRefundPost201ResponseLinks) + end + end + describe 'test attribute "_self"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "void"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_refund_post201_response_order_information_spec.rb b/spec/models/pts_v2_payments_refund_post201_response_order_information_spec.rb new file mode 100644 index 00000000..77c8c273 --- /dev/null +++ b/spec/models/pts_v2_payments_refund_post201_response_order_information_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsRefundPost201ResponseOrderInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsRefundPost201ResponseOrderInformation' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsRefundPost201ResponseOrderInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsRefundPost201ResponseOrderInformation' do + it 'should create an instance of PtsV2PaymentsRefundPost201ResponseOrderInformation' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsRefundPost201ResponseOrderInformation) + end + end + describe 'test attribute "invoice_details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_refund_post201_response_processor_information_spec.rb b/spec/models/pts_v2_payments_refund_post201_response_processor_information_spec.rb new file mode 100644 index 00000000..cc7de5c2 --- /dev/null +++ b/spec/models/pts_v2_payments_refund_post201_response_processor_information_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsRefundPost201ResponseProcessorInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsRefundPost201ResponseProcessorInformation' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsRefundPost201ResponseProcessorInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsRefundPost201ResponseProcessorInformation' do + it 'should create an instance of PtsV2PaymentsRefundPost201ResponseProcessorInformation' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsRefundPost201ResponseProcessorInformation) + end + end + describe 'test attribute "transaction_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "forwarded_acquirer_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_refund_post201_response_refund_amount_details_spec.rb b/spec/models/pts_v2_payments_refund_post201_response_refund_amount_details_spec.rb new file mode 100644 index 00000000..b5fd0280 --- /dev/null +++ b/spec/models/pts_v2_payments_refund_post201_response_refund_amount_details_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsRefundPost201ResponseRefundAmountDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsRefundPost201ResponseRefundAmountDetails' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsRefundPost201ResponseRefundAmountDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsRefundPost201ResponseRefundAmountDetails' do + it 'should create an instance of PtsV2PaymentsRefundPost201ResponseRefundAmountDetails' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsRefundPost201ResponseRefundAmountDetails) + end + end + describe 'test attribute "refund_amount"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "currency"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_refund_post201_response_spec.rb b/spec/models/pts_v2_payments_refund_post201_response_spec.rb new file mode 100644 index 00000000..00050b5f --- /dev/null +++ b/spec/models/pts_v2_payments_refund_post201_response_spec.rb @@ -0,0 +1,93 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsRefundPost201Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsRefundPost201Response' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsRefundPost201Response.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsRefundPost201Response' do + it 'should create an instance of PtsV2PaymentsRefundPost201Response' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsRefundPost201Response) + end + end + describe 'test attribute "_links"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PENDING"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "reconciliation_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "client_reference_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "refund_amount_details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "processor_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "order_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_refund_post400_response_spec.rb b/spec/models/pts_v2_payments_refund_post400_response_spec.rb new file mode 100644 index 00000000..7ae911b1 --- /dev/null +++ b/spec/models/pts_v2_payments_refund_post400_response_spec.rb @@ -0,0 +1,73 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsRefundPost400Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsRefundPost400Response' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsRefundPost400Response.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsRefundPost400Response' do + it 'should create an instance of PtsV2PaymentsRefundPost400Response' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsRefundPost400Response) + end + end + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["INVALID_REQUEST"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["MISSING_FIELD", "INVALID_DATA", "DUPLICATE_REQUEST", "INVALID_CARD", "INVALID_MERCHANT_CONFIGURATION", "CAPTURE_ALREADY_VOIDED", "ACCOUNT_NOT_ALLOWED_CREDIT"]) + # validator.allowable_values.each do |value| + # expect { @instance.reason = value }.not_to raise_error + # end + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_reversals_post201_response__links_spec.rb b/spec/models/pts_v2_payments_reversals_post201_response__links_spec.rb new file mode 100644 index 00000000..958cf00e --- /dev/null +++ b/spec/models/pts_v2_payments_reversals_post201_response__links_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsReversalsPost201ResponseLinks +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsReversalsPost201ResponseLinks' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsReversalsPost201ResponseLinks.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsReversalsPost201ResponseLinks' do + it 'should create an instance of PtsV2PaymentsReversalsPost201ResponseLinks' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsReversalsPost201ResponseLinks) + end + end + describe 'test attribute "_self"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_reversals_post201_response_authorization_information_spec.rb b/spec/models/pts_v2_payments_reversals_post201_response_authorization_information_spec.rb new file mode 100644 index 00000000..6bd70d08 --- /dev/null +++ b/spec/models/pts_v2_payments_reversals_post201_response_authorization_information_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation' do + it 'should create an instance of PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation) + end + end + describe 'test attribute "approval_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "reason_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_reversals_post201_response_processor_information_spec.rb b/spec/models/pts_v2_payments_reversals_post201_response_processor_information_spec.rb new file mode 100644 index 00000000..d32d2493 --- /dev/null +++ b/spec/models/pts_v2_payments_reversals_post201_response_processor_information_spec.rb @@ -0,0 +1,71 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsReversalsPost201ResponseProcessorInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsReversalsPost201ResponseProcessorInformation' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsReversalsPost201ResponseProcessorInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsReversalsPost201ResponseProcessorInformation' do + it 'should create an instance of PtsV2PaymentsReversalsPost201ResponseProcessorInformation' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsReversalsPost201ResponseProcessorInformation) + end + end + describe 'test attribute "transaction_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "response_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "response_category_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "forwarded_acquirer_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "master_card_service_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "master_card_service_reply_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_reversals_post201_response_reversal_amount_details_spec.rb b/spec/models/pts_v2_payments_reversals_post201_response_reversal_amount_details_spec.rb new file mode 100644 index 00000000..11e08a29 --- /dev/null +++ b/spec/models/pts_v2_payments_reversals_post201_response_reversal_amount_details_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsReversalsPost201ResponseReversalAmountDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsReversalsPost201ResponseReversalAmountDetails' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsReversalsPost201ResponseReversalAmountDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsReversalsPost201ResponseReversalAmountDetails' do + it 'should create an instance of PtsV2PaymentsReversalsPost201ResponseReversalAmountDetails' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsReversalsPost201ResponseReversalAmountDetails) + end + end + describe 'test attribute "reversed_amount"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "original_transaction_amount"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "currency"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_reversals_post201_response_spec.rb b/spec/models/pts_v2_payments_reversals_post201_response_spec.rb new file mode 100644 index 00000000..18210acb --- /dev/null +++ b/spec/models/pts_v2_payments_reversals_post201_response_spec.rb @@ -0,0 +1,99 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsReversalsPost201Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsReversalsPost201Response' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsReversalsPost201Response.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsReversalsPost201Response' do + it 'should create an instance of PtsV2PaymentsReversalsPost201Response' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsReversalsPost201Response) + end + end + describe 'test attribute "_links"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["REVERSED"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "reconciliation_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "client_reference_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "reversal_amount_details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "processor_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "authorization_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "point_of_sale_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_reversals_post400_response_spec.rb b/spec/models/pts_v2_payments_reversals_post400_response_spec.rb new file mode 100644 index 00000000..7e0a606a --- /dev/null +++ b/spec/models/pts_v2_payments_reversals_post400_response_spec.rb @@ -0,0 +1,73 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsReversalsPost400Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsReversalsPost400Response' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsReversalsPost400Response.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsReversalsPost400Response' do + it 'should create an instance of PtsV2PaymentsReversalsPost400Response' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsReversalsPost400Response) + end + end + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["INVALID_REQUEST"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["MISSING_FIELD", "INVALID_DATA", "DUPLICATE_REQUEST", "INVALID_MERCHANT_CONFIGURATION", "AUTH_ALREADY_REVERSED", "MISSING_AUTH", "TRANSACTION_ALREADY_REVERSED_OR_SETTLED"]) + # validator.allowable_values.each do |value| + # expect { @instance.reason = value }.not_to raise_error + # end + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_voids_post201_response_spec.rb b/spec/models/pts_v2_payments_voids_post201_response_spec.rb new file mode 100644 index 00000000..931459a9 --- /dev/null +++ b/spec/models/pts_v2_payments_voids_post201_response_spec.rb @@ -0,0 +1,75 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsVoidsPost201Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsVoidsPost201Response' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsVoidsPost201Response.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsVoidsPost201Response' do + it 'should create an instance of PtsV2PaymentsVoidsPost201Response' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsVoidsPost201Response) + end + end + describe 'test attribute "_links"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["VOIDED"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "client_reference_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "void_amount_details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_voids_post201_response_void_amount_details_spec.rb b/spec/models/pts_v2_payments_voids_post201_response_void_amount_details_spec.rb new file mode 100644 index 00000000..98c610bd --- /dev/null +++ b/spec/models/pts_v2_payments_voids_post201_response_void_amount_details_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsVoidsPost201ResponseVoidAmountDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsVoidsPost201ResponseVoidAmountDetails' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsVoidsPost201ResponseVoidAmountDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsVoidsPost201ResponseVoidAmountDetails' do + it 'should create an instance of PtsV2PaymentsVoidsPost201ResponseVoidAmountDetails' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsVoidsPost201ResponseVoidAmountDetails) + end + end + describe 'test attribute "void_amount"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "original_transaction_amount"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "currency"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payments_voids_post400_response_spec.rb b/spec/models/pts_v2_payments_voids_post400_response_spec.rb new file mode 100644 index 00000000..3085954e --- /dev/null +++ b/spec/models/pts_v2_payments_voids_post400_response_spec.rb @@ -0,0 +1,73 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PaymentsVoidsPost400Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PaymentsVoidsPost400Response' do + before do + # run before each test + @instance = CyberSource::PtsV2PaymentsVoidsPost400Response.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PaymentsVoidsPost400Response' do + it 'should create an instance of PtsV2PaymentsVoidsPost400Response' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PaymentsVoidsPost400Response) + end + end + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["INVALID_REQUEST"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["MISSING_FIELD", "INVALID_DATA", "DUPLICATE_REQUEST", "INVALID_MERCHANT_CONFIGURATION", "NOT_VOIDABLE"]) + # validator.allowable_values.each do |value| + # expect { @instance.reason = value }.not_to raise_error + # end + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payouts_post400_response_spec.rb b/spec/models/pts_v2_payouts_post400_response_spec.rb new file mode 100644 index 00000000..7a76e13c --- /dev/null +++ b/spec/models/pts_v2_payouts_post400_response_spec.rb @@ -0,0 +1,69 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PayoutsPost400Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PayoutsPost400Response' do + before do + # run before each test + @instance = CyberSource::PtsV2PayoutsPost400Response.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PayoutsPost400Response' do + it 'should create an instance of PtsV2PayoutsPost400Response' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PayoutsPost400Response) + end + end + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["MISSING_FIELD", "INVALID_DATA", "DUPLICATE_REQUEST", "INVALID_MERCHANT_CONFIGURATION", "INVALID_AMOUNT", "DEBIT_CARD_USEAGE_EXCEEDD_LIMIT"]) + # validator.allowable_values.each do |value| + # expect { @instance.reason = value }.not_to raise_error + # end + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/pts_v2_payouts_post_response_spec.rb b/spec/models/pts_v2_payouts_post_response_spec.rb new file mode 100644 index 00000000..c04b6115 --- /dev/null +++ b/spec/models/pts_v2_payouts_post_response_spec.rb @@ -0,0 +1,77 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::PtsV2PayoutsPostResponse +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PtsV2PayoutsPostResponse' do + before do + # run before each test + @instance = CyberSource::PtsV2PayoutsPostResponse.new + end + + after do + # run after each test + end + + describe 'test an instance of PtsV2PayoutsPostResponse' do + it 'should create an instance of PtsV2PayoutsPostResponse' do + expect(@instance).to be_instance_of(CyberSource::PtsV2PayoutsPostResponse) + end + end + describe 'test attribute "client_reference_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "order_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "merchant_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "recipient_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "sender_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "processing_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "payment_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/reporting_v3_notificationof_changes_get200_response_notification_of_changes_spec.rb b/spec/models/reporting_v3_notificationof_changes_get200_response_notification_of_changes_spec.rb new file mode 100644 index 00000000..470ef155 --- /dev/null +++ b/spec/models/reporting_v3_notificationof_changes_get200_response_notification_of_changes_spec.rb @@ -0,0 +1,83 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::ReportingV3NotificationofChangesGet200ResponseNotificationOfChanges +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportingV3NotificationofChangesGet200ResponseNotificationOfChanges' do + before do + # run before each test + @instance = CyberSource::ReportingV3NotificationofChangesGet200ResponseNotificationOfChanges.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportingV3NotificationofChangesGet200ResponseNotificationOfChanges' do + it 'should create an instance of ReportingV3NotificationofChangesGet200ResponseNotificationOfChanges' do + expect(@instance).to be_instance_of(CyberSource::ReportingV3NotificationofChangesGet200ResponseNotificationOfChanges) + end + end + describe 'test attribute "merchant_reference_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "transaction_reference_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "account_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "routing_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "account_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "consumer_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/reporting_v3_notificationof_changes_get200_response_spec.rb b/spec/models/reporting_v3_notificationof_changes_get200_response_spec.rb new file mode 100644 index 00000000..5a6458ac --- /dev/null +++ b/spec/models/reporting_v3_notificationof_changes_get200_response_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::ReportingV3NotificationofChangesGet200Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportingV3NotificationofChangesGet200Response' do + before do + # run before each test + @instance = CyberSource::ReportingV3NotificationofChangesGet200Response.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportingV3NotificationofChangesGet200Response' do + it 'should create an instance of ReportingV3NotificationofChangesGet200Response' do + expect(@instance).to be_instance_of(CyberSource::ReportingV3NotificationofChangesGet200Response) + end + end + describe 'test attribute "notification_of_changes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/reporting_v3_notificationof_changes_get400_response_fields_spec.rb b/spec/models/reporting_v3_notificationof_changes_get400_response_fields_spec.rb new file mode 100644 index 00000000..f29e9f6d --- /dev/null +++ b/spec/models/reporting_v3_notificationof_changes_get400_response_fields_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::ReportingV3NotificationofChangesGet400ResponseFields +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportingV3NotificationofChangesGet400ResponseFields' do + before do + # run before each test + @instance = CyberSource::ReportingV3NotificationofChangesGet400ResponseFields.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportingV3NotificationofChangesGet400ResponseFields' do + it 'should create an instance of ReportingV3NotificationofChangesGet400ResponseFields' do + expect(@instance).to be_instance_of(CyberSource::ReportingV3NotificationofChangesGet400ResponseFields) + end + end + describe 'test attribute "path"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "localization_key"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/reporting_v3_notificationof_changes_get400_response_spec.rb b/spec/models/reporting_v3_notificationof_changes_get400_response_spec.rb new file mode 100644 index 00000000..ee71f81c --- /dev/null +++ b/spec/models/reporting_v3_notificationof_changes_get400_response_spec.rb @@ -0,0 +1,71 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::ReportingV3NotificationofChangesGet400Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportingV3NotificationofChangesGet400Response' do + before do + # run before each test + @instance = CyberSource::ReportingV3NotificationofChangesGet400Response.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportingV3NotificationofChangesGet400Response' do + it 'should create an instance of ReportingV3NotificationofChangesGet400Response' do + expect(@instance).to be_instance_of(CyberSource::ReportingV3NotificationofChangesGet400Response) + end + end + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "localization_key"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "correlation_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "detail"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "fields"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/reporting_v3_report_definitions_get200_response_report_definitions_spec.rb b/spec/models/reporting_v3_report_definitions_get200_response_report_definitions_spec.rb new file mode 100644 index 00000000..e796777b --- /dev/null +++ b/spec/models/reporting_v3_report_definitions_get200_response_report_definitions_spec.rb @@ -0,0 +1,69 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::ReportingV3ReportDefinitionsGet200ResponseReportDefinitions +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportingV3ReportDefinitionsGet200ResponseReportDefinitions' do + before do + # run before each test + @instance = CyberSource::ReportingV3ReportDefinitionsGet200ResponseReportDefinitions.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportingV3ReportDefinitionsGet200ResponseReportDefinitions' do + it 'should create an instance of ReportingV3ReportDefinitionsGet200ResponseReportDefinitions' do + expect(@instance).to be_instance_of(CyberSource::ReportingV3ReportDefinitionsGet200ResponseReportDefinitions) + end + end + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_definition_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_defintion_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "supported_formats"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('Array', ["application/xml", "text/csv"]) + # validator.allowable_values.each do |value| + # expect { @instance.supported_formats = value }.not_to raise_error + # end + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/reporting_v3_report_definitions_get200_response_spec.rb b/spec/models/reporting_v3_report_definitions_get200_response_spec.rb new file mode 100644 index 00000000..37635756 --- /dev/null +++ b/spec/models/reporting_v3_report_definitions_get200_response_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::ReportingV3ReportDefinitionsGet200Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportingV3ReportDefinitionsGet200Response' do + before do + # run before each test + @instance = CyberSource::ReportingV3ReportDefinitionsGet200Response.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportingV3ReportDefinitionsGet200Response' do + it 'should create an instance of ReportingV3ReportDefinitionsGet200Response' do + expect(@instance).to be_instance_of(CyberSource::ReportingV3ReportDefinitionsGet200Response) + end + end + describe 'test attribute "report_definitions"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/reporting_v3_report_definitions_name_get200_response_attributes_spec.rb b/spec/models/reporting_v3_report_definitions_name_get200_response_attributes_spec.rb new file mode 100644 index 00000000..b377707c --- /dev/null +++ b/spec/models/reporting_v3_report_definitions_name_get200_response_attributes_spec.rb @@ -0,0 +1,77 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::ReportingV3ReportDefinitionsNameGet200ResponseAttributes +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportingV3ReportDefinitionsNameGet200ResponseAttributes' do + before do + # run before each test + @instance = CyberSource::ReportingV3ReportDefinitionsNameGet200ResponseAttributes.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportingV3ReportDefinitionsNameGet200ResponseAttributes' do + it 'should create an instance of ReportingV3ReportDefinitionsNameGet200ResponseAttributes' do + expect(@instance).to be_instance_of(CyberSource::ReportingV3ReportDefinitionsNameGet200ResponseAttributes) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "filter_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "default"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "required"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "supported_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/reporting_v3_report_definitions_name_get200_response_spec.rb b/spec/models/reporting_v3_report_definitions_name_get200_response_spec.rb new file mode 100644 index 00000000..c4e51a9f --- /dev/null +++ b/spec/models/reporting_v3_report_definitions_name_get200_response_spec.rb @@ -0,0 +1,75 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::ReportingV3ReportDefinitionsNameGet200Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportingV3ReportDefinitionsNameGet200Response' do + before do + # run before each test + @instance = CyberSource::ReportingV3ReportDefinitionsNameGet200Response.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportingV3ReportDefinitionsNameGet200Response' do + it 'should create an instance of ReportingV3ReportDefinitionsNameGet200Response' do + expect(@instance).to be_instance_of(CyberSource::ReportingV3ReportDefinitionsNameGet200Response) + end + end + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_definition_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_defintion_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "attributes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "supported_formats"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('Array', ["application/xml", "text/csv"]) + # validator.allowable_values.each do |value| + # expect { @instance.supported_formats = value }.not_to raise_error + # end + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/reporting_v3_report_subscriptions_get200_response_report_preferences_spec.rb b/spec/models/reporting_v3_report_subscriptions_get200_response_report_preferences_spec.rb new file mode 100644 index 00000000..8a78ba68 --- /dev/null +++ b/spec/models/reporting_v3_report_subscriptions_get200_response_report_preferences_spec.rb @@ -0,0 +1,51 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::ReportingV3ReportSubscriptionsGet200ResponseReportPreferences +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportingV3ReportSubscriptionsGet200ResponseReportPreferences' do + before do + # run before each test + @instance = CyberSource::ReportingV3ReportSubscriptionsGet200ResponseReportPreferences.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportingV3ReportSubscriptionsGet200ResponseReportPreferences' do + it 'should create an instance of ReportingV3ReportSubscriptionsGet200ResponseReportPreferences' do + expect(@instance).to be_instance_of(CyberSource::ReportingV3ReportSubscriptionsGet200ResponseReportPreferences) + end + end + describe 'test attribute "signed_amounts"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "field_name_convention"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["SOAPI", "SCMP"]) + # validator.allowable_values.each do |value| + # expect { @instance.field_name_convention = value }.not_to raise_error + # end + end + end + +end diff --git a/spec/models/reporting_v3_report_subscriptions_get200_response_spec.rb b/spec/models/reporting_v3_report_subscriptions_get200_response_spec.rb new file mode 100644 index 00000000..53ce9243 --- /dev/null +++ b/spec/models/reporting_v3_report_subscriptions_get200_response_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::ReportingV3ReportSubscriptionsGet200Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportingV3ReportSubscriptionsGet200Response' do + before do + # run before each test + @instance = CyberSource::ReportingV3ReportSubscriptionsGet200Response.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportingV3ReportSubscriptionsGet200Response' do + it 'should create an instance of ReportingV3ReportSubscriptionsGet200Response' do + expect(@instance).to be_instance_of(CyberSource::ReportingV3ReportSubscriptionsGet200Response) + end + end + describe 'test attribute "subscriptions"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/reporting_v3_report_subscriptions_get200_response_subscriptions_spec.rb b/spec/models/reporting_v3_report_subscriptions_get200_response_subscriptions_spec.rb new file mode 100644 index 00000000..9265c24e --- /dev/null +++ b/spec/models/reporting_v3_report_subscriptions_get200_response_subscriptions_spec.rb @@ -0,0 +1,121 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::ReportingV3ReportSubscriptionsGet200ResponseSubscriptions +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportingV3ReportSubscriptionsGet200ResponseSubscriptions' do + before do + # run before each test + @instance = CyberSource::ReportingV3ReportSubscriptionsGet200ResponseSubscriptions.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportingV3ReportSubscriptionsGet200ResponseSubscriptions' do + it 'should create an instance of ReportingV3ReportSubscriptionsGet200ResponseSubscriptions' do + expect(@instance).to be_instance_of(CyberSource::ReportingV3ReportSubscriptionsGet200ResponseSubscriptions) + end + end + describe 'test attribute "organization_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_definition_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_definition_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_mime_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["application/xml", "text/csv"]) + # validator.allowable_values.each do |value| + # expect { @instance.report_mime_type = value }.not_to raise_error + # end + end + end + + describe 'test attribute "report_frequency"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["DAILY", "WEEKLY", "MONTHLY"]) + # validator.allowable_values.each do |value| + # expect { @instance.report_frequency = value }.not_to raise_error + # end + end + end + + describe 'test attribute "report_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "timezone"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "start_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "start_day"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_fields"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_filters"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_preferences"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "selected_merchant_group_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/reporting_v3_reports_get200_response_reports_spec.rb b/spec/models/reporting_v3_reports_get200_response_reports_spec.rb new file mode 100644 index 00000000..98f2a85a --- /dev/null +++ b/spec/models/reporting_v3_reports_get200_response_reports_spec.rb @@ -0,0 +1,131 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::ReportingV3ReportsGet200ResponseReports +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportingV3ReportsGet200ResponseReports' do + before do + # run before each test + @instance = CyberSource::ReportingV3ReportsGet200ResponseReports.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportingV3ReportsGet200ResponseReports' do + it 'should create an instance of ReportingV3ReportsGet200ResponseReports' do + expect(@instance).to be_instance_of(CyberSource::ReportingV3ReportsGet200ResponseReports) + end + end + describe 'test attribute "report_definition_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_mime_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["application/xml", "text/csv"]) + # validator.allowable_values.each do |value| + # expect { @instance.report_mime_type = value }.not_to raise_error + # end + end + end + + describe 'test attribute "report_frequency"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["DAILY", "WEEKLY", "MONTHLY", "ADHOC"]) + # validator.allowable_values.each do |value| + # expect { @instance.report_frequency = value }.not_to raise_error + # end + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["COMPLETED", "PENDING", "QUEUED", "RUNNING", "ERROR", "NO_DATA"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "report_start_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_end_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "timezone"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "organization_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "queued_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_generating_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_completed_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "selected_merchant_group_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/reporting_v3_reports_get200_response_spec.rb b/spec/models/reporting_v3_reports_get200_response_spec.rb new file mode 100644 index 00000000..8ba27dc9 --- /dev/null +++ b/spec/models/reporting_v3_reports_get200_response_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::ReportingV3ReportsGet200Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportingV3ReportsGet200Response' do + before do + # run before each test + @instance = CyberSource::ReportingV3ReportsGet200Response.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportingV3ReportsGet200Response' do + it 'should create an instance of ReportingV3ReportsGet200Response' do + expect(@instance).to be_instance_of(CyberSource::ReportingV3ReportsGet200Response) + end + end + describe 'test attribute "reports"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/reporting_v3_reports_id_get200_response_spec.rb b/spec/models/reporting_v3_reports_id_get200_response_spec.rb new file mode 100644 index 00000000..6da30ccc --- /dev/null +++ b/spec/models/reporting_v3_reports_id_get200_response_spec.rb @@ -0,0 +1,131 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::ReportingV3ReportsIdGet200Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportingV3ReportsIdGet200Response' do + before do + # run before each test + @instance = CyberSource::ReportingV3ReportsIdGet200Response.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportingV3ReportsIdGet200Response' do + it 'should create an instance of ReportingV3ReportsIdGet200Response' do + expect(@instance).to be_instance_of(CyberSource::ReportingV3ReportsIdGet200Response) + end + end + describe 'test attribute "organization_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_definition_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_mime_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["application/xml", "text/csv"]) + # validator.allowable_values.each do |value| + # expect { @instance.report_mime_type = value }.not_to raise_error + # end + end + end + + describe 'test attribute "report_frequency"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["DAILY", "WEEKLY", "MONTHLY"]) + # validator.allowable_values.each do |value| + # expect { @instance.report_frequency = value }.not_to raise_error + # end + end + end + + describe 'test attribute "report_fields"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["COMPLETED", "PENDING", "QUEUED", "RUNNING", "ERROR", "NO_DATA", "RERUN"]) + # validator.allowable_values.each do |value| + # expect { @instance.report_status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "report_start_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_end_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "timezone"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_filters"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report_preferences"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "selected_merchant_group_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tms_v1_instrumentidentifiers_delete409_response__links_payment_instruments_spec.rb b/spec/models/tms_v1_instrumentidentifiers_delete409_response__links_payment_instruments_spec.rb new file mode 100644 index 00000000..3af50845 --- /dev/null +++ b/spec/models/tms_v1_instrumentidentifiers_delete409_response__links_payment_instruments_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TmsV1InstrumentidentifiersDelete409ResponseLinksPaymentInstruments +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TmsV1InstrumentidentifiersDelete409ResponseLinksPaymentInstruments' do + before do + # run before each test + @instance = CyberSource::TmsV1InstrumentidentifiersDelete409ResponseLinksPaymentInstruments.new + end + + after do + # run after each test + end + + describe 'test an instance of TmsV1InstrumentidentifiersDelete409ResponseLinksPaymentInstruments' do + it 'should create an instance of TmsV1InstrumentidentifiersDelete409ResponseLinksPaymentInstruments' do + expect(@instance).to be_instance_of(CyberSource::TmsV1InstrumentidentifiersDelete409ResponseLinksPaymentInstruments) + end + end + describe 'test attribute "href"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tms_v1_instrumentidentifiers_delete409_response__links_spec.rb b/spec/models/tms_v1_instrumentidentifiers_delete409_response__links_spec.rb new file mode 100644 index 00000000..1596be14 --- /dev/null +++ b/spec/models/tms_v1_instrumentidentifiers_delete409_response__links_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TmsV1InstrumentidentifiersDelete409ResponseLinks +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TmsV1InstrumentidentifiersDelete409ResponseLinks' do + before do + # run before each test + @instance = CyberSource::TmsV1InstrumentidentifiersDelete409ResponseLinks.new + end + + after do + # run after each test + end + + describe 'test an instance of TmsV1InstrumentidentifiersDelete409ResponseLinks' do + it 'should create an instance of TmsV1InstrumentidentifiersDelete409ResponseLinks' do + expect(@instance).to be_instance_of(CyberSource::TmsV1InstrumentidentifiersDelete409ResponseLinks) + end + end + describe 'test attribute "payment_instruments"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tms_v1_instrumentidentifiers_delete409_response_spec.rb b/spec/models/tms_v1_instrumentidentifiers_delete409_response_spec.rb new file mode 100644 index 00000000..2f1445f2 --- /dev/null +++ b/spec/models/tms_v1_instrumentidentifiers_delete409_response_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TmsV1InstrumentidentifiersDelete409Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TmsV1InstrumentidentifiersDelete409Response' do + before do + # run before each test + @instance = CyberSource::TmsV1InstrumentidentifiersDelete409Response.new + end + + after do + # run after each test + end + + describe 'test an instance of TmsV1InstrumentidentifiersDelete409Response' do + it 'should create an instance of TmsV1InstrumentidentifiersDelete409Response' do + expect(@instance).to be_instance_of(CyberSource::TmsV1InstrumentidentifiersDelete409Response) + end + end + describe 'test attribute "_links"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_first_spec.rb b/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_first_spec.rb new file mode 100644 index 00000000..6db86dcd --- /dev/null +++ b/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_first_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksFirst +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksFirst' do + before do + # run before each test + @instance = CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksFirst.new + end + + after do + # run after each test + end + + describe 'test an instance of TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksFirst' do + it 'should create an instance of TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksFirst' do + expect(@instance).to be_instance_of(CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksFirst) + end + end + describe 'test attribute "href"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_last_spec.rb b/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_last_spec.rb new file mode 100644 index 00000000..67d1d498 --- /dev/null +++ b/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_last_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksLast +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksLast' do + before do + # run before each test + @instance = CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksLast.new + end + + after do + # run after each test + end + + describe 'test an instance of TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksLast' do + it 'should create an instance of TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksLast' do + expect(@instance).to be_instance_of(CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksLast) + end + end + describe 'test attribute "href"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_next_spec.rb b/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_next_spec.rb new file mode 100644 index 00000000..cc5129cf --- /dev/null +++ b/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_next_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksNext +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksNext' do + before do + # run before each test + @instance = CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksNext.new + end + + after do + # run after each test + end + + describe 'test an instance of TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksNext' do + it 'should create an instance of TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksNext' do + expect(@instance).to be_instance_of(CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksNext) + end + end + describe 'test attribute "href"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_prev_spec.rb b/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_prev_spec.rb new file mode 100644 index 00000000..362f22ca --- /dev/null +++ b/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_prev_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksPrev +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksPrev' do + before do + # run before each test + @instance = CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksPrev.new + end + + after do + # run after each test + end + + describe 'test an instance of TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksPrev' do + it 'should create an instance of TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksPrev' do + expect(@instance).to be_instance_of(CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksPrev) + end + end + describe 'test attribute "href"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_self_spec.rb b/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_self_spec.rb new file mode 100644 index 00000000..cce735fc --- /dev/null +++ b/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_self_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksSelf +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksSelf' do + before do + # run before each test + @instance = CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksSelf.new + end + + after do + # run after each test + end + + describe 'test an instance of TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksSelf' do + it 'should create an instance of TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksSelf' do + expect(@instance).to be_instance_of(CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinksSelf) + end + end + describe 'test attribute "href"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_spec.rb b/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_spec.rb new file mode 100644 index 00000000..fde48eac --- /dev/null +++ b/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response__links_spec.rb @@ -0,0 +1,65 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinks +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinks' do + before do + # run before each test + @instance = CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinks.new + end + + after do + # run after each test + end + + describe 'test an instance of TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinks' do + it 'should create an instance of TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinks' do + expect(@instance).to be_instance_of(CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200ResponseLinks) + end + end + describe 'test attribute "_self"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "first"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "prev"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "_next"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "last"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response_spec.rb b/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response_spec.rb new file mode 100644 index 00000000..4c82ab2c --- /dev/null +++ b/spec/models/tms_v1_instrumentidentifiers_paymentinstruments_get200_response_spec.rb @@ -0,0 +1,81 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response' do + before do + # run before each test + @instance = CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response.new + end + + after do + # run after each test + end + + describe 'test an instance of TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response' do + it 'should create an instance of TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response' do + expect(@instance).to be_instance_of(CyberSource::TmsV1InstrumentidentifiersPaymentinstrumentsGet200Response) + end + end + describe 'test attribute "_links"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "object"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["collection"]) + # validator.allowable_values.each do |value| + # expect { @instance.object = value }.not_to raise_error + # end + end + end + + describe 'test attribute "offset"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "limit"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "total"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "_embedded"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tms_v1_instrumentidentifiers_post200_response_spec.rb b/spec/models/tms_v1_instrumentidentifiers_post200_response_spec.rb new file mode 100644 index 00000000..cc68b00c --- /dev/null +++ b/spec/models/tms_v1_instrumentidentifiers_post200_response_spec.rb @@ -0,0 +1,91 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TmsV1InstrumentidentifiersPost200Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TmsV1InstrumentidentifiersPost200Response' do + before do + # run before each test + @instance = CyberSource::TmsV1InstrumentidentifiersPost200Response.new + end + + after do + # run after each test + end + + describe 'test an instance of TmsV1InstrumentidentifiersPost200Response' do + it 'should create an instance of TmsV1InstrumentidentifiersPost200Response' do + expect(@instance).to be_instance_of(CyberSource::TmsV1InstrumentidentifiersPost200Response) + end + end + describe 'test attribute "_links"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "object"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["instrumentIdentifier"]) + # validator.allowable_values.each do |value| + # expect { @instance.object = value }.not_to raise_error + # end + end + end + + describe 'test attribute "state"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ACTIVE", "CLOSED"]) + # validator.allowable_values.each do |value| + # expect { @instance.state = value }.not_to raise_error + # end + end + end + + describe 'test attribute "card"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "bank_account"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "processing_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "metadata"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tms_v1_paymentinstruments_post201_response_spec.rb b/spec/models/tms_v1_paymentinstruments_post201_response_spec.rb new file mode 100644 index 00000000..8569756c --- /dev/null +++ b/spec/models/tms_v1_paymentinstruments_post201_response_spec.rb @@ -0,0 +1,115 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TmsV1PaymentinstrumentsPost201Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TmsV1PaymentinstrumentsPost201Response' do + before do + # run before each test + @instance = CyberSource::TmsV1PaymentinstrumentsPost201Response.new + end + + after do + # run after each test + end + + describe 'test an instance of TmsV1PaymentinstrumentsPost201Response' do + it 'should create an instance of TmsV1PaymentinstrumentsPost201Response' do + expect(@instance).to be_instance_of(CyberSource::TmsV1PaymentinstrumentsPost201Response) + end + end + describe 'test attribute "_links"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "object"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["paymentInstrument"]) + # validator.allowable_values.each do |value| + # expect { @instance.object = value }.not_to raise_error + # end + end + end + + describe 'test attribute "state"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ACTIVE", "CLOSED"]) + # validator.allowable_values.each do |value| + # expect { @instance.state = value }.not_to raise_error + # end + end + end + + describe 'test attribute "bank_account"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "card"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "buyer_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "bill_to"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "processing_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "merchant_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "meta_data"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "instrument_identifier"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tmsv1instrumentidentifiers_processing_information_authorization_options_initiator_merchant_initiated_transaction_spec.rb b/spec/models/tmsv1instrumentidentifiers_processing_information_authorization_options_initiator_merchant_initiated_transaction_spec.rb index f86abc81..a3229118 100644 --- a/spec/models/tmsv1instrumentidentifiers_processing_information_authorization_options_initiator_merchant_initiated_transaction_spec.rb +++ b/spec/models/tmsv1instrumentidentifiers_processing_information_authorization_options_initiator_merchant_initiated_transaction_spec.rb @@ -14,22 +14,22 @@ require 'json' require 'date' -# Unit tests for CyberSource::Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction +# Unit tests for CyberSource::Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) # Please update as you see appropriate -describe 'Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction' do +describe 'Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator' do before do # run before each test - @instance = CyberSource::Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction.new + @instance = CyberSource::Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.new end after do # run after each test end - describe 'test an instance of Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction' do - it 'should create an instance of Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction' do - expect(@instance).to be_instance_of(CyberSource::Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction) + describe 'test an instance of Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator' do + it 'should create an instance of Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator) end end describe 'test attribute "previous_transaction_id"' do diff --git a/spec/models/tss_v2_transactions_get200_response_application_information_applications_spec.rb b/spec/models/tss_v2_transactions_get200_response_application_information_applications_spec.rb new file mode 100644 index 00000000..f9c1a85b --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_application_information_applications_spec.rb @@ -0,0 +1,83 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseApplicationInformationApplications +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseApplicationInformationApplications' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseApplicationInformationApplications.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseApplicationInformationApplications' do + it 'should create an instance of TssV2TransactionsGet200ResponseApplicationInformationApplications' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseApplicationInformationApplications) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "reason_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "r_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "r_flag"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "reconciliation_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "r_message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "return_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_application_information_spec.rb b/spec/models/tss_v2_transactions_get200_response_application_information_spec.rb new file mode 100644 index 00000000..e1caa18a --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_application_information_spec.rb @@ -0,0 +1,65 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseApplicationInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseApplicationInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseApplicationInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseApplicationInformation' do + it 'should create an instance of TssV2TransactionsGet200ResponseApplicationInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseApplicationInformation) + end + end + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "reason_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "r_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "r_flag"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "applications"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_buyer_information_spec.rb b/spec/models/tss_v2_transactions_get200_response_buyer_information_spec.rb new file mode 100644 index 00000000..091009b9 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_buyer_information_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseBuyerInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseBuyerInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseBuyerInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseBuyerInformation' do + it 'should create an instance of TssV2TransactionsGet200ResponseBuyerInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseBuyerInformation) + end + end + describe 'test attribute "merchant_customer_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "hashed_password"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_client_reference_information_spec.rb b/spec/models/tss_v2_transactions_get200_response_client_reference_information_spec.rb new file mode 100644 index 00000000..ad326728 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_client_reference_information_spec.rb @@ -0,0 +1,65 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseClientReferenceInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseClientReferenceInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseClientReferenceInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseClientReferenceInformation' do + it 'should create an instance of TssV2TransactionsGet200ResponseClientReferenceInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseClientReferenceInformation) + end + end + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "application_version"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "application_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "application_user"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "comments"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_consumer_authentication_information_spec.rb b/spec/models/tss_v2_transactions_get200_response_consumer_authentication_information_spec.rb new file mode 100644 index 00000000..845033c9 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_consumer_authentication_information_spec.rb @@ -0,0 +1,59 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseConsumerAuthenticationInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseConsumerAuthenticationInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseConsumerAuthenticationInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseConsumerAuthenticationInformation' do + it 'should create an instance of TssV2TransactionsGet200ResponseConsumerAuthenticationInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseConsumerAuthenticationInformation) + end + end + describe 'test attribute "eci_raw"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "cavv"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "xid"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "transaction_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_device_information_spec.rb b/spec/models/tss_v2_transactions_get200_response_device_information_spec.rb new file mode 100644 index 00000000..4ffef618 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_device_information_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseDeviceInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseDeviceInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseDeviceInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseDeviceInformation' do + it 'should create an instance of TssV2TransactionsGet200ResponseDeviceInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseDeviceInformation) + end + end + describe 'test attribute "ip_address"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "host_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "cookies_accepted"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_error_information_spec.rb b/spec/models/tss_v2_transactions_get200_response_error_information_spec.rb new file mode 100644 index 00000000..4618d4e0 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_error_information_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseErrorInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseErrorInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseErrorInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseErrorInformation' do + it 'should create an instance of TssV2TransactionsGet200ResponseErrorInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseErrorInformation) + end + end + describe 'test attribute "reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_fraud_marking_information_spec.rb b/spec/models/tss_v2_transactions_get200_response_fraud_marking_information_spec.rb new file mode 100644 index 00000000..b43acfbe --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_fraud_marking_information_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseFraudMarkingInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseFraudMarkingInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseFraudMarkingInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseFraudMarkingInformation' do + it 'should create an instance of TssV2TransactionsGet200ResponseFraudMarkingInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseFraudMarkingInformation) + end + end + describe 'test attribute "reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_installment_information_spec.rb b/spec/models/tss_v2_transactions_get200_response_installment_information_spec.rb new file mode 100644 index 00000000..b88378fc --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_installment_information_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseInstallmentInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseInstallmentInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseInstallmentInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseInstallmentInformation' do + it 'should create an instance of TssV2TransactionsGet200ResponseInstallmentInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseInstallmentInformation) + end + end + describe 'test attribute "number_of_installments"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_merchant_defined_information_spec.rb b/spec/models/tss_v2_transactions_get200_response_merchant_defined_information_spec.rb new file mode 100644 index 00000000..b9897d16 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_merchant_defined_information_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseMerchantDefinedInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseMerchantDefinedInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseMerchantDefinedInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseMerchantDefinedInformation' do + it 'should create an instance of TssV2TransactionsGet200ResponseMerchantDefinedInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseMerchantDefinedInformation) + end + end + describe 'test attribute "key"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_merchant_information_merchant_descriptor_spec.rb b/spec/models/tss_v2_transactions_get200_response_merchant_information_merchant_descriptor_spec.rb new file mode 100644 index 00000000..d03e8174 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_merchant_information_merchant_descriptor_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseMerchantInformationMerchantDescriptor +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseMerchantInformationMerchantDescriptor' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseMerchantInformationMerchantDescriptor.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseMerchantInformationMerchantDescriptor' do + it 'should create an instance of TssV2TransactionsGet200ResponseMerchantInformationMerchantDescriptor' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseMerchantInformationMerchantDescriptor) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_merchant_information_spec.rb b/spec/models/tss_v2_transactions_get200_response_merchant_information_spec.rb new file mode 100644 index 00000000..d7d1bf8f --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_merchant_information_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseMerchantInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseMerchantInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseMerchantInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseMerchantInformation' do + it 'should create an instance of TssV2TransactionsGet200ResponseMerchantInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseMerchantInformation) + end + end + describe 'test attribute "merchant_descriptor"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_order_information_amount_details_spec.rb b/spec/models/tss_v2_transactions_get200_response_order_information_amount_details_spec.rb new file mode 100644 index 00000000..43ccd28d --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_order_information_amount_details_spec.rb @@ -0,0 +1,59 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseOrderInformationAmountDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseOrderInformationAmountDetails' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseOrderInformationAmountDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseOrderInformationAmountDetails' do + it 'should create an instance of TssV2TransactionsGet200ResponseOrderInformationAmountDetails' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseOrderInformationAmountDetails) + end + end + describe 'test attribute "total_amount"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "currency"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "tax_amount"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "authorized_amount"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_order_information_bill_to_spec.rb b/spec/models/tss_v2_transactions_get200_response_order_information_bill_to_spec.rb new file mode 100644 index 00000000..e0b1ef8e --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_order_information_bill_to_spec.rb @@ -0,0 +1,119 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseOrderInformationBillTo +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseOrderInformationBillTo' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseOrderInformationBillTo.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseOrderInformationBillTo' do + it 'should create an instance of TssV2TransactionsGet200ResponseOrderInformationBillTo' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseOrderInformationBillTo) + end + end + describe 'test attribute "first_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "last_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "middel_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name_suffix"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "address1"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "address2"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "locality"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "administrative_area"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "postal_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "company"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "email"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "country"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "title"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "phone_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_order_information_line_items_spec.rb b/spec/models/tss_v2_transactions_get200_response_order_information_line_items_spec.rb new file mode 100644 index 00000000..ae821bed --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_order_information_line_items_spec.rb @@ -0,0 +1,77 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseOrderInformationLineItems +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseOrderInformationLineItems' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseOrderInformationLineItems.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseOrderInformationLineItems' do + it 'should create an instance of TssV2TransactionsGet200ResponseOrderInformationLineItems' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseOrderInformationLineItems) + end + end + describe 'test attribute "product_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "product_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "product_sku"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "tax_amount"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "quantity"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "unit_price"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "fulfillment_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_order_information_ship_to_spec.rb b/spec/models/tss_v2_transactions_get200_response_order_information_ship_to_spec.rb new file mode 100644 index 00000000..199b3d62 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_order_information_ship_to_spec.rb @@ -0,0 +1,95 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseOrderInformationShipTo +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseOrderInformationShipTo' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseOrderInformationShipTo.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseOrderInformationShipTo' do + it 'should create an instance of TssV2TransactionsGet200ResponseOrderInformationShipTo' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseOrderInformationShipTo) + end + end + describe 'test attribute "first_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "last_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "address1"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "address2"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "locality"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "administrative_area"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "postal_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "company"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "country"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "phone_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_order_information_shipping_details_spec.rb b/spec/models/tss_v2_transactions_get200_response_order_information_shipping_details_spec.rb new file mode 100644 index 00000000..0f6a8fb4 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_order_information_shipping_details_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseOrderInformationShippingDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseOrderInformationShippingDetails' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseOrderInformationShippingDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseOrderInformationShippingDetails' do + it 'should create an instance of TssV2TransactionsGet200ResponseOrderInformationShippingDetails' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseOrderInformationShippingDetails) + end + end + describe 'test attribute "gift_wrap"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "shipping_method"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_order_information_spec.rb b/spec/models/tss_v2_transactions_get200_response_order_information_spec.rb new file mode 100644 index 00000000..9312d39c --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_order_information_spec.rb @@ -0,0 +1,65 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseOrderInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseOrderInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseOrderInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseOrderInformation' do + it 'should create an instance of TssV2TransactionsGet200ResponseOrderInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseOrderInformation) + end + end + describe 'test attribute "bill_to"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "ship_to"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "line_items"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "amount_details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "shipping_details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_payment_information_account_features_spec.rb b/spec/models/tss_v2_transactions_get200_response_payment_information_account_features_spec.rb new file mode 100644 index 00000000..884bdb30 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_payment_information_account_features_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponsePaymentInformationAccountFeatures +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponsePaymentInformationAccountFeatures' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponsePaymentInformationAccountFeatures.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponsePaymentInformationAccountFeatures' do + it 'should create an instance of TssV2TransactionsGet200ResponsePaymentInformationAccountFeatures' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponsePaymentInformationAccountFeatures) + end + end + describe 'test attribute "balance_amount"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "previous_balance_amount"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "currency"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_payment_information_bank_account_spec.rb b/spec/models/tss_v2_transactions_get200_response_payment_information_bank_account_spec.rb new file mode 100644 index 00000000..45608306 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_payment_information_bank_account_spec.rb @@ -0,0 +1,77 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponsePaymentInformationBankAccount +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponsePaymentInformationBankAccount' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponsePaymentInformationBankAccount.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponsePaymentInformationBankAccount' do + it 'should create an instance of TssV2TransactionsGet200ResponsePaymentInformationBankAccount' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponsePaymentInformationBankAccount) + end + end + describe 'test attribute "suffix"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "prefix"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "check_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "check_digit"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "encoder_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_payment_information_bank_mandate_spec.rb b/spec/models/tss_v2_transactions_get200_response_payment_information_bank_mandate_spec.rb new file mode 100644 index 00000000..04fc6d1e --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_payment_information_bank_mandate_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponsePaymentInformationBankMandate +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponsePaymentInformationBankMandate' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponsePaymentInformationBankMandate.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponsePaymentInformationBankMandate' do + it 'should create an instance of TssV2TransactionsGet200ResponsePaymentInformationBankMandate' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponsePaymentInformationBankMandate) + end + end + describe 'test attribute "reference_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "recurring_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_payment_information_bank_spec.rb b/spec/models/tss_v2_transactions_get200_response_payment_information_bank_spec.rb new file mode 100644 index 00000000..ad843ac3 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_payment_information_bank_spec.rb @@ -0,0 +1,77 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponsePaymentInformationBank +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponsePaymentInformationBank' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponsePaymentInformationBank.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponsePaymentInformationBank' do + it 'should create an instance of TssV2TransactionsGet200ResponsePaymentInformationBank' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponsePaymentInformationBank) + end + end + describe 'test attribute "routing_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "branch_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "swift_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "bank_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "iban"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "account"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "mandate"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_payment_information_card_spec.rb b/spec/models/tss_v2_transactions_get200_response_payment_information_card_spec.rb new file mode 100644 index 00000000..64e19010 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_payment_information_card_spec.rb @@ -0,0 +1,95 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponsePaymentInformationCard +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponsePaymentInformationCard' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponsePaymentInformationCard.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponsePaymentInformationCard' do + it 'should create an instance of TssV2TransactionsGet200ResponsePaymentInformationCard' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponsePaymentInformationCard) + end + end + describe 'test attribute "suffix"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "prefix"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expiration_month"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expiration_year"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "start_month"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "start_year"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "issue_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "account_encoder_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "use_as"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_payment_information_invoice_spec.rb b/spec/models/tss_v2_transactions_get200_response_payment_information_invoice_spec.rb new file mode 100644 index 00000000..51fc92a4 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_payment_information_invoice_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponsePaymentInformationInvoice +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponsePaymentInformationInvoice' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponsePaymentInformationInvoice.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponsePaymentInformationInvoice' do + it 'should create an instance of TssV2TransactionsGet200ResponsePaymentInformationInvoice' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponsePaymentInformationInvoice) + end + end + describe 'test attribute "number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "barcode_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expiration_date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_payment_information_payment_type_spec.rb b/spec/models/tss_v2_transactions_get200_response_payment_information_payment_type_spec.rb new file mode 100644 index 00000000..40b767e4 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_payment_information_payment_type_spec.rb @@ -0,0 +1,77 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponsePaymentInformationPaymentType +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponsePaymentInformationPaymentType' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponsePaymentInformationPaymentType.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponsePaymentInformationPaymentType' do + it 'should create an instance of TssV2TransactionsGet200ResponsePaymentInformationPaymentType' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponsePaymentInformationPaymentType) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "sub_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "method"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "funding_source"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "funding_source_affiliation"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "credential"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_payment_information_spec.rb b/spec/models/tss_v2_transactions_get200_response_payment_information_spec.rb new file mode 100644 index 00000000..187f4147 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_payment_information_spec.rb @@ -0,0 +1,71 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponsePaymentInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponsePaymentInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponsePaymentInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponsePaymentInformation' do + it 'should create an instance of TssV2TransactionsGet200ResponsePaymentInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponsePaymentInformation) + end + end + describe 'test attribute "payment_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "customer"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "card"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "invoice"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "bank"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "account_features"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_point_of_sale_information_spec.rb b/spec/models/tss_v2_transactions_get200_response_point_of_sale_information_spec.rb new file mode 100644 index 00000000..514d6c49 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_point_of_sale_information_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponsePointOfSaleInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponsePointOfSaleInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponsePointOfSaleInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponsePointOfSaleInformation' do + it 'should create an instance of TssV2TransactionsGet200ResponsePointOfSaleInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponsePointOfSaleInformation) + end + end + describe 'test attribute "entry_mode"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "terminal_capability"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_processing_information_authorization_options_spec.rb b/spec/models/tss_v2_transactions_get200_response_processing_information_authorization_options_spec.rb new file mode 100644 index 00000000..55b520b4 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_processing_information_authorization_options_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions' do + it 'should create an instance of TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions) + end + end + describe 'test attribute "auth_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_processing_information_bank_transfer_options_spec.rb b/spec/models/tss_v2_transactions_get200_response_processing_information_bank_transfer_options_spec.rb new file mode 100644 index 00000000..320f64f5 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_processing_information_bank_transfer_options_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions' do + it 'should create an instance of TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions) + end + end + describe 'test attribute "sec_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_processing_information_spec.rb b/spec/models/tss_v2_transactions_get200_response_processing_information_spec.rb new file mode 100644 index 00000000..1fb24609 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_processing_information_spec.rb @@ -0,0 +1,65 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseProcessingInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseProcessingInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseProcessingInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseProcessingInformation' do + it 'should create an instance of TssV2TransactionsGet200ResponseProcessingInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseProcessingInformation) + end + end + describe 'test attribute "payment_solution"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "commerce_indicator"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "business_application_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "authorization_options"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "bank_transfer_options"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_processor_information_ach_verification_spec.rb b/spec/models/tss_v2_transactions_get200_response_processor_information_ach_verification_spec.rb new file mode 100644 index 00000000..b38b52a0 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_processor_information_ach_verification_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseProcessorInformationAchVerification +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseProcessorInformationAchVerification' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseProcessorInformationAchVerification.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseProcessorInformationAchVerification' do + it 'should create an instance of TssV2TransactionsGet200ResponseProcessorInformationAchVerification' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseProcessorInformationAchVerification) + end + end + describe 'test attribute "result_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "result_code_raw"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_processor_information_card_verification_spec.rb b/spec/models/tss_v2_transactions_get200_response_processor_information_card_verification_spec.rb new file mode 100644 index 00000000..325c7c45 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_processor_information_card_verification_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseProcessorInformationCardVerification +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseProcessorInformationCardVerification' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseProcessorInformationCardVerification.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseProcessorInformationCardVerification' do + it 'should create an instance of TssV2TransactionsGet200ResponseProcessorInformationCardVerification' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseProcessorInformationCardVerification) + end + end + describe 'test attribute "result_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_processor_information_electronic_verification_results_spec.rb b/spec/models/tss_v2_transactions_get200_response_processor_information_electronic_verification_results_spec.rb new file mode 100644 index 00000000..88ed087b --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_processor_information_electronic_verification_results_spec.rb @@ -0,0 +1,95 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseProcessorInformationElectronicVerificationResults +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseProcessorInformationElectronicVerificationResults' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseProcessorInformationElectronicVerificationResults.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseProcessorInformationElectronicVerificationResults' do + it 'should create an instance of TssV2TransactionsGet200ResponseProcessorInformationElectronicVerificationResults' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseProcessorInformationElectronicVerificationResults) + end + end + describe 'test attribute "email"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "email_raw"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name_raw"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "phone_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "phone_number_raw"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "street"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "street_raw"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "postal_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "postal_code_raw"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_processor_information_processor_spec.rb b/spec/models/tss_v2_transactions_get200_response_processor_information_processor_spec.rb new file mode 100644 index 00000000..d4f24cf5 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_processor_information_processor_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseProcessorInformationProcessor +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseProcessorInformationProcessor' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseProcessorInformationProcessor.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseProcessorInformationProcessor' do + it 'should create an instance of TssV2TransactionsGet200ResponseProcessorInformationProcessor' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseProcessorInformationProcessor) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_processor_information_spec.rb b/spec/models/tss_v2_transactions_get200_response_processor_information_spec.rb new file mode 100644 index 00000000..1a630bf6 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_processor_information_spec.rb @@ -0,0 +1,101 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseProcessorInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseProcessorInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseProcessorInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseProcessorInformation' do + it 'should create an instance of TssV2TransactionsGet200ResponseProcessorInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseProcessorInformation) + end + end + describe 'test attribute "processor"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "transaction_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "network_transaction_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "response_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "provider_transaction_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "approval_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "response_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "avs"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "card_verification"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "ach_verification"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "electronic_verification_results"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_risk_information_profile_spec.rb b/spec/models/tss_v2_transactions_get200_response_risk_information_profile_spec.rb new file mode 100644 index 00000000..530568be --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_risk_information_profile_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseRiskInformationProfile +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseRiskInformationProfile' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseRiskInformationProfile.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseRiskInformationProfile' do + it 'should create an instance of TssV2TransactionsGet200ResponseRiskInformationProfile' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseRiskInformationProfile) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "decision"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_risk_information_score_spec.rb b/spec/models/tss_v2_transactions_get200_response_risk_information_score_spec.rb new file mode 100644 index 00000000..6454ff5d --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_risk_information_score_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseRiskInformationScore +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseRiskInformationScore' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseRiskInformationScore.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseRiskInformationScore' do + it 'should create an instance of TssV2TransactionsGet200ResponseRiskInformationScore' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseRiskInformationScore) + end + end + describe 'test attribute "factor_codes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "result"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_risk_information_spec.rb b/spec/models/tss_v2_transactions_get200_response_risk_information_spec.rb new file mode 100644 index 00000000..c78157a1 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_risk_information_spec.rb @@ -0,0 +1,71 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseRiskInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseRiskInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseRiskInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseRiskInformation' do + it 'should create an instance of TssV2TransactionsGet200ResponseRiskInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseRiskInformation) + end + end + describe 'test attribute "profile"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "rules"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "passive_profile"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "passive_rules"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "score"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "local_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_sender_information_spec.rb b/spec/models/tss_v2_transactions_get200_response_sender_information_spec.rb new file mode 100644 index 00000000..73eee848 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_sender_information_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200ResponseSenderInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200ResponseSenderInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200ResponseSenderInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200ResponseSenderInformation' do + it 'should create an instance of TssV2TransactionsGet200ResponseSenderInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200ResponseSenderInformation) + end + end + describe 'test attribute "reference_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_get200_response_spec.rb b/spec/models/tss_v2_transactions_get200_response_spec.rb new file mode 100644 index 00000000..1d8c62d0 --- /dev/null +++ b/spec/models/tss_v2_transactions_get200_response_spec.rb @@ -0,0 +1,179 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsGet200Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsGet200Response' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsGet200Response.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsGet200Response' do + it 'should create an instance of TssV2TransactionsGet200Response' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsGet200Response) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "root_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "reconciliation_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "merchant_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "application_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "buyer_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "client_reference_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "consumer_authentication_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "device_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "error_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "installment_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "fraud_marking_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "merchant_defined_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "merchant_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "order_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "payment_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "processing_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "processor_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "point_of_sale_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "risk_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "sender_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "_links"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded__links_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded__links_spec.rb new file mode 100644 index 00000000..e0521c4e --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded__links_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedLinks +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedLinks' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedLinks.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedLinks' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedLinks' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedLinks) + end + end + describe 'test attribute "transaction_detail"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_buyer_information_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_buyer_information_spec.rb new file mode 100644 index 00000000..ab3f80bc --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_buyer_information_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedBuyerInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedBuyerInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedBuyerInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedBuyerInformation' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedBuyerInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedBuyerInformation) + end + end + describe 'test attribute "merchant_customer_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_client_reference_information_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_client_reference_information_spec.rb new file mode 100644 index 00000000..0a0c6580 --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_client_reference_information_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedClientReferenceInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedClientReferenceInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedClientReferenceInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedClientReferenceInformation' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedClientReferenceInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedClientReferenceInformation) + end + end + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "application_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "application_user"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_consumer_authentication_information_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_consumer_authentication_information_spec.rb new file mode 100644 index 00000000..3ba69fb9 --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_consumer_authentication_information_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedConsumerAuthenticationInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedConsumerAuthenticationInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedConsumerAuthenticationInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedConsumerAuthenticationInformation' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedConsumerAuthenticationInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedConsumerAuthenticationInformation) + end + end + describe 'test attribute "xid"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "transaction_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_device_information_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_device_information_spec.rb new file mode 100644 index 00000000..30c62a43 --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_device_information_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedDeviceInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedDeviceInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedDeviceInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedDeviceInformation' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedDeviceInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedDeviceInformation) + end + end + describe 'test attribute "ip_address"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_merchant_information_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_merchant_information_spec.rb new file mode 100644 index 00000000..b3f09c32 --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_merchant_information_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedMerchantInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedMerchantInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedMerchantInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedMerchantInformation' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedMerchantInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedMerchantInformation) + end + end + describe 'test attribute "reseller_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_order_information_bill_to_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_order_information_bill_to_spec.rb new file mode 100644 index 00000000..05650fe4 --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_order_information_bill_to_spec.rb @@ -0,0 +1,65 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedOrderInformationBillTo +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedOrderInformationBillTo' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedOrderInformationBillTo.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedOrderInformationBillTo' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedOrderInformationBillTo' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedOrderInformationBillTo) + end + end + describe 'test attribute "first_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "last_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "email"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "country"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "phone_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_order_information_ship_to_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_order_information_ship_to_spec.rb new file mode 100644 index 00000000..d20441ff --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_order_information_ship_to_spec.rb @@ -0,0 +1,65 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedOrderInformationShipTo +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedOrderInformationShipTo' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedOrderInformationShipTo.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedOrderInformationShipTo' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedOrderInformationShipTo' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedOrderInformationShipTo) + end + end + describe 'test attribute "first_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "last_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "address1"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "country"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "phone_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_order_information_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_order_information_spec.rb new file mode 100644 index 00000000..6b2c5fb1 --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_order_information_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedOrderInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedOrderInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedOrderInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedOrderInformation' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedOrderInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedOrderInformation) + end + end + describe 'test attribute "bill_to"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "ship_to"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "amount_details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_payment_information_card_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_payment_information_card_spec.rb new file mode 100644 index 00000000..ff59e0bd --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_payment_information_card_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCard +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCard' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCard.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCard' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCard' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCard) + end + end + describe 'test attribute "suffix"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "prefix"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_payment_information_payment_method_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_payment_information_payment_method_spec.rb new file mode 100644 index 00000000..5d00af10 --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_payment_information_payment_method_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedPaymentInformationPaymentMethod +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedPaymentInformationPaymentMethod' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedPaymentInformationPaymentMethod.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedPaymentInformationPaymentMethod' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedPaymentInformationPaymentMethod' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedPaymentInformationPaymentMethod) + end + end + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_payment_information_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_payment_information_spec.rb new file mode 100644 index 00000000..718397b4 --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_payment_information_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedPaymentInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedPaymentInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedPaymentInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedPaymentInformation' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedPaymentInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedPaymentInformation) + end + end + describe 'test attribute "payment_method"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "customer"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "card"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information_partner_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information_partner_spec.rb new file mode 100644 index 00000000..dce993e4 --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information_partner_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformationPartner +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformationPartner' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformationPartner.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformationPartner' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformationPartner' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformationPartner) + end + end + describe 'test attribute "original_transaction_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information_spec.rb new file mode 100644 index 00000000..a9fb4f59 --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information_spec.rb @@ -0,0 +1,59 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformation' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformation) + end + end + describe 'test attribute "terminal_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "terminal_serial_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "device_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "partner"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_processing_information_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_processing_information_spec.rb new file mode 100644 index 00000000..49c42f99 --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_processing_information_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedProcessingInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedProcessingInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedProcessingInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedProcessingInformation' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedProcessingInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedProcessingInformation) + end + end + describe 'test attribute "payment_solution"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "business_application_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_processor_information_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_processor_information_spec.rb new file mode 100644 index 00000000..f8a71d05 --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_processor_information_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedProcessorInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedProcessorInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedProcessorInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedProcessorInformation' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedProcessorInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedProcessorInformation) + end + end + describe 'test attribute "processor"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_risk_information_providers_fingerprint_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_risk_information_providers_fingerprint_spec.rb new file mode 100644 index 00000000..692425c9 --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_risk_information_providers_fingerprint_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedRiskInformationProvidersFingerprint +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedRiskInformationProvidersFingerprint' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedRiskInformationProvidersFingerprint.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedRiskInformationProvidersFingerprint' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedRiskInformationProvidersFingerprint' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedRiskInformationProvidersFingerprint) + end + end + describe 'test attribute "true_ipaddress"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "hash"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "smart_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_risk_information_providers_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_risk_information_providers_spec.rb new file mode 100644 index 00000000..7f0533de --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_risk_information_providers_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedRiskInformationProviders +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedRiskInformationProviders' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedRiskInformationProviders.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedRiskInformationProviders' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedRiskInformationProviders' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedRiskInformationProviders) + end + end + describe 'test attribute "fingerprint"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_risk_information_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_risk_information_spec.rb new file mode 100644 index 00000000..88263a69 --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_risk_information_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedRiskInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedRiskInformation' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedRiskInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedRiskInformation' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedRiskInformation' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedRiskInformation) + end + end + describe 'test attribute "providers"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_spec.rb new file mode 100644 index 00000000..e4ee71cc --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbedded +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbedded' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbedded.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbedded' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbedded' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbedded) + end + end + describe 'test attribute "transaction_summaries"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response__embedded_transaction_summaries_spec.rb b/spec/models/tss_v2_transactions_post201_response__embedded_transaction_summaries_spec.rb new file mode 100644 index 00000000..64a530fb --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response__embedded_transaction_summaries_spec.rb @@ -0,0 +1,143 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201ResponseEmbeddedTransactionSummaries +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201ResponseEmbeddedTransactionSummaries' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201ResponseEmbeddedTransactionSummaries.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201ResponseEmbeddedTransactionSummaries' do + it 'should create an instance of TssV2TransactionsPost201ResponseEmbeddedTransactionSummaries' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201ResponseEmbeddedTransactionSummaries) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "merchant_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "application_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "buyer_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "client_reference_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "consumer_authentication_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "device_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "fraud_marking_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "merchant_defined_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "merchant_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "order_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "payment_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "processing_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "processor_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "point_of_sale_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "risk_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "_links"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post201_response_spec.rb b/spec/models/tss_v2_transactions_post201_response_spec.rb new file mode 100644 index 00000000..5c934683 --- /dev/null +++ b/spec/models/tss_v2_transactions_post201_response_spec.rb @@ -0,0 +1,113 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost201Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost201Response' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost201Response.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost201Response' do + it 'should create an instance of TssV2TransactionsPost201Response' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost201Response) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "save"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "timezone"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "query"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "offset"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "limit"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "sort"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "total_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "_embedded"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "_links"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post400_response_spec.rb b/spec/models/tss_v2_transactions_post400_response_spec.rb new file mode 100644 index 00000000..59be4bbc --- /dev/null +++ b/spec/models/tss_v2_transactions_post400_response_spec.rb @@ -0,0 +1,63 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPost400Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPost400Response' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPost400Response.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPost400Response' do + it 'should create an instance of TssV2TransactionsPost400Response' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPost400Response) + end + end + describe 'test attribute "submit_time_utc"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["INVALID_REQUEST"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tss_v2_transactions_post_response_spec.rb b/spec/models/tss_v2_transactions_post_response_spec.rb new file mode 100644 index 00000000..c48340ce --- /dev/null +++ b/spec/models/tss_v2_transactions_post_response_spec.rb @@ -0,0 +1,77 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::TssV2TransactionsPostResponse +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TssV2TransactionsPostResponse' do + before do + # run before each test + @instance = CyberSource::TssV2TransactionsPostResponse.new + end + + after do + # run after each test + end + + describe 'test an instance of TssV2TransactionsPostResponse' do + it 'should create an instance of TssV2TransactionsPostResponse' do + expect(@instance).to be_instance_of(CyberSource::TssV2TransactionsPostResponse) + end + end + describe 'test attribute "save"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "timezone"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "query"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "offset"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "limit"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "sort"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ums_v1_users_get200_response_account_information_spec.rb b/spec/models/ums_v1_users_get200_response_account_information_spec.rb new file mode 100644 index 00000000..680d9cdf --- /dev/null +++ b/spec/models/ums_v1_users_get200_response_account_information_spec.rb @@ -0,0 +1,87 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::UmsV1UsersGet200ResponseAccountInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'UmsV1UsersGet200ResponseAccountInformation' do + before do + # run before each test + @instance = CyberSource::UmsV1UsersGet200ResponseAccountInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of UmsV1UsersGet200ResponseAccountInformation' do + it 'should create an instance of UmsV1UsersGet200ResponseAccountInformation' do + expect(@instance).to be_instance_of(CyberSource::UmsV1UsersGet200ResponseAccountInformation) + end + end + describe 'test attribute "user_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "role_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "permissions"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["active", "inactive", "locked", "disabled", "forgotpassword", "deleted"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "created_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "last_access_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "language_preference"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "timezone"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ums_v1_users_get200_response_contact_information_spec.rb b/spec/models/ums_v1_users_get200_response_contact_information_spec.rb new file mode 100644 index 00000000..0e787703 --- /dev/null +++ b/spec/models/ums_v1_users_get200_response_contact_information_spec.rb @@ -0,0 +1,59 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::UmsV1UsersGet200ResponseContactInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'UmsV1UsersGet200ResponseContactInformation' do + before do + # run before each test + @instance = CyberSource::UmsV1UsersGet200ResponseContactInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of UmsV1UsersGet200ResponseContactInformation' do + it 'should create an instance of UmsV1UsersGet200ResponseContactInformation' do + expect(@instance).to be_instance_of(CyberSource::UmsV1UsersGet200ResponseContactInformation) + end + end + describe 'test attribute "email"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "phone_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "first_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "last_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ums_v1_users_get200_response_organization_information_spec.rb b/spec/models/ums_v1_users_get200_response_organization_information_spec.rb new file mode 100644 index 00000000..9fa3cabf --- /dev/null +++ b/spec/models/ums_v1_users_get200_response_organization_information_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::UmsV1UsersGet200ResponseOrganizationInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'UmsV1UsersGet200ResponseOrganizationInformation' do + before do + # run before each test + @instance = CyberSource::UmsV1UsersGet200ResponseOrganizationInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of UmsV1UsersGet200ResponseOrganizationInformation' do + it 'should create an instance of UmsV1UsersGet200ResponseOrganizationInformation' do + expect(@instance).to be_instance_of(CyberSource::UmsV1UsersGet200ResponseOrganizationInformation) + end + end + describe 'test attribute "organization_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ums_v1_users_get200_response_spec.rb b/spec/models/ums_v1_users_get200_response_spec.rb new file mode 100644 index 00000000..3eb3c85b --- /dev/null +++ b/spec/models/ums_v1_users_get200_response_spec.rb @@ -0,0 +1,41 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::UmsV1UsersGet200Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'UmsV1UsersGet200Response' do + before do + # run before each test + @instance = CyberSource::UmsV1UsersGet200Response.new + end + + after do + # run after each test + end + + describe 'test an instance of UmsV1UsersGet200Response' do + it 'should create an instance of UmsV1UsersGet200Response' do + expect(@instance).to be_instance_of(CyberSource::UmsV1UsersGet200Response) + end + end + describe 'test attribute "users"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ums_v1_users_get200_response_users_spec.rb b/spec/models/ums_v1_users_get200_response_users_spec.rb new file mode 100644 index 00000000..a289136b --- /dev/null +++ b/spec/models/ums_v1_users_get200_response_users_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::UmsV1UsersGet200ResponseUsers +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'UmsV1UsersGet200ResponseUsers' do + before do + # run before each test + @instance = CyberSource::UmsV1UsersGet200ResponseUsers.new + end + + after do + # run after each test + end + + describe 'test an instance of UmsV1UsersGet200ResponseUsers' do + it 'should create an instance of UmsV1UsersGet200ResponseUsers' do + expect(@instance).to be_instance_of(CyberSource::UmsV1UsersGet200ResponseUsers) + end + end + describe 'test attribute "account_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "organization_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "contact_information"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/v1_file_details_get200_response__links_files_spec.rb b/spec/models/v1_file_details_get200_response__links_files_spec.rb new file mode 100644 index 00000000..01cd7f75 --- /dev/null +++ b/spec/models/v1_file_details_get200_response__links_files_spec.rb @@ -0,0 +1,53 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::V1FileDetailsGet200ResponseLinksFiles +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'V1FileDetailsGet200ResponseLinksFiles' do + before do + # run before each test + @instance = CyberSource::V1FileDetailsGet200ResponseLinksFiles.new + end + + after do + # run after each test + end + + describe 'test an instance of V1FileDetailsGet200ResponseLinksFiles' do + it 'should create an instance of V1FileDetailsGet200ResponseLinksFiles' do + expect(@instance).to be_instance_of(CyberSource::V1FileDetailsGet200ResponseLinksFiles) + end + end + describe 'test attribute "file_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "href"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "method"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/v1_file_details_get200_response__links_self_spec.rb b/spec/models/v1_file_details_get200_response__links_self_spec.rb new file mode 100644 index 00000000..da28bef1 --- /dev/null +++ b/spec/models/v1_file_details_get200_response__links_self_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::V1FileDetailsGet200ResponseLinksSelf +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'V1FileDetailsGet200ResponseLinksSelf' do + before do + # run before each test + @instance = CyberSource::V1FileDetailsGet200ResponseLinksSelf.new + end + + after do + # run after each test + end + + describe 'test an instance of V1FileDetailsGet200ResponseLinksSelf' do + it 'should create an instance of V1FileDetailsGet200ResponseLinksSelf' do + expect(@instance).to be_instance_of(CyberSource::V1FileDetailsGet200ResponseLinksSelf) + end + end + describe 'test attribute "href"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "method"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/v1_file_details_get200_response__links_spec.rb b/spec/models/v1_file_details_get200_response__links_spec.rb new file mode 100644 index 00000000..ed7293e7 --- /dev/null +++ b/spec/models/v1_file_details_get200_response__links_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::V1FileDetailsGet200ResponseLinks +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'V1FileDetailsGet200ResponseLinks' do + before do + # run before each test + @instance = CyberSource::V1FileDetailsGet200ResponseLinks.new + end + + after do + # run after each test + end + + describe 'test an instance of V1FileDetailsGet200ResponseLinks' do + it 'should create an instance of V1FileDetailsGet200ResponseLinks' do + expect(@instance).to be_instance_of(CyberSource::V1FileDetailsGet200ResponseLinks) + end + end + describe 'test attribute "_self"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "files"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/v1_file_details_get200_response_file_details_spec.rb b/spec/models/v1_file_details_get200_response_file_details_spec.rb new file mode 100644 index 00000000..65425038 --- /dev/null +++ b/spec/models/v1_file_details_get200_response_file_details_spec.rb @@ -0,0 +1,81 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::V1FileDetailsGet200ResponseFileDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'V1FileDetailsGet200ResponseFileDetails' do + before do + # run before each test + @instance = CyberSource::V1FileDetailsGet200ResponseFileDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of V1FileDetailsGet200ResponseFileDetails' do + it 'should create an instance of V1FileDetailsGet200ResponseFileDetails' do + expect(@instance).to be_instance_of(CyberSource::V1FileDetailsGet200ResponseFileDetails) + end + end + describe 'test attribute "file_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "last_modified_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "mime_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["application/xml", "text/csv", "application/pdf", "application/octet-stream"]) + # validator.allowable_values.each do |value| + # expect { @instance.mime_type = value }.not_to raise_error + # end + end + end + + describe 'test attribute "size"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/v1_file_details_get200_response_spec.rb b/spec/models/v1_file_details_get200_response_spec.rb new file mode 100644 index 00000000..d0859250 --- /dev/null +++ b/spec/models/v1_file_details_get200_response_spec.rb @@ -0,0 +1,47 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::V1FileDetailsGet200Response +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'V1FileDetailsGet200Response' do + before do + # run before each test + @instance = CyberSource::V1FileDetailsGet200Response.new + end + + after do + # run after each test + end + + describe 'test an instance of V1FileDetailsGet200Response' do + it 'should create an instance of V1FileDetailsGet200Response' do + expect(@instance).to be_instance_of(CyberSource::V1FileDetailsGet200Response) + end + end + describe 'test attribute "file_details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "_links"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end