diff --git a/AuthenticationSDK/Cybersource.gemspec b/AuthenticationSDK/Cybersource.gemspec index aa8b4245..9e8ccf8c 100644 --- a/AuthenticationSDK/Cybersource.gemspec +++ b/AuthenticationSDK/Cybersource.gemspec @@ -1,23 +1,24 @@ Gem::Specification.new do |s| - s.name = "AuthenticationSDK" - s.version = "0.0.1" - s.platform = Gem::Platform::RUBY - s.date = "2018-07-17" - s.summary = "Cybersource Payments REST API Ruby Gem" - s.description = "Move your business forward with the Cybersource Payments REST API" - s.authors = ["cybersource"] - s.email = "" - s.files = Dir.glob("{lib}/**/*") + s.name = "authenticationSDK" + s.version = "0.0.1" + s.platform = Gem::Platform::RUBY + s.date = "2018-07-17" + s.summary = "Cybersource Payments REST API Ruby Gem" + s.description = "Move your business forward with the Cybersource Payments REST API" + s.authors = ["cybersource"] + s.email = "" + s.files = Dir.glob("{lib}/**/*") + + s.required_ruby_version = '>= 2.2.2' + s.required_rubygems_version = '>= 1.3.6' - s.required_ruby_version = '>= 2.2.2' - s.required_rubygems_version = '>= 1.3.6' - - s.add_runtime_dependency 'activesupport', '~> 5.2', '>= 5.2.0' - s.add_runtime_dependency 'json', '~> 2.1.0', '>= 1.8.1' - s.add_runtime_dependency 'interface','~> 1.0', '>= 1.0.4' - s.add_runtime_dependency 'jwt', '~> 2.1.0' - - s.add_development_dependency 'rspec', '~> 2.1' - s.add_development_dependency 'simplecov' - s.add_development_dependency 'rubocop', '~> 0.57.2' -end + s.add_runtime_dependency 'activesupport', '~> 5.2', '>= 5.2.0' + s.add_runtime_dependency 'json', '~> 2.1.0', '>= 1.8.1' + s.add_runtime_dependency 'interface','~> 1.0', '>= 1.0.4' + s.add_runtime_dependency 'jwt', '~> 2.1.0' + + s.add_development_dependency 'rspec', '~> 2.1' + s.add_development_dependency 'simplecov' + s.add_development_dependency 'rubocop', '~> 0.57.2' + end + \ No newline at end of file diff --git a/AuthenticationSDK/authentication/http/GetSignatureParameter.rb b/AuthenticationSDK/authentication/http/GetSignatureParameter.rb index 5db7be62..ef809975 100644 --- a/AuthenticationSDK/authentication/http/GetSignatureParameter.rb +++ b/AuthenticationSDK/authentication/http/GetSignatureParameter.rb @@ -22,7 +22,7 @@ def generateSignatureParameter(merchantconfig_obj, gmtdatetime, log_obj) if request_type == Constants::GET_REQUEST_TYPE || request_type == Constants::DELETE_REQUEST_TYPE targetUrl=gettargetUrlForGetDelete(request_type,merchantconfig_obj) signatureString << targetUrl + "\n" - elsif request_type == Constants::POST_REQUEST_TYPE || request_type == Constants::PUT_REQUEST_TYPE + elsif request_type == Constants::POST_REQUEST_TYPE || request_type == Constants::PUT_REQUEST_TYPE || request_type == Constants::PATCH_REQUEST_TYPE targetUrl=gettargetUrlForPutPost(request_type,merchantconfig_obj) signatureString << targetUrl + "\n" payload = merchantconfig_obj.requestJsonData @@ -56,6 +56,8 @@ def gettargetUrlForPutPost(request_type, merchantconfig_obj) targetUrlForPutPost = Constants::POST_REQUEST_TYPE_LOWER + ' ' + merchantconfig_obj.requestTarget elsif request_type == Constants::PUT_REQUEST_TYPE targetUrlForPutPost = Constants::PUT_REQUEST_TYPE_LOWER + ' ' + merchantconfig_obj.requestTarget + elsif request_type == Constants::PATCH_REQUEST_TYPE + targetUrlForPutPost = Constants::PATCH_REQUEST_TYPE_LOWER + ' ' + merchantconfig_obj.requestTarget end return targetUrlForPutPost end diff --git a/AuthenticationSDK/authentication/http/HttpSignatureHeader.rb b/AuthenticationSDK/authentication/http/HttpSignatureHeader.rb index 7b2504d1..e9d7a1f8 100644 --- a/AuthenticationSDK/authentication/http/HttpSignatureHeader.rb +++ b/AuthenticationSDK/authentication/http/HttpSignatureHeader.rb @@ -41,7 +41,9 @@ def getsignatureHeader(request_type) headers = 'host date (request-target)' + ' ' + Constants::V_C_MERCHANT_ID elsif request_type == Constants::PUT_REQUEST_TYPE headers = 'host date (request-target) digest ' + Constants::V_C_MERCHANT_ID - else + elsif request_type == Constants::PATCH_REQUEST_TYPE + headers = 'host date (request-target) digest ' + Constants::V_C_MERCHANT_ID + else raise StandardError.new(Constants::ERROR_PREFIX + Constants::INVALID_REQUEST_TYPE_METHOD) end return headers diff --git a/AuthenticationSDK/authentication/jwt/JwtToken.rb b/AuthenticationSDK/authentication/jwt/JwtToken.rb index b3a2a574..ac5a00c5 100644 --- a/AuthenticationSDK/authentication/jwt/JwtToken.rb +++ b/AuthenticationSDK/authentication/jwt/JwtToken.rb @@ -16,7 +16,7 @@ def getToken(merchantconfig_obj,gmtDatetime,log_obj) request_type = merchantconfig_obj.requestType.upcase filePath = merchantconfig_obj.keysDirectory + '/' + merchantconfig_obj.keyFilename + '.p12' if (!File.exist?(filePath)) - raise Constants::ERROR_PREFIX + Constants::FILE_NOT_FOUND + filePath + raise Constants::ERROR_PREFIX + Constants::FILE_NOT_FOUND + File.expand_path(filePath) end p12File = File.binread(filePath) jwtBody=getJwtBody(request_type, gmtDatetime, merchantconfig_obj, log_obj) @@ -47,7 +47,7 @@ def getToken(merchantconfig_obj,gmtDatetime,log_obj) end end def getJwtBody(request_type, gmtDatetime, merchantconfig_obj,log_obj) - if request_type == Constants::POST_REQUEST_TYPE || request_type == Constants::PUT_REQUEST_TYPE + if request_type == Constants::POST_REQUEST_TYPE || request_type == Constants::PUT_REQUEST_TYPE || request_type == Constants::PATCH_REQUEST_TYPE payload = merchantconfig_obj.requestJsonData # Note: Digest is not passed for GET calls digest = DigestGeneration.new.generateDigest(payload, log_obj) diff --git a/AuthenticationSDK/util/Constants.rb b/AuthenticationSDK/util/Constants.rb index 4cade03d..0206e039 100644 --- a/AuthenticationSDK/util/Constants.rb +++ b/AuthenticationSDK/util/Constants.rb @@ -5,6 +5,8 @@ class Constants POST_REQUEST_TYPE_LOWER = 'post' unless const_defined?(:POST_REQUEST_TYPE_LOWER) PUT_REQUEST_TYPE_LOWER = 'put' unless const_defined?(:PUT_REQUEST_TYPE_LOWER) + + PATCH_REQUEST_TYPE_LOWER = 'patch' unless const_defined?(:PATCH_REQUEST_TYPE_LOWER) DELETE_REQUEST_TYPE_LOWER = 'delete' unless const_defined?(:DELETE_REQUEST_TYPE_LOWER) @@ -13,6 +15,8 @@ class Constants POST_REQUEST_TYPE = 'POST' unless const_defined?(:POST_REQUEST_TYPE) PUT_REQUEST_TYPE = 'PUT' unless const_defined?(:PUT_REQUEST_TYPE) + + PATCH_REQUEST_TYPE = 'PATCH' unless const_defined?(:PATCH_REQUEST_TYPE) DELETE_REQUEST_TYPE = 'DELETE' unless const_defined?(:DELETE_REQUEST_TYPE) diff --git a/cyberSource_client.gemspec b/cyberSource_client.gemspec deleted file mode 100644 index d4d28838..00000000 --- a/cyberSource_client.gemspec +++ /dev/null @@ -1,39 +0,0 @@ -# -*- encoding: utf-8 -*- - - -$:.push File.expand_path("../lib", __FILE__) -require "cyberSource_client/version" - -Gem::Specification.new do |s| - s.name = "cybersource_rest_client" - s.version = "0.0.4" - s.platform = Gem::Platform::RUBY - s.authors = ["CyberSource"] - s.email = ["cybersourcedev@gmail.com"] - s.homepage = "https://developer.cybersource.com" - s.summary = "CyberSource Ruby SDK Gem" - s.description = "Simple REST API for the CyberSource Global Payments Platform" - s.license = "CyberSource" - s.files = Dir.glob("{lib,AuthenticationSDK}/**/*") - s.required_ruby_version = ">= 1.9" - - s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' - s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0' - - s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' - s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1' - s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3' - s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6' - s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2' - s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16' - s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12' - - s.add_runtime_dependency 'activesupport', '~> 5.2', '>= 5.2.0' - s.add_runtime_dependency 'interface','~> 1.0', '>= 1.0.4' - s.add_runtime_dependency 'jwt', '~> 2.1.0' - - s.add_development_dependency 'simplecov' - s.add_development_dependency 'rubocop', '~> 0.57.2' - - s.require_paths = ["lib"] -end diff --git a/cybersource_rest_client.gemspec b/cybersource_rest_client.gemspec new file mode 100644 index 00000000..c2cb6605 --- /dev/null +++ b/cybersource_rest_client.gemspec @@ -0,0 +1,50 @@ +# -*- encoding: utf-8 -*- + +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +$:.push File.expand_path("../lib", __FILE__) +require "cybersource_rest_client/version" + +Gem::Specification.new do |s| + s.name = "cybersource_rest_client" + s.version = "0.0.4" + s.platform = Gem::Platform::RUBY + s.authors = ["CyberSource"] + s.email = ["cybersourcedev@gmail.com"] + s.homepage = "https://developer.cybersource.com" + s.summary = "CyberSource Ruby SDK Gem" + s.description = "Simple REST API for the CyberSource Global Payments Platform" + s.license = "CyberSource" + s.files = Dir.glob("{lib,AuthenticationSDK}/**/*") + s.required_ruby_version = ">= 1.9" + + s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' + s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0' + + s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' + s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1' + s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3' + s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6' + s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2' + s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16' + s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12' + + s.add_runtime_dependency 'activesupport', '~> 5.2', '>= 5.2.0' + s.add_runtime_dependency 'interface','~> 1.0', '>= 1.0.4' + s.add_runtime_dependency 'jwt', '~> 2.1.0' + + s.add_development_dependency 'simplecov' + s.add_development_dependency 'rubocop', '~> 0.57.2' + + s.require_paths = ["lib"] +end diff --git a/docs/AuthReversalRequest.md b/docs/AuthReversalRequest.md index 075b994b..d7083b66 100644 --- a/docs/AuthReversalRequest.md +++ b/docs/AuthReversalRequest.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**client_reference_information** | [**V2paymentsidreversalsClientReferenceInformation**](V2paymentsidreversalsClientReferenceInformation.md) | | [optional] -**reversal_information** | [**V2paymentsidreversalsReversalInformation**](V2paymentsidreversalsReversalInformation.md) | | [optional] -**processing_information** | [**V2paymentsidreversalsProcessingInformation**](V2paymentsidreversalsProcessingInformation.md) | | [optional] -**order_information** | [**V2paymentsidreversalsOrderInformation**](V2paymentsidreversalsOrderInformation.md) | | [optional] -**point_of_sale_information** | [**V2paymentsidreversalsPointOfSaleInformation**](V2paymentsidreversalsPointOfSaleInformation.md) | | [optional] +**client_reference_information** | [**Ptsv2paymentsidreversalsClientReferenceInformation**](Ptsv2paymentsidreversalsClientReferenceInformation.md) | | [optional] +**reversal_information** | [**Ptsv2paymentsidreversalsReversalInformation**](Ptsv2paymentsidreversalsReversalInformation.md) | | [optional] +**processing_information** | [**Ptsv2paymentsidreversalsProcessingInformation**](Ptsv2paymentsidreversalsProcessingInformation.md) | | [optional] +**order_information** | [**Ptsv2paymentsidreversalsOrderInformation**](Ptsv2paymentsidreversalsOrderInformation.md) | | [optional] +**point_of_sale_information** | [**Ptsv2paymentsidreversalsPointOfSaleInformation**](Ptsv2paymentsidreversalsPointOfSaleInformation.md) | | [optional] diff --git a/docs/Body.md b/docs/Body.md index 5a64d1fb..4102f4c8 100644 --- a/docs/Body.md +++ b/docs/Body.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_links** | [**InstrumentidentifiersLinks**](InstrumentidentifiersLinks.md) | | [optional] +**_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** | [**InstrumentidentifiersCard**](InstrumentidentifiersCard.md) | | [optional] -**bank_account** | [**InstrumentidentifiersBankAccount**](InstrumentidentifiersBankAccount.md) | | [optional] -**processing_information** | [**InstrumentidentifiersProcessingInformation**](InstrumentidentifiersProcessingInformation.md) | | [optional] -**metadata** | [**InstrumentidentifiersMetadata**](InstrumentidentifiersMetadata.md) | | [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/Body1.md b/docs/Body1.md index ddd683f7..5b189acf 100644 --- a/docs/Body1.md +++ b/docs/Body1.md @@ -3,6 +3,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**processing_information** | [**InstrumentidentifiersProcessingInformation**](InstrumentidentifiersProcessingInformation.md) | | [optional] +**processing_information** | [**Tmsv1instrumentidentifiersProcessingInformation**](Tmsv1instrumentidentifiersProcessingInformation.md) | | [optional] diff --git a/docs/Body2.md b/docs/Body2.md index 2a6caabc..517b5bf4 100644 --- a/docs/Body2.md +++ b/docs/Body2.md @@ -3,17 +3,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_links** | [**InstrumentidentifiersLinks**](InstrumentidentifiersLinks.md) | | [optional] +**_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** | [**PaymentinstrumentsBankAccount**](PaymentinstrumentsBankAccount.md) | | [optional] -**card** | [**PaymentinstrumentsCard**](PaymentinstrumentsCard.md) | | [optional] -**buyer_information** | [**PaymentinstrumentsBuyerInformation**](PaymentinstrumentsBuyerInformation.md) | | [optional] -**bill_to** | [**PaymentinstrumentsBillTo**](PaymentinstrumentsBillTo.md) | | [optional] -**processing_information** | [**PaymentinstrumentsProcessingInformation**](PaymentinstrumentsProcessingInformation.md) | | [optional] -**merchant_information** | [**PaymentinstrumentsMerchantInformation**](PaymentinstrumentsMerchantInformation.md) | | [optional] -**meta_data** | [**InstrumentidentifiersMetadata**](InstrumentidentifiersMetadata.md) | | [optional] -**instrument_identifier** | [**PaymentinstrumentsInstrumentIdentifier**](PaymentinstrumentsInstrumentIdentifier.md) | | [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/Body3.md b/docs/Body3.md index a38247f5..4a53331e 100644 --- a/docs/Body3.md +++ b/docs/Body3.md @@ -3,17 +3,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_links** | [**InstrumentidentifiersLinks**](InstrumentidentifiersLinks.md) | | [optional] +**_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** | [**PaymentinstrumentsBankAccount**](PaymentinstrumentsBankAccount.md) | | [optional] -**card** | [**PaymentinstrumentsCard**](PaymentinstrumentsCard.md) | | [optional] -**buyer_information** | [**PaymentinstrumentsBuyerInformation**](PaymentinstrumentsBuyerInformation.md) | | [optional] -**bill_to** | [**PaymentinstrumentsBillTo**](PaymentinstrumentsBillTo.md) | | [optional] -**processing_information** | [**PaymentinstrumentsProcessingInformation**](PaymentinstrumentsProcessingInformation.md) | | [optional] -**merchant_information** | [**PaymentinstrumentsMerchantInformation**](PaymentinstrumentsMerchantInformation.md) | | [optional] -**meta_data** | [**InstrumentidentifiersMetadata**](InstrumentidentifiersMetadata.md) | | [optional] -**instrument_identifier** | [**PaymentinstrumentsInstrumentIdentifier**](PaymentinstrumentsInstrumentIdentifier.md) | | [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/CaptureApi.md b/docs/CaptureApi.md index 61ad8c0f..dcacbc48 100644 --- a/docs/CaptureApi.md +++ b/docs/CaptureApi.md @@ -1,11 +1,10 @@ # CyberSource::CaptureApi -All URIs are relative to *https://api.cybersource.com* +All URIs are relative to *https://apitest.cybersource.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**capture_payment**](CaptureApi.md#capture_payment) | **POST** /v2/payments/{id}/captures | Capture a Payment -[**get_capture**](CaptureApi.md#get_capture) | **GET** /v2/captures/{id} | Retrieve a Capture +[**capture_payment**](CaptureApi.md#capture_payment) | **POST** /pts/v2/payments/{id}/captures | Capture a Payment # **capture_payment** @@ -18,7 +17,7 @@ Include the payment ID in the POST request to capture the payment amount. ### Example ```ruby # load the gem -require 'cyberSource_client' +require 'cybersource_rest_client' api_instance = CyberSource::CaptureApi.new @@ -53,55 +52,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **get_capture** -> InlineResponse2004 get_capture(id) - -Retrieve a Capture - -Include the capture ID in the GET request to retrieve the capture details. - -### Example -```ruby -# load the gem -require 'cyberSource_client' - -api_instance = CyberSource::CaptureApi.new - -id = "id_example" # String | The capture ID returned from a previous capture request. - - -begin - #Retrieve a Capture - result = api_instance.get_capture(id) - p result -rescue CyberSource::ApiError => e - puts "Exception when calling CaptureApi->get_capture: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The capture ID returned from a previous capture request. | - -### Return type - -[**InlineResponse2004**](InlineResponse2004.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 diff --git a/docs/CapturePaymentRequest.md b/docs/CapturePaymentRequest.md index 0acf541e..1683a4fe 100644 --- a/docs/CapturePaymentRequest.md +++ b/docs/CapturePaymentRequest.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**client_reference_information** | [**V2paymentsClientReferenceInformation**](V2paymentsClientReferenceInformation.md) | | [optional] -**processing_information** | [**V2paymentsidcapturesProcessingInformation**](V2paymentsidcapturesProcessingInformation.md) | | [optional] -**payment_information** | [**V2paymentsidcapturesPaymentInformation**](V2paymentsidcapturesPaymentInformation.md) | | [optional] -**order_information** | [**V2paymentsidcapturesOrderInformation**](V2paymentsidcapturesOrderInformation.md) | | [optional] -**buyer_information** | [**V2paymentsidcapturesBuyerInformation**](V2paymentsidcapturesBuyerInformation.md) | | [optional] -**device_information** | [**V2paymentsDeviceInformation**](V2paymentsDeviceInformation.md) | | [optional] -**merchant_information** | [**V2paymentsidcapturesMerchantInformation**](V2paymentsidcapturesMerchantInformation.md) | | [optional] -**aggregator_information** | [**V2paymentsidcapturesAggregatorInformation**](V2paymentsidcapturesAggregatorInformation.md) | | [optional] -**point_of_sale_information** | [**V2paymentsidcapturesPointOfSaleInformation**](V2paymentsidcapturesPointOfSaleInformation.md) | | [optional] -**merchant_defined_information** | [**Array<V2paymentsMerchantDefinedInformation>**](V2paymentsMerchantDefinedInformation.md) | TBD | [optional] +**client_reference_information** | [**Ptsv2paymentsClientReferenceInformation**](Ptsv2paymentsClientReferenceInformation.md) | | [optional] +**processing_information** | [**Ptsv2paymentsidcapturesProcessingInformation**](Ptsv2paymentsidcapturesProcessingInformation.md) | | [optional] +**payment_information** | [**Ptsv2paymentsidcapturesPaymentInformation**](Ptsv2paymentsidcapturesPaymentInformation.md) | | [optional] +**order_information** | [**Ptsv2paymentsidcapturesOrderInformation**](Ptsv2paymentsidcapturesOrderInformation.md) | | [optional] +**buyer_information** | [**Ptsv2paymentsidcapturesBuyerInformation**](Ptsv2paymentsidcapturesBuyerInformation.md) | | [optional] +**device_information** | [**Ptsv2paymentsDeviceInformation**](Ptsv2paymentsDeviceInformation.md) | | [optional] +**merchant_information** | [**Ptsv2paymentsidcapturesMerchantInformation**](Ptsv2paymentsidcapturesMerchantInformation.md) | | [optional] +**aggregator_information** | [**Ptsv2paymentsidcapturesAggregatorInformation**](Ptsv2paymentsidcapturesAggregatorInformation.md) | | [optional] +**point_of_sale_information** | [**Ptsv2paymentsidcapturesPointOfSaleInformation**](Ptsv2paymentsidcapturesPointOfSaleInformation.md) | | [optional] +**merchant_defined_information** | [**Array<Ptsv2paymentsMerchantDefinedInformation>**](Ptsv2paymentsMerchantDefinedInformation.md) | Description of this field is not available. | [optional] diff --git a/docs/CreateCreditRequest.md b/docs/CreateCreditRequest.md index a401564d..db2351eb 100644 --- a/docs/CreateCreditRequest.md +++ b/docs/CreateCreditRequest.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**client_reference_information** | [**V2paymentsClientReferenceInformation**](V2paymentsClientReferenceInformation.md) | | [optional] -**processing_information** | [**V2creditsProcessingInformation**](V2creditsProcessingInformation.md) | | [optional] -**payment_information** | [**V2paymentsidrefundsPaymentInformation**](V2paymentsidrefundsPaymentInformation.md) | | [optional] -**order_information** | [**V2paymentsidrefundsOrderInformation**](V2paymentsidrefundsOrderInformation.md) | | [optional] -**buyer_information** | [**V2paymentsidcapturesBuyerInformation**](V2paymentsidcapturesBuyerInformation.md) | | [optional] -**device_information** | [**V2paymentsDeviceInformation**](V2paymentsDeviceInformation.md) | | [optional] -**merchant_information** | [**V2paymentsidrefundsMerchantInformation**](V2paymentsidrefundsMerchantInformation.md) | | [optional] -**aggregator_information** | [**V2paymentsidcapturesAggregatorInformation**](V2paymentsidcapturesAggregatorInformation.md) | | [optional] -**point_of_sale_information** | [**V2creditsPointOfSaleInformation**](V2creditsPointOfSaleInformation.md) | | [optional] -**merchant_defined_information** | [**Array<V2paymentsMerchantDefinedInformation>**](V2paymentsMerchantDefinedInformation.md) | TBD | [optional] +**client_reference_information** | [**Ptsv2paymentsClientReferenceInformation**](Ptsv2paymentsClientReferenceInformation.md) | | [optional] +**processing_information** | [**Ptsv2creditsProcessingInformation**](Ptsv2creditsProcessingInformation.md) | | [optional] +**payment_information** | [**Ptsv2paymentsidrefundsPaymentInformation**](Ptsv2paymentsidrefundsPaymentInformation.md) | | [optional] +**order_information** | [**Ptsv2paymentsidrefundsOrderInformation**](Ptsv2paymentsidrefundsOrderInformation.md) | | [optional] +**buyer_information** | [**Ptsv2paymentsidcapturesBuyerInformation**](Ptsv2paymentsidcapturesBuyerInformation.md) | | [optional] +**device_information** | [**Ptsv2paymentsDeviceInformation**](Ptsv2paymentsDeviceInformation.md) | | [optional] +**merchant_information** | [**Ptsv2paymentsidrefundsMerchantInformation**](Ptsv2paymentsidrefundsMerchantInformation.md) | | [optional] +**aggregator_information** | [**Ptsv2paymentsidcapturesAggregatorInformation**](Ptsv2paymentsidcapturesAggregatorInformation.md) | | [optional] +**point_of_sale_information** | [**Ptsv2creditsPointOfSaleInformation**](Ptsv2creditsPointOfSaleInformation.md) | | [optional] +**merchant_defined_information** | [**Array<Ptsv2paymentsMerchantDefinedInformation>**](Ptsv2paymentsMerchantDefinedInformation.md) | Description of this field is not available. | [optional] diff --git a/docs/CreatePaymentRequest.md b/docs/CreatePaymentRequest.md index 22697814..98cedd59 100644 --- a/docs/CreatePaymentRequest.md +++ b/docs/CreatePaymentRequest.md @@ -3,17 +3,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**client_reference_information** | [**V2paymentsClientReferenceInformation**](V2paymentsClientReferenceInformation.md) | | [optional] -**processing_information** | [**V2paymentsProcessingInformation**](V2paymentsProcessingInformation.md) | | [optional] -**payment_information** | [**V2paymentsPaymentInformation**](V2paymentsPaymentInformation.md) | | [optional] -**order_information** | [**V2paymentsOrderInformation**](V2paymentsOrderInformation.md) | | [optional] -**buyer_information** | [**V2paymentsBuyerInformation**](V2paymentsBuyerInformation.md) | | [optional] -**recipient_information** | [**V2paymentsRecipientInformation**](V2paymentsRecipientInformation.md) | | [optional] -**device_information** | [**V2paymentsDeviceInformation**](V2paymentsDeviceInformation.md) | | [optional] -**merchant_information** | [**V2paymentsMerchantInformation**](V2paymentsMerchantInformation.md) | | [optional] -**aggregator_information** | [**V2paymentsAggregatorInformation**](V2paymentsAggregatorInformation.md) | | [optional] -**consumer_authentication_information** | [**V2paymentsConsumerAuthenticationInformation**](V2paymentsConsumerAuthenticationInformation.md) | | [optional] -**point_of_sale_information** | [**V2paymentsPointOfSaleInformation**](V2paymentsPointOfSaleInformation.md) | | [optional] -**merchant_defined_information** | [**Array<V2paymentsMerchantDefinedInformation>**](V2paymentsMerchantDefinedInformation.md) | TBD | [optional] +**client_reference_information** | [**Ptsv2paymentsClientReferenceInformation**](Ptsv2paymentsClientReferenceInformation.md) | | [optional] +**processing_information** | [**Ptsv2paymentsProcessingInformation**](Ptsv2paymentsProcessingInformation.md) | | [optional] +**payment_information** | [**Ptsv2paymentsPaymentInformation**](Ptsv2paymentsPaymentInformation.md) | | [optional] +**order_information** | [**Ptsv2paymentsOrderInformation**](Ptsv2paymentsOrderInformation.md) | | [optional] +**buyer_information** | [**Ptsv2paymentsBuyerInformation**](Ptsv2paymentsBuyerInformation.md) | | [optional] +**recipient_information** | [**Ptsv2paymentsRecipientInformation**](Ptsv2paymentsRecipientInformation.md) | | [optional] +**device_information** | [**Ptsv2paymentsDeviceInformation**](Ptsv2paymentsDeviceInformation.md) | | [optional] +**merchant_information** | [**Ptsv2paymentsMerchantInformation**](Ptsv2paymentsMerchantInformation.md) | | [optional] +**aggregator_information** | [**Ptsv2paymentsAggregatorInformation**](Ptsv2paymentsAggregatorInformation.md) | | [optional] +**consumer_authentication_information** | [**Ptsv2paymentsConsumerAuthenticationInformation**](Ptsv2paymentsConsumerAuthenticationInformation.md) | | [optional] +**point_of_sale_information** | [**Ptsv2paymentsPointOfSaleInformation**](Ptsv2paymentsPointOfSaleInformation.md) | | [optional] +**merchant_defined_information** | [**Array<Ptsv2paymentsMerchantDefinedInformation>**](Ptsv2paymentsMerchantDefinedInformation.md) | Description of this field is not available. | [optional] diff --git a/docs/CreateSearchRequest.md b/docs/CreateSearchRequest.md new file mode 100644 index 00000000..8abf6d0b --- /dev/null +++ b/docs/CreateSearchRequest.md @@ -0,0 +1,14 @@ +# 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 1587d755..1a1807ae 100644 --- a/docs/CreditApi.md +++ b/docs/CreditApi.md @@ -1,11 +1,10 @@ # CyberSource::CreditApi -All URIs are relative to *https://api.cybersource.com* +All URIs are relative to *https://apitest.cybersource.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_credit**](CreditApi.md#create_credit) | **POST** /v2/credits/ | Process a Credit -[**get_credit**](CreditApi.md#get_credit) | **GET** /v2/credits/{id} | Retrieve a Credit +[**create_credit**](CreditApi.md#create_credit) | **POST** /pts/v2/credits/ | Process a Credit # **create_credit** @@ -18,7 +17,7 @@ POST to the credit resource to credit funds to a specified credit card. ### Example ```ruby # load the gem -require 'cyberSource_client' +require 'cybersource_rest_client' api_instance = CyberSource::CreditApi.new @@ -50,55 +49,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **get_credit** -> InlineResponse2006 get_credit(id) - -Retrieve a Credit - -Include the credit ID in the GET request to return details of the credit. - -### Example -```ruby -# load the gem -require 'cyberSource_client' - -api_instance = CyberSource::CreditApi.new - -id = "id_example" # String | The credit ID returned from a previous stand-alone credit request. - - -begin - #Retrieve a Credit - result = api_instance.get_credit(id) - p result -rescue CyberSource::ApiError => e - puts "Exception when calling CreditApi->get_credit: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The credit ID returned from a previous stand-alone credit request. | - -### Return type - -[**InlineResponse2006**](InlineResponse2006.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md deleted file mode 100644 index 56204e46..00000000 --- a/docs/DefaultApi.md +++ /dev/null @@ -1,55 +0,0 @@ -# CyberSource::DefaultApi - -All URIs are relative to *https://api.cybersource.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**oct_create_payment**](DefaultApi.md#oct_create_payment) | **POST** /v2/payouts/ | Process a Payout - - -# **oct_create_payment** -> oct_create_payment(oct_create_payment_request) - -Process a Payout - -Send funds from a selected funding source to a designated credit/debit card account or a prepaid card using an Original Credit Transaction (OCT). - -### Example -```ruby -# load the gem -require 'cyberSource_client' - -api_instance = CyberSource::DefaultApi.new - -oct_create_payment_request = CyberSource::OctCreatePaymentRequest.new # OctCreatePaymentRequest | - - -begin - #Process a Payout - api_instance.oct_create_payment(oct_create_payment_request) -rescue CyberSource::ApiError => e - puts "Exception when calling DefaultApi->oct_create_payment: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **oct_create_payment_request** | [**OctCreatePaymentRequest**](OctCreatePaymentRequest.md)| | - -### Return type - -nil (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - diff --git a/docs/FlexTokenApi.md b/docs/FlexTokenApi.md new file mode 100644 index 00000000..66f529b4 --- /dev/null +++ b/docs/FlexTokenApi.md @@ -0,0 +1,57 @@ +# CyberSource::FlexTokenApi + +All URIs are relative to *https://apitest.cybersource.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**tokenize**](FlexTokenApi.md#tokenize) | **POST** /flex/v1/tokens/ | Flex Tokenize card + + +# **tokenize** +> InlineResponse2001 tokenize(opts) + +Flex Tokenize card + +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. + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::FlexTokenApi.new + +opts = { + tokenize_request: CyberSource::TokenizeRequest.new # TokenizeRequest | +} + +begin + #Flex Tokenize card + result = api_instance.tokenize(opts) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling FlexTokenApi->tokenize: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tokenize_request** | [**TokenizeRequest**](TokenizeRequest.md)| | [optional] + +### Return type + +[**InlineResponse2001**](InlineResponse2001.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json + + + diff --git a/docs/Flexv1tokensCardInfo.md b/docs/Flexv1tokensCardInfo.md new file mode 100644 index 00000000..d602695e --- /dev/null +++ b/docs/Flexv1tokensCardInfo.md @@ -0,0 +1,11 @@ +# CyberSource::Flexv1tokensCardInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**card_number** | **String** | Encrypted or plain text card number. If the encryption type of “None” was used in the Generate Key request, this value can be set to the plaintext card number/Personal Account Number (PAN). If the encryption type of RsaOaep256 was used in the Generate Key request, this value needs to be the RSA OAEP 256 encrypted card number. The card number should be encrypted on the cardholders’ device. The [WebCrypto API] (https://github.com/CyberSource/cybersource-flex-samples/blob/master/java/spring-boot/src/main/resources/public/flex.js) can be used with the JWK obtained in the Generate Key request. | [optional] +**card_expiration_month** | **String** | Two digit expiration month | [optional] +**card_expiration_year** | **String** | Four digit expiration year | [optional] +**card_type** | **String** | Card Type. This field is required. Refer to the CyberSource Credit Card Services documentation for supported card types. | [optional] + + diff --git a/docs/GeneratePublicKeyRequest.md b/docs/GeneratePublicKeyRequest.md index 127bce00..1e3b9e11 100644 --- a/docs/GeneratePublicKeyRequest.md +++ b/docs/GeneratePublicKeyRequest.md @@ -3,6 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**encryption_type** | **String** | How the card number should be encrypted in the subsequent Tokenize Card request. Possible values are RsaOaep256 or None (if using this value the card number must be in plain text when included in the Tokenize Card request). The Tokenize Card request uses a secure connection (TLS 1.2+) regardless of what encryption type is specified. | [optional] +**encryption_type** | **String** | How the card number should be encrypted in the subsequent Tokenize Card request. Possible values are RsaOaep256 or None (if using this value the card number must be in plain text when included in the Tokenize Card request). The Tokenize Card request uses a secure connection (TLS 1.2+) regardless of what encryption type is specified. | +**target_origin** | **String** | This should only be used if using the Microform implementation. This is the protocol, URL, and if used, port number of the page that will host the Microform. Unless using http://localhost, the protocol must be https://. For example, if serving Microform on example.com, the targetOrigin is https://example.com The value is used to restrict the frame ancestor of the Microform. If there is a mismatch between this value and the frame ancestor, the Microfrom will not load. | [optional] +**unmasked_left** | **Integer** | Specifies the number of card number digits to be returned un-masked from the left. For example, setting this value to 6 will return: 411111XXXXXXXXXX Default value: 6 Maximum value: 6 | [optional] +**unmasked_right** | **Integer** | Specifies the number of card number digits to be returned un-masked from the right. For example, setting this value to 4 will return: 411111XXXXXX1111 Default value: 4 Maximum value: 4 | [optional] +**enable_billing_address** | **BOOLEAN** | Specifies whether or not 'dummy' address data should be specified in the create token request. If you have 'Relaxed AVS' enabled for your MID, this value can be set to False.Default value: true | [optional] +**currency** | **String** | Three character ISO currency code to be associated with the token. Required for legacy integrations. Default value: USD. | [optional] +**enable_auto_auth** | **BOOLEAN** | Specifies whether or not an account verification authorization ($0 Authorization) is carried out on token creation. Default is false, as it is assumed a full or zero amount authorization will be carried out in a separate call from your server. | [optional] diff --git a/docs/InlineResponse20010.md b/docs/InlineResponse20010.md new file mode 100644 index 00000000..04f9fa1c --- /dev/null +++ b/docs/InlineResponse20010.md @@ -0,0 +1,15 @@ +# 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 new file mode 100644 index 00000000..ef88227f --- /dev/null +++ b/docs/InlineResponse20011.md @@ -0,0 +1,14 @@ +# 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 new file mode 100644 index 00000000..322c7926 --- /dev/null +++ b/docs/InlineResponse20011Links.md @@ -0,0 +1,12 @@ +# 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 new file mode 100644 index 00000000..8fce130c --- /dev/null +++ b/docs/InlineResponse20011LinksFirst.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 00000000..c9adccd5 --- /dev/null +++ b/docs/InlineResponse20011LinksLast.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 00000000..52f19b61 --- /dev/null +++ b/docs/InlineResponse20011LinksNext.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 00000000..52613212 --- /dev/null +++ b/docs/InlineResponse20011LinksPrev.md @@ -0,0 +1,8 @@ +# CyberSource::InlineResponse20011LinksPrev + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | | [optional] + + diff --git a/docs/InlineResponse20011LinksSelf.md b/docs/InlineResponse20011LinksSelf.md new file mode 100644 index 00000000..76b7b7b5 --- /dev/null +++ b/docs/InlineResponse20011LinksSelf.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 00000000..447f3863 --- /dev/null +++ b/docs/InlineResponse20012.md @@ -0,0 +1,31 @@ +# 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 new file mode 100644 index 00000000..f17a8689 --- /dev/null +++ b/docs/InlineResponse20012ApplicationInformation.md @@ -0,0 +1,12 @@ +# 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 new file mode 100644 index 00000000..3349739b --- /dev/null +++ b/docs/InlineResponse20012ApplicationInformationApplications.md @@ -0,0 +1,15 @@ +# 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 new file mode 100644 index 00000000..5add5e64 --- /dev/null +++ b/docs/InlineResponse20012BuyerInformation.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 00000000..ca2909b7 --- /dev/null +++ b/docs/InlineResponse20012ClientReferenceInformation.md @@ -0,0 +1,12 @@ +# 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 new file mode 100644 index 00000000..89e5b005 --- /dev/null +++ b/docs/InlineResponse20012ConsumerAuthenticationInformation.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..c155a9d1 --- /dev/null +++ b/docs/InlineResponse20012DeviceInformation.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..984fa06c --- /dev/null +++ b/docs/InlineResponse20012ErrorInformation.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..8f90c68b --- /dev/null +++ b/docs/InlineResponse20012FraudMarkingInformation.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 00000000..8114647e --- /dev/null +++ b/docs/InlineResponse20012InstallmentInformation.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 00000000..b91649fc --- /dev/null +++ b/docs/InlineResponse20012MerchantDefinedInformation.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 00000000..467bed62 --- /dev/null +++ b/docs/InlineResponse20012MerchantInformation.md @@ -0,0 +1,8 @@ +# CyberSource::InlineResponse20012MerchantInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**merchant_descriptor** | [**InlineResponse20012MerchantInformationMerchantDescriptor**](InlineResponse20012MerchantInformationMerchantDescriptor.md) | | [optional] + + diff --git a/docs/InlineResponse20012MerchantInformationMerchantDescriptor.md b/docs/InlineResponse20012MerchantInformationMerchantDescriptor.md new file mode 100644 index 00000000..2e906f24 --- /dev/null +++ b/docs/InlineResponse20012MerchantInformationMerchantDescriptor.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 00000000..d1887831 --- /dev/null +++ b/docs/InlineResponse20012OrderInformation.md @@ -0,0 +1,12 @@ +# 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 new file mode 100644 index 00000000..c025d293 --- /dev/null +++ b/docs/InlineResponse20012OrderInformationAmountDetails.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..6f0d1ad1 --- /dev/null +++ b/docs/InlineResponse20012OrderInformationBillTo.md @@ -0,0 +1,21 @@ +# 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 new file mode 100644 index 00000000..41a4eac2 --- /dev/null +++ b/docs/InlineResponse20012OrderInformationLineItems.md @@ -0,0 +1,14 @@ +# 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 new file mode 100644 index 00000000..aa0a096d --- /dev/null +++ b/docs/InlineResponse20012OrderInformationShipTo.md @@ -0,0 +1,17 @@ +# 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 new file mode 100644 index 00000000..c87f8022 --- /dev/null +++ b/docs/InlineResponse20012OrderInformationShippingDetails.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 00000000..a54c407c --- /dev/null +++ b/docs/InlineResponse20012PaymentInformation.md @@ -0,0 +1,13 @@ +# 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 new file mode 100644 index 00000000..6051e179 --- /dev/null +++ b/docs/InlineResponse20012PaymentInformationAccountFeatures.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..f3f0e231 --- /dev/null +++ b/docs/InlineResponse20012PaymentInformationBank.md @@ -0,0 +1,14 @@ +# 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 new file mode 100644 index 00000000..8212073b --- /dev/null +++ b/docs/InlineResponse20012PaymentInformationBankAccount.md @@ -0,0 +1,14 @@ +# 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 new file mode 100644 index 00000000..a21a58b9 --- /dev/null +++ b/docs/InlineResponse20012PaymentInformationBankMandate.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..9ecc3d2f --- /dev/null +++ b/docs/InlineResponse20012PaymentInformationCard.md @@ -0,0 +1,17 @@ +# 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 new file mode 100644 index 00000000..adaf6f3b --- /dev/null +++ b/docs/InlineResponse20012PaymentInformationInvoice.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..dcf1a4bb --- /dev/null +++ b/docs/InlineResponse20012PaymentInformationPaymentType.md @@ -0,0 +1,14 @@ +# 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 new file mode 100644 index 00000000..069fbd6d --- /dev/null +++ b/docs/InlineResponse20012PointOfSaleInformation.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 00000000..0b9eb815 --- /dev/null +++ b/docs/InlineResponse20012ProcessingInformation.md @@ -0,0 +1,12 @@ +# 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 new file mode 100644 index 00000000..81bee547 --- /dev/null +++ b/docs/InlineResponse20012ProcessingInformationAuthorizationOptions.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 00000000..5422fec8 --- /dev/null +++ b/docs/InlineResponse20012ProcessingInformationBankTransferOptions.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 00000000..3fed232f --- /dev/null +++ b/docs/InlineResponse20012ProcessorInformation.md @@ -0,0 +1,18 @@ +# 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 new file mode 100644 index 00000000..f94bab7a --- /dev/null +++ b/docs/InlineResponse20012ProcessorInformationAchVerification.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 00000000..5c578d2a --- /dev/null +++ b/docs/InlineResponse20012ProcessorInformationCardVerification.md @@ -0,0 +1,8 @@ +# CyberSource::InlineResponse20012ProcessorInformationCardVerification + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result_code** | **String** | CVN result code. | [optional] + + diff --git a/docs/InlineResponse20012ProcessorInformationElectronicVerificationResults.md b/docs/InlineResponse20012ProcessorInformationElectronicVerificationResults.md new file mode 100644 index 00000000..d847e3c9 --- /dev/null +++ b/docs/InlineResponse20012ProcessorInformationElectronicVerificationResults.md @@ -0,0 +1,17 @@ +# 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 new file mode 100644 index 00000000..cc9108c5 --- /dev/null +++ b/docs/InlineResponse20012ProcessorInformationProcessor.md @@ -0,0 +1,8 @@ +# CyberSource::InlineResponse20012ProcessorInformationProcessor + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of the Processor. | [optional] + + diff --git a/docs/InlineResponse20012RiskInformation.md b/docs/InlineResponse20012RiskInformation.md new file mode 100644 index 00000000..3a20a6c0 --- /dev/null +++ b/docs/InlineResponse20012RiskInformation.md @@ -0,0 +1,13 @@ +# 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 new file mode 100644 index 00000000..029f02f1 --- /dev/null +++ b/docs/InlineResponse20012RiskInformationProfile.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 00000000..d4221545 --- /dev/null +++ b/docs/InlineResponse20012RiskInformationScore.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 00000000..b8eb6558 --- /dev/null +++ b/docs/InlineResponse20012SenderInformation.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 00000000..7e4d9038 --- /dev/null +++ b/docs/InlineResponse20013.md @@ -0,0 +1,8 @@ +# CyberSource::InlineResponse20013 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**Array<InlineResponse20013Users>**](InlineResponse20013Users.md) | | [optional] + + diff --git a/docs/InlineResponse20013AccountInformation.md b/docs/InlineResponse20013AccountInformation.md new file mode 100644 index 00000000..d71f1f6e --- /dev/null +++ b/docs/InlineResponse20013AccountInformation.md @@ -0,0 +1,15 @@ +# 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 new file mode 100644 index 00000000..249d535c --- /dev/null +++ b/docs/InlineResponse20013ContactInformation.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..86e5c639 --- /dev/null +++ b/docs/InlineResponse20013OrganizationInformation.md @@ -0,0 +1,8 @@ +# CyberSource::InlineResponse20013OrganizationInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_id** | **String** | | [optional] + + diff --git a/docs/InlineResponse20013Users.md b/docs/InlineResponse20013Users.md new file mode 100644 index 00000000..38b61ac1 --- /dev/null +++ b/docs/InlineResponse20013Users.md @@ -0,0 +1,10 @@ +# 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 index 64b4b3a2..7315e0c1 100644 --- a/docs/InlineResponse2002.md +++ b/docs/InlineResponse2002.md @@ -3,20 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_links** | [**InlineResponse201Links**](InlineResponse201Links.md) | | [optional] -**_embedded** | [**InlineResponse201Embedded**](InlineResponse201Embedded.md) | | [optional] -**id** | **String** | An unique identification number assigned by CyberSource to identify the submitted request. | [optional] +**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] -**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] -**processing_information** | [**InlineResponse2002ProcessingInformation**](InlineResponse2002ProcessingInformation.md) | | [optional] -**processor_information** | [**InlineResponse2002ProcessorInformation**](InlineResponse2002ProcessorInformation.md) | | [optional] -**payment_information** | [**InlineResponse2002PaymentInformation**](InlineResponse2002PaymentInformation.md) | | [optional] -**order_information** | [**InlineResponse2002OrderInformation**](InlineResponse2002OrderInformation.md) | | [optional] -**buyer_information** | [**InlineResponse2002BuyerInformation**](InlineResponse2002BuyerInformation.md) | | [optional] -**merchant_information** | [**InlineResponse2002MerchantInformation**](InlineResponse2002MerchantInformation.md) | | [optional] -**device_information** | [**InlineResponse2002DeviceInformation**](InlineResponse2002DeviceInformation.md) | | [optional] diff --git a/docs/InlineResponse2002BuyerInformation.md b/docs/InlineResponse2002BuyerInformation.md deleted file mode 100644 index 46a25662..00000000 --- a/docs/InlineResponse2002BuyerInformation.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::InlineResponse2002BuyerInformation - -## 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] -**date_of_birth** | **String** | Recipient’s date of birth. **Format**: `YYYYMMDD`. This field is a pass-through, which means that CyberSource ensures that the value is eight numeric characters but otherwise does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. | [optional] -**vat_registration_number** | **String** | Customer’s government-assigned tax identification number. For processor-specific information, see the purchaser_vat_registration_number 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] -**personal_identification** | [**Array<V2paymentsBuyerInformationPersonalIdentification>**](V2paymentsBuyerInformationPersonalIdentification.md) | | [optional] -**tax_id** | **String** | TBD | [optional] - - diff --git a/docs/InlineResponse2002DeviceInformation.md b/docs/InlineResponse2002DeviceInformation.md deleted file mode 100644 index c2e5a029..00000000 --- a/docs/InlineResponse2002DeviceInformation.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse2002DeviceInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | TBD | [optional] -**fingerprint_id** | **String** | TBD | [optional] -**ip_address** | **String** | IP address of the customer. | [optional] - - diff --git a/docs/InlineResponse2002Links.md b/docs/InlineResponse2002Links.md new file mode 100644 index 00000000..1b062a13 --- /dev/null +++ b/docs/InlineResponse2002Links.md @@ -0,0 +1,8 @@ +# CyberSource::InlineResponse2002Links + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_self** | [**InlineResponse2002LinksSelf**](InlineResponse2002LinksSelf.md) | | [optional] + + diff --git a/docs/InlineResponse2002LinksSelf.md b/docs/InlineResponse2002LinksSelf.md new file mode 100644 index 00000000..bbeaff65 --- /dev/null +++ b/docs/InlineResponse2002LinksSelf.md @@ -0,0 +1,9 @@ +# CyberSource::InlineResponse2002LinksSelf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | | [optional] +**method** | **String** | | [optional] + + diff --git a/docs/InlineResponse2002MerchantInformation.md b/docs/InlineResponse2002MerchantInformation.md deleted file mode 100644 index b183650d..00000000 --- a/docs/InlineResponse2002MerchantInformation.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse2002MerchantInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**category_code** | **Integer** | Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**vat_registration_number** | **String** | Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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] -**merchant_descriptor** | [**V2paymentsMerchantInformationMerchantDescriptor**](V2paymentsMerchantInformationMerchantDescriptor.md) | | [optional] - - diff --git a/docs/InlineResponse2002OrderInformation.md b/docs/InlineResponse2002OrderInformation.md deleted file mode 100644 index 5c017fbd..00000000 --- a/docs/InlineResponse2002OrderInformation.md +++ /dev/null @@ -1,13 +0,0 @@ -# CyberSource::InlineResponse2002OrderInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount_details** | [**InlineResponse2002OrderInformationAmountDetails**](InlineResponse2002OrderInformationAmountDetails.md) | | [optional] -**bill_to** | [**InlineResponse2002OrderInformationBillTo**](InlineResponse2002OrderInformationBillTo.md) | | [optional] -**ship_to** | [**InlineResponse2002OrderInformationShipTo**](InlineResponse2002OrderInformationShipTo.md) | | [optional] -**line_items** | [**Array<InlineResponse2002OrderInformationLineItems>**](InlineResponse2002OrderInformationLineItems.md) | | [optional] -**invoice_details** | [**InlineResponse2002OrderInformationInvoiceDetails**](InlineResponse2002OrderInformationInvoiceDetails.md) | | [optional] -**shipping_details** | [**V2paymentsOrderInformationShippingDetails**](V2paymentsOrderInformationShippingDetails.md) | | [optional] - - diff --git a/docs/InlineResponse2002OrderInformationAmountDetails.md b/docs/InlineResponse2002OrderInformationAmountDetails.md deleted file mode 100644 index e69fc5b0..00000000 --- a/docs/InlineResponse2002OrderInformationAmountDetails.md +++ /dev/null @@ -1,16 +0,0 @@ -# CyberSource::InlineResponse2002OrderInformationAmountDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**authorized_amount** | **String** | Amount that was authorized. | [optional] -**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] -**discount_amount** | **String** | Total discount amount applied to the order. For processor-specific information, see the order_discount_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] -**duty_amount** | **String** | Total charges for any import or export duties included in the order. For processor-specific information, see the duty_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] -**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] -**national_tax_included** | **String** | Flag that indicates whether a national tax is included in the order total. Possible values: - **0**: national tax not included - **1**: national tax included For processor-specific information, see the national_tax_indicator 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] -**freight_amount** | **String** | Total freight or shipping and handling charges for the order. When you include this field in your request, you must also include the **totalAmount** field. For processor-specific information, see the freight_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] -**tax_details** | [**Array<V2paymentsOrderInformationAmountDetailsTaxDetails>**](V2paymentsOrderInformationAmountDetailsTaxDetails.md) | | [optional] - - diff --git a/docs/InlineResponse2002OrderInformationBillTo.md b/docs/InlineResponse2002OrderInformationBillTo.md deleted file mode 100644 index 3f59f3d0..00000000 --- a/docs/InlineResponse2002OrderInformationBillTo.md +++ /dev/null @@ -1,19 +0,0 @@ -# CyberSource::InlineResponse2002OrderInformationBillTo - -## 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] -**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] -**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] -**county** | **String** | TBD | [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] -**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] -**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/InlineResponse2002OrderInformationInvoiceDetails.md b/docs/InlineResponse2002OrderInformationInvoiceDetails.md deleted file mode 100644 index 6fafed68..00000000 --- a/docs/InlineResponse2002OrderInformationInvoiceDetails.md +++ /dev/null @@ -1,15 +0,0 @@ -# CyberSource::InlineResponse2002OrderInformationInvoiceDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**purchase_order_number** | **String** | Value used by your customer to identify the order. This value is typically a purchase order number. CyberSource recommends that you do not populate the field with all zeros or nines. For processor-specific information, see the user_po 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] -**purchase_order_date** | **String** | Date the order was processed. `Format: YYYY-MM-DD`. For processor-specific information, see the purchaser_order_date 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] -**taxable** | **BOOLEAN** | Flag that indicates whether an order is taxable. This value must be true if the sum of all _lineItems[].taxAmount_ values > 0. If you do not include any _lineItems[].taxAmount_ values in your request, CyberSource does not include _invoiceDetails.taxable_ in the data it sends to the processor. For processor-specific information, see the tax_indicator 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] -**vat_invoice_reference_number** | **String** | VAT invoice number associated with the transaction. For processor-specific information, see the vat_invoice_ref_number 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] -**commodity_code** | **String** | International description code of the overall order’s goods or services or the Categorizes purchases for VAT reporting. Contact your acquirer for a list of codes. For processor-specific information, see the summary_commodity_code 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] -**merchandise_code** | **Float** | Identifier for the merchandise. Possible value: - 1000: Gift card This field is supported only for **American Express Direct**. | [optional] -**transaction_advice_addendum** | [**Array<V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum>**](V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum.md) | | [optional] -**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/InlineResponse2002OrderInformationLineItems.md b/docs/InlineResponse2002OrderInformationLineItems.md deleted file mode 100644 index 81dd6cfc..00000000 --- a/docs/InlineResponse2002OrderInformationLineItems.md +++ /dev/null @@ -1,24 +0,0 @@ -# CyberSource::InlineResponse2002OrderInformationLineItems - -## 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] -**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] -**unit_of_measure** | **String** | Unit of measure, or unit of measure code, for the item. | [optional] -**total_amount** | **String** | Total amount for the item. Normally calculated as the unit price x quantity. | [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] -**tax_rate** | **String** | Tax rate applied to the item. See \"Numbered Elements,\" page 14. Visa: Valid range is 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated). Mastercard: Valid range is 0.00001 to 0.99999 (0.001% to 99.999%). | [optional] -**tax_type_code** | **String** | Type of tax being applied to the item. Possible values: Below values are used by **RBS WorldPay Atlanta**, **FDC Nashville Global**, **Litle** - 0000: unknown tax type - 0001: federal/national sales tax - 0002: state sales tax - 0003: city sales tax - 0004: local sales tax - 0005: municipal sales tax - 0006: other tax - 0010: value-added tax - 0011: goods and services tax - 0012: provincial sales tax - 0013: harmonized sales tax - 0014: Quebec sales tax (QST) - 0020: room tax - 0021: occupancy tax - 0022: energy tax - Blank: Tax not supported on line item. | [optional] -**amount_includes_tax** | **BOOLEAN** | Flag that indicates whether the tax amount is included in the Line Item Total. | [optional] -**commodity_code** | **String** | Commodity code or International description code used to classify the item. Contact your acquirer for a list of codes. | [optional] -**discount_amount** | **String** | Discount applied to the item. | [optional] -**discount_applied** | **BOOLEAN** | Flag that indicates whether the amount is discounted. If you do not provide a value but you set Discount Amount to a value greater than zero, then CyberSource sets this field to **true**. | [optional] -**discount_rate** | **String** | Rate the item is discounted. Maximum of 2 decimal places. Example 5.25 (=5.25%) | [optional] -**invoice_number** | **String** | Field to support an invoice number for a transaction. You must specify the number of line items that will include an invoice number. By default, the first line item will include an invoice number field. The invoice number field can be included for up to 10 line items. | [optional] -**tax_details** | [**Array<V2paymentsOrderInformationAmountDetailsTaxDetails>**](V2paymentsOrderInformationAmountDetailsTaxDetails.md) | | [optional] - - diff --git a/docs/InlineResponse2002OrderInformationShipTo.md b/docs/InlineResponse2002OrderInformationShipTo.md deleted file mode 100644 index 87bf8acd..00000000 --- a/docs/InlineResponse2002OrderInformationShipTo.md +++ /dev/null @@ -1,19 +0,0 @@ -# CyberSource::InlineResponse2002OrderInformationShipTo - -## 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] -**company** | **String** | TBD | [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] -**county** | **String** | TBD | [optional] -**country** | **String** | Country of the shipping address. Use the two character ISO Standard Country Codes. | [optional] -**email** | **String** | TBD | [optional] -**phone_number** | **String** | Phone number for the shipping address. | [optional] - - diff --git a/docs/InlineResponse2002PaymentInformation.md b/docs/InlineResponse2002PaymentInformation.md deleted file mode 100644 index 9008b9ae..00000000 --- a/docs/InlineResponse2002PaymentInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse2002PaymentInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**card** | [**InlineResponse2002PaymentInformationCard**](InlineResponse2002PaymentInformationCard.md) | | [optional] -**tokenized_card** | [**InlineResponse2002PaymentInformationTokenizedCard**](InlineResponse2002PaymentInformationTokenizedCard.md) | | [optional] - - diff --git a/docs/InlineResponse2002PaymentInformationCard.md b/docs/InlineResponse2002PaymentInformationCard.md deleted file mode 100644 index db3e7dfb..00000000 --- a/docs/InlineResponse2002PaymentInformationCard.md +++ /dev/null @@ -1,11 +0,0 @@ -# CyberSource::InlineResponse2002PaymentInformationCard - -## 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] -**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] -**type** | **String** | Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover | [optional] - - diff --git a/docs/InlineResponse2002PaymentInformationTokenizedCard.md b/docs/InlineResponse2002PaymentInformationTokenizedCard.md deleted file mode 100644 index 995c0e47..00000000 --- a/docs/InlineResponse2002PaymentInformationTokenizedCard.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::InlineResponse2002PaymentInformationTokenizedCard - -## 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] -**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] - - diff --git a/docs/InlineResponse2002ProcessingInformation.md b/docs/InlineResponse2002ProcessingInformation.md deleted file mode 100644 index d383c540..00000000 --- a/docs/InlineResponse2002ProcessingInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2002ProcessingInformation - -## 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] - - diff --git a/docs/InlineResponse2002ProcessorInformation.md b/docs/InlineResponse2002ProcessorInformation.md deleted file mode 100644 index de760254..00000000 --- a/docs/InlineResponse2002ProcessorInformation.md +++ /dev/null @@ -1,11 +0,0 @@ -# CyberSource::InlineResponse2002ProcessorInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**approval_code** | **String** | Authorization code. Returned only when the processor returns this value. | [optional] -**card_verification** | [**InlineResponse2002ProcessorInformationCardVerification**](InlineResponse2002ProcessorInformationCardVerification.md) | | [optional] -**avs** | [**InlineResponse2002ProcessorInformationAvs**](InlineResponse2002ProcessorInformationAvs.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] - - diff --git a/docs/InlineResponse2002ProcessorInformationAvs.md b/docs/InlineResponse2002ProcessorInformationAvs.md deleted file mode 100644 index a6a5e3d4..00000000 --- a/docs/InlineResponse2002ProcessorInformationAvs.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2002ProcessorInformationAvs - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **String** | AVS result code. | [optional] - - diff --git a/docs/InlineResponse2002ProcessorInformationCardVerification.md b/docs/InlineResponse2002ProcessorInformationCardVerification.md deleted file mode 100644 index 990bd2b2..00000000 --- a/docs/InlineResponse2002ProcessorInformationCardVerification.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2002ProcessorInformationCardVerification - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**result_code** | **String** | CVN result code. | [optional] - - diff --git a/docs/InlineResponse2002TransactionBatches.md b/docs/InlineResponse2002TransactionBatches.md new file mode 100644 index 00000000..91a1b34e --- /dev/null +++ b/docs/InlineResponse2002TransactionBatches.md @@ -0,0 +1,14 @@ +# 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 index 0cbb58ee..f5023c08 100644 --- a/docs/InlineResponse2003.md +++ b/docs/InlineResponse2003.md @@ -3,13 +3,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_links** | [**InlineResponse201EmbeddedCaptureLinks**](InlineResponse201EmbeddedCaptureLinks.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** | [**InlineResponse2011ProcessorInformation**](InlineResponse2011ProcessorInformation.md) | | [optional] -**reversal_amount_details** | [**InlineResponse2011ReversalAmountDetails**](InlineResponse2011ReversalAmountDetails.md) | | [optional] +**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 new file mode 100644 index 00000000..aa67340f --- /dev/null +++ b/docs/InlineResponse2003NotificationOfChanges.md @@ -0,0 +1,15 @@ +# 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 index 958727d8..d09eb5c4 100644 --- a/docs/InlineResponse2004.md +++ b/docs/InlineResponse2004.md @@ -3,17 +3,6 @@ ## 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] -**processing_information** | [**InlineResponse2004ProcessingInformation**](InlineResponse2004ProcessingInformation.md) | | [optional] -**processor_information** | [**InlineResponse2012ProcessorInformation**](InlineResponse2012ProcessorInformation.md) | | [optional] -**order_information** | [**InlineResponse2004OrderInformation**](InlineResponse2004OrderInformation.md) | | [optional] -**buyer_information** | [**V2paymentsidcapturesBuyerInformation**](V2paymentsidcapturesBuyerInformation.md) | | [optional] -**merchant_information** | [**InlineResponse2002MerchantInformation**](InlineResponse2002MerchantInformation.md) | | [optional] -**device_information** | [**InlineResponse2004DeviceInformation**](InlineResponse2004DeviceInformation.md) | | [optional] +**report_definitions** | [**Array<InlineResponse2004ReportDefinitions>**](InlineResponse2004ReportDefinitions.md) | | [optional] diff --git a/docs/InlineResponse2004DeviceInformation.md b/docs/InlineResponse2004DeviceInformation.md deleted file mode 100644 index 9291f233..00000000 --- a/docs/InlineResponse2004DeviceInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2004DeviceInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ip_address** | **String** | IP address of the customer. | [optional] - - diff --git a/docs/InlineResponse2004OrderInformation.md b/docs/InlineResponse2004OrderInformation.md deleted file mode 100644 index 2f763501..00000000 --- a/docs/InlineResponse2004OrderInformation.md +++ /dev/null @@ -1,13 +0,0 @@ -# CyberSource::InlineResponse2004OrderInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount_details** | [**InlineResponse2004OrderInformationAmountDetails**](InlineResponse2004OrderInformationAmountDetails.md) | | [optional] -**bill_to** | [**InlineResponse2002OrderInformationBillTo**](InlineResponse2002OrderInformationBillTo.md) | | [optional] -**ship_to** | [**InlineResponse2004OrderInformationShipTo**](InlineResponse2004OrderInformationShipTo.md) | | [optional] -**line_items** | [**Array<InlineResponse2002OrderInformationLineItems>**](InlineResponse2002OrderInformationLineItems.md) | | [optional] -**invoice_details** | [**InlineResponse2004OrderInformationInvoiceDetails**](InlineResponse2004OrderInformationInvoiceDetails.md) | | [optional] -**shipping_details** | [**V2paymentsidcapturesOrderInformationShippingDetails**](V2paymentsidcapturesOrderInformationShippingDetails.md) | | [optional] - - diff --git a/docs/InlineResponse2004OrderInformationAmountDetails.md b/docs/InlineResponse2004OrderInformationAmountDetails.md deleted file mode 100644 index da575fb9..00000000 --- a/docs/InlineResponse2004OrderInformationAmountDetails.md +++ /dev/null @@ -1,15 +0,0 @@ -# CyberSource::InlineResponse2004OrderInformationAmountDetails - -## 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] -**discount_amount** | **String** | Total discount amount applied to the order. For processor-specific information, see the order_discount_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] -**duty_amount** | **String** | Total charges for any import or export duties included in the order. For processor-specific information, see the duty_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] -**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] -**national_tax_included** | **String** | Flag that indicates whether a national tax is included in the order total. Possible values: - **0**: national tax not included - **1**: national tax included For processor-specific information, see the national_tax_indicator 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] -**freight_amount** | **String** | Total freight or shipping and handling charges for the order. When you include this field in your request, you must also include the **totalAmount** field. For processor-specific information, see the freight_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] -**tax_details** | [**Array<V2paymentsOrderInformationAmountDetailsTaxDetails>**](V2paymentsOrderInformationAmountDetailsTaxDetails.md) | | [optional] - - diff --git a/docs/InlineResponse2004OrderInformationInvoiceDetails.md b/docs/InlineResponse2004OrderInformationInvoiceDetails.md deleted file mode 100644 index 040afe26..00000000 --- a/docs/InlineResponse2004OrderInformationInvoiceDetails.md +++ /dev/null @@ -1,14 +0,0 @@ -# CyberSource::InlineResponse2004OrderInformationInvoiceDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**purchase_order_number** | **String** | Value used by your customer to identify the order. This value is typically a purchase order number. CyberSource recommends that you do not populate the field with all zeros or nines. For processor-specific information, see the user_po 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] -**purchase_order_date** | **String** | Date the order was processed. `Format: YYYY-MM-DD`. For processor-specific information, see the purchaser_order_date 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] -**taxable** | **BOOLEAN** | Flag that indicates whether an order is taxable. This value must be true if the sum of all _lineItems[].taxAmount_ values > 0. If you do not include any _lineItems[].taxAmount_ values in your request, CyberSource does not include _invoiceDetails.taxable_ in the data it sends to the processor. For processor-specific information, see the tax_indicator 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] -**vat_invoice_reference_number** | **String** | VAT invoice number associated with the transaction. For processor-specific information, see the vat_invoice_ref_number 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] -**commodity_code** | **String** | International description code of the overall order’s goods or services or the Categorizes purchases for VAT reporting. Contact your acquirer for a list of codes. For processor-specific information, see the summary_commodity_code 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] -**transaction_advice_addendum** | [**Array<V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum>**](V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum.md) | | [optional] -**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/InlineResponse2004OrderInformationShipTo.md b/docs/InlineResponse2004OrderInformationShipTo.md deleted file mode 100644 index 42bfd467..00000000 --- a/docs/InlineResponse2004OrderInformationShipTo.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InlineResponse2004OrderInformationShipTo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] -**country** | **String** | Country of the shipping address. Use the two character ISO Standard Country Codes. | [optional] - - diff --git a/docs/InlineResponse2004ProcessingInformation.md b/docs/InlineResponse2004ProcessingInformation.md deleted file mode 100644 index 907b8806..00000000 --- a/docs/InlineResponse2004ProcessingInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse2004ProcessingInformation - -## 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] -**authorization_options** | [**InlineResponse2004ProcessingInformationAuthorizationOptions**](InlineResponse2004ProcessingInformationAuthorizationOptions.md) | | [optional] - - diff --git a/docs/InlineResponse2004ProcessingInformationAuthorizationOptions.md b/docs/InlineResponse2004ProcessingInformationAuthorizationOptions.md deleted file mode 100644 index 3bd73422..00000000 --- a/docs/InlineResponse2004ProcessingInformationAuthorizationOptions.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2004ProcessingInformationAuthorizationOptions - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**verbal_auth_code** | **String** | Authorization code. **Forced Capture** Use this field to send the authorization code you received from a payment that you authorized outside the CyberSource system. **Verbal Authorization** Use this field in CAPTURE API to send the verbally received authorization code. For processor-specific information, see the auth_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] - - diff --git a/docs/InlineResponse2004ReportDefinitions.md b/docs/InlineResponse2004ReportDefinitions.md new file mode 100644 index 00000000..9dbd0c3d --- /dev/null +++ b/docs/InlineResponse2004ReportDefinitions.md @@ -0,0 +1,12 @@ +# 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 index 35fd640c..f8e5185e 100644 --- a/docs/InlineResponse2005.md +++ b/docs/InlineResponse2005.md @@ -3,12 +3,11 @@ ## 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] +**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 new file mode 100644 index 00000000..3214f55f --- /dev/null +++ b/docs/InlineResponse2005Attributes.md @@ -0,0 +1,14 @@ +# 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 index 8319d04d..92b123bc 100644 --- a/docs/InlineResponse2006.md +++ b/docs/InlineResponse2006.md @@ -3,12 +3,6 @@ ## 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] +**subscriptions** | [**Array<InlineResponse2006Subscriptions>**](InlineResponse2006Subscriptions.md) | | [optional] diff --git a/docs/InlineResponse2006ReportPreferences.md b/docs/InlineResponse2006ReportPreferences.md new file mode 100644 index 00000000..04182217 --- /dev/null +++ b/docs/InlineResponse2006ReportPreferences.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 00000000..bab2b61e --- /dev/null +++ b/docs/InlineResponse2006Subscriptions.md @@ -0,0 +1,20 @@ +# 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 index e1b6886f..e26ba91e 100644 --- a/docs/InlineResponse2007.md +++ b/docs/InlineResponse2007.md @@ -3,13 +3,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_links** | [**InstrumentidentifiersLinks**](InstrumentidentifiersLinks.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** | [**InstrumentidentifiersCard**](InstrumentidentifiersCard.md) | | [optional] -**bank_account** | [**InstrumentidentifiersBankAccount**](InstrumentidentifiersBankAccount.md) | | [optional] -**processing_information** | [**InstrumentidentifiersProcessingInformation**](InstrumentidentifiersProcessingInformation.md) | | [optional] -**metadata** | [**InstrumentidentifiersMetadata**](InstrumentidentifiersMetadata.md) | | [optional] +**reports** | [**Array<InlineResponse2007Reports>**](InlineResponse2007Reports.md) | | [optional] diff --git a/docs/InlineResponse2007Reports.md b/docs/InlineResponse2007Reports.md new file mode 100644 index 00000000..5279e8f9 --- /dev/null +++ b/docs/InlineResponse2007Reports.md @@ -0,0 +1,21 @@ +# 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 index efc0ad68..4d1ec63c 100644 --- a/docs/InlineResponse2008.md +++ b/docs/InlineResponse2008.md @@ -3,12 +3,19 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_links** | [**InlineResponse2008Links**](InlineResponse2008Links.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] +**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/InlineResponse2008Links.md b/docs/InlineResponse2008Links.md deleted file mode 100644 index 21645eb8..00000000 --- a/docs/InlineResponse2008Links.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::InlineResponse2008Links - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_self** | [**InlineResponse2008LinksSelf**](InlineResponse2008LinksSelf.md) | | [optional] -**first** | [**InlineResponse2008LinksFirst**](InlineResponse2008LinksFirst.md) | | [optional] -**prev** | [**InlineResponse2008LinksPrev**](InlineResponse2008LinksPrev.md) | | [optional] -**_next** | [**InlineResponse2008LinksNext**](InlineResponse2008LinksNext.md) | | [optional] -**last** | [**InlineResponse2008LinksLast**](InlineResponse2008LinksLast.md) | | [optional] - - diff --git a/docs/InlineResponse2008LinksFirst.md b/docs/InlineResponse2008LinksFirst.md deleted file mode 100644 index 03b092a1..00000000 --- a/docs/InlineResponse2008LinksFirst.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2008LinksFirst - -## 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/InlineResponse2008LinksLast.md b/docs/InlineResponse2008LinksLast.md deleted file mode 100644 index 8c84f040..00000000 --- a/docs/InlineResponse2008LinksLast.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2008LinksLast - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**href** | **String** | A link to the last collection containing the remaining objects. | [optional] - - diff --git a/docs/InlineResponse2008LinksNext.md b/docs/InlineResponse2008LinksNext.md deleted file mode 100644 index 47f89006..00000000 --- a/docs/InlineResponse2008LinksNext.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2008LinksNext - -## 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/InlineResponse2008LinksPrev.md b/docs/InlineResponse2008LinksPrev.md deleted file mode 100644 index 10d02f17..00000000 --- a/docs/InlineResponse2008LinksPrev.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2008LinksPrev - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**href** | **String** | | [optional] - - diff --git a/docs/InlineResponse2008LinksSelf.md b/docs/InlineResponse2008LinksSelf.md deleted file mode 100644 index d3045b84..00000000 --- a/docs/InlineResponse2008LinksSelf.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse2008LinksSelf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**href** | **String** | A link to the current requested collection. | [optional] - - diff --git a/docs/InlineResponse2009.md b/docs/InlineResponse2009.md new file mode 100644 index 00000000..8462c0cb --- /dev/null +++ b/docs/InlineResponse2009.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 00000000..92339a80 --- /dev/null +++ b/docs/InlineResponse2009FileDetails.md @@ -0,0 +1,14 @@ +# 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 new file mode 100644 index 00000000..04d56c94 --- /dev/null +++ b/docs/InlineResponse2009Links.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 00000000..76d8b1fc --- /dev/null +++ b/docs/InlineResponse2009LinksFiles.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..bcc5f8e4 --- /dev/null +++ b/docs/InlineResponse2009LinksSelf.md @@ -0,0 +1,9 @@ +# CyberSource::InlineResponse2009LinksSelf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | | [optional] +**method** | **String** | | [optional] + + diff --git a/docs/InlineResponse201.md b/docs/InlineResponse201.md index 98c81374..32fe435c 100644 --- a/docs/InlineResponse201.md +++ b/docs/InlineResponse201.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_links** | [**InlineResponse201Links**](InlineResponse201Links.md) | | [optional] -**_embedded** | [**InlineResponse201Embedded**](InlineResponse201Embedded.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] diff --git a/docs/InlineResponse2011.md b/docs/InlineResponse2011.md index 3ee889b6..6331dabc 100644 --- a/docs/InlineResponse2011.md +++ b/docs/InlineResponse2011.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_links** | [**InlineResponse201EmbeddedCaptureLinks**](InlineResponse201EmbeddedCaptureLinks.md) | | [optional] +**_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] @@ -12,6 +12,6 @@ Name | Type | Description | Notes **reversal_amount_details** | [**InlineResponse2011ReversalAmountDetails**](InlineResponse2011ReversalAmountDetails.md) | | [optional] **processor_information** | [**InlineResponse2011ProcessorInformation**](InlineResponse2011ProcessorInformation.md) | | [optional] **authorization_information** | [**InlineResponse2011AuthorizationInformation**](InlineResponse2011AuthorizationInformation.md) | | [optional] -**point_of_sale_information** | [**V2paymentsidreversalsPointOfSaleInformation**](V2paymentsidreversalsPointOfSaleInformation.md) | | [optional] +**point_of_sale_information** | [**Ptsv2paymentsidreversalsPointOfSaleInformation**](Ptsv2paymentsidreversalsPointOfSaleInformation.md) | | [optional] diff --git a/docs/InlineResponse2011Links.md b/docs/InlineResponse2011Links.md new file mode 100644 index 00000000..c86e5fb5 --- /dev/null +++ b/docs/InlineResponse2011Links.md @@ -0,0 +1,8 @@ +# CyberSource::InlineResponse2011Links + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_self** | [**InlineResponse201LinksSelf**](InlineResponse201LinksSelf.md) | | [optional] + + diff --git a/docs/InlineResponse2011ProcessorInformation.md b/docs/InlineResponse2011ProcessorInformation.md index 9060f0c7..9701d54a 100644 --- a/docs/InlineResponse2011ProcessorInformation.md +++ b/docs/InlineResponse2011ProcessorInformation.md @@ -5,7 +5,7 @@ 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] +**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/InlineResponse2015.md b/docs/InlineResponse2015.md index 393a7cbc..21a8a4c8 100644 --- a/docs/InlineResponse2015.md +++ b/docs/InlineResponse2015.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_links** | [**InlineResponse201EmbeddedCaptureLinks**](InlineResponse201EmbeddedCaptureLinks.md) | | [optional] +**_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] diff --git a/docs/InlineResponse2016.md b/docs/InlineResponse2016.md index bcb4fca2..055b6091 100644 --- a/docs/InlineResponse2016.md +++ b/docs/InlineResponse2016.md @@ -3,17 +3,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_links** | [**InstrumentidentifiersLinks**](InstrumentidentifiersLinks.md) | | [optional] +**_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** | [**PaymentinstrumentsBankAccount**](PaymentinstrumentsBankAccount.md) | | [optional] -**card** | [**PaymentinstrumentsCard**](PaymentinstrumentsCard.md) | | [optional] -**buyer_information** | [**PaymentinstrumentsBuyerInformation**](PaymentinstrumentsBuyerInformation.md) | | [optional] -**bill_to** | [**PaymentinstrumentsBillTo**](PaymentinstrumentsBillTo.md) | | [optional] -**processing_information** | [**PaymentinstrumentsProcessingInformation**](PaymentinstrumentsProcessingInformation.md) | | [optional] -**merchant_information** | [**PaymentinstrumentsMerchantInformation**](PaymentinstrumentsMerchantInformation.md) | | [optional] -**meta_data** | [**InstrumentidentifiersMetadata**](InstrumentidentifiersMetadata.md) | | [optional] -**instrument_identifier** | [**PaymentinstrumentsInstrumentIdentifier**](PaymentinstrumentsInstrumentIdentifier.md) | | [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 new file mode 100644 index 00000000..217d89bf --- /dev/null +++ b/docs/InlineResponse2017.md @@ -0,0 +1,20 @@ +# 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 new file mode 100644 index 00000000..d4c57c8c --- /dev/null +++ b/docs/InlineResponse2017Embedded.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 00000000..aede3941 --- /dev/null +++ b/docs/InlineResponse2017EmbeddedBuyerInformation.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 00000000..83b792ea --- /dev/null +++ b/docs/InlineResponse2017EmbeddedClientReferenceInformation.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..21575395 --- /dev/null +++ b/docs/InlineResponse2017EmbeddedConsumerAuthenticationInformation.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 00000000..ac238818 --- /dev/null +++ b/docs/InlineResponse2017EmbeddedDeviceInformation.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 00000000..720e5c6f --- /dev/null +++ b/docs/InlineResponse2017EmbeddedLinks.md @@ -0,0 +1,8 @@ +# CyberSource::InlineResponse2017EmbeddedLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_detail** | [**InlineResponse201LinksSelf**](InlineResponse201LinksSelf.md) | | [optional] + + diff --git a/docs/InlineResponse2017EmbeddedMerchantInformation.md b/docs/InlineResponse2017EmbeddedMerchantInformation.md new file mode 100644 index 00000000..752087cc --- /dev/null +++ b/docs/InlineResponse2017EmbeddedMerchantInformation.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 00000000..f4bb0055 --- /dev/null +++ b/docs/InlineResponse2017EmbeddedOrderInformation.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..4abebaa5 --- /dev/null +++ b/docs/InlineResponse2017EmbeddedOrderInformationBillTo.md @@ -0,0 +1,12 @@ +# 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 new file mode 100644 index 00000000..f1ac6eb4 --- /dev/null +++ b/docs/InlineResponse2017EmbeddedOrderInformationShipTo.md @@ -0,0 +1,12 @@ +# 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 new file mode 100644 index 00000000..f1ebbe83 --- /dev/null +++ b/docs/InlineResponse2017EmbeddedPaymentInformation.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..3098667c --- /dev/null +++ b/docs/InlineResponse2017EmbeddedPaymentInformationCard.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..d3a9ef67 --- /dev/null +++ b/docs/InlineResponse2017EmbeddedPaymentInformationPaymentMethod.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 00000000..83bc3991 --- /dev/null +++ b/docs/InlineResponse2017EmbeddedPointOfSaleInformation.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..a8bd0b73 --- /dev/null +++ b/docs/InlineResponse2017EmbeddedPointOfSaleInformationPartner.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 00000000..f2d4fc79 --- /dev/null +++ b/docs/InlineResponse2017EmbeddedProcessingInformation.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 00000000..8369141a --- /dev/null +++ b/docs/InlineResponse2017EmbeddedProcessorInformation.md @@ -0,0 +1,8 @@ +# CyberSource::InlineResponse2017EmbeddedProcessorInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**processor** | [**InlineResponse20012ProcessorInformationProcessor**](InlineResponse20012ProcessorInformationProcessor.md) | | [optional] + + diff --git a/docs/InlineResponse2017EmbeddedRiskInformation.md b/docs/InlineResponse2017EmbeddedRiskInformation.md new file mode 100644 index 00000000..3eed8e37 --- /dev/null +++ b/docs/InlineResponse2017EmbeddedRiskInformation.md @@ -0,0 +1,8 @@ +# CyberSource::InlineResponse2017EmbeddedRiskInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**providers** | [**InlineResponse2017EmbeddedRiskInformationProviders**](InlineResponse2017EmbeddedRiskInformationProviders.md) | | [optional] + + diff --git a/docs/InlineResponse2017EmbeddedRiskInformationProviders.md b/docs/InlineResponse2017EmbeddedRiskInformationProviders.md new file mode 100644 index 00000000..96cbbec8 --- /dev/null +++ b/docs/InlineResponse2017EmbeddedRiskInformationProviders.md @@ -0,0 +1,8 @@ +# CyberSource::InlineResponse2017EmbeddedRiskInformationProviders + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fingerprint** | [**InlineResponse2017EmbeddedRiskInformationProvidersFingerprint**](InlineResponse2017EmbeddedRiskInformationProvidersFingerprint.md) | | [optional] + + diff --git a/docs/InlineResponse2017EmbeddedRiskInformationProvidersFingerprint.md b/docs/InlineResponse2017EmbeddedRiskInformationProvidersFingerprint.md new file mode 100644 index 00000000..2b338ae3 --- /dev/null +++ b/docs/InlineResponse2017EmbeddedRiskInformationProvidersFingerprint.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..329d2470 --- /dev/null +++ b/docs/InlineResponse2017EmbeddedTransactionSummaries.md @@ -0,0 +1,25 @@ +# 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/InlineResponse201Embedded.md b/docs/InlineResponse201Embedded.md deleted file mode 100644 index bce11330..00000000 --- a/docs/InlineResponse201Embedded.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse201Embedded - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**capture** | [**InlineResponse201EmbeddedCapture**](InlineResponse201EmbeddedCapture.md) | | [optional] - - diff --git a/docs/InlineResponse201EmbeddedCapture.md b/docs/InlineResponse201EmbeddedCapture.md deleted file mode 100644 index 50ed25d0..00000000 --- a/docs/InlineResponse201EmbeddedCapture.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InlineResponse201EmbeddedCapture - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **String** | The status of the submitted transaction. | [optional] -**_links** | [**InlineResponse201EmbeddedCaptureLinks**](InlineResponse201EmbeddedCaptureLinks.md) | | [optional] - - diff --git a/docs/InlineResponse201EmbeddedCaptureLinks.md b/docs/InlineResponse201EmbeddedCaptureLinks.md deleted file mode 100644 index 5b448322..00000000 --- a/docs/InlineResponse201EmbeddedCaptureLinks.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InlineResponse201EmbeddedCaptureLinks - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_self** | [**InlineResponse201LinksSelf**](InlineResponse201LinksSelf.md) | | [optional] - - diff --git a/docs/InlineResponse201PaymentInformationCard.md b/docs/InlineResponse201PaymentInformationCard.md index f2ee2e11..cd356ae3 100644 --- a/docs/InlineResponse201PaymentInformationCard.md +++ b/docs/InlineResponse201PaymentInformationCard.md @@ -3,6 +3,6 @@ ## 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] +**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 index 9d415cf9..cd625b16 100644 --- a/docs/InlineResponse201PaymentInformationTokenizedCard.md +++ b/docs/InlineResponse201PaymentInformationTokenizedCard.md @@ -9,6 +9,6 @@ Name | Type | Description | Notes **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] +**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/InlineResponse201ProcessorInformation.md b/docs/InlineResponse201ProcessorInformation.md index 87f8b09f..aa9d750f 100644 --- a/docs/InlineResponse201ProcessorInformation.md +++ b/docs/InlineResponse201ProcessorInformation.md @@ -5,12 +5,12 @@ 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** | TBD | [optional] -**provider_transaction_id** | **String** | TBD | [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] +**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] @@ -19,9 +19,9 @@ Name | Type | Description | Notes **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] +**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] +**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] diff --git a/docs/InlineResponse201ProcessorInformationElectronicVerificationResults.md b/docs/InlineResponse201ProcessorInformationElectronicVerificationResults.md index caf7f83c..385b5675 100644 --- a/docs/InlineResponse201ProcessorInformationElectronicVerificationResults.md +++ b/docs/InlineResponse201ProcessorInformationElectronicVerificationResults.md @@ -3,16 +3,16 @@ ## 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] +**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/InlineResponse4005.md b/docs/InlineResponse4005.md index 50b3c270..602f28cc 100644 --- a/docs/InlineResponse4005.md +++ b/docs/InlineResponse4005.md @@ -3,10 +3,7 @@ ## 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] -**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/InlineResponse4005ErrorInformation.md b/docs/InlineResponse4005ErrorInformation.md new file mode 100644 index 00000000..82c9f5f2 --- /dev/null +++ b/docs/InlineResponse4005ErrorInformation.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..523db669 --- /dev/null +++ b/docs/InlineResponse4005ErrorInformationDetails.md @@ -0,0 +1,9 @@ +# 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 index e496135a..348056c2 100644 --- a/docs/InlineResponse4006.md +++ b/docs/InlineResponse4006.md @@ -3,8 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **String** | | [optional] -**message** | **String** | The detailed message related to the type stated above. | [optional] -**details** | [**InstrumentidentifiersDetails**](InstrumentidentifiersDetails.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] +**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 new file mode 100644 index 00000000..4f0a209c --- /dev/null +++ b/docs/InlineResponse4007.md @@ -0,0 +1,13 @@ +# 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 new file mode 100644 index 00000000..cb4f06e1 --- /dev/null +++ b/docs/InlineResponse4007Fields.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..76ff53ac --- /dev/null +++ b/docs/InlineResponse4008.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..67df1180 --- /dev/null +++ b/docs/InlineResponse4009.md @@ -0,0 +1,11 @@ +# 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/InlineResponse500.md b/docs/InlineResponse500.md new file mode 100644 index 00000000..58086aef --- /dev/null +++ b/docs/InlineResponse500.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 00000000..16a91e1b --- /dev/null +++ b/docs/InlineResponse500ErrorInformation.md @@ -0,0 +1,9 @@ +# 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/InstrumentIdentifierApi.md b/docs/InstrumentIdentifierApi.md index c8ec0bce..76d2d62d 100644 --- a/docs/InstrumentIdentifierApi.md +++ b/docs/InstrumentIdentifierApi.md @@ -1,74 +1,23 @@ # CyberSource::InstrumentIdentifierApi -All URIs are relative to *https://api.cybersource.com* +All URIs are relative to *https://apitest.cybersource.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**instrumentidentifiers_post**](InstrumentIdentifierApi.md#instrumentidentifiers_post) | **POST** /instrumentidentifiers | Create an Instrument Identifier -[**instrumentidentifiers_token_id_delete**](InstrumentIdentifierApi.md#instrumentidentifiers_token_id_delete) | **DELETE** /instrumentidentifiers/{tokenId} | Delete an Instrument Identifier -[**instrumentidentifiers_token_id_get**](InstrumentIdentifierApi.md#instrumentidentifiers_token_id_get) | **GET** /instrumentidentifiers/{tokenId} | Retrieve an Instrument Identifier -[**instrumentidentifiers_token_id_patch**](InstrumentIdentifierApi.md#instrumentidentifiers_token_id_patch) | **PATCH** /instrumentidentifiers/{tokenId} | Update a Instrument Identifier -[**instrumentidentifiers_token_id_paymentinstruments_get**](InstrumentIdentifierApi.md#instrumentidentifiers_token_id_paymentinstruments_get) | **GET** /instrumentidentifiers/{tokenId}/paymentinstruments | Retrieve all Payment Instruments associated with an Instrument Identifier +[**tms_v1_instrumentidentifiers_token_id_delete**](InstrumentIdentifierApi.md#tms_v1_instrumentidentifiers_token_id_delete) | **DELETE** /tms/v1/instrumentidentifiers/{tokenId} | Delete an Instrument Identifier +[**tms_v1_instrumentidentifiers_token_id_get**](InstrumentIdentifierApi.md#tms_v1_instrumentidentifiers_token_id_get) | **GET** /tms/v1/instrumentidentifiers/{tokenId} | Retrieve an Instrument Identifier +[**tms_v1_instrumentidentifiers_token_id_patch**](InstrumentIdentifierApi.md#tms_v1_instrumentidentifiers_token_id_patch) | **PATCH** /tms/v1/instrumentidentifiers/{tokenId} | Update a Instrument Identifier -# **instrumentidentifiers_post** -> InlineResponse2007 instrumentidentifiers_post(profile_id, opts) - -Create an Instrument Identifier - -### Example -```ruby -# load the gem -require 'cyberSource_client' - -api_instance = CyberSource::InstrumentIdentifierApi.new - -profile_id = "profile_id_example" # String | The id of a profile containing user specific TMS configuration. - -opts = { - body: CyberSource::Body.new # Body | Please specify either a Card or Bank Account. -} - -begin - #Create an Instrument Identifier - result = api_instance.instrumentidentifiers_post(profile_id, opts) - p result -rescue CyberSource::ApiError => e - puts "Exception when calling InstrumentIdentifierApi->instrumentidentifiers_post: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **profile_id** | **String**| The id of a profile containing user specific TMS configuration. | - **body** | [**Body**](Body.md)| Please specify either a Card or Bank Account. | [optional] - -### Return type - -[**InlineResponse2007**](InlineResponse2007.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **instrumentidentifiers_token_id_delete** -> instrumentidentifiers_token_id_delete(profile_id, token_id) +# **tms_v1_instrumentidentifiers_token_id_delete** +> tms_v1_instrumentidentifiers_token_id_delete(profile_id, token_id) Delete an Instrument Identifier ### Example ```ruby # load the gem -require 'cyberSource_client' +require 'cybersource_rest_client' api_instance = CyberSource::InstrumentIdentifierApi.new @@ -79,9 +28,9 @@ token_id = "token_id_example" # String | The TokenId of an Instrument Identifier begin #Delete an Instrument Identifier - api_instance.instrumentidentifiers_token_id_delete(profile_id, token_id) + api_instance.tms_v1_instrumentidentifiers_token_id_delete(profile_id, token_id) rescue CyberSource::ApiError => e - puts "Exception when calling InstrumentIdentifierApi->instrumentidentifiers_token_id_delete: #{e}" + puts "Exception when calling InstrumentIdentifierApi->tms_v1_instrumentidentifiers_token_id_delete: #{e}" end ``` @@ -102,20 +51,20 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 -# **instrumentidentifiers_token_id_get** -> InlineResponse2007 instrumentidentifiers_token_id_get(profile_id, token_id) +# **tms_v1_instrumentidentifiers_token_id_get** +> InlineResponse20010 tms_v1_instrumentidentifiers_token_id_get(profile_id, token_id) Retrieve an Instrument Identifier ### Example ```ruby # load the gem -require 'cyberSource_client' +require 'cybersource_rest_client' api_instance = CyberSource::InstrumentIdentifierApi.new @@ -126,10 +75,10 @@ token_id = "token_id_example" # String | The TokenId of an Instrument Identifier begin #Retrieve an Instrument Identifier - result = api_instance.instrumentidentifiers_token_id_get(profile_id, token_id) + result = api_instance.tms_v1_instrumentidentifiers_token_id_get(profile_id, token_id) p result rescue CyberSource::ApiError => e - puts "Exception when calling InstrumentIdentifierApi->instrumentidentifiers_token_id_get: #{e}" + puts "Exception when calling InstrumentIdentifierApi->tms_v1_instrumentidentifiers_token_id_get: #{e}" end ``` @@ -142,7 +91,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2007**](InlineResponse2007.md) +[**InlineResponse20010**](InlineResponse20010.md) ### Authorization @@ -150,89 +99,36 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 -# **instrumentidentifiers_token_id_patch** -> InlineResponse2007 instrumentidentifiers_token_id_patch(profile_id, token_id, body) +# **tms_v1_instrumentidentifiers_token_id_patch** +> InlineResponse20010 tms_v1_instrumentidentifiers_token_id_patch(profile_id, token_id, body) Update a Instrument Identifier ### Example ```ruby # load the gem -require 'cyberSource_client' +require 'cybersource_rest_client' api_instance = CyberSource::InstrumentIdentifierApi.new profile_id = "profile_id_example" # String | The id of a profile containing user specific TMS configuration. -token_id = "token_id_example" # String | The TokenId of an Instrument Identifier +token_id = "token_id_example" # String | The TokenId of an Instrument Identifier. body = CyberSource::Body1.new # Body1 | Please specify the previous transaction Id to update. begin #Update a Instrument Identifier - result = api_instance.instrumentidentifiers_token_id_patch(profile_id, token_id, body) + result = api_instance.tms_v1_instrumentidentifiers_token_id_patch(profile_id, token_id, body) p result rescue CyberSource::ApiError => e - puts "Exception when calling InstrumentIdentifierApi->instrumentidentifiers_token_id_patch: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **profile_id** | **String**| The id of a profile containing user specific TMS configuration. | - **token_id** | **String**| The TokenId of an Instrument Identifier | - **body** | [**Body1**](Body1.md)| Please specify the previous transaction Id to update. | - -### Return type - -[**InlineResponse2007**](InlineResponse2007.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **instrumentidentifiers_token_id_paymentinstruments_get** -> InlineResponse2008 instrumentidentifiers_token_id_paymentinstruments_get(profile_id, token_id, opts) - -Retrieve all Payment Instruments associated with an Instrument Identifier - -### Example -```ruby -# load the gem -require 'cyberSource_client' - -api_instance = CyberSource::InstrumentIdentifierApi.new - -profile_id = "profile_id_example" # String | The id of a profile containing user specific TMS configuration. - -token_id = "token_id_example" # String | The TokenId of an Instrument Identifier. - -opts = { - offset: "offset_example", # String | Starting Payment Instrument record in zero-based dataset that should be returned as the first object in the array. Default is 0. - limit: "20" # String | 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. -} - -begin - #Retrieve all Payment Instruments associated with an Instrument Identifier - result = api_instance.instrumentidentifiers_token_id_paymentinstruments_get(profile_id, token_id, opts) - p result -rescue CyberSource::ApiError => e - puts "Exception when calling InstrumentIdentifierApi->instrumentidentifiers_token_id_paymentinstruments_get: #{e}" + puts "Exception when calling InstrumentIdentifierApi->tms_v1_instrumentidentifiers_token_id_patch: #{e}" end ``` @@ -242,12 +138,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **profile_id** | **String**| The id of a profile containing user specific TMS configuration. | **token_id** | **String**| The TokenId of an Instrument Identifier. | - **offset** | **String**| Starting Payment Instrument record in zero-based dataset that should be returned as the first object in the array. Default is 0. | [optional] - **limit** | **String**| 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. | [optional] [default to 20] + **body** | [**Body1**](Body1.md)| Please specify the previous transaction Id to update. | ### Return type -[**InlineResponse2008**](InlineResponse2008.md) +[**InlineResponse20010**](InlineResponse20010.md) ### Authorization @@ -255,8 +150,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 diff --git a/docs/InstrumentIdentifiersApi.md b/docs/InstrumentIdentifiersApi.md new file mode 100644 index 00000000..da012ad7 --- /dev/null +++ b/docs/InstrumentIdentifiersApi.md @@ -0,0 +1,57 @@ +# CyberSource::InstrumentIdentifiersApi + +All URIs are relative to *https://apitest.cybersource.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**tms_v1_instrumentidentifiers_post**](InstrumentIdentifiersApi.md#tms_v1_instrumentidentifiers_post) | **POST** /tms/v1/instrumentidentifiers | Create an Instrument Identifier + + +# **tms_v1_instrumentidentifiers_post** +> InlineResponse20010 tms_v1_instrumentidentifiers_post(profile_id, body) + +Create an Instrument Identifier + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::InstrumentIdentifiersApi.new + +profile_id = "profile_id_example" # String | The id of a profile containing user specific TMS configuration. + +body = CyberSource::Body.new # Body | Please specify either a Card or Bank Account. + + +begin + #Create an Instrument Identifier + result = api_instance.tms_v1_instrumentidentifiers_post(profile_id, body) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling InstrumentIdentifiersApi->tms_v1_instrumentidentifiers_post: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **profile_id** | **String**| The id of a profile containing user specific TMS configuration. | + **body** | [**Body**](Body.md)| Please specify either a Card or Bank Account. | + +### Return type + +[**InlineResponse20010**](InlineResponse20010.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 + + + diff --git a/docs/InstrumentidentifiersBankAccount.md b/docs/InstrumentidentifiersBankAccount.md deleted file mode 100644 index e04655ed..00000000 --- a/docs/InstrumentidentifiersBankAccount.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InstrumentidentifiersBankAccount - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**number** | **String** | Bank account number. | [optional] -**routing_number** | **String** | Routing number. | [optional] - - diff --git a/docs/InstrumentidentifiersCard.md b/docs/InstrumentidentifiersCard.md deleted file mode 100644 index 80b5a623..00000000 --- a/docs/InstrumentidentifiersCard.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InstrumentidentifiersCard - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**number** | **String** | Credit card number (PAN). | [optional] - - diff --git a/docs/InstrumentidentifiersDetails.md b/docs/InstrumentidentifiersDetails.md deleted file mode 100644 index d65ec05d..00000000 --- a/docs/InstrumentidentifiersDetails.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::InstrumentidentifiersDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The name of the field that threw the error. | [optional] -**location** | **String** | The location of the field that threw the error. | [optional] - - diff --git a/docs/InstrumentidentifiersLinks.md b/docs/InstrumentidentifiersLinks.md deleted file mode 100644 index 8c676627..00000000 --- a/docs/InstrumentidentifiersLinks.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::InstrumentidentifiersLinks - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_self** | [**InstrumentidentifiersLinksSelf**](InstrumentidentifiersLinksSelf.md) | | [optional] -**ancestor** | [**InstrumentidentifiersLinksSelf**](InstrumentidentifiersLinksSelf.md) | | [optional] -**successor** | [**InstrumentidentifiersLinksSelf**](InstrumentidentifiersLinksSelf.md) | | [optional] - - diff --git a/docs/InstrumentidentifiersLinksSelf.md b/docs/InstrumentidentifiersLinksSelf.md deleted file mode 100644 index be1db4e6..00000000 --- a/docs/InstrumentidentifiersLinksSelf.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InstrumentidentifiersLinksSelf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**href** | **String** | | [optional] - - diff --git a/docs/InstrumentidentifiersMetadata.md b/docs/InstrumentidentifiersMetadata.md deleted file mode 100644 index 91ce3cd5..00000000 --- a/docs/InstrumentidentifiersMetadata.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InstrumentidentifiersMetadata - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**creator** | **String** | The creator of the token. | [optional] - - diff --git a/docs/InstrumentidentifiersProcessingInformation.md b/docs/InstrumentidentifiersProcessingInformation.md deleted file mode 100644 index ca3d86cd..00000000 --- a/docs/InstrumentidentifiersProcessingInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InstrumentidentifiersProcessingInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**authorization_options** | [**InstrumentidentifiersProcessingInformationAuthorizationOptions**](InstrumentidentifiersProcessingInformationAuthorizationOptions.md) | | [optional] - - diff --git a/docs/InstrumentidentifiersProcessingInformationAuthorizationOptions.md b/docs/InstrumentidentifiersProcessingInformationAuthorizationOptions.md deleted file mode 100644 index cde55c8b..00000000 --- a/docs/InstrumentidentifiersProcessingInformationAuthorizationOptions.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InstrumentidentifiersProcessingInformationAuthorizationOptions - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**initiator** | [**InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiator**](InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.md) | | [optional] - - diff --git a/docs/InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.md b/docs/InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.md deleted file mode 100644 index c08353cc..00000000 --- a/docs/InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiator - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**merchant_initiated_transaction** | [**InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction**](InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md) | | [optional] - - diff --git a/docs/InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md b/docs/InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md deleted file mode 100644 index b082e594..00000000 --- a/docs/InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**previous_transaction_id** | **String** | Previous Consumer Initiated Transaction Id. | [optional] - - diff --git a/docs/KeyGenerationApi.md b/docs/KeyGenerationApi.md index f2a736ee..3c5f87f5 100644 --- a/docs/KeyGenerationApi.md +++ b/docs/KeyGenerationApi.md @@ -1,14 +1,14 @@ # CyberSource::KeyGenerationApi -All URIs are relative to *https://api.cybersource.com* +All URIs are relative to *https://apitest.cybersource.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**generate_public_key**](KeyGenerationApi.md#generate_public_key) | **POST** /payments/flex/v1/keys/ | Generate Key +[**generate_public_key**](KeyGenerationApi.md#generate_public_key) | **POST** /flex/v1/keys/ | Generate Key # **generate_public_key** -> InlineResponse200 generate_public_key(generate_public_key_request) +> InlineResponse200 generate_public_key(opts) Generate Key @@ -17,16 +17,17 @@ Generate a one-time use public key and key ID to encrypt the card number in the ### Example ```ruby # load the gem -require 'cyberSource_client' +require 'cybersource_rest_client' api_instance = CyberSource::KeyGenerationApi.new -generate_public_key_request = CyberSource::GeneratePublicKeyRequest.new # GeneratePublicKeyRequest | - +opts = { + generate_public_key_request: CyberSource::GeneratePublicKeyRequest.new # GeneratePublicKeyRequest | +} begin #Generate Key - result = api_instance.generate_public_key(generate_public_key_request) + result = api_instance.generate_public_key(opts) p result rescue CyberSource::ApiError => e puts "Exception when calling KeyGenerationApi->generate_public_key: #{e}" @@ -37,7 +38,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **generate_public_key_request** | [**GeneratePublicKeyRequest**](GeneratePublicKeyRequest.md)| | + **generate_public_key_request** | [**GeneratePublicKeyRequest**](GeneratePublicKeyRequest.md)| | [optional] ### Return type @@ -49,7 +50,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json;charset=utf-8 - **Accept**: application/json diff --git a/docs/NotificationOfChangesApi.md b/docs/NotificationOfChangesApi.md new file mode 100644 index 00000000..922a1150 --- /dev/null +++ b/docs/NotificationOfChangesApi.md @@ -0,0 +1,59 @@ +# CyberSource::NotificationOfChangesApi + +All URIs are relative to *https://apitest.cybersource.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_notification_of_change_report**](NotificationOfChangesApi.md#get_notification_of_change_report) | **GET** /reporting/v3/notification-of-changes | Get Notification Of Changes + + +# **get_notification_of_change_report** +> InlineResponse2003 get_notification_of_change_report(start_time, end_time) + +Get Notification Of Changes + +Notification of Change Report + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::NotificationOfChangesApi.new + +start_time = DateTime.parse("2013-10-20T19:20:30+01:00") # DateTime | 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 + +end_time = DateTime.parse("2013-10-20T19:20:30+01:00") # DateTime | 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 + + +begin + #Get Notification Of Changes + result = api_instance.get_notification_of_change_report(start_time, end_time) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling NotificationOfChangesApi->get_notification_of_change_report: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start_time** | **DateTime**| 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 | + **end_time** | **DateTime**| 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 | + +### Return type + +[**InlineResponse2003**](InlineResponse2003.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/hal+json + + + diff --git a/docs/OctCreatePaymentRequest.md b/docs/OctCreatePaymentRequest.md index 35794cca..e01b9e56 100644 --- a/docs/OctCreatePaymentRequest.md +++ b/docs/OctCreatePaymentRequest.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **client_reference_information** | [**InlineResponse201ClientReferenceInformation**](InlineResponse201ClientReferenceInformation.md) | | [optional] -**order_information** | [**V2payoutsOrderInformation**](V2payoutsOrderInformation.md) | | [optional] -**merchant_information** | [**V2payoutsMerchantInformation**](V2payoutsMerchantInformation.md) | | [optional] -**recipient_information** | [**V2payoutsRecipientInformation**](V2payoutsRecipientInformation.md) | | [optional] -**sender_information** | [**V2payoutsSenderInformation**](V2payoutsSenderInformation.md) | | [optional] -**processing_information** | [**V2payoutsProcessingInformation**](V2payoutsProcessingInformation.md) | | [optional] -**payment_information** | [**V2payoutsPaymentInformation**](V2payoutsPaymentInformation.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/PaymentApi.md b/docs/PaymentApi.md deleted file mode 100644 index ae23b928..00000000 --- a/docs/PaymentApi.md +++ /dev/null @@ -1,104 +0,0 @@ -# CyberSource::PaymentApi - -All URIs are relative to *https://api.cybersource.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_payment**](PaymentApi.md#create_payment) | **POST** /v2/payments/ | Process a Payment -[**get_payment**](PaymentApi.md#get_payment) | **GET** /v2/payments/{id} | Retrieve a Payment - - -# **create_payment** -> InlineResponse201 create_payment(create_payment_request) - -Process a Payment - -Authorize the payment for the transaction. - -### Example -```ruby -# load the gem -require 'cyberSource_client' - -api_instance = CyberSource::PaymentApi.new - -create_payment_request = CyberSource::CreatePaymentRequest.new # CreatePaymentRequest | - - -begin - #Process a Payment - result = api_instance.create_payment(create_payment_request) - p result -rescue CyberSource::ApiError => e - puts "Exception when calling PaymentApi->create_payment: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_payment_request** | [**CreatePaymentRequest**](CreatePaymentRequest.md)| | - -### Return type - -[**InlineResponse201**](InlineResponse201.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **get_payment** -> InlineResponse2002 get_payment(id) - -Retrieve a Payment - -Include the payment ID in the GET request to retrieve the payment details. - -### Example -```ruby -# load the gem -require 'cyberSource_client' - -api_instance = CyberSource::PaymentApi.new - -id = "id_example" # String | The payment ID returned from a previous payment request. - - -begin - #Retrieve a Payment - result = api_instance.get_payment(id) - p result -rescue CyberSource::ApiError => e - puts "Exception when calling PaymentApi->get_payment: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The payment ID returned from a previous payment request. | - -### Return type - -[**InlineResponse2002**](InlineResponse2002.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - diff --git a/docs/PaymentInstrumentApi.md b/docs/PaymentInstrumentApi.md deleted file mode 100644 index 167c9752..00000000 --- a/docs/PaymentInstrumentApi.md +++ /dev/null @@ -1,206 +0,0 @@ -# CyberSource::PaymentInstrumentApi - -All URIs are relative to *https://api.cybersource.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**paymentinstruments_post**](PaymentInstrumentApi.md#paymentinstruments_post) | **POST** /paymentinstruments | Create a Payment Instrument -[**paymentinstruments_token_id_delete**](PaymentInstrumentApi.md#paymentinstruments_token_id_delete) | **DELETE** /paymentinstruments/{tokenId} | Delete a Payment Instrument -[**paymentinstruments_token_id_get**](PaymentInstrumentApi.md#paymentinstruments_token_id_get) | **GET** /paymentinstruments/{tokenId} | Retrieve a Payment Instrument -[**paymentinstruments_token_id_patch**](PaymentInstrumentApi.md#paymentinstruments_token_id_patch) | **PATCH** /paymentinstruments/{tokenId} | Update a Payment Instrument - - -# **paymentinstruments_post** -> InlineResponse2016 paymentinstruments_post(profile_id, body) - -Create a Payment Instrument - -### Example -```ruby -# load the gem -require 'cyberSource_client' - -api_instance = CyberSource::PaymentInstrumentApi.new - -profile_id = "profile_id_example" # String | The id of a profile containing user specific TMS configuration. - -body = CyberSource::Body2.new # Body2 | Please specify the customers payment details for card or bank account. - - -begin - #Create a Payment Instrument - result = api_instance.paymentinstruments_post(profile_id, body) - p result -rescue CyberSource::ApiError => e - puts "Exception when calling PaymentInstrumentApi->paymentinstruments_post: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **profile_id** | **String**| The id of a profile containing user specific TMS configuration. | - **body** | [**Body2**](Body2.md)| Please specify the customers payment details for card or bank account. | - -### Return type - -[**InlineResponse2016**](InlineResponse2016.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **paymentinstruments_token_id_delete** -> paymentinstruments_token_id_delete(profile_id, token_id) - -Delete a Payment Instrument - -### Example -```ruby -# load the gem -require 'cyberSource_client' - -api_instance = CyberSource::PaymentInstrumentApi.new - -profile_id = "profile_id_example" # String | The id of a profile containing user specific TMS configuration. - -token_id = "token_id_example" # String | The TokenId of a Payment Instrument. - - -begin - #Delete a Payment Instrument - api_instance.paymentinstruments_token_id_delete(profile_id, token_id) -rescue CyberSource::ApiError => e - puts "Exception when calling PaymentInstrumentApi->paymentinstruments_token_id_delete: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **profile_id** | **String**| The id of a profile containing user specific TMS configuration. | - **token_id** | **String**| The TokenId of a Payment Instrument. | - -### Return type - -nil (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **paymentinstruments_token_id_get** -> InlineResponse2016 paymentinstruments_token_id_get(profile_id, token_id) - -Retrieve a Payment Instrument - -### Example -```ruby -# load the gem -require 'cyberSource_client' - -api_instance = CyberSource::PaymentInstrumentApi.new - -profile_id = "profile_id_example" # String | The id of a profile containing user specific TMS configuration. - -token_id = "token_id_example" # String | The TokenId of a Payment Instrument. - - -begin - #Retrieve a Payment Instrument - result = api_instance.paymentinstruments_token_id_get(profile_id, token_id) - p result -rescue CyberSource::ApiError => e - puts "Exception when calling PaymentInstrumentApi->paymentinstruments_token_id_get: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **profile_id** | **String**| The id of a profile containing user specific TMS configuration. | - **token_id** | **String**| The TokenId of a Payment Instrument. | - -### Return type - -[**InlineResponse2016**](InlineResponse2016.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **paymentinstruments_token_id_patch** -> InlineResponse2016 paymentinstruments_token_id_patch(profile_id, token_id, body) - -Update a Payment Instrument - -### Example -```ruby -# load the gem -require 'cyberSource_client' - -api_instance = CyberSource::PaymentInstrumentApi.new - -profile_id = "profile_id_example" # String | The id of a profile containing user specific TMS configuration. - -token_id = "token_id_example" # String | The TokenId of a Payment Instrument. - -body = CyberSource::Body3.new # Body3 | Please specify the customers payment details. - - -begin - #Update a Payment Instrument - result = api_instance.paymentinstruments_token_id_patch(profile_id, token_id, body) - p result -rescue CyberSource::ApiError => e - puts "Exception when calling PaymentInstrumentApi->paymentinstruments_token_id_patch: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **profile_id** | **String**| The id of a profile containing user specific TMS configuration. | - **token_id** | **String**| The TokenId of a Payment Instrument. | - **body** | [**Body3**](Body3.md)| Please specify the customers payment details. | - -### Return type - -[**InlineResponse2016**](InlineResponse2016.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - diff --git a/docs/PaymentInstrumentsApi.md b/docs/PaymentInstrumentsApi.md new file mode 100644 index 00000000..f600de44 --- /dev/null +++ b/docs/PaymentInstrumentsApi.md @@ -0,0 +1,261 @@ +# CyberSource::PaymentInstrumentsApi + +All URIs are relative to *https://apitest.cybersource.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**tms_v1_instrumentidentifiers_token_id_paymentinstruments_get**](PaymentInstrumentsApi.md#tms_v1_instrumentidentifiers_token_id_paymentinstruments_get) | **GET** /tms/v1/instrumentidentifiers/{tokenId}/paymentinstruments | Retrieve all Payment Instruments associated with an Instrument Identifier +[**tms_v1_paymentinstruments_post**](PaymentInstrumentsApi.md#tms_v1_paymentinstruments_post) | **POST** /tms/v1/paymentinstruments | Create a Payment Instrument +[**tms_v1_paymentinstruments_token_id_delete**](PaymentInstrumentsApi.md#tms_v1_paymentinstruments_token_id_delete) | **DELETE** /tms/v1/paymentinstruments/{tokenId} | Delete a Payment Instrument +[**tms_v1_paymentinstruments_token_id_get**](PaymentInstrumentsApi.md#tms_v1_paymentinstruments_token_id_get) | **GET** /tms/v1/paymentinstruments/{tokenId} | Retrieve a Payment Instrument +[**tms_v1_paymentinstruments_token_id_patch**](PaymentInstrumentsApi.md#tms_v1_paymentinstruments_token_id_patch) | **PATCH** /tms/v1/paymentinstruments/{tokenId} | Update a Payment Instrument + + +# **tms_v1_instrumentidentifiers_token_id_paymentinstruments_get** +> InlineResponse20011 tms_v1_instrumentidentifiers_token_id_paymentinstruments_get(profile_id, token_id, opts) + +Retrieve all Payment Instruments associated with an Instrument Identifier + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::PaymentInstrumentsApi.new + +profile_id = "profile_id_example" # String | The id of a profile containing user specific TMS configuration. + +token_id = "token_id_example" # String | The TokenId of an Instrument Identifier. + +opts = { + offset: "offset_example", # String | Starting Payment Instrument record in zero-based dataset that should be returned as the first object in the array. Default is 0. + limit: "20" # String | 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. +} + +begin + #Retrieve all Payment Instruments associated with an Instrument Identifier + result = api_instance.tms_v1_instrumentidentifiers_token_id_paymentinstruments_get(profile_id, token_id, opts) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling PaymentInstrumentsApi->tms_v1_instrumentidentifiers_token_id_paymentinstruments_get: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **profile_id** | **String**| The id of a profile containing user specific TMS configuration. | + **token_id** | **String**| The TokenId of an Instrument Identifier. | + **offset** | **String**| Starting Payment Instrument record in zero-based dataset that should be returned as the first object in the array. Default is 0. | [optional] + **limit** | **String**| 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. | [optional] [default to 20] + +### Return type + +[**InlineResponse20011**](InlineResponse20011.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 + + + +# **tms_v1_paymentinstruments_post** +> InlineResponse2016 tms_v1_paymentinstruments_post(profile_id, body) + +Create a Payment Instrument + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::PaymentInstrumentsApi.new + +profile_id = "profile_id_example" # String | The id of a profile containing user specific TMS configuration. + +body = CyberSource::Body2.new # Body2 | Please specify the customers payment details for card or bank account. + + +begin + #Create a Payment Instrument + result = api_instance.tms_v1_paymentinstruments_post(profile_id, body) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling PaymentInstrumentsApi->tms_v1_paymentinstruments_post: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **profile_id** | **String**| The id of a profile containing user specific TMS configuration. | + **body** | [**Body2**](Body2.md)| Please specify the customers payment details for card or bank account. | + +### Return type + +[**InlineResponse2016**](InlineResponse2016.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 + + + +# **tms_v1_paymentinstruments_token_id_delete** +> tms_v1_paymentinstruments_token_id_delete(profile_id, token_id) + +Delete a Payment Instrument + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::PaymentInstrumentsApi.new + +profile_id = "profile_id_example" # String | The id of a profile containing user specific TMS configuration. + +token_id = "token_id_example" # String | The TokenId of a Payment Instrument. + + +begin + #Delete a Payment Instrument + api_instance.tms_v1_paymentinstruments_token_id_delete(profile_id, token_id) +rescue CyberSource::ApiError => e + puts "Exception when calling PaymentInstrumentsApi->tms_v1_paymentinstruments_token_id_delete: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **profile_id** | **String**| The id of a profile containing user specific TMS configuration. | + **token_id** | **String**| The TokenId of a Payment Instrument. | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 + + + +# **tms_v1_paymentinstruments_token_id_get** +> InlineResponse2016 tms_v1_paymentinstruments_token_id_get(profile_id, token_id) + +Retrieve a Payment Instrument + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::PaymentInstrumentsApi.new + +profile_id = "profile_id_example" # String | The id of a profile containing user specific TMS configuration. + +token_id = "token_id_example" # String | The TokenId of a Payment Instrument. + + +begin + #Retrieve a Payment Instrument + result = api_instance.tms_v1_paymentinstruments_token_id_get(profile_id, token_id) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling PaymentInstrumentsApi->tms_v1_paymentinstruments_token_id_get: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **profile_id** | **String**| The id of a profile containing user specific TMS configuration. | + **token_id** | **String**| The TokenId of a Payment Instrument. | + +### Return type + +[**InlineResponse2016**](InlineResponse2016.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 + + + +# **tms_v1_paymentinstruments_token_id_patch** +> InlineResponse2016 tms_v1_paymentinstruments_token_id_patch(profile_id, token_id, body) + +Update a Payment Instrument + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::PaymentInstrumentsApi.new + +profile_id = "profile_id_example" # String | The id of a profile containing user specific TMS configuration. + +token_id = "token_id_example" # String | The TokenId of a Payment Instrument. + +body = CyberSource::Body3.new # Body3 | Please specify the customers payment details. + + +begin + #Update a Payment Instrument + result = api_instance.tms_v1_paymentinstruments_token_id_patch(profile_id, token_id, body) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling PaymentInstrumentsApi->tms_v1_paymentinstruments_token_id_patch: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **profile_id** | **String**| The id of a profile containing user specific TMS configuration. | + **token_id** | **String**| The TokenId of a Payment Instrument. | + **body** | [**Body3**](Body3.md)| Please specify the customers payment details. | + +### Return type + +[**InlineResponse2016**](InlineResponse2016.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 + + + diff --git a/docs/PaymentinstrumentsBankAccount.md b/docs/PaymentinstrumentsBankAccount.md deleted file mode 100644 index feaf81bd..00000000 --- a/docs/PaymentinstrumentsBankAccount.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::PaymentinstrumentsBankAccount - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | Type of Bank Account. | [optional] - - diff --git a/docs/PaymentinstrumentsBillTo.md b/docs/PaymentinstrumentsBillTo.md deleted file mode 100644 index 14c74eb3..00000000 --- a/docs/PaymentinstrumentsBillTo.md +++ /dev/null @@ -1,18 +0,0 @@ -# CyberSource::PaymentinstrumentsBillTo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**first_name** | **String** | Bill to First Name. | [optional] -**last_name** | **String** | Bill to Last Name. | [optional] -**company** | **String** | Bill to Company. | [optional] -**address1** | **String** | Bill to Address Line 1. | [optional] -**address2** | **String** | Bill to Address Line 2. | [optional] -**locality** | **String** | Bill to City. | [optional] -**administrative_area** | **String** | Bill to State. | [optional] -**postal_code** | **String** | Bill to Postal Code. | [optional] -**country** | **String** | Bill to Country. Accepts input in the ISO 3166-1 standard, stores as ISO 3166-1-Alpha-2 | [optional] -**email** | **String** | Valid Bill to Email. | [optional] -**phone_number** | **String** | Bill to Phone Number. | [optional] - - diff --git a/docs/PaymentinstrumentsBuyerInformation.md b/docs/PaymentinstrumentsBuyerInformation.md deleted file mode 100644 index ac0d342c..00000000 --- a/docs/PaymentinstrumentsBuyerInformation.md +++ /dev/null @@ -1,11 +0,0 @@ -# CyberSource::PaymentinstrumentsBuyerInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**company_tax_id** | **String** | Company Tax ID. | [optional] -**currency** | **String** | Currency. Accepts input in the ISO 4217 standard, stores as ISO 4217 Alpha | [optional] -**date_o_birth** | **String** | Date of birth YYYY-MM-DD. | [optional] -**personal_identification** | [**Array<PaymentinstrumentsBuyerInformationPersonalIdentification>**](PaymentinstrumentsBuyerInformationPersonalIdentification.md) | | [optional] - - diff --git a/docs/PaymentinstrumentsBuyerInformationIssuedBy.md b/docs/PaymentinstrumentsBuyerInformationIssuedBy.md deleted file mode 100644 index 17c4386d..00000000 --- a/docs/PaymentinstrumentsBuyerInformationIssuedBy.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::PaymentinstrumentsBuyerInformationIssuedBy - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**administrative_area** | **String** | State or province where the identification was issued. | [optional] - - diff --git a/docs/PaymentinstrumentsBuyerInformationPersonalIdentification.md b/docs/PaymentinstrumentsBuyerInformationPersonalIdentification.md deleted file mode 100644 index bb5f1f0e..00000000 --- a/docs/PaymentinstrumentsBuyerInformationPersonalIdentification.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::PaymentinstrumentsBuyerInformationPersonalIdentification - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | Identification Number. | [optional] -**type** | **String** | Type of personal identification. | [optional] -**issued_by** | [**PaymentinstrumentsBuyerInformationIssuedBy**](PaymentinstrumentsBuyerInformationIssuedBy.md) | | [optional] - - diff --git a/docs/PaymentinstrumentsCard.md b/docs/PaymentinstrumentsCard.md deleted file mode 100644 index 8240e601..00000000 --- a/docs/PaymentinstrumentsCard.md +++ /dev/null @@ -1,14 +0,0 @@ -# CyberSource::PaymentinstrumentsCard - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**expiration_month** | **String** | Credit card expiration month. | [optional] -**expiration_year** | **String** | Credit card expiration year. | [optional] -**type** | **String** | Credit card brand. | [optional] -**issue_number** | **String** | Credit card issue number. | [optional] -**start_month** | **String** | Credit card start month. | [optional] -**start_year** | **String** | Credit card start year. | [optional] -**use_as** | **String** | Card Use As Field. Supported value of \"pinless debit\" only. Only for use with Pinless Debit tokens. | [optional] - - diff --git a/docs/PaymentinstrumentsInstrumentIdentifier.md b/docs/PaymentinstrumentsInstrumentIdentifier.md deleted file mode 100644 index e4cb2e04..00000000 --- a/docs/PaymentinstrumentsInstrumentIdentifier.md +++ /dev/null @@ -1,15 +0,0 @@ -# CyberSource::PaymentinstrumentsInstrumentIdentifier - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_links** | [**InstrumentidentifiersLinks**](InstrumentidentifiersLinks.md) | | [optional] -**object** | **String** | Describes type of token. For example: customer, paymentInstrument or instrumentIdentifier. | [optional] -**state** | **String** | Current state of the token. | [optional] -**id** | **String** | The id of the existing instrument identifier to be linked to the newly created payment instrument. | [optional] -**card** | [**InstrumentidentifiersCard**](InstrumentidentifiersCard.md) | | [optional] -**bank_account** | [**InstrumentidentifiersBankAccount**](InstrumentidentifiersBankAccount.md) | | [optional] -**processing_information** | [**InstrumentidentifiersProcessingInformation**](InstrumentidentifiersProcessingInformation.md) | | [optional] -**metadata** | [**InstrumentidentifiersMetadata**](InstrumentidentifiersMetadata.md) | | [optional] - - diff --git a/docs/PaymentinstrumentsMerchantInformation.md b/docs/PaymentinstrumentsMerchantInformation.md deleted file mode 100644 index 957136aa..00000000 --- a/docs/PaymentinstrumentsMerchantInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::PaymentinstrumentsMerchantInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**merchant_descriptor** | [**PaymentinstrumentsMerchantInformationMerchantDescriptor**](PaymentinstrumentsMerchantInformationMerchantDescriptor.md) | | [optional] - - diff --git a/docs/PaymentinstrumentsMerchantInformationMerchantDescriptor.md b/docs/PaymentinstrumentsMerchantInformationMerchantDescriptor.md deleted file mode 100644 index a8f4137e..00000000 --- a/docs/PaymentinstrumentsMerchantInformationMerchantDescriptor.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::PaymentinstrumentsMerchantInformationMerchantDescriptor - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**alternate_name** | **String** | Alternate information for your business. This API field overrides the company entry description value in your CyberSource account. | [optional] - - diff --git a/docs/PaymentinstrumentsProcessingInformation.md b/docs/PaymentinstrumentsProcessingInformation.md deleted file mode 100644 index 25a9ce31..00000000 --- a/docs/PaymentinstrumentsProcessingInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::PaymentinstrumentsProcessingInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bill_payment_program_enabled** | **BOOLEAN** | Bill Payment Program Enabled. | [optional] -**bank_transfer_options** | [**PaymentinstrumentsProcessingInformationBankTransferOptions**](PaymentinstrumentsProcessingInformationBankTransferOptions.md) | | [optional] - - diff --git a/docs/PaymentinstrumentsProcessingInformationBankTransferOptions.md b/docs/PaymentinstrumentsProcessingInformationBankTransferOptions.md deleted file mode 100644 index c95ffd6e..00000000 --- a/docs/PaymentinstrumentsProcessingInformationBankTransferOptions.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::PaymentinstrumentsProcessingInformationBankTransferOptions - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sec_code** | **String** | Authorization method used for the transaction.(acceptable values are CCD, PPD, TEL, WEB). | [optional] - - diff --git a/docs/PaymentsApi.md b/docs/PaymentsApi.md new file mode 100644 index 00000000..871ca840 --- /dev/null +++ b/docs/PaymentsApi.md @@ -0,0 +1,56 @@ +# CyberSource::PaymentsApi + +All URIs are relative to *https://apitest.cybersource.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_payment**](PaymentsApi.md#create_payment) | **POST** /pts/v2/payments/ | Process a Payment + + +# **create_payment** +> InlineResponse201 create_payment(create_payment_request) + +Process a Payment + +Authorize the payment for the transaction. + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::PaymentsApi.new + +create_payment_request = CyberSource::CreatePaymentRequest.new # CreatePaymentRequest | + + +begin + #Process a Payment + result = api_instance.create_payment(create_payment_request) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling PaymentsApi->create_payment: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_payment_request** | [**CreatePaymentRequest**](CreatePaymentRequest.md)| | + +### Return type + +[**InlineResponse201**](InlineResponse201.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 + + + diff --git a/docs/Paymentsflexv1tokensCardInfo.md b/docs/Paymentsflexv1tokensCardInfo.md deleted file mode 100644 index 0668b9d5..00000000 --- a/docs/Paymentsflexv1tokensCardInfo.md +++ /dev/null @@ -1,11 +0,0 @@ -# CyberSource::Paymentsflexv1tokensCardInfo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**card_number** | **String** | Encrypted or plain text card number. If the encryption type of “None” was used in the Generate Key request, this value can be set to the plaintext card number/Personal Account Number (PAN). If the encryption type of RsaOaep256 was used in the Generate Key request, this value needs to be the RSA OAEP 256 encrypted card number. The card number should be encrypted on the cardholders’ device. The [WebCrypto API] (https://github.com/CyberSource/cybersource-flex-samples/blob/master/java/spring-boot/src/main/resources/public/flex.js) can be used with the JWK obtained in the Generate Key request. | [optional] -**card_expiration_month** | **String** | Two digit expiration month | [optional] -**card_expiration_year** | **String** | Four digit expiration year | [optional] -**card_type** | **String** | Card Type. This field is required. Refer to the CyberSource Credit Card Services documentation for supported card types. | [optional] - - diff --git a/docs/ProcessAPayoutApi.md b/docs/ProcessAPayoutApi.md new file mode 100644 index 00000000..a07d5e29 --- /dev/null +++ b/docs/ProcessAPayoutApi.md @@ -0,0 +1,55 @@ +# CyberSource::ProcessAPayoutApi + +All URIs are relative to *https://apitest.cybersource.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**oct_create_payment**](ProcessAPayoutApi.md#oct_create_payment) | **POST** /pts/v2/payouts/ | Process a Payout + + +# **oct_create_payment** +> oct_create_payment(oct_create_payment_request) + +Process a Payout + +Send funds from a selected funding source to a designated credit/debit card account or a prepaid card using an Original Credit Transaction (OCT). + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::ProcessAPayoutApi.new + +oct_create_payment_request = CyberSource::OctCreatePaymentRequest.new # OctCreatePaymentRequest | + + +begin + #Process a Payout + api_instance.oct_create_payment(oct_create_payment_request) +rescue CyberSource::ApiError => e + puts "Exception when calling ProcessAPayoutApi->oct_create_payment: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oct_create_payment_request** | [**OctCreatePaymentRequest**](OctCreatePaymentRequest.md)| | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 + + + diff --git a/docs/Ptsv2creditsPointOfSaleInformation.md b/docs/Ptsv2creditsPointOfSaleInformation.md new file mode 100644 index 00000000..a70eef65 --- /dev/null +++ b/docs/Ptsv2creditsPointOfSaleInformation.md @@ -0,0 +1,8 @@ +# CyberSource::Ptsv2creditsPointOfSaleInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emv** | [**Ptsv2creditsPointOfSaleInformationEmv**](Ptsv2creditsPointOfSaleInformationEmv.md) | | [optional] + + diff --git a/docs/Ptsv2creditsPointOfSaleInformationEmv.md b/docs/Ptsv2creditsPointOfSaleInformationEmv.md new file mode 100644 index 00000000..57564c74 --- /dev/null +++ b/docs/Ptsv2creditsPointOfSaleInformationEmv.md @@ -0,0 +1,10 @@ +# CyberSource::Ptsv2creditsPointOfSaleInformationEmv + +## 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] +**fallback** | **BOOLEAN** | Indicates whether a fallback method was used to enter credit card information into the POS terminal. When a technical problem prevents a successful exchange of information between a chip card and a chip-capable terminal: 1. Swipe the card or key the credit card information into the POS terminal. 2. Use the pos_entry_mode field to indicate whether the information was swiped or keyed. This field is supported only on **Chase Paymentech Solutions** and **GPN**. | [optional] [default to false] +**fallback_condition** | **Float** | Reason for the EMV fallback transaction. An EMV fallback transaction occurs when an EMV transaction fails for one of these reasons: - Technical failure: the EMV terminal or EMV card cannot read and process chip data. - Empty candidate list failure: the EMV terminal does not have any applications in common with the EMV card. EMV terminals are coded to determine whether the terminal and EMV card have any applications in common. EMV terminals provide this information to you. Possible values: - **1**: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal either used information from a successful chip read or it was not a chip transaction. - **2**: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal was an EMV fallback transaction because the attempted chip read was unsuccessful. This field is supported only on **GPN**. | [optional] + + diff --git a/docs/Ptsv2creditsProcessingInformation.md b/docs/Ptsv2creditsProcessingInformation.md new file mode 100644 index 00000000..999bd126 --- /dev/null +++ b/docs/Ptsv2creditsProcessingInformation.md @@ -0,0 +1,16 @@ +# CyberSource::Ptsv2creditsProcessingInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] +**processor_id** | **String** | Value that identifies the processor/acquirer to use for the transaction. This value is supported only for **CyberSource through VisaNet**. | [optional] +**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] +**reconciliation_id** | **String** | Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). | [optional] +**link_id** | **String** | Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. | [optional] +**report_group** | **String** | Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. | [optional] +**visa_checkout_id** | **String** | Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. | [optional] +**purchase_level** | **String** | Set this field to 3 to indicate that the request includes Level III data. | [optional] +**recurring_options** | [**Ptsv2paymentsidrefundsProcessingInformationRecurringOptions**](Ptsv2paymentsidrefundsProcessingInformationRecurringOptions.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsAggregatorInformation.md b/docs/Ptsv2paymentsAggregatorInformation.md new file mode 100644 index 00000000..ef31f2cc --- /dev/null +++ b/docs/Ptsv2paymentsAggregatorInformation.md @@ -0,0 +1,10 @@ +# CyberSource::Ptsv2paymentsAggregatorInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aggregator_id** | **String** | Value that identifies you as a payment aggregator. Get this value from the processor. For processor-specific information, see the aggregator_id field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**name** | **String** | Your payment aggregator business name. For processor-specific information, see the aggregator_name field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**sub_merchant** | [**Ptsv2paymentsAggregatorInformationSubMerchant**](Ptsv2paymentsAggregatorInformationSubMerchant.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsAggregatorInformationSubMerchant.md b/docs/Ptsv2paymentsAggregatorInformationSubMerchant.md new file mode 100644 index 00000000..26525a14 --- /dev/null +++ b/docs/Ptsv2paymentsAggregatorInformationSubMerchant.md @@ -0,0 +1,17 @@ +# CyberSource::Ptsv2paymentsAggregatorInformationSubMerchant + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**card_acceptor_id** | **String** | Unique identifier assigned by the payment card company to the sub-merchant. | [optional] +**name** | **String** | Sub-merchant’s business name. | [optional] +**address1** | **String** | First line of the sub-merchant’s street address. | [optional] +**locality** | **String** | Sub-merchant’s city. | [optional] +**administrative_area** | **String** | Sub-merchant’s state or province. Use the State, Province, and Territory Codes for the United States and Canada. | [optional] +**region** | **String** | Sub-merchant’s region. Example `NE` indicates that the sub-merchant is in the northeast region. | [optional] +**postal_code** | **String** | Partial postal code for the sub-merchant’s address. | [optional] +**country** | **String** | Sub-merchant’s country. Use the two-character ISO Standard Country Codes. | [optional] +**email** | **String** | Sub-merchant’s email address. **Maximum length for processors** - American Express Direct: 40 - CyberSource through VisaNet: 40 - FDC Compass: 40 - FDC Nashville Global: 19 | [optional] +**phone_number** | **String** | Sub-merchant’s telephone number. **Maximum length for procesors** - American Express Direct: 20 - CyberSource through VisaNet: 20 - FDC Compass: 13 - FDC Nashville Global: 10 | [optional] + + diff --git a/docs/Ptsv2paymentsBuyerInformation.md b/docs/Ptsv2paymentsBuyerInformation.md new file mode 100644 index 00000000..e2fafacc --- /dev/null +++ b/docs/Ptsv2paymentsBuyerInformation.md @@ -0,0 +1,12 @@ +# CyberSource::Ptsv2paymentsBuyerInformation + +## 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] +**date_of_birth** | **String** | Recipient’s date of birth. **Format**: `YYYYMMDD`. This field is a pass-through, which means that CyberSource ensures that the value is eight numeric characters but otherwise does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. | [optional] +**vat_registration_number** | **String** | Customer’s government-assigned tax identification number. For processor-specific information, see the purchaser_vat_registration_number 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] +**personal_identification** | [**Array<Ptsv2paymentsBuyerInformationPersonalIdentification>**](Ptsv2paymentsBuyerInformationPersonalIdentification.md) | | [optional] +**hashed_password** | **String** | TODO | [optional] + + diff --git a/docs/Ptsv2paymentsBuyerInformationPersonalIdentification.md b/docs/Ptsv2paymentsBuyerInformationPersonalIdentification.md new file mode 100644 index 00000000..9e98a8f2 --- /dev/null +++ b/docs/Ptsv2paymentsBuyerInformationPersonalIdentification.md @@ -0,0 +1,10 @@ +# CyberSource::Ptsv2paymentsBuyerInformationPersonalIdentification + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**id** | **String** | Personal Identifier for the customer based on various type. This field is supported only on the processors listed in this description. For processor-specific information, see the personal_id field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**issued_by** | **String** | Description of this field is not available. | [optional] + + diff --git a/docs/Ptsv2paymentsClientReferenceInformation.md b/docs/Ptsv2paymentsClientReferenceInformation.md new file mode 100644 index 00000000..fc1ad632 --- /dev/null +++ b/docs/Ptsv2paymentsClientReferenceInformation.md @@ -0,0 +1,10 @@ +# CyberSource::Ptsv2paymentsClientReferenceInformation + +## 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] +**transaction_id** | **String** | Identifier that you assign to the transaction. See \"Merchant-Initiated Reversals and Voids,\" page 176 | [optional] +**comments** | **String** | Comments | [optional] + + diff --git a/docs/Ptsv2paymentsConsumerAuthenticationInformation.md b/docs/Ptsv2paymentsConsumerAuthenticationInformation.md new file mode 100644 index 00000000..1b971b8c --- /dev/null +++ b/docs/Ptsv2paymentsConsumerAuthenticationInformation.md @@ -0,0 +1,15 @@ +# CyberSource::Ptsv2paymentsConsumerAuthenticationInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cavv** | **String** | Cardholder authentication verification value (CAVV). | [optional] +**cavv_algorithm** | **String** | Algorithm used to generate the CAVV for Verified by Visa or the UCAF authentication data for Mastercard SecureCode. | [optional] +**eci_raw** | **String** | Raw electronic commerce indicator (ECI). | [optional] +**pares_status** | **String** | Payer authentication response status. | [optional] +**veres_enrolled** | **String** | Verification response enrollment status. | [optional] +**xid** | **String** | Transaction identifier. | [optional] +**ucaf_authentication_data** | **String** | Universal cardholder authentication field (UCAF) data. | [optional] +**ucaf_collection_indicator** | **String** | Universal cardholder authentication field (UCAF) collection indicator. | [optional] + + diff --git a/docs/Ptsv2paymentsDeviceInformation.md b/docs/Ptsv2paymentsDeviceInformation.md new file mode 100644 index 00000000..32f09dde --- /dev/null +++ b/docs/Ptsv2paymentsDeviceInformation.md @@ -0,0 +1,10 @@ +# CyberSource::Ptsv2paymentsDeviceInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**host_name** | **String** | DNS resolved hostname from above _ipAddress_. | [optional] +**ip_address** | **String** | IP address of the customer. | [optional] +**user_agent** | **String** | Customer’s browser as identified from the HTTP header data. For example, Mozilla is the value that identifies the Netscape browser. | [optional] + + diff --git a/docs/Ptsv2paymentsMerchantDefinedInformation.md b/docs/Ptsv2paymentsMerchantDefinedInformation.md new file mode 100644 index 00000000..0829026c --- /dev/null +++ b/docs/Ptsv2paymentsMerchantDefinedInformation.md @@ -0,0 +1,9 @@ +# CyberSource::Ptsv2paymentsMerchantDefinedInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **String** | Description of this field is not available. | [optional] +**value** | **String** | Description of this field is not available. | [optional] + + diff --git a/docs/Ptsv2paymentsMerchantInformation.md b/docs/Ptsv2paymentsMerchantInformation.md new file mode 100644 index 00000000..beddb601 --- /dev/null +++ b/docs/Ptsv2paymentsMerchantInformation.md @@ -0,0 +1,13 @@ +# CyberSource::Ptsv2paymentsMerchantInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**merchant_descriptor** | [**Ptsv2paymentsMerchantInformationMerchantDescriptor**](Ptsv2paymentsMerchantInformationMerchantDescriptor.md) | | [optional] +**sales_organization_id** | **String** | Company ID assigned to an independent sales organization. Get this value from Mastercard. For processor-specific information, see the sales_organization_ID field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**category_code** | **Integer** | Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**vat_registration_number** | **String** | Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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] +**card_acceptor_reference_number** | **String** | Reference number that facilitates card acceptor/corporation communication and record keeping. For processor-specific information, see the card_acceptor_ref_number 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] +**transaction_local_date_time** | **String** | Local date and time at your physical location. Include both the date and time in this field or leave it blank. This field is supported only for **CyberSource through VisaNet**. For processor-specific information, see the transaction_local_date_time field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) `Format: YYYYMMDDhhmmss`, where: - YYYY = year - MM = month - DD = day - hh = hour - mm = minutes - ss = seconds | [optional] + + diff --git a/docs/Ptsv2paymentsMerchantInformationMerchantDescriptor.md b/docs/Ptsv2paymentsMerchantInformationMerchantDescriptor.md new file mode 100644 index 00000000..ce079afd --- /dev/null +++ b/docs/Ptsv2paymentsMerchantInformationMerchantDescriptor.md @@ -0,0 +1,15 @@ +# CyberSource::Ptsv2paymentsMerchantInformationMerchantDescriptor + +## 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] +**alternate_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) | [optional] +**contact** | **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) * FDCCompass (13) * Paymentech (13) | [optional] +**address1** | **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) | [optional] +**locality** | **String** | Merchant City. 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) | [optional] +**country** | **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) | [optional] +**postal_code** | **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) | [optional] +**administrative_area** | **String** | Merchant State. 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) | [optional] + + diff --git a/docs/Ptsv2paymentsOrderInformation.md b/docs/Ptsv2paymentsOrderInformation.md new file mode 100644 index 00000000..d2a6477b --- /dev/null +++ b/docs/Ptsv2paymentsOrderInformation.md @@ -0,0 +1,13 @@ +# CyberSource::Ptsv2paymentsOrderInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount_details** | [**Ptsv2paymentsOrderInformationAmountDetails**](Ptsv2paymentsOrderInformationAmountDetails.md) | | [optional] +**bill_to** | [**Ptsv2paymentsOrderInformationBillTo**](Ptsv2paymentsOrderInformationBillTo.md) | | [optional] +**ship_to** | [**Ptsv2paymentsOrderInformationShipTo**](Ptsv2paymentsOrderInformationShipTo.md) | | [optional] +**line_items** | [**Array<Ptsv2paymentsOrderInformationLineItems>**](Ptsv2paymentsOrderInformationLineItems.md) | | [optional] +**invoice_details** | [**Ptsv2paymentsOrderInformationInvoiceDetails**](Ptsv2paymentsOrderInformationInvoiceDetails.md) | | [optional] +**shipping_details** | [**Ptsv2paymentsOrderInformationShippingDetails**](Ptsv2paymentsOrderInformationShippingDetails.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsOrderInformationAmountDetails.md b/docs/Ptsv2paymentsOrderInformationAmountDetails.md new file mode 100644 index 00000000..b5ea9b94 --- /dev/null +++ b/docs/Ptsv2paymentsOrderInformationAmountDetails.md @@ -0,0 +1,26 @@ +# CyberSource::Ptsv2paymentsOrderInformationAmountDetails + +## 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] +**discount_amount** | **String** | Total discount amount applied to the order. For processor-specific information, see the order_discount_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] +**duty_amount** | **String** | Total charges for any import or export duties included in the order. For processor-specific information, see the duty_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] +**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] +**national_tax_included** | **String** | Flag that indicates whether a national tax is included in the order total. Possible values: - **0**: national tax not included - **1**: national tax included For processor-specific information, see the national_tax_indicator 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] +**tax_applied_after_discount** | **String** | Flag that indicates how the merchant manages discounts. Possible values: - **0**: no invoice level discount included - **1**: tax calculated on the postdiscount invoice total - **2**: tax calculated on the prediscount invoice total For processor-specific information, see the order_discount_management_indicator 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] +**tax_applied_level** | **String** | Flag that indicates how you calculate tax. Possible values: - **0**: net prices with tax calculated at line item level - **1**: net prices with tax calculated at invoice level - **2**: gross prices with tax provided at line item level - **3**: gross prices with tax provided at invoice level - **4**: no tax applies on the invoice for the transaction For processor-specific information, see the tax_management_indicator 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] +**tax_type_code** | **String** | For tax amounts that can be categorized as one tax type. This field contains the tax type code that corresponds to the entry in the _lineItems.taxAmount_ field. Possible values: - **056**: sales tax (U.S only) - **TX~**: all taxes (Canada only) Note ~ = space. For processor-specific information, see the total_tax_type_code 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] +**freight_amount** | **String** | Total freight or shipping and handling charges for the order. When you include this field in your request, you must also include the **totalAmount** field. For processor-specific information, see the freight_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] +**foreign_amount** | **String** | Converted amount returned by the DCC service. For processor-specific information, see the foreign_amount field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**foreign_currency** | **String** | Billing currency returned by the DCC service. For processor-specific information, see the foreign_currency field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**exchange_rate** | **String** | Exchange rate returned by the DCC service. Includes a decimal point and a maximum of 4 decimal places. For processor-specific information, see the exchange_rate field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**exchange_rate_time_stamp** | **String** | Time stamp for the exchange rate. This value is returned by the DCC service. Format: `YYYYMMDD~HH:MM` where ~ denotes a space. For processor-specific information, see the exchange_rate_timestamp field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**surcharge** | [**Ptsv2paymentsOrderInformationAmountDetailsSurcharge**](Ptsv2paymentsOrderInformationAmountDetailsSurcharge.md) | | [optional] +**settlement_amount** | **String** | This is a multicurrency field. It contains the transaction amount (field 4), converted to the Currency used to bill the cardholder’s account. | [optional] +**settlement_currency** | **String** | This is a multicurrency-only field. It contains a 3-digit numeric code that identifies the currency used by the issuer to bill the cardholder's account. | [optional] +**amex_additional_amounts** | [**Array<Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts>**](Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts.md) | | [optional] +**tax_details** | [**Array<Ptsv2paymentsOrderInformationAmountDetailsTaxDetails>**](Ptsv2paymentsOrderInformationAmountDetailsTaxDetails.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts.md b/docs/Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts.md new file mode 100644 index 00000000..b27994ba --- /dev/null +++ b/docs/Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts.md @@ -0,0 +1,9 @@ +# CyberSource::Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **String** | Additional amount type. This field is supported only for **American Express Direct**. For processor-specific information, see the additional_amount_type field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**amount** | **String** | Additional amount. This field is supported only for **American Express Direct**. For processor-specific information, see the additional_amount 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/Ptsv2paymentsOrderInformationAmountDetailsSurcharge.md b/docs/Ptsv2paymentsOrderInformationAmountDetailsSurcharge.md new file mode 100644 index 00000000..91416607 --- /dev/null +++ b/docs/Ptsv2paymentsOrderInformationAmountDetailsSurcharge.md @@ -0,0 +1,9 @@ +# CyberSource::Ptsv2paymentsOrderInformationAmountDetailsSurcharge + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **String** | The surcharge amount is included in the total transaction amount but is passed in a separate field to the issuer and acquirer for tracking. The issuer can provide information about the surcharge amount to the customer. - Applicable only for CTV for Payouts. - CTV (<= 08) For processor-specific information, see the surcharge_amount field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**description** | **String** | Description of this field is not available. | [optional] + + diff --git a/docs/Ptsv2paymentsOrderInformationAmountDetailsTaxDetails.md b/docs/Ptsv2paymentsOrderInformationAmountDetailsTaxDetails.md new file mode 100644 index 00000000..9e60e215 --- /dev/null +++ b/docs/Ptsv2paymentsOrderInformationAmountDetailsTaxDetails.md @@ -0,0 +1,13 @@ +# CyberSource::Ptsv2paymentsOrderInformationAmountDetailsTaxDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | This is used to determine what type of tax related data should be inclued under _taxDetails_ object. | [optional] +**amount** | **String** | Please see below table for related decription based on above _type_ field. | type | amount description | |-----------|--------------------| | alternate | Total amount of alternate tax for the order. | | local | Sales tax for the order. | | national | National tax for the order. | | vat | Total amount of VAT or other tax included in the order. | | [optional] +**rate** | **String** | Rate of VAT or other tax for the order. Example 0.040 (=4%) Valid range: 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated) | [optional] +**code** | **String** | Type of tax being applied to the item. Possible values: Below values are used by **RBS WorldPay Atlanta**, **FDC Nashville Global**, **Litle** - 0000: unknown tax type - 0001: federal/national sales tax - 0002: state sales tax - 0003: city sales tax - 0004: local sales tax - 0005: municipal sales tax - 0006: other tax - 0010: value-added tax - 0011: goods and services tax - 0012: provincial sales tax - 0013: harmonized sales tax - 0014: Quebec sales tax (QST) - 0020: room tax - 0021: occupancy tax - 0022: energy tax - Blank: Tax not supported on line item. | [optional] +**tax_id** | **String** | Your tax ID number to use for the alternate tax amount. Required if you set alternate tax amount to any value, including zero. You may send this field without sending alternate tax amount. | [optional] +**applied** | **BOOLEAN** | The tax is applied. Valid value is `true` or `false`. | [optional] + + diff --git a/docs/Ptsv2paymentsOrderInformationBillTo.md b/docs/Ptsv2paymentsOrderInformationBillTo.md new file mode 100644 index 00000000..ad4a205b --- /dev/null +++ b/docs/Ptsv2paymentsOrderInformationBillTo.md @@ -0,0 +1,24 @@ +# CyberSource::Ptsv2paymentsOrderInformationBillTo + +## 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] +**middle_name** | **String** | Customer’s middle name. | [optional] +**name_suffix** | **String** | Customer’s name suffix. | [optional] +**title** | **String** | Title. | [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] +**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] +**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] +**district** | **String** | Customer’s neighborhood, community, or region (a barrio in Brazil) within the city or municipality. This field is available only on **Cielo**. | [optional] +**building_number** | **String** | Building number in the street address. This field is supported only for: - Cielo transactions. - Redecard customer validation with CyberSource Latin American Processing. | [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] +**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] +**phone_type** | **String** | Customer's phone number type. For Payouts: This field may be sent only for FDC Compass. Possible Values - * day * home * night * work | [optional] + + diff --git a/docs/Ptsv2paymentsOrderInformationInvoiceDetails.md b/docs/Ptsv2paymentsOrderInformationInvoiceDetails.md new file mode 100644 index 00000000..8a1b9fa8 --- /dev/null +++ b/docs/Ptsv2paymentsOrderInformationInvoiceDetails.md @@ -0,0 +1,18 @@ +# CyberSource::Ptsv2paymentsOrderInformationInvoiceDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invoice_number** | **String** | Invoice Number. | [optional] +**barcode_number** | **String** | Barcode Number. | [optional] +**expiration_date** | **String** | Expiration Date. | [optional] +**purchase_order_number** | **String** | Value used by your customer to identify the order. This value is typically a purchase order number. CyberSource recommends that you do not populate the field with all zeros or nines. For processor-specific information, see the user_po 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] +**purchase_order_date** | **String** | Date the order was processed. `Format: YYYY-MM-DD`. For processor-specific information, see the purchaser_order_date 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] +**purchase_contact_name** | **String** | The name of the individual or the company contacted for company authorized purchases. For processor-specific information, see the authorized_contact_name 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] +**taxable** | **BOOLEAN** | Flag that indicates whether an order is taxable. This value must be true if the sum of all _lineItems[].taxAmount_ values > 0. If you do not include any _lineItems[].taxAmount_ values in your request, CyberSource does not include _invoiceDetails.taxable_ in the data it sends to the processor. For processor-specific information, see the tax_indicator 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] +**vat_invoice_reference_number** | **String** | VAT invoice number associated with the transaction. For processor-specific information, see the vat_invoice_ref_number 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] +**commodity_code** | **String** | International description code of the overall order’s goods or services or the Categorizes purchases for VAT reporting. Contact your acquirer for a list of codes. For processor-specific information, see the summary_commodity_code 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] +**merchandise_code** | **Float** | Identifier for the merchandise. Possible value: - 1000: Gift card This field is supported only for **American Express Direct**. | [optional] +**transaction_advice_addendum** | [**Array<Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum>**](Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum.md b/docs/Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum.md new file mode 100644 index 00000000..4780c487 --- /dev/null +++ b/docs/Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum.md @@ -0,0 +1,8 @@ +# CyberSource::Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **String** | Four Transaction Advice Addendum (TAA) fields. These fields are used to display descriptive information about a transaction on the customer’s American Express card statement. When you send TAA fields, start with amexdata_taa1, then ...taa2, and so on. Skipping a TAA field causes subsequent TAA fields to be ignored. To use these fields, contact CyberSource Customer Support to have your account enabled for this feature. | [optional] + + diff --git a/docs/Ptsv2paymentsOrderInformationLineItems.md b/docs/Ptsv2paymentsOrderInformationLineItems.md new file mode 100644 index 00000000..a4fcc0c9 --- /dev/null +++ b/docs/Ptsv2paymentsOrderInformationLineItems.md @@ -0,0 +1,28 @@ +# CyberSource::Ptsv2paymentsOrderInformationLineItems + +## 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] +**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] +**unit_of_measure** | **String** | Unit of measure, or unit of measure code, for the item. | [optional] +**total_amount** | **String** | Total amount for the item. Normally calculated as the unit price x quantity. | [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] +**tax_rate** | **String** | Tax rate applied to the item. See \"Numbered Elements,\" page 14. Visa: Valid range is 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated). Mastercard: Valid range is 0.00001 to 0.99999 (0.001% to 99.999%). | [optional] +**tax_applied_after_discount** | **String** | Flag to indicate how you handle discount at the line item level. - 0: no line level discount provided - 1: tax was calculated on the post-discount line item total - 2: tax was calculated on the pre-discount line item total `Note` Visa will inset 0 (zero) if an invalid value is included in this field. This field relates to the value in the _lineItems[].discountAmount_ field. | [optional] +**tax_status_indicator** | **String** | Flag to indicate whether tax is exempted or not included. - 0: tax not included - 1: tax included - 2: transaction is not subject to tax | [optional] +**tax_type_code** | **String** | Type of tax being applied to the item. Possible values: Below values are used by **RBS WorldPay Atlanta**, **FDC Nashville Global**, **Litle** - 0000: unknown tax type - 0001: federal/national sales tax - 0002: state sales tax - 0003: city sales tax - 0004: local sales tax - 0005: municipal sales tax - 0006: other tax - 0010: value-added tax - 0011: goods and services tax - 0012: provincial sales tax - 0013: harmonized sales tax - 0014: Quebec sales tax (QST) - 0020: room tax - 0021: occupancy tax - 0022: energy tax - Blank: Tax not supported on line item. | [optional] +**amount_includes_tax** | **BOOLEAN** | Flag that indicates whether the tax amount is included in the Line Item Total. | [optional] +**type_of_supply** | **String** | Flag to indicate whether the purchase is categorized as goods or services. Possible values: - 00: goods - 01: services | [optional] +**commodity_code** | **String** | Commodity code or International description code used to classify the item. Contact your acquirer for a list of codes. | [optional] +**discount_amount** | **String** | Discount applied to the item. | [optional] +**discount_applied** | **BOOLEAN** | Flag that indicates whether the amount is discounted. If you do not provide a value but you set Discount Amount to a value greater than zero, then CyberSource sets this field to **true**. | [optional] +**discount_rate** | **String** | Rate the item is discounted. Maximum of 2 decimal places. Example 5.25 (=5.25%) | [optional] +**invoice_number** | **String** | Field to support an invoice number for a transaction. You must specify the number of line items that will include an invoice number. By default, the first line item will include an invoice number field. The invoice number field can be included for up to 10 line items. | [optional] +**tax_details** | [**Array<Ptsv2paymentsOrderInformationAmountDetailsTaxDetails>**](Ptsv2paymentsOrderInformationAmountDetailsTaxDetails.md) | | [optional] +**fulfillment_type** | **String** | TODO | [optional] + + diff --git a/docs/Ptsv2paymentsOrderInformationShipTo.md b/docs/Ptsv2paymentsOrderInformationShipTo.md new file mode 100644 index 00000000..f57631df --- /dev/null +++ b/docs/Ptsv2paymentsOrderInformationShipTo.md @@ -0,0 +1,19 @@ +# CyberSource::Ptsv2paymentsOrderInformationShipTo + +## 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] +**country** | **String** | Country of the shipping address. Use the two character ISO Standard Country Codes. | [optional] +**district** | **String** | Neighborhood, community, or region within a city or municipality. | [optional] +**building_number** | **String** | Building number in the street address. For example, the building number is 187 in the following address: Rua da Quitanda 187 | [optional] +**phone_number** | **String** | Phone number for the shipping address. | [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] + + diff --git a/docs/Ptsv2paymentsOrderInformationShippingDetails.md b/docs/Ptsv2paymentsOrderInformationShippingDetails.md new file mode 100644 index 00000000..b3366817 --- /dev/null +++ b/docs/Ptsv2paymentsOrderInformationShippingDetails.md @@ -0,0 +1,10 @@ +# CyberSource::Ptsv2paymentsOrderInformationShippingDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**gift_wrap** | **BOOLEAN** | Description of 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] +**ship_from_postal_code** | **String** | Postal code for the address from which the goods are shipped, which is used to establish nexus. The default is the postal code associated with your CyberSource account. 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 This field is frequently used for Level II and Level III transactions. | [optional] + + diff --git a/docs/Ptsv2paymentsPaymentInformation.md b/docs/Ptsv2paymentsPaymentInformation.md new file mode 100644 index 00000000..d4142a6b --- /dev/null +++ b/docs/Ptsv2paymentsPaymentInformation.md @@ -0,0 +1,11 @@ +# CyberSource::Ptsv2paymentsPaymentInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**card** | [**Ptsv2paymentsPaymentInformationCard**](Ptsv2paymentsPaymentInformationCard.md) | | [optional] +**tokenized_card** | [**Ptsv2paymentsPaymentInformationTokenizedCard**](Ptsv2paymentsPaymentInformationTokenizedCard.md) | | [optional] +**fluid_data** | [**Ptsv2paymentsPaymentInformationFluidData**](Ptsv2paymentsPaymentInformationFluidData.md) | | [optional] +**customer** | [**Ptsv2paymentsPaymentInformationCustomer**](Ptsv2paymentsPaymentInformationCustomer.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsPaymentInformationCard.md b/docs/Ptsv2paymentsPaymentInformationCard.md new file mode 100644 index 00000000..c94cfba4 --- /dev/null +++ b/docs/Ptsv2paymentsPaymentInformationCard.md @@ -0,0 +1,19 @@ +# CyberSource::Ptsv2paymentsPaymentInformationCard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number** | **String** | Customer’s credit card number. Encoded Account Numbers when processing encoded account numbers, use this field for the encoded account number. For processor-specific information, see the customer_cc_number field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [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] +**type** | **String** | Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover | [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] +**source_account_type** | **String** | Flag that specifies the type of account associated with the card. The cardholder provides this information during the payment process. This field is required in the following cases. - Debit transactions on Cielo and Comercio Latino. - Transactions with Brazilian-issued cards on CyberSource through VisaNet. - Applicable only for CTV. **Note** Combo cards in Brazil contain credit and debit functionality in a single card. Visa systems use a credit bank identification number (BIN) for this type of card. Using the BIN to determine whether a card is debit or credit can cause transactions with these cards to be processed incorrectly. CyberSource strongly recommends that you include this field for combo card transactions. Possible values include the following. - CHECKING: Checking account - CREDIT: Credit card account - SAVING: Saving account - LINE_OF_CREDIT: Line of credit - PREPAID: Prepaid card account - UNIVERSAL: Universal account | [optional] +**security_code** | **String** | Card Verification Number. | [optional] +**security_code_indicator** | **String** | Flag that indicates whether a CVN code was sent. Possible values: - 0 (default): CVN service not requested. CyberSource uses this default value when you do not include _securityCode_ in the request. - 1 (default): CVN service requested and supported. CyberSource uses this default value when you include _securityCode_ in the request. - 2: CVN on credit card is illegible. - 9: CVN was not imprinted on credit card. | [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] +**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] +**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] + + diff --git a/docs/Ptsv2paymentsPaymentInformationCustomer.md b/docs/Ptsv2paymentsPaymentInformationCustomer.md new file mode 100644 index 00000000..8e2fc226 --- /dev/null +++ b/docs/Ptsv2paymentsPaymentInformationCustomer.md @@ -0,0 +1,8 @@ +# CyberSource::Ptsv2paymentsPaymentInformationCustomer + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **String** | Unique identifier for the customer's card and billing information. | [optional] + + diff --git a/docs/Ptsv2paymentsPaymentInformationFluidData.md b/docs/Ptsv2paymentsPaymentInformationFluidData.md new file mode 100644 index 00000000..ac07a5bc --- /dev/null +++ b/docs/Ptsv2paymentsPaymentInformationFluidData.md @@ -0,0 +1,11 @@ +# CyberSource::Ptsv2paymentsPaymentInformationFluidData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **String** | Description of this field is not available. | [optional] +**descriptor** | **String** | Format of the encrypted payment data. | [optional] +**value** | **String** | The encrypted payment data value. If using Apple Pay or Samsung Pay, the values are: - Apple Pay: RklEPUNPTU1PTi5BUFBMRS5JTkFQUC5QQVlNRU5U - Samsung Pay: RklEPUNPTU1PTi5TQU1TVU5HLklOQVBQLlBBWU1FTlQ= | [optional] +**encoding** | **String** | Encoding method used to encrypt the payment data. Possible value: Base64 | [optional] + + diff --git a/docs/Ptsv2paymentsPaymentInformationTokenizedCard.md b/docs/Ptsv2paymentsPaymentInformationTokenizedCard.md new file mode 100644 index 00000000..f5921627 --- /dev/null +++ b/docs/Ptsv2paymentsPaymentInformationTokenizedCard.md @@ -0,0 +1,17 @@ +# CyberSource::Ptsv2paymentsPaymentInformationTokenizedCard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number** | **String** | Customer’s payment network token value. | [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] +**type** | **String** | Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover | [optional] +**cryptogram** | **String** | This field is used internally. | [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] +**transaction_type** | **String** | Type of transaction that provided the token data. This value does not specify the token service provider; it specifies the entity that provided you with information about the token. Set the value for this field to 1. An application on the customer’s mobile device provided the token data. | [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] +**storage_method** | **String** | Type of technology used in the device to store token data. Possible values: - 001: Secure Element (SE) Smart card or memory with restricted access and encryption to prevent data tampering. For storing payment credentials, a SE is tested against a set of requirements defined by the payment networks. `Note` This field is supported only for **FDC Compass**. - 002: Host Card Emulation (HCE) Emulation of a smart card by using software to create a virtual and exact representation of the card. Sensitive data is stored in a database that is hosted in the cloud. For storing payment credentials, a database must meet very stringent security requirements that exceed PCI DSS. `Note` This field is supported only for **FDC Compass**. | [optional] +**security_code** | **String** | CVN. | [optional] + + diff --git a/docs/Ptsv2paymentsPointOfSaleInformation.md b/docs/Ptsv2paymentsPointOfSaleInformation.md new file mode 100644 index 00000000..f08bf4df --- /dev/null +++ b/docs/Ptsv2paymentsPointOfSaleInformation.md @@ -0,0 +1,19 @@ +# CyberSource::Ptsv2paymentsPointOfSaleInformation + +## 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** | Description of this field is not available. | [optional] +**lane_number** | **String** | Identifier for an alternate terminal at your retail location. You define the value for this field. This field is supported only for MasterCard transactions on FDC Nashville Global. Use the _terminalID_ field to identify the main terminal at your retail location. If your retail location has multiple terminals, use this _alternateTerminalID_ field to identify the terminal used for the transaction. This field is a pass-through, which means that CyberSource does not check the value or modify the value in any way before sending it to the processor. | [optional] +**card_present** | **BOOLEAN** | Indicates whether the card is present at the time of the transaction. Possible values: - **true**: Card is present. - **false**: Card is not present. | [optional] +**cat_level** | **Integer** | Type of cardholder-activated terminal. Possible values: - 1: Automated dispensing machine - 2: Self-service terminal - 3: Limited amount terminal - 4: In-flight commerce (IFC) terminal - 5: Radio frequency device - 6: Mobile acceptance terminal - 7: Electronic cash register - 8: E-commerce device at your location - 9: Terminal or cash register that uses a dialup connection to connect to the transaction processing network * Applicable only for CTV for Payouts. | [optional] +**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] +**pin_entry_capability** | **Integer** | A one-digit code that identifies the capability of terminal to capture PINs. This code does not necessarily mean that a PIN was entered or is included in this message. For Payouts: This field is applicable for CtV. | [optional] +**operating_environment** | **String** | Operating environment. Possible values: - 0: No terminal used or unknown environment. - 1: On merchant premises, attended. - 2: On merchant premises, unattended, or cardholder terminal. Examples: oil, kiosks, self-checkout, home computer, mobile telephone, personal digital assistant (PDA). Cardholder terminal is supported only for MasterCard transactions on **CyberSource through VisaNet**. - 3: Off merchant premises, attended. Examples: portable POS devices at trade shows, at service calls, or in taxis. - 4: Off merchant premises, unattended, or cardholder terminal. Examples: vending machines, home computer, mobile telephone, PDA. Cardholder terminal is supported only for MasterCard transactions on **CyberSource through VisaNet**. - 5: On premises of cardholder, unattended. - 9: Unknown delivery mode. - S: Electronic delivery of product. Examples: music, software, or eTickets that are downloaded over the internet. - T: Physical delivery of product. Examples: music or software that is delivered by mail or by a courier. This field is supported only for **American Express Direct** and **CyberSource through VisaNet**. **CyberSource through VisaNet** For MasterCard transactions, the only valid values are 2 and 4. | [optional] +**emv** | [**Ptsv2paymentsPointOfSaleInformationEmv**](Ptsv2paymentsPointOfSaleInformationEmv.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] +**track_data** | **String** | Card’s track 1 and 2 data. For all processors except FDMS Nashville, this value consists of one of the following: - Track 1 data - Track 2 data - Data for both tracks 1 and 2 For FDMS Nashville, this value consists of one of the following: - Track 1 data - Data for both tracks 1 and 2 Example: %B4111111111111111^SMITH/JOHN ^1612101976110000868000000?;4111111111111111=16121019761186800000? | [optional] + + diff --git a/docs/Ptsv2paymentsPointOfSaleInformationEmv.md b/docs/Ptsv2paymentsPointOfSaleInformationEmv.md new file mode 100644 index 00000000..4137b605 --- /dev/null +++ b/docs/Ptsv2paymentsPointOfSaleInformationEmv.md @@ -0,0 +1,12 @@ +# CyberSource::Ptsv2paymentsPointOfSaleInformationEmv + +## 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] +**cardholder_verification_method** | **Float** | Method that was used to verify the cardholder's identity. Possible values: - **0**: No verification - **1**: Signature This field is supported only on **American Express Direct**. | [optional] +**card_sequence_number** | **String** | Number assigned to a specific card when two or more cards are associated with the same primary account number. This value enables issuers to distinguish among multiple cards that are linked to the same account. This value can also act as a tracking tool when reissuing cards. When this value is available, it is provided by the chip reader. When the chip reader does not provide this value, do not include this field in your request. | [optional] +**fallback** | **BOOLEAN** | Indicates whether a fallback method was used to enter credit card information into the POS terminal. When a technical problem prevents a successful exchange of information between a chip card and a chip-capable terminal: 1. Swipe the card or key the credit card information into the POS terminal. 2. Use the pos_entry_mode field to indicate whether the information was swiped or keyed. This field is supported only on **Chase Paymentech Solutions** and **GPN**. | [optional] [default to false] +**fallback_condition** | **Float** | Reason for the EMV fallback transaction. An EMV fallback transaction occurs when an EMV transaction fails for one of these reasons: - Technical failure: the EMV terminal or EMV card cannot read and process chip data. - Empty candidate list failure: the EMV terminal does not have any applications in common with the EMV card. EMV terminals are coded to determine whether the terminal and EMV card have any applications in common. EMV terminals provide this information to you. Possible values: - **1**: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal either used information from a successful chip read or it was not a chip transaction. - **2**: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal was an EMV fallback transaction because the attempted chip read was unsuccessful. This field is supported only on **GPN**. | [optional] + + diff --git a/docs/Ptsv2paymentsProcessingInformation.md b/docs/Ptsv2paymentsProcessingInformation.md new file mode 100644 index 00000000..8caaafd7 --- /dev/null +++ b/docs/Ptsv2paymentsProcessingInformation.md @@ -0,0 +1,21 @@ +# CyberSource::Ptsv2paymentsProcessingInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**capture** | **BOOLEAN** | Flag that specifies whether to also include capture service in the submitted request or not. | [optional] [default to false] +**processor_id** | **String** | Value that identifies the processor/acquirer to use for the transaction. This value is supported only for **CyberSource through VisaNet**. | [optional] +**business_application_id** | **String** | Description of this field is not available. | [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] +**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] +**reconciliation_id** | **String** | Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). | [optional] +**link_id** | **String** | Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. | [optional] +**purchase_level** | **String** | Set this field to 3 to indicate that the request includes Level III data. | [optional] +**report_group** | **String** | Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. | [optional] +**visa_checkout_id** | **String** | Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. | [optional] +**issuer** | [**Ptsv2paymentsProcessingInformationIssuer**](Ptsv2paymentsProcessingInformationIssuer.md) | | [optional] +**authorization_options** | [**Ptsv2paymentsProcessingInformationAuthorizationOptions**](Ptsv2paymentsProcessingInformationAuthorizationOptions.md) | | [optional] +**capture_options** | [**Ptsv2paymentsProcessingInformationCaptureOptions**](Ptsv2paymentsProcessingInformationCaptureOptions.md) | | [optional] +**recurring_options** | [**Ptsv2paymentsProcessingInformationRecurringOptions**](Ptsv2paymentsProcessingInformationRecurringOptions.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsProcessingInformationAuthorizationOptions.md b/docs/Ptsv2paymentsProcessingInformationAuthorizationOptions.md new file mode 100644 index 00000000..3532d9f4 --- /dev/null +++ b/docs/Ptsv2paymentsProcessingInformationAuthorizationOptions.md @@ -0,0 +1,17 @@ +# CyberSource::Ptsv2paymentsProcessingInformationAuthorizationOptions + +## 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] +**verbal_auth_code** | **String** | Authorization code. **Forced Capture** Use this field to send the authorization code you received from a payment that you authorized outside the CyberSource system. **Verbal Authorization** Use this field in CAPTURE API to send the verbally received authorization code. For processor-specific information, see the auth_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**verbal_auth_transaction_id** | **String** | Transaction ID (TID). | [optional] +**auth_indicator** | **String** | Flag that specifies the purpose of the authorization. Possible values: - **0**: Preauthorization - **1**: Final authorization For processor-specific information, see the auth_indicator field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**partial_auth_indicator** | **BOOLEAN** | Flag that indicates whether the transaction is enabled for partial authorization or not. When your request includes this field, this value overrides the information in your CyberSource account. For processor-specific information, see the auth_partial_auth_indicator field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**balance_inquiry** | **BOOLEAN** | Flag that indicates whether to return balance information. | [optional] +**ignore_avs_result** | **BOOLEAN** | Flag that indicates whether to allow the capture service to run even when the payment receives an AVS decline. | [optional] [default to false] +**decline_avs_flags** | **Array<String>** | An array of AVS flags that cause the reply flag to be returned. `Important` To receive declines for the AVS code N, include the value N in the array. | [optional] +**ignore_cv_result** | **BOOLEAN** | Flag that indicates whether to allow the capture service to run even when the payment receives a CVN decline. | [optional] [default to false] +**initiator** | [**Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator**](Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator.md b/docs/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator.md new file mode 100644 index 00000000..f1d3684e --- /dev/null +++ b/docs/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator.md @@ -0,0 +1,11 @@ +# CyberSource::Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | This field indicates whether the transaction is a merchant-initiated transaction or customer-initiated transaction. | [optional] +**credential_stored_on_file** | **BOOLEAN** | Flag that indicates whether merchant is intend to use this transaction to store payment credential for follow-up merchant-initiated transactions or not. | [optional] +**stored_credential_used** | **BOOLEAN** | Flag that indicates whether merchant is intend to use this transaction to store payment credential for follow-up merchant-initiated transactions or not. | [optional] +**merchant_initiated_transaction** | [**Ptsv2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction**](Ptsv2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md b/docs/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md new file mode 100644 index 00000000..847fdaf6 --- /dev/null +++ b/docs/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md @@ -0,0 +1,9 @@ +# CyberSource::Ptsv2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason** | **String** | Reason for the merchant-initiated transaction. Possible values: - **1**: Resubmission - **2**: Delayed charge - **3**: Reauthorization for split shipment - **4**: No show - **5**: Account top up This field is not required for installment payments or recurring payments or when _reAuth.first_ is true. It is required for all other merchant-initiated transactions. This field is supported only for Visa transactions on CyberSource through VisaNet. | [optional] +**previous_transaction_id** | **String** | Transaction identifier that was returned in the payment response field _processorInformation.transactionID_ in the reply message for either the original merchant initiated payment in the series or the previous merchant-initiated payment in the series. <p/> If the current payment request includes a token instead of an account number, the following time limits apply for the value of this field: For a **resubmission**, the transaction ID must be less than 14 days old. For a **delayed charge** or **reauthorization**, the transaction ID must be less than 30 days old. The value for this field does not correspond to any data in the TC 33 capture file. This field is supported only for Visa transactions on CyberSource through VisaNet. | [optional] + + diff --git a/docs/Ptsv2paymentsProcessingInformationCaptureOptions.md b/docs/Ptsv2paymentsProcessingInformationCaptureOptions.md new file mode 100644 index 00000000..6521c326 --- /dev/null +++ b/docs/Ptsv2paymentsProcessingInformationCaptureOptions.md @@ -0,0 +1,10 @@ +# CyberSource::Ptsv2paymentsProcessingInformationCaptureOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**capture_sequence_number** | **Float** | Capture number when requesting multiple partial captures for one payment. Used along with _totalCaptureCount_ to track which capture is being processed. For example, the second of five captures would be passed to CyberSource as: - _captureSequenceNumber_ = 2, and - _totalCaptureCount_ = 5 | [optional] +**total_capture_count** | **Float** | Total number of captures when requesting multiple partial captures for one payment. Used along with _captureSequenceNumber_ which capture is being processed. For example, the second of five captures would be passed to CyberSource as: - _captureSequenceNumber_ = 2, and - _totalCaptureCount_ = 5 | [optional] +**date_to_capture** | **String** | Date on which you want the capture to occur. This field is supported only for **CyberSource through VisaNet**. `Format: MMDD` | [optional] + + diff --git a/docs/Ptsv2paymentsProcessingInformationIssuer.md b/docs/Ptsv2paymentsProcessingInformationIssuer.md new file mode 100644 index 00000000..b0802b4d --- /dev/null +++ b/docs/Ptsv2paymentsProcessingInformationIssuer.md @@ -0,0 +1,8 @@ +# CyberSource::Ptsv2paymentsProcessingInformationIssuer + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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/Ptsv2paymentsProcessingInformationRecurringOptions.md b/docs/Ptsv2paymentsProcessingInformationRecurringOptions.md new file mode 100644 index 00000000..3f9948c6 --- /dev/null +++ b/docs/Ptsv2paymentsProcessingInformationRecurringOptions.md @@ -0,0 +1,9 @@ +# CyberSource::Ptsv2paymentsProcessingInformationRecurringOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_payment** | **BOOLEAN** | Flag that indicates whether this is a payment towards an existing contractual loan. | [optional] [default to false] +**first_recurring_payment** | **BOOLEAN** | Flag that indicates whether this transaction is the first in a series of recurring payments. This field is supported only for **Atos**, **FDC Nashville Global**, and **OmniPay Direct**. | [optional] [default to false] + + diff --git a/docs/Ptsv2paymentsRecipientInformation.md b/docs/Ptsv2paymentsRecipientInformation.md new file mode 100644 index 00000000..bf10b7c7 --- /dev/null +++ b/docs/Ptsv2paymentsRecipientInformation.md @@ -0,0 +1,10 @@ +# CyberSource::Ptsv2paymentsRecipientInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_id** | **String** | Identifier for the recipient’s account. Use the first six digits and last four digits of the recipient’s account number. This field is a pass-through, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. | [optional] +**last_name** | **String** | Recipient’s last name. This field is a passthrough, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. | [optional] +**postal_code** | **String** | Partial postal code for the recipient’s address. For example, if the postal code is **NN5 7SG**, the value for this field should be the first part of the postal code: **NN5**. This field is a pass-through, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. | [optional] + + diff --git a/docs/Ptsv2paymentsidcapturesAggregatorInformation.md b/docs/Ptsv2paymentsidcapturesAggregatorInformation.md new file mode 100644 index 00000000..d08141b0 --- /dev/null +++ b/docs/Ptsv2paymentsidcapturesAggregatorInformation.md @@ -0,0 +1,10 @@ +# CyberSource::Ptsv2paymentsidcapturesAggregatorInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aggregator_id** | **String** | Value that identifies you as a payment aggregator. Get this value from the processor. For processor-specific information, see the aggregator_id field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**name** | **String** | Your payment aggregator business name. For processor-specific information, see the aggregator_name field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**sub_merchant** | [**Ptsv2paymentsidcapturesAggregatorInformationSubMerchant**](Ptsv2paymentsidcapturesAggregatorInformationSubMerchant.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsidcapturesAggregatorInformationSubMerchant.md b/docs/Ptsv2paymentsidcapturesAggregatorInformationSubMerchant.md new file mode 100644 index 00000000..c6e5e842 --- /dev/null +++ b/docs/Ptsv2paymentsidcapturesAggregatorInformationSubMerchant.md @@ -0,0 +1,15 @@ +# CyberSource::Ptsv2paymentsidcapturesAggregatorInformationSubMerchant + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Sub-merchant’s business name. | [optional] +**address1** | **String** | First line of the sub-merchant’s street address. | [optional] +**locality** | **String** | Sub-merchant’s city. | [optional] +**administrative_area** | **String** | Sub-merchant’s state or province. Use the State, Province, and Territory Codes for the United States and Canada. | [optional] +**postal_code** | **String** | Partial postal code for the sub-merchant’s address. | [optional] +**country** | **String** | Sub-merchant’s country. Use the two-character ISO Standard Country Codes. | [optional] +**email** | **String** | Sub-merchant’s email address. **Maximum length for processors** - American Express Direct: 40 - CyberSource through VisaNet: 40 - FDC Compass: 40 - FDC Nashville Global: 19 | [optional] +**phone_number** | **String** | Sub-merchant’s telephone number. **Maximum length for procesors** - American Express Direct: 20 - CyberSource through VisaNet: 20 - FDC Compass: 13 - FDC Nashville Global: 10 | [optional] + + diff --git a/docs/Ptsv2paymentsidcapturesBuyerInformation.md b/docs/Ptsv2paymentsidcapturesBuyerInformation.md new file mode 100644 index 00000000..5f49038d --- /dev/null +++ b/docs/Ptsv2paymentsidcapturesBuyerInformation.md @@ -0,0 +1,9 @@ +# CyberSource::Ptsv2paymentsidcapturesBuyerInformation + +## 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] +**vat_registration_number** | **String** | Customer’s government-assigned tax identification number. For processor-specific information, see the purchaser_vat_registration_number 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/Ptsv2paymentsidcapturesMerchantInformation.md b/docs/Ptsv2paymentsidcapturesMerchantInformation.md new file mode 100644 index 00000000..3989f26b --- /dev/null +++ b/docs/Ptsv2paymentsidcapturesMerchantInformation.md @@ -0,0 +1,11 @@ +# CyberSource::Ptsv2paymentsidcapturesMerchantInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**merchant_descriptor** | [**Ptsv2paymentsMerchantInformationMerchantDescriptor**](Ptsv2paymentsMerchantInformationMerchantDescriptor.md) | | [optional] +**card_acceptor_reference_number** | **String** | Reference number that facilitates card acceptor/corporation communication and record keeping. For processor-specific information, see the card_acceptor_ref_number 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] +**category_code** | **Integer** | Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**vat_registration_number** | **String** | Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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/Ptsv2paymentsidcapturesOrderInformation.md b/docs/Ptsv2paymentsidcapturesOrderInformation.md new file mode 100644 index 00000000..870be7bb --- /dev/null +++ b/docs/Ptsv2paymentsidcapturesOrderInformation.md @@ -0,0 +1,13 @@ +# CyberSource::Ptsv2paymentsidcapturesOrderInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount_details** | [**Ptsv2paymentsidcapturesOrderInformationAmountDetails**](Ptsv2paymentsidcapturesOrderInformationAmountDetails.md) | | [optional] +**bill_to** | [**Ptsv2paymentsidcapturesOrderInformationBillTo**](Ptsv2paymentsidcapturesOrderInformationBillTo.md) | | [optional] +**ship_to** | [**Ptsv2paymentsidcapturesOrderInformationShipTo**](Ptsv2paymentsidcapturesOrderInformationShipTo.md) | | [optional] +**line_items** | [**Array<Ptsv2paymentsOrderInformationLineItems>**](Ptsv2paymentsOrderInformationLineItems.md) | | [optional] +**invoice_details** | [**Ptsv2paymentsidcapturesOrderInformationInvoiceDetails**](Ptsv2paymentsidcapturesOrderInformationInvoiceDetails.md) | | [optional] +**shipping_details** | [**Ptsv2paymentsidcapturesOrderInformationShippingDetails**](Ptsv2paymentsidcapturesOrderInformationShippingDetails.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsidcapturesOrderInformationAmountDetails.md b/docs/Ptsv2paymentsidcapturesOrderInformationAmountDetails.md new file mode 100644 index 00000000..67888c3d --- /dev/null +++ b/docs/Ptsv2paymentsidcapturesOrderInformationAmountDetails.md @@ -0,0 +1,23 @@ +# CyberSource::Ptsv2paymentsidcapturesOrderInformationAmountDetails + +## 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] +**discount_amount** | **String** | Total discount amount applied to the order. For processor-specific information, see the order_discount_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] +**duty_amount** | **String** | Total charges for any import or export duties included in the order. For processor-specific information, see the duty_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] +**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] +**national_tax_included** | **String** | Flag that indicates whether a national tax is included in the order total. Possible values: - **0**: national tax not included - **1**: national tax included For processor-specific information, see the national_tax_indicator 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] +**tax_applied_after_discount** | **String** | Flag that indicates how the merchant manages discounts. Possible values: - **0**: no invoice level discount included - **1**: tax calculated on the postdiscount invoice total - **2**: tax calculated on the prediscount invoice total For processor-specific information, see the order_discount_management_indicator 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] +**tax_applied_level** | **String** | Flag that indicates how you calculate tax. Possible values: - **0**: net prices with tax calculated at line item level - **1**: net prices with tax calculated at invoice level - **2**: gross prices with tax provided at line item level - **3**: gross prices with tax provided at invoice level - **4**: no tax applies on the invoice for the transaction For processor-specific information, see the tax_management_indicator 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] +**tax_type_code** | **String** | For tax amounts that can be categorized as one tax type. This field contains the tax type code that corresponds to the entry in the _lineItems.taxAmount_ field. Possible values: - **056**: sales tax (U.S only) - **TX~**: all taxes (Canada only) Note ~ = space. For processor-specific information, see the total_tax_type_code 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] +**freight_amount** | **String** | Total freight or shipping and handling charges for the order. When you include this field in your request, you must also include the **totalAmount** field. For processor-specific information, see the freight_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] +**foreign_amount** | **String** | Converted amount returned by the DCC service. For processor-specific information, see the foreign_amount field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**foreign_currency** | **String** | Billing currency returned by the DCC service. For processor-specific information, see the foreign_currency field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**exchange_rate** | **String** | Exchange rate returned by the DCC service. Includes a decimal point and a maximum of 4 decimal places. For processor-specific information, see the exchange_rate field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**exchange_rate_time_stamp** | **String** | Time stamp for the exchange rate. This value is returned by the DCC service. Format: `YYYYMMDD~HH:MM` where ~ denotes a space. For processor-specific information, see the exchange_rate_timestamp field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**amex_additional_amounts** | [**Array<Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts>**](Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts.md) | | [optional] +**tax_details** | [**Array<Ptsv2paymentsOrderInformationAmountDetailsTaxDetails>**](Ptsv2paymentsOrderInformationAmountDetailsTaxDetails.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsidcapturesOrderInformationBillTo.md b/docs/Ptsv2paymentsidcapturesOrderInformationBillTo.md new file mode 100644 index 00000000..7e4c6e9f --- /dev/null +++ b/docs/Ptsv2paymentsidcapturesOrderInformationBillTo.md @@ -0,0 +1,18 @@ +# CyberSource::Ptsv2paymentsidcapturesOrderInformationBillTo + +## 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] +**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] +**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] +**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] +**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] +**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/Ptsv2paymentsidcapturesOrderInformationInvoiceDetails.md b/docs/Ptsv2paymentsidcapturesOrderInformationInvoiceDetails.md new file mode 100644 index 00000000..9230e778 --- /dev/null +++ b/docs/Ptsv2paymentsidcapturesOrderInformationInvoiceDetails.md @@ -0,0 +1,14 @@ +# CyberSource::Ptsv2paymentsidcapturesOrderInformationInvoiceDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**purchase_order_number** | **String** | Value used by your customer to identify the order. This value is typically a purchase order number. CyberSource recommends that you do not populate the field with all zeros or nines. For processor-specific information, see the user_po 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] +**purchase_order_date** | **String** | Date the order was processed. `Format: YYYY-MM-DD`. For processor-specific information, see the purchaser_order_date 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] +**purchase_contact_name** | **String** | The name of the individual or the company contacted for company authorized purchases. For processor-specific information, see the authorized_contact_name 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] +**taxable** | **BOOLEAN** | Flag that indicates whether an order is taxable. This value must be true if the sum of all _lineItems[].taxAmount_ values > 0. If you do not include any _lineItems[].taxAmount_ values in your request, CyberSource does not include _invoiceDetails.taxable_ in the data it sends to the processor. For processor-specific information, see the tax_indicator 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] +**vat_invoice_reference_number** | **String** | VAT invoice number associated with the transaction. For processor-specific information, see the vat_invoice_ref_number 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] +**commodity_code** | **String** | International description code of the overall order’s goods or services or the Categorizes purchases for VAT reporting. Contact your acquirer for a list of codes. For processor-specific information, see the summary_commodity_code 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] +**transaction_advice_addendum** | [**Array<Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum>**](Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsidcapturesOrderInformationShipTo.md b/docs/Ptsv2paymentsidcapturesOrderInformationShipTo.md new file mode 100644 index 00000000..5fca7ba9 --- /dev/null +++ b/docs/Ptsv2paymentsidcapturesOrderInformationShipTo.md @@ -0,0 +1,10 @@ +# CyberSource::Ptsv2paymentsidcapturesOrderInformationShipTo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**administrative_area** | **String** | State or province of the shipping address. Use the State, Province, and Territory Codes for the United States and Canada. | [optional] +**country** | **String** | Country of the shipping address. Use the two character ISO Standard Country Codes. | [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] + + diff --git a/docs/Ptsv2paymentsidcapturesOrderInformationShippingDetails.md b/docs/Ptsv2paymentsidcapturesOrderInformationShippingDetails.md new file mode 100644 index 00000000..90529429 --- /dev/null +++ b/docs/Ptsv2paymentsidcapturesOrderInformationShippingDetails.md @@ -0,0 +1,8 @@ +# CyberSource::Ptsv2paymentsidcapturesOrderInformationShippingDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ship_from_postal_code** | **String** | Postal code for the address from which the goods are shipped, which is used to establish nexus. The default is the postal code associated with your CyberSource account. 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 This field is frequently used for Level II and Level III transactions. | [optional] + + diff --git a/docs/Ptsv2paymentsidcapturesPaymentInformation.md b/docs/Ptsv2paymentsidcapturesPaymentInformation.md new file mode 100644 index 00000000..bba6e977 --- /dev/null +++ b/docs/Ptsv2paymentsidcapturesPaymentInformation.md @@ -0,0 +1,8 @@ +# CyberSource::Ptsv2paymentsidcapturesPaymentInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer** | [**Ptsv2paymentsPaymentInformationCustomer**](Ptsv2paymentsPaymentInformationCustomer.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsidcapturesPointOfSaleInformation.md b/docs/Ptsv2paymentsidcapturesPointOfSaleInformation.md new file mode 100644 index 00000000..473efe7e --- /dev/null +++ b/docs/Ptsv2paymentsidcapturesPointOfSaleInformation.md @@ -0,0 +1,9 @@ +# CyberSource::Ptsv2paymentsidcapturesPointOfSaleInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emv** | [**Ptsv2paymentsidcapturesPointOfSaleInformationEmv**](Ptsv2paymentsidcapturesPointOfSaleInformationEmv.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/Ptsv2paymentsidcapturesPointOfSaleInformationEmv.md b/docs/Ptsv2paymentsidcapturesPointOfSaleInformationEmv.md new file mode 100644 index 00000000..d5d2c172 --- /dev/null +++ b/docs/Ptsv2paymentsidcapturesPointOfSaleInformationEmv.md @@ -0,0 +1,9 @@ +# CyberSource::Ptsv2paymentsidcapturesPointOfSaleInformationEmv + +## 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] +**fallback** | **BOOLEAN** | Indicates whether a fallback method was used to enter credit card information into the POS terminal. When a technical problem prevents a successful exchange of information between a chip card and a chip-capable terminal: 1. Swipe the card or key the credit card information into the POS terminal. 2. Use the pos_entry_mode field to indicate whether the information was swiped or keyed. This field is supported only on **Chase Paymentech Solutions** and **GPN**. | [optional] [default to false] + + diff --git a/docs/Ptsv2paymentsidcapturesProcessingInformation.md b/docs/Ptsv2paymentsidcapturesProcessingInformation.md new file mode 100644 index 00000000..505ed0fa --- /dev/null +++ b/docs/Ptsv2paymentsidcapturesProcessingInformation.md @@ -0,0 +1,16 @@ +# CyberSource::Ptsv2paymentsidcapturesProcessingInformation + +## 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] +**reconciliation_id** | **String** | Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). | [optional] +**link_id** | **String** | Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. | [optional] +**report_group** | **String** | Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. | [optional] +**visa_checkout_id** | **String** | Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. | [optional] +**purchase_level** | **String** | Set this field to 3 to indicate that the request includes Level III data. | [optional] +**issuer** | [**Ptsv2paymentsProcessingInformationIssuer**](Ptsv2paymentsProcessingInformationIssuer.md) | | [optional] +**authorization_options** | [**Ptsv2paymentsidcapturesProcessingInformationAuthorizationOptions**](Ptsv2paymentsidcapturesProcessingInformationAuthorizationOptions.md) | | [optional] +**capture_options** | [**Ptsv2paymentsidcapturesProcessingInformationCaptureOptions**](Ptsv2paymentsidcapturesProcessingInformationCaptureOptions.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsidcapturesProcessingInformationAuthorizationOptions.md b/docs/Ptsv2paymentsidcapturesProcessingInformationAuthorizationOptions.md new file mode 100644 index 00000000..d3ca922e --- /dev/null +++ b/docs/Ptsv2paymentsidcapturesProcessingInformationAuthorizationOptions.md @@ -0,0 +1,10 @@ +# CyberSource::Ptsv2paymentsidcapturesProcessingInformationAuthorizationOptions + +## 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] +**verbal_auth_code** | **String** | Authorization code. **Forced Capture** Use this field to send the authorization code you received from a payment that you authorized outside the CyberSource system. **Verbal Authorization** Use this field in CAPTURE API to send the verbally received authorization code. For processor-specific information, see the auth_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**verbal_auth_transaction_id** | **String** | Transaction ID (TID). | [optional] + + diff --git a/docs/Ptsv2paymentsidcapturesProcessingInformationCaptureOptions.md b/docs/Ptsv2paymentsidcapturesProcessingInformationCaptureOptions.md new file mode 100644 index 00000000..c8f21f28 --- /dev/null +++ b/docs/Ptsv2paymentsidcapturesProcessingInformationCaptureOptions.md @@ -0,0 +1,9 @@ +# CyberSource::Ptsv2paymentsidcapturesProcessingInformationCaptureOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**capture_sequence_number** | **Float** | Capture number when requesting multiple partial captures for one payment. Used along with _totalCaptureCount_ to track which capture is being processed. For example, the second of five captures would be passed to CyberSource as: - _captureSequenceNumber_ = 2, and - _totalCaptureCount_ = 5 | [optional] +**total_capture_count** | **Float** | Total number of captures when requesting multiple partial captures for one payment. Used along with _captureSequenceNumber_ which capture is being processed. For example, the second of five captures would be passed to CyberSource as: - _captureSequenceNumber_ = 2, and - _totalCaptureCount_ = 5 | [optional] + + diff --git a/docs/Ptsv2paymentsidrefundsMerchantInformation.md b/docs/Ptsv2paymentsidrefundsMerchantInformation.md new file mode 100644 index 00000000..6ca1833b --- /dev/null +++ b/docs/Ptsv2paymentsidrefundsMerchantInformation.md @@ -0,0 +1,11 @@ +# CyberSource::Ptsv2paymentsidrefundsMerchantInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**merchant_descriptor** | [**Ptsv2paymentsMerchantInformationMerchantDescriptor**](Ptsv2paymentsMerchantInformationMerchantDescriptor.md) | | [optional] +**category_code** | **Integer** | Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**vat_registration_number** | **String** | Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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] +**card_acceptor_reference_number** | **String** | Reference number that facilitates card acceptor/corporation communication and record keeping. For processor-specific information, see the card_acceptor_ref_number 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/Ptsv2paymentsidrefundsOrderInformation.md b/docs/Ptsv2paymentsidrefundsOrderInformation.md new file mode 100644 index 00000000..7d5ee609 --- /dev/null +++ b/docs/Ptsv2paymentsidrefundsOrderInformation.md @@ -0,0 +1,13 @@ +# CyberSource::Ptsv2paymentsidrefundsOrderInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount_details** | [**Ptsv2paymentsidcapturesOrderInformationAmountDetails**](Ptsv2paymentsidcapturesOrderInformationAmountDetails.md) | | [optional] +**bill_to** | [**Ptsv2paymentsidcapturesOrderInformationBillTo**](Ptsv2paymentsidcapturesOrderInformationBillTo.md) | | [optional] +**ship_to** | [**Ptsv2paymentsidcapturesOrderInformationShipTo**](Ptsv2paymentsidcapturesOrderInformationShipTo.md) | | [optional] +**line_items** | [**Array<Ptsv2paymentsidrefundsOrderInformationLineItems>**](Ptsv2paymentsidrefundsOrderInformationLineItems.md) | | [optional] +**invoice_details** | [**Ptsv2paymentsidcapturesOrderInformationInvoiceDetails**](Ptsv2paymentsidcapturesOrderInformationInvoiceDetails.md) | | [optional] +**shipping_details** | [**Ptsv2paymentsidcapturesOrderInformationShippingDetails**](Ptsv2paymentsidcapturesOrderInformationShippingDetails.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsidrefundsOrderInformationLineItems.md b/docs/Ptsv2paymentsidrefundsOrderInformationLineItems.md new file mode 100644 index 00000000..b38d2725 --- /dev/null +++ b/docs/Ptsv2paymentsidrefundsOrderInformationLineItems.md @@ -0,0 +1,27 @@ +# CyberSource::Ptsv2paymentsidrefundsOrderInformationLineItems + +## 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] +**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] +**unit_of_measure** | **String** | Unit of measure, or unit of measure code, for the item. | [optional] +**total_amount** | **String** | Total amount for the item. Normally calculated as the unit price x quantity. | [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] +**tax_rate** | **String** | Tax rate applied to the item. See \"Numbered Elements,\" page 14. Visa: Valid range is 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated). Mastercard: Valid range is 0.00001 to 0.99999 (0.001% to 99.999%). | [optional] +**tax_applied_after_discount** | **String** | Flag to indicate how you handle discount at the line item level. - 0: no line level discount provided - 1: tax was calculated on the post-discount line item total - 2: tax was calculated on the pre-discount line item total `Note` Visa will inset 0 (zero) if an invalid value is included in this field. This field relates to the value in the _lineItems[].discountAmount_ field. | [optional] +**tax_status_indicator** | **String** | Flag to indicate whether tax is exempted or not included. - 0: tax not included - 1: tax included - 2: transaction is not subject to tax | [optional] +**tax_type_code** | **String** | Type of tax being applied to the item. Possible values: Below values are used by **RBS WorldPay Atlanta**, **FDC Nashville Global**, **Litle** - 0000: unknown tax type - 0001: federal/national sales tax - 0002: state sales tax - 0003: city sales tax - 0004: local sales tax - 0005: municipal sales tax - 0006: other tax - 0010: value-added tax - 0011: goods and services tax - 0012: provincial sales tax - 0013: harmonized sales tax - 0014: Quebec sales tax (QST) - 0020: room tax - 0021: occupancy tax - 0022: energy tax - Blank: Tax not supported on line item. | [optional] +**amount_includes_tax** | **BOOLEAN** | Flag that indicates whether the tax amount is included in the Line Item Total. | [optional] +**type_of_supply** | **String** | Flag to indicate whether the purchase is categorized as goods or services. Possible values: - 00: goods - 01: services | [optional] +**commodity_code** | **String** | Commodity code or International description code used to classify the item. Contact your acquirer for a list of codes. | [optional] +**discount_amount** | **String** | Discount applied to the item. | [optional] +**discount_applied** | **BOOLEAN** | Flag that indicates whether the amount is discounted. If you do not provide a value but you set Discount Amount to a value greater than zero, then CyberSource sets this field to **true**. | [optional] +**discount_rate** | **String** | Rate the item is discounted. Maximum of 2 decimal places. Example 5.25 (=5.25%) | [optional] +**invoice_number** | **String** | Field to support an invoice number for a transaction. You must specify the number of line items that will include an invoice number. By default, the first line item will include an invoice number field. The invoice number field can be included for up to 10 line items. | [optional] +**tax_details** | [**Array<Ptsv2paymentsOrderInformationAmountDetailsTaxDetails>**](Ptsv2paymentsOrderInformationAmountDetailsTaxDetails.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsidrefundsPaymentInformation.md b/docs/Ptsv2paymentsidrefundsPaymentInformation.md new file mode 100644 index 00000000..d827385c --- /dev/null +++ b/docs/Ptsv2paymentsidrefundsPaymentInformation.md @@ -0,0 +1,8 @@ +# CyberSource::Ptsv2paymentsidrefundsPaymentInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**card** | [**Ptsv2paymentsidrefundsPaymentInformationCard**](Ptsv2paymentsidrefundsPaymentInformationCard.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsidrefundsPaymentInformationCard.md b/docs/Ptsv2paymentsidrefundsPaymentInformationCard.md new file mode 100644 index 00000000..7c4d5e3f --- /dev/null +++ b/docs/Ptsv2paymentsidrefundsPaymentInformationCard.md @@ -0,0 +1,15 @@ +# CyberSource::Ptsv2paymentsidrefundsPaymentInformationCard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number** | **String** | Customer’s credit card number. Encoded Account Numbers when processing encoded account numbers, use this field for the encoded account number. For processor-specific information, see the customer_cc_number field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [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] +**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] +**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] +**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] + + diff --git a/docs/Ptsv2paymentsidrefundsPointOfSaleInformation.md b/docs/Ptsv2paymentsidrefundsPointOfSaleInformation.md new file mode 100644 index 00000000..7eda9ec4 --- /dev/null +++ b/docs/Ptsv2paymentsidrefundsPointOfSaleInformation.md @@ -0,0 +1,8 @@ +# CyberSource::Ptsv2paymentsidrefundsPointOfSaleInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emv** | [**Ptsv2paymentsidcapturesPointOfSaleInformationEmv**](Ptsv2paymentsidcapturesPointOfSaleInformationEmv.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsidrefundsProcessingInformation.md b/docs/Ptsv2paymentsidrefundsProcessingInformation.md new file mode 100644 index 00000000..2fdd704b --- /dev/null +++ b/docs/Ptsv2paymentsidrefundsProcessingInformation.md @@ -0,0 +1,14 @@ +# CyberSource::Ptsv2paymentsidrefundsProcessingInformation + +## 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] +**reconciliation_id** | **String** | Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). | [optional] +**link_id** | **String** | Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. | [optional] +**report_group** | **String** | Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. | [optional] +**visa_checkout_id** | **String** | Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. | [optional] +**purchase_level** | **String** | Set this field to 3 to indicate that the request includes Level III data. | [optional] +**recurring_options** | [**Ptsv2paymentsidrefundsProcessingInformationRecurringOptions**](Ptsv2paymentsidrefundsProcessingInformationRecurringOptions.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsidrefundsProcessingInformationRecurringOptions.md b/docs/Ptsv2paymentsidrefundsProcessingInformationRecurringOptions.md new file mode 100644 index 00000000..54925aa2 --- /dev/null +++ b/docs/Ptsv2paymentsidrefundsProcessingInformationRecurringOptions.md @@ -0,0 +1,8 @@ +# CyberSource::Ptsv2paymentsidrefundsProcessingInformationRecurringOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_payment** | **BOOLEAN** | Flag that indicates whether this is a payment towards an existing contractual loan. | [optional] [default to false] + + diff --git a/docs/Ptsv2paymentsidreversalsClientReferenceInformation.md b/docs/Ptsv2paymentsidreversalsClientReferenceInformation.md new file mode 100644 index 00000000..5c6f76f7 --- /dev/null +++ b/docs/Ptsv2paymentsidreversalsClientReferenceInformation.md @@ -0,0 +1,9 @@ +# CyberSource::Ptsv2paymentsidreversalsClientReferenceInformation + +## 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] +**comments** | **String** | Comments | [optional] + + diff --git a/docs/Ptsv2paymentsidreversalsOrderInformation.md b/docs/Ptsv2paymentsidreversalsOrderInformation.md new file mode 100644 index 00000000..c2508e42 --- /dev/null +++ b/docs/Ptsv2paymentsidreversalsOrderInformation.md @@ -0,0 +1,8 @@ +# CyberSource::Ptsv2paymentsidreversalsOrderInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**line_items** | [**Array<Ptsv2paymentsidreversalsOrderInformationLineItems>**](Ptsv2paymentsidreversalsOrderInformationLineItems.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsidreversalsOrderInformationLineItems.md b/docs/Ptsv2paymentsidreversalsOrderInformationLineItems.md new file mode 100644 index 00000000..644c28ec --- /dev/null +++ b/docs/Ptsv2paymentsidreversalsOrderInformationLineItems.md @@ -0,0 +1,9 @@ +# CyberSource::Ptsv2paymentsidreversalsOrderInformationLineItems + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + diff --git a/docs/Ptsv2paymentsidreversalsPointOfSaleInformation.md b/docs/Ptsv2paymentsidreversalsPointOfSaleInformation.md new file mode 100644 index 00000000..3948fed8 --- /dev/null +++ b/docs/Ptsv2paymentsidreversalsPointOfSaleInformation.md @@ -0,0 +1,8 @@ +# CyberSource::Ptsv2paymentsidreversalsPointOfSaleInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emv** | [**InlineResponse201PointOfSaleInformationEmv**](InlineResponse201PointOfSaleInformationEmv.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsidreversalsProcessingInformation.md b/docs/Ptsv2paymentsidreversalsProcessingInformation.md new file mode 100644 index 00000000..bbc334ab --- /dev/null +++ b/docs/Ptsv2paymentsidreversalsProcessingInformation.md @@ -0,0 +1,13 @@ +# CyberSource::Ptsv2paymentsidreversalsProcessingInformation + +## 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] +**reconciliation_id** | **String** | Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). | [optional] +**link_id** | **String** | Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. | [optional] +**report_group** | **String** | Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. | [optional] +**visa_checkout_id** | **String** | Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. | [optional] +**issuer** | [**Ptsv2paymentsProcessingInformationIssuer**](Ptsv2paymentsProcessingInformationIssuer.md) | | [optional] + + diff --git a/docs/Ptsv2paymentsidreversalsReversalInformation.md b/docs/Ptsv2paymentsidreversalsReversalInformation.md new file mode 100644 index 00000000..20d98b43 --- /dev/null +++ b/docs/Ptsv2paymentsidreversalsReversalInformation.md @@ -0,0 +1,9 @@ +# CyberSource::Ptsv2paymentsidreversalsReversalInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount_details** | [**Ptsv2paymentsidreversalsReversalInformationAmountDetails**](Ptsv2paymentsidreversalsReversalInformationAmountDetails.md) | | [optional] +**reason** | **String** | Reason for the authorization reversal. Possible value: - 34: Suspected fraud CyberSource ignores this field for processors that do not support this value. | [optional] + + diff --git a/docs/Ptsv2paymentsidreversalsReversalInformationAmountDetails.md b/docs/Ptsv2paymentsidreversalsReversalInformationAmountDetails.md new file mode 100644 index 00000000..46419f24 --- /dev/null +++ b/docs/Ptsv2paymentsidreversalsReversalInformationAmountDetails.md @@ -0,0 +1,9 @@ +# CyberSource::Ptsv2paymentsidreversalsReversalInformationAmountDetails + +## 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] + + diff --git a/docs/Ptsv2payoutsMerchantInformation.md b/docs/Ptsv2payoutsMerchantInformation.md new file mode 100644 index 00000000..af71120b --- /dev/null +++ b/docs/Ptsv2payoutsMerchantInformation.md @@ -0,0 +1,11 @@ +# CyberSource::Ptsv2payoutsMerchantInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category_code** | **Integer** | Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] +**submit_local_date_time** | **String** | Time that the transaction was submitted in local time. The time is in hhmmss format. | [optional] +**vat_registration_number** | **String** | Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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] +**merchant_descriptor** | [**Ptsv2payoutsMerchantInformationMerchantDescriptor**](Ptsv2payoutsMerchantInformationMerchantDescriptor.md) | | [optional] + + diff --git a/docs/Ptsv2payoutsMerchantInformationMerchantDescriptor.md b/docs/Ptsv2payoutsMerchantInformationMerchantDescriptor.md new file mode 100644 index 00000000..45a5b9da --- /dev/null +++ b/docs/Ptsv2payoutsMerchantInformationMerchantDescriptor.md @@ -0,0 +1,13 @@ +# CyberSource::Ptsv2payoutsMerchantInformationMerchantDescriptor + +## 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] +**locality** | **String** | Merchant City. 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) | [optional] +**country** | **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) | [optional] +**administrative_area** | **String** | Merchant State. 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) | [optional] +**postal_code** | **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) | [optional] +**contact** | **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) * FDCCompass (13) * Paymentech (13) | [optional] + + diff --git a/docs/Ptsv2payoutsOrderInformation.md b/docs/Ptsv2payoutsOrderInformation.md new file mode 100644 index 00000000..3e9cc05a --- /dev/null +++ b/docs/Ptsv2payoutsOrderInformation.md @@ -0,0 +1,9 @@ +# CyberSource::Ptsv2payoutsOrderInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount_details** | [**Ptsv2payoutsOrderInformationAmountDetails**](Ptsv2payoutsOrderInformationAmountDetails.md) | | [optional] +**bill_to** | [**Ptsv2payoutsOrderInformationBillTo**](Ptsv2payoutsOrderInformationBillTo.md) | | [optional] + + diff --git a/docs/Ptsv2payoutsOrderInformationAmountDetails.md b/docs/Ptsv2payoutsOrderInformationAmountDetails.md new file mode 100644 index 00000000..2c2a7b7f --- /dev/null +++ b/docs/Ptsv2payoutsOrderInformationAmountDetails.md @@ -0,0 +1,10 @@ +# CyberSource::Ptsv2payoutsOrderInformationAmountDetails + +## 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] +**surcharge** | [**Ptsv2payoutsOrderInformationAmountDetailsSurcharge**](Ptsv2payoutsOrderInformationAmountDetailsSurcharge.md) | | [optional] + + diff --git a/docs/Ptsv2payoutsOrderInformationAmountDetailsSurcharge.md b/docs/Ptsv2payoutsOrderInformationAmountDetailsSurcharge.md new file mode 100644 index 00000000..e12008cc --- /dev/null +++ b/docs/Ptsv2payoutsOrderInformationAmountDetailsSurcharge.md @@ -0,0 +1,8 @@ +# CyberSource::Ptsv2payoutsOrderInformationAmountDetailsSurcharge + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **String** | The surcharge amount is included in the total transaction amount but is passed in a separate field to the issuer and acquirer for tracking. The issuer can provide information about the surcharge amount to the customer. - Applicable only for CTV for Payouts. - CTV (<= 08) For processor-specific information, see the surcharge_amount 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/Ptsv2payoutsOrderInformationBillTo.md b/docs/Ptsv2payoutsOrderInformationBillTo.md new file mode 100644 index 00000000..8e2feebd --- /dev/null +++ b/docs/Ptsv2payoutsOrderInformationBillTo.md @@ -0,0 +1,17 @@ +# CyberSource::Ptsv2payoutsOrderInformationBillTo + +## 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] +**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] +**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] +**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] +**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] +**phone_type** | **String** | Customer's phone number type. For Payouts: This field may be sent only for FDC Compass. Possible Values - * day * home * night * work | [optional] + + diff --git a/docs/Ptsv2payoutsPaymentInformation.md b/docs/Ptsv2payoutsPaymentInformation.md new file mode 100644 index 00000000..b2a15fd9 --- /dev/null +++ b/docs/Ptsv2payoutsPaymentInformation.md @@ -0,0 +1,8 @@ +# CyberSource::Ptsv2payoutsPaymentInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**card** | [**Ptsv2payoutsPaymentInformationCard**](Ptsv2payoutsPaymentInformationCard.md) | | [optional] + + diff --git a/docs/Ptsv2payoutsPaymentInformationCard.md b/docs/Ptsv2payoutsPaymentInformationCard.md new file mode 100644 index 00000000..6cb9855a --- /dev/null +++ b/docs/Ptsv2payoutsPaymentInformationCard.md @@ -0,0 +1,12 @@ +# CyberSource::Ptsv2payoutsPaymentInformationCard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover | [optional] +**number** | **String** | Customer’s credit card number. Encoded Account Numbers when processing encoded account numbers, use this field for the encoded account number. For processor-specific information, see the customer_cc_number field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [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] +**source_account_type** | **String** | Flag that specifies the type of account associated with the card. The cardholder provides this information during the payment process. This field is required in the following cases. - Debit transactions on Cielo and Comercio Latino. - Transactions with Brazilian-issued cards on CyberSource through VisaNet. - Applicable only for CTV. **Note** Combo cards in Brazil contain credit and debit functionality in a single card. Visa systems use a credit bank identification number (BIN) for this type of card. Using the BIN to determine whether a card is debit or credit can cause transactions with these cards to be processed incorrectly. CyberSource strongly recommends that you include this field for combo card transactions. Possible values include the following. - CHECKING: Checking account - CREDIT: Credit card account - SAVING: Saving account - LINE_OF_CREDIT: Line of credit - PREPAID: Prepaid card account - UNIVERSAL: Universal account | [optional] + + diff --git a/docs/Ptsv2payoutsProcessingInformation.md b/docs/Ptsv2payoutsProcessingInformation.md new file mode 100644 index 00000000..984806b1 --- /dev/null +++ b/docs/Ptsv2payoutsProcessingInformation.md @@ -0,0 +1,12 @@ +# CyberSource::Ptsv2payoutsProcessingInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**business_application_id** | **String** | Payouts transaction type. Applicable Processors: FDC Compass, Paymentech, CtV Possible values: **Credit Card Bill Payment** - **CP**: credit card bill payment **Funds Disbursement** - **FD**: funds disbursement - **GD**: government disbursement - **MD**: merchant disbursement **Money Transfer** - **AA**: account to account. Sender and receiver are same person. - **PP**: person to person. Sender and receiver are different. **Prepaid Load** - **TU**: top up | [optional] +**network_routing_order** | **String** | This field is optionally used by Push Payments Gateway participants (merchants and acquirers) to get the attributes for specified networks only. The networks specified in this field must be a subset of the information provided during program enrollment. Refer to Sharing Group Code/Network Routing Order. Note: Supported only in US for domestic transactions involving Push Payments Gateway Service. VisaNet checks to determine if there are issuer routing preferences for any of the networks specified by the network routing order. If an issuer preference exists for one of the specified debit networks, VisaNet makes a routing selection based on the issuer’s preference. If an issuer preference exists for more than one of the specified debit networks, or if no issuer preference exists, VisaNet makes a selection based on the acquirer’s routing priorities. See https://developer.visa.com/request_response_codes#network_id_and_sharing_group_code , under section 'Network ID and Sharing Group Code' on the left panel for available values | [optional] +**commerce_indicator** | **String** | Type of transaction. Possible value for Fast Payments transactions: - internet | [optional] +**reconciliation_id** | **String** | Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). | [optional] +**payouts_options** | [**Ptsv2payoutsProcessingInformationPayoutsOptions**](Ptsv2payoutsProcessingInformationPayoutsOptions.md) | | [optional] + + diff --git a/docs/Ptsv2payoutsProcessingInformationPayoutsOptions.md b/docs/Ptsv2payoutsProcessingInformationPayoutsOptions.md new file mode 100644 index 00000000..305de251 --- /dev/null +++ b/docs/Ptsv2payoutsProcessingInformationPayoutsOptions.md @@ -0,0 +1,11 @@ +# CyberSource::Ptsv2payoutsProcessingInformationPayoutsOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**acquirer_merchant_id** | **String** | This field identifies the card acceptor for defining the point of service terminal in both local and interchange environments. An acquirer-assigned code identifying the card acceptor for the transaction. Depending on the acquirer and merchant billing and reporting requirements, the code can represent a merchant, a specific merchant location, or a specific merchant location terminal. Acquiring Institution Identification Code uniquely identifies the merchant. The value from the original is required in any subsequent messages, including reversals, chargebacks, and representments. * Applicable only for CTV for Payouts. | [optional] +**acquirer_bin** | **String** | This code identifies the financial institution acting as the acquirer of this customer transaction. The acquirer is the member or system user that signed the merchant or ADM or dispensed cash. This number is usually Visa-assigned. * Applicable only for CTV for Payouts. | [optional] +**retrieval_reference_number** | **String** | This field contains a number that is used with other data elements as a key to identify and track all messages related to a given cardholder transaction; that is, to a given transaction set. * Applicable only for CTV for Payouts. | [optional] +**account_funding_reference_id** | **String** | Visa-generated transaction identifier (TID) that is unique for each original authorization and financial request. * Applicable only for CTV for Payouts. | [optional] + + diff --git a/docs/Ptsv2payoutsRecipientInformation.md b/docs/Ptsv2payoutsRecipientInformation.md new file mode 100644 index 00000000..72cb5a00 --- /dev/null +++ b/docs/Ptsv2payoutsRecipientInformation.md @@ -0,0 +1,17 @@ +# CyberSource::Ptsv2payoutsRecipientInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**first_name** | **String** | First name of recipient. characters. * CTV (14) * Paymentech (30) | [optional] +**middle_initial** | **String** | Middle Initial of recipient. Required only for FDCCompass. | [optional] +**last_name** | **String** | Last name of recipient. characters. * CTV (14) * Paymentech (30) | [optional] +**address1** | **String** | Recipient address information. Required only for FDCCompass. | [optional] +**locality** | **String** | Recipient city. Required only for FDCCompass. | [optional] +**administrative_area** | **String** | Recipient State. Required only for FDCCompass. | [optional] +**country** | **String** | Recipient country code. Required only for FDCCompass. | [optional] +**postal_code** | **String** | Recipient postal code. Required only for FDCCompass. | [optional] +**phone_number** | **String** | Recipient phone number. Required only for FDCCompass. | [optional] +**date_of_birth** | **String** | Recipient date of birth in YYYYMMDD format. Required only for FDCCompass. | [optional] + + diff --git a/docs/Ptsv2payoutsSenderInformation.md b/docs/Ptsv2payoutsSenderInformation.md new file mode 100644 index 00000000..e4ee20a4 --- /dev/null +++ b/docs/Ptsv2payoutsSenderInformation.md @@ -0,0 +1,21 @@ +# CyberSource::Ptsv2payoutsSenderInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reference_number** | **String** | Reference number generated by you that uniquely identifies the sender. | [optional] +**account** | [**Ptsv2payoutsSenderInformationAccount**](Ptsv2payoutsSenderInformationAccount.md) | | [optional] +**first_name** | **String** | First name of sender (Optional). * CTV (14) * Paymentech (30) | [optional] +**middle_initial** | **String** | Recipient middle initial (Optional). | [optional] +**last_name** | **String** | Recipient last name (Optional). * CTV (14) * Paymentech (30) | [optional] +**name** | **String** | Name of sender. **Funds Disbursement** This value is the name of the originator sending the funds disbursement. * CTV, Paymentech (30) | [optional] +**address1** | **String** | Street address of sender. **Funds Disbursement** This value is the address of the originator sending the funds disbursement. | [optional] +**locality** | **String** | City of sender. **Funds Disbursement** This value is the city of the originator sending the funds disbursement. | [optional] +**administrative_area** | **String** | Sender’s state. Use the State, Province, and Territory Codes for the United States and Canada. | [optional] +**country_code** | **String** | Country of sender. Use the ISO Standard Country Codes. * CTV (3) | [optional] +**postal_code** | **String** | Sender’s postal code. Required only for FDCCompass. | [optional] +**phone_number** | **String** | Sender’s phone number. Required only for FDCCompass. | [optional] +**date_of_birth** | **String** | Sender’s date of birth in YYYYMMDD format. Required only for FDCCompass. | [optional] +**vat_registration_number** | **String** | Customer's government-assigned tax identification number. | [optional] + + diff --git a/docs/Ptsv2payoutsSenderInformationAccount.md b/docs/Ptsv2payoutsSenderInformationAccount.md new file mode 100644 index 00000000..564fc776 --- /dev/null +++ b/docs/Ptsv2payoutsSenderInformationAccount.md @@ -0,0 +1,9 @@ +# CyberSource::Ptsv2payoutsSenderInformationAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**funds_source** | **String** | Source of funds. Possible values: Paymentech, CTV, FDC Compass: - 01: Credit card - 02: Debit card - 03: Prepaid card Paymentech, CTV - - 04: Cash - 05: Debit or deposit account that is not linked to a Visa card. Includes checking accounts, savings accounts, and proprietary debit or ATM cards. - 06: Credit account that is not linked to a Visa card. Includes credit cards and proprietary lines of credit. FDCCompass - - 04: Deposit Account **Funds Disbursement** This value is most likely 05 to identify that the originator used a deposit account to fund the disbursement. **Credit Card Bill Payment** This value must be 02, 03, 04, or 05. | [optional] +**number** | **String** | The account number of the entity funding the transaction. It is the sender’s account number. It can be a debit/credit card account number or bank account number. **Funds disbursements** This field is optional. **All other transactions** This field is required when the sender funds the transaction with a financial instrument, for example debit card. Length: * FDCCompass (<= 19) * Paymentech (<= 16) | [optional] + + diff --git a/docs/PurchaseAndRefundDetailsApi.md b/docs/PurchaseAndRefundDetailsApi.md new file mode 100644 index 00000000..ae2a8cd1 --- /dev/null +++ b/docs/PurchaseAndRefundDetailsApi.md @@ -0,0 +1,72 @@ +# CyberSource::PurchaseAndRefundDetailsApi + +All URIs are relative to *https://apitest.cybersource.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_purchase_and_refund_details**](PurchaseAndRefundDetailsApi.md#get_purchase_and_refund_details) | **GET** /reporting/v3/purchase-refund-details | Get Purchase and Refund details + + +# **get_purchase_and_refund_details** +> get_purchase_and_refund_details(start_time, end_time, opts) + +Get Purchase and Refund details + +Purchase And Refund Details Description + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::PurchaseAndRefundDetailsApi.new + +start_time = DateTime.parse("2013-10-20T19:20:30+01:00") # DateTime | 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 + +end_time = DateTime.parse("2013-10-20T19:20:30+01:00") # DateTime | 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 + +opts = { + organization_id: "organization_id_example", # String | Valid Cybersource Organization Id + payment_subtype: "ALL", # String | Payment Subtypes. - **ALL**: All Payment Subtypes - **VI** : Visa - **MC** : Master Card - **AX** : American Express - **DI** : Discover - **DP** : Pinless Debit + view_by: "requestDate", # String | View results by Request Date or Submission Date. - **requestDate** : Request Date - **submissionDate**: Submission Date + group_name: "group_name_example", # String | Valid CyberSource Group Name.User can define groups using CBAPI and Group Management Module in EBC2. Groups are collection of organizationIds + offset: 56, # Integer | Offset of the Purchase and Refund Results. + limit: 2000 # Integer | Results count per page. Range(1-2000) +} + +begin + #Get Purchase and Refund details + api_instance.get_purchase_and_refund_details(start_time, end_time, opts) +rescue CyberSource::ApiError => e + puts "Exception when calling PurchaseAndRefundDetailsApi->get_purchase_and_refund_details: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start_time** | **DateTime**| 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 | + **end_time** | **DateTime**| 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 | + **organization_id** | **String**| Valid Cybersource Organization Id | [optional] + **payment_subtype** | **String**| Payment Subtypes. - **ALL**: All Payment Subtypes - **VI** : Visa - **MC** : Master Card - **AX** : American Express - **DI** : Discover - **DP** : Pinless Debit | [optional] [default to ALL] + **view_by** | **String**| View results by Request Date or Submission Date. - **requestDate** : Request Date - **submissionDate**: Submission Date | [optional] [default to requestDate] + **group_name** | **String**| Valid CyberSource Group Name.User can define groups using CBAPI and Group Management Module in EBC2. Groups are collection of organizationIds | [optional] + **offset** | **Integer**| Offset of the Purchase and Refund Results. | [optional] + **limit** | **Integer**| Results count per page. Range(1-2000) | [optional] [default to 2000] + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/hal+json + + + diff --git a/docs/RefundApi.md b/docs/RefundApi.md index b55e2660..d38bcc55 100644 --- a/docs/RefundApi.md +++ b/docs/RefundApi.md @@ -1,59 +1,11 @@ # CyberSource::RefundApi -All URIs are relative to *https://api.cybersource.com* +All URIs are relative to *https://apitest.cybersource.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_refund**](RefundApi.md#get_refund) | **GET** /v2/refunds/{id} | Retrieve a Refund -[**refund_capture**](RefundApi.md#refund_capture) | **POST** /v2/captures/{id}/refunds | Refund a Capture -[**refund_payment**](RefundApi.md#refund_payment) | **POST** /v2/payments/{id}/refunds | Refund a Payment - - -# **get_refund** -> InlineResponse2005 get_refund(id) - -Retrieve a Refund - -Include the refund ID in the GET request to to retrieve the refund details. - -### Example -```ruby -# load the gem -require 'cyberSource_client' - -api_instance = CyberSource::RefundApi.new - -id = "id_example" # String | The refund ID. This ID is returned from a previous refund request. - - -begin - #Retrieve a Refund - result = api_instance.get_refund(id) - p result -rescue CyberSource::ApiError => e - puts "Exception when calling RefundApi->get_refund: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The refund ID. This ID is returned from a previous refund request. | - -### Return type - -[**InlineResponse2005**](InlineResponse2005.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - +[**refund_capture**](RefundApi.md#refund_capture) | **POST** /pts/v2/captures/{id}/refunds | Refund a Capture +[**refund_payment**](RefundApi.md#refund_payment) | **POST** /pts/v2/payments/{id}/refunds | Refund a Payment # **refund_capture** @@ -66,7 +18,7 @@ Include the capture ID in the POST request to refund the captured amount. ### Example ```ruby # load the gem -require 'cyberSource_client' +require 'cybersource_rest_client' api_instance = CyberSource::RefundApi.new @@ -101,8 +53,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 @@ -116,7 +68,7 @@ Include the payment ID in the POST request to refund the payment amount. ### Example ```ruby # load the gem -require 'cyberSource_client' +require 'cybersource_rest_client' api_instance = CyberSource::RefundApi.new @@ -151,8 +103,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 diff --git a/docs/RefundCaptureRequest.md b/docs/RefundCaptureRequest.md index 8bfee1dc..1d416cdb 100644 --- a/docs/RefundCaptureRequest.md +++ b/docs/RefundCaptureRequest.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**client_reference_information** | [**V2paymentsClientReferenceInformation**](V2paymentsClientReferenceInformation.md) | | [optional] -**processing_information** | [**V2paymentsidrefundsProcessingInformation**](V2paymentsidrefundsProcessingInformation.md) | | [optional] -**payment_information** | [**V2paymentsidrefundsPaymentInformation**](V2paymentsidrefundsPaymentInformation.md) | | [optional] -**order_information** | [**V2paymentsidrefundsOrderInformation**](V2paymentsidrefundsOrderInformation.md) | | [optional] -**buyer_information** | [**V2paymentsidcapturesBuyerInformation**](V2paymentsidcapturesBuyerInformation.md) | | [optional] -**device_information** | [**V2paymentsDeviceInformation**](V2paymentsDeviceInformation.md) | | [optional] -**merchant_information** | [**V2paymentsidrefundsMerchantInformation**](V2paymentsidrefundsMerchantInformation.md) | | [optional] -**aggregator_information** | [**V2paymentsidcapturesAggregatorInformation**](V2paymentsidcapturesAggregatorInformation.md) | | [optional] -**point_of_sale_information** | [**V2paymentsidrefundsPointOfSaleInformation**](V2paymentsidrefundsPointOfSaleInformation.md) | | [optional] -**merchant_defined_information** | [**Array<V2paymentsMerchantDefinedInformation>**](V2paymentsMerchantDefinedInformation.md) | TBD | [optional] +**client_reference_information** | [**Ptsv2paymentsClientReferenceInformation**](Ptsv2paymentsClientReferenceInformation.md) | | [optional] +**processing_information** | [**Ptsv2paymentsidrefundsProcessingInformation**](Ptsv2paymentsidrefundsProcessingInformation.md) | | [optional] +**payment_information** | [**Ptsv2paymentsidrefundsPaymentInformation**](Ptsv2paymentsidrefundsPaymentInformation.md) | | [optional] +**order_information** | [**Ptsv2paymentsidrefundsOrderInformation**](Ptsv2paymentsidrefundsOrderInformation.md) | | [optional] +**buyer_information** | [**Ptsv2paymentsidcapturesBuyerInformation**](Ptsv2paymentsidcapturesBuyerInformation.md) | | [optional] +**device_information** | [**Ptsv2paymentsDeviceInformation**](Ptsv2paymentsDeviceInformation.md) | | [optional] +**merchant_information** | [**Ptsv2paymentsidrefundsMerchantInformation**](Ptsv2paymentsidrefundsMerchantInformation.md) | | [optional] +**aggregator_information** | [**Ptsv2paymentsidcapturesAggregatorInformation**](Ptsv2paymentsidcapturesAggregatorInformation.md) | | [optional] +**point_of_sale_information** | [**Ptsv2paymentsidrefundsPointOfSaleInformation**](Ptsv2paymentsidrefundsPointOfSaleInformation.md) | | [optional] +**merchant_defined_information** | [**Array<Ptsv2paymentsMerchantDefinedInformation>**](Ptsv2paymentsMerchantDefinedInformation.md) | Description of this field is not available. | [optional] diff --git a/docs/RefundPaymentRequest.md b/docs/RefundPaymentRequest.md index 3456500c..930be386 100644 --- a/docs/RefundPaymentRequest.md +++ b/docs/RefundPaymentRequest.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**client_reference_information** | [**V2paymentsClientReferenceInformation**](V2paymentsClientReferenceInformation.md) | | [optional] -**processing_information** | [**V2paymentsidrefundsProcessingInformation**](V2paymentsidrefundsProcessingInformation.md) | | [optional] -**payment_information** | [**V2paymentsidrefundsPaymentInformation**](V2paymentsidrefundsPaymentInformation.md) | | [optional] -**order_information** | [**V2paymentsidrefundsOrderInformation**](V2paymentsidrefundsOrderInformation.md) | | [optional] -**buyer_information** | [**V2paymentsidcapturesBuyerInformation**](V2paymentsidcapturesBuyerInformation.md) | | [optional] -**device_information** | [**V2paymentsDeviceInformation**](V2paymentsDeviceInformation.md) | | [optional] -**merchant_information** | [**V2paymentsidrefundsMerchantInformation**](V2paymentsidrefundsMerchantInformation.md) | | [optional] -**aggregator_information** | [**V2paymentsidcapturesAggregatorInformation**](V2paymentsidcapturesAggregatorInformation.md) | | [optional] -**point_of_sale_information** | [**V2paymentsidrefundsPointOfSaleInformation**](V2paymentsidrefundsPointOfSaleInformation.md) | | [optional] -**merchant_defined_information** | [**Array<V2paymentsMerchantDefinedInformation>**](V2paymentsMerchantDefinedInformation.md) | TBD | [optional] +**client_reference_information** | [**Ptsv2paymentsClientReferenceInformation**](Ptsv2paymentsClientReferenceInformation.md) | | [optional] +**processing_information** | [**Ptsv2paymentsidrefundsProcessingInformation**](Ptsv2paymentsidrefundsProcessingInformation.md) | | [optional] +**payment_information** | [**Ptsv2paymentsidrefundsPaymentInformation**](Ptsv2paymentsidrefundsPaymentInformation.md) | | [optional] +**order_information** | [**Ptsv2paymentsidrefundsOrderInformation**](Ptsv2paymentsidrefundsOrderInformation.md) | | [optional] +**buyer_information** | [**Ptsv2paymentsidcapturesBuyerInformation**](Ptsv2paymentsidcapturesBuyerInformation.md) | | [optional] +**device_information** | [**Ptsv2paymentsDeviceInformation**](Ptsv2paymentsDeviceInformation.md) | | [optional] +**merchant_information** | [**Ptsv2paymentsidrefundsMerchantInformation**](Ptsv2paymentsidrefundsMerchantInformation.md) | | [optional] +**aggregator_information** | [**Ptsv2paymentsidcapturesAggregatorInformation**](Ptsv2paymentsidcapturesAggregatorInformation.md) | | [optional] +**point_of_sale_information** | [**Ptsv2paymentsidrefundsPointOfSaleInformation**](Ptsv2paymentsidrefundsPointOfSaleInformation.md) | | [optional] +**merchant_defined_information** | [**Array<Ptsv2paymentsMerchantDefinedInformation>**](Ptsv2paymentsMerchantDefinedInformation.md) | Description of this field is not available. | [optional] diff --git a/docs/ReportDefinitionsApi.md b/docs/ReportDefinitionsApi.md new file mode 100644 index 00000000..e9d24338 --- /dev/null +++ b/docs/ReportDefinitionsApi.md @@ -0,0 +1,109 @@ +# CyberSource::ReportDefinitionsApi + +All URIs are relative to *https://apitest.cybersource.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_resource_info_by_report_definition**](ReportDefinitionsApi.md#get_resource_info_by_report_definition) | **GET** /reporting/v3/report-definitions/{reportDefinitionName} | Get a single report definition information +[**get_resource_v2_info**](ReportDefinitionsApi.md#get_resource_v2_info) | **GET** /reporting/v3/report-definitions | Get reporting resource information + + +# **get_resource_info_by_report_definition** +> InlineResponse2005 get_resource_info_by_report_definition(report_definition_name, opts) + +Get a single report definition information + +The report definition name must be used as path parameter exclusive of each other + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::ReportDefinitionsApi.new + +report_definition_name = "report_definition_name_example" # String | Name of the Report definition to retrieve + +opts = { + organization_id: "organization_id_example" # String | Valid Cybersource Organization Id +} + +begin + #Get a single report definition information + result = api_instance.get_resource_info_by_report_definition(report_definition_name, opts) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling ReportDefinitionsApi->get_resource_info_by_report_definition: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **report_definition_name** | **String**| Name of the Report definition to retrieve | + **organization_id** | **String**| Valid Cybersource Organization Id | [optional] + +### Return type + +[**InlineResponse2005**](InlineResponse2005.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/hal+json + + + +# **get_resource_v2_info** +> InlineResponse2004 get_resource_v2_info(opts) + +Get reporting resource information + + + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::ReportDefinitionsApi.new + +opts = { + organization_id: "organization_id_example" # String | Valid Cybersource Organization Id +} + +begin + #Get reporting resource information + result = api_instance.get_resource_v2_info(opts) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling ReportDefinitionsApi->get_resource_v2_info: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **organization_id** | **String**| Valid Cybersource Organization Id | [optional] + +### Return type + +[**InlineResponse2004**](InlineResponse2004.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/hal+json + + + diff --git a/docs/ReportDownloadsApi.md b/docs/ReportDownloadsApi.md new file mode 100644 index 00000000..b9440df5 --- /dev/null +++ b/docs/ReportDownloadsApi.md @@ -0,0 +1,62 @@ +# CyberSource::ReportDownloadsApi + +All URIs are relative to *https://apitest.cybersource.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**download_report**](ReportDownloadsApi.md#download_report) | **GET** /reporting/v3/report-downloads | Download a report + + +# **download_report** +> download_report(report_date, report_name, opts) + +Download a report + +Download a report for the given report name on the specified date + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::ReportDownloadsApi.new + +report_date = Date.parse("2013-10-20") # Date | Valid date on which to download the report 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 + +report_name = "report_name_example" # String | Name of the report to download + +opts = { + organization_id: "organization_id_example" # String | Valid Cybersource Organization Id +} + +begin + #Download a report + api_instance.download_report(report_date, report_name, opts) +rescue CyberSource::ApiError => e + puts "Exception when calling ReportDownloadsApi->download_report: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **report_date** | **Date**| Valid date on which to download the report 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 | + **report_name** | **String**| Name of the report to download | + **organization_id** | **String**| Valid Cybersource Organization Id | [optional] + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/xml, test/csv + + + diff --git a/docs/ReportSubscriptionsApi.md b/docs/ReportSubscriptionsApi.md new file mode 100644 index 00000000..e7e3671d --- /dev/null +++ b/docs/ReportSubscriptionsApi.md @@ -0,0 +1,195 @@ +# CyberSource::ReportSubscriptionsApi + +All URIs are relative to *https://apitest.cybersource.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_subscription**](ReportSubscriptionsApi.md#create_subscription) | **PUT** /reporting/v3/report-subscriptions/{reportName} | Create Report Subscription for a report name by organization +[**delete_subscription**](ReportSubscriptionsApi.md#delete_subscription) | **DELETE** /reporting/v3/report-subscriptions/{reportName} | Delete subscription of a report name by organization +[**get_all_subscriptions**](ReportSubscriptionsApi.md#get_all_subscriptions) | **GET** /reporting/v3/report-subscriptions | Retrieve all subscriptions by organization +[**get_subscription**](ReportSubscriptionsApi.md#get_subscription) | **GET** /reporting/v3/report-subscriptions/{reportName} | Retrieve subscription for a report name by organization + + +# **create_subscription** +> create_subscription(report_name, request_body) + +Create Report Subscription for a report name by organization + + + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::ReportSubscriptionsApi.new + +report_name = "report_name_example" # String | Name of the Report to Create + +request_body = CyberSource::RequestBody.new # RequestBody | Report subscription request payload + + +begin + #Create Report Subscription for a report name by organization + api_instance.create_subscription(report_name, request_body) +rescue CyberSource::ApiError => e + puts "Exception when calling ReportSubscriptionsApi->create_subscription: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **report_name** | **String**| Name of the Report to Create | + **request_body** | [**RequestBody**](RequestBody.md)| Report subscription request payload | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json + + + +# **delete_subscription** +> delete_subscription(report_name) + +Delete subscription of a report name by organization + + + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::ReportSubscriptionsApi.new + +report_name = "report_name_example" # String | Name of the Report to Delete + + +begin + #Delete subscription of a report name by organization + api_instance.delete_subscription(report_name) +rescue CyberSource::ApiError => e + puts "Exception when calling ReportSubscriptionsApi->delete_subscription: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **report_name** | **String**| Name of the Report to Delete | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/hal+json + + + +# **get_all_subscriptions** +> InlineResponse2006 get_all_subscriptions + +Retrieve all subscriptions by organization + + + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::ReportSubscriptionsApi.new + +begin + #Retrieve all subscriptions by organization + result = api_instance.get_all_subscriptions + p result +rescue CyberSource::ApiError => e + puts "Exception when calling ReportSubscriptionsApi->get_all_subscriptions: #{e}" +end +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**InlineResponse2006**](InlineResponse2006.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/hal+json + + + +# **get_subscription** +> InlineResponse2006Subscriptions get_subscription(report_name) + +Retrieve subscription for a report name by organization + + + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::ReportSubscriptionsApi.new + +report_name = "report_name_example" # String | Name of the Report to Retrieve + + +begin + #Retrieve subscription for a report name by organization + result = api_instance.get_subscription(report_name) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling ReportSubscriptionsApi->get_subscription: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **report_name** | **String**| Name of the Report to Retrieve | + +### Return type + +[**InlineResponse2006Subscriptions**](InlineResponse2006Subscriptions.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/hal+json + + + diff --git a/docs/ReportsApi.md b/docs/ReportsApi.md new file mode 100644 index 00000000..13410c65 --- /dev/null +++ b/docs/ReportsApi.md @@ -0,0 +1,175 @@ +# CyberSource::ReportsApi + +All URIs are relative to *https://apitest.cybersource.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_report**](ReportsApi.md#create_report) | **POST** /reporting/v3/reports | Create Adhoc Report +[**get_report_by_report_id**](ReportsApi.md#get_report_by_report_id) | **GET** /reporting/v3/reports/{reportId} | Get Report based on reportId +[**search_reports**](ReportsApi.md#search_reports) | **GET** /reporting/v3/reports | Retrieve available reports + + +# **create_report** +> create_report(request_body) + +Create Adhoc Report + +Create one time report + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::ReportsApi.new + +request_body = CyberSource::RequestBody1.new # RequestBody1 | Report subscription request payload + + +begin + #Create Adhoc Report + api_instance.create_report(request_body) +rescue CyberSource::ApiError => e + puts "Exception when calling ReportsApi->create_report: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_body** | [**RequestBody1**](RequestBody1.md)| Report subscription request payload | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json + + + +# **get_report_by_report_id** +> InlineResponse2008 get_report_by_report_id(report_id, opts) + +Get Report based on reportId + +ReportId is mandatory input + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::ReportsApi.new + +report_id = "report_id_example" # String | Valid Report Id + +opts = { + organization_id: "organization_id_example" # String | Valid Cybersource Organization Id +} + +begin + #Get Report based on reportId + result = api_instance.get_report_by_report_id(report_id, opts) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling ReportsApi->get_report_by_report_id: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **report_id** | **String**| Valid Report Id | + **organization_id** | **String**| Valid Cybersource Organization Id | [optional] + +### Return type + +[**InlineResponse2008**](InlineResponse2008.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/hal+json, application/xml + + + +# **search_reports** +> InlineResponse2007 search_reports(start_time, end_time, time_query_type, opts) + +Retrieve available reports + +Retrieve list of available reports + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::ReportsApi.new + +start_time = DateTime.parse("2013-10-20T19:20:30+01:00") # DateTime | 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 + +end_time = DateTime.parse("2013-10-20T19:20:30+01:00") # DateTime | 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 + +time_query_type = "time_query_type_example" # String | Specify time you woud like to search + +opts = { + organization_id: "organization_id_example", # String | Valid Cybersource Organization Id + report_mime_type: "report_mime_type_example", # String | Valid Report Format + report_frequency: "report_frequency_example", # String | Valid Report Frequency + report_name: "report_name_example", # String | Valid Report Name + report_definition_id: 56, # Integer | Valid Report Definition Id + report_status: "report_status_example" # String | Valid Report Status +} + +begin + #Retrieve available reports + result = api_instance.search_reports(start_time, end_time, time_query_type, opts) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling ReportsApi->search_reports: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start_time** | **DateTime**| 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 | + **end_time** | **DateTime**| 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 | + **time_query_type** | **String**| Specify time you woud like to search | + **organization_id** | **String**| Valid Cybersource Organization Id | [optional] + **report_mime_type** | **String**| Valid Report Format | [optional] + **report_frequency** | **String**| Valid Report Frequency | [optional] + **report_name** | **String**| Valid Report Name | [optional] + **report_definition_id** | **Integer**| Valid Report Definition Id | [optional] + **report_status** | **String**| Valid Report Status | [optional] + +### Return type + +[**InlineResponse2007**](InlineResponse2007.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/hal+json + + + diff --git a/docs/RequestBody.md b/docs/RequestBody.md new file mode 100644 index 00000000..f81f19d9 --- /dev/null +++ b/docs/RequestBody.md @@ -0,0 +1,19 @@ +# CyberSource::RequestBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_id** | **String** | | [optional] +**report_definition_name** | **String** | | +**report_fields** | **Array<String>** | | +**report_mime_type** | **String** | | [optional] +**report_frequency** | **String** | | [optional] +**report_name** | **String** | | +**timezone** | **String** | | [optional] +**start_time** | **DateTime** | | [optional] +**start_day** | **Integer** | | [optional] +**report_filters** | **Hash<String, Array<String>>** | | [optional] +**report_preferences** | [**InlineResponse2006ReportPreferences**](InlineResponse2006ReportPreferences.md) | | [optional] +**selected_merchant_group_name** | **String** | | [optional] + + diff --git a/docs/RequestBody1.md b/docs/RequestBody1.md new file mode 100644 index 00000000..2a1f43c3 --- /dev/null +++ b/docs/RequestBody1.md @@ -0,0 +1,18 @@ +# CyberSource::RequestBody1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_id** | **String** | Valid CyberSource Organization Id | [optional] +**report_definition_name** | **String** | | [optional] +**report_fields** | **Array<String>** | List of fields which needs to get included in a report | [optional] +**report_mime_type** | **String** | Format of the report | [optional] +**report_name** | **String** | Name of the report | [optional] +**timezone** | **String** | Timezone of the report | [optional] +**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] +**selected_merchant_group_name** | **String** | Specifies the group name | [optional] + + diff --git a/docs/ReversalApi.md b/docs/ReversalApi.md index 8faf8073..d77b0d1e 100644 --- a/docs/ReversalApi.md +++ b/docs/ReversalApi.md @@ -1,11 +1,10 @@ # CyberSource::ReversalApi -All URIs are relative to *https://api.cybersource.com* +All URIs are relative to *https://apitest.cybersource.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**auth_reversal**](ReversalApi.md#auth_reversal) | **POST** /v2/payments/{id}/reversals | Process an Authorization Reversal -[**get_auth_reversal**](ReversalApi.md#get_auth_reversal) | **GET** /v2/reversals/{id} | Retrieve an Authorization Reversal +[**auth_reversal**](ReversalApi.md#auth_reversal) | **POST** /pts/v2/payments/{id}/reversals | Process an Authorization Reversal # **auth_reversal** @@ -18,7 +17,7 @@ Include the payment ID in the POST request to reverse the payment amount. ### Example ```ruby # load the gem -require 'cyberSource_client' +require 'cybersource_rest_client' api_instance = CyberSource::ReversalApi.new @@ -53,55 +52,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **get_auth_reversal** -> InlineResponse2003 get_auth_reversal(id) - -Retrieve an Authorization Reversal - -Include the authorization reversal ID in the GET request to retrieve the authorization reversal details. - -### Example -```ruby -# load the gem -require 'cyberSource_client' - -api_instance = CyberSource::ReversalApi.new - -id = "id_example" # String | The authorization reversal ID returned from a previous authorization reversal request. - - -begin - #Retrieve an Authorization Reversal - result = api_instance.get_auth_reversal(id) - p result -rescue CyberSource::ApiError => e - puts "Exception when calling ReversalApi->get_auth_reversal: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The authorization reversal ID returned from a previous authorization reversal request. | - -### Return type - -[**InlineResponse2003**](InlineResponse2003.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 diff --git a/docs/SearchTransactionsApi.md b/docs/SearchTransactionsApi.md new file mode 100644 index 00000000..5f6a7734 --- /dev/null +++ b/docs/SearchTransactionsApi.md @@ -0,0 +1,104 @@ +# CyberSource::SearchTransactionsApi + +All URIs are relative to *https://apitest.cybersource.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_search**](SearchTransactionsApi.md#create_search) | **POST** /tss/v2/searches | Create a search request +[**get_search**](SearchTransactionsApi.md#get_search) | **GET** /tss/v2/searches/{id} | Get Search results + + +# **create_search** +> InlineResponse2017 create_search(create_search_request) + +Create a search request + +Create a search request. + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::SearchTransactionsApi.new + +create_search_request = CyberSource::CreateSearchRequest.new # CreateSearchRequest | + + +begin + #Create a search request + result = api_instance.create_search(create_search_request) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling SearchTransactionsApi->create_search: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_search_request** | [**CreateSearchRequest**](CreateSearchRequest.md)| | + +### Return type + +[**InlineResponse2017**](InlineResponse2017.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 + + + +# **get_search** +> InlineResponse2017 get_search(id) + +Get Search results + +Include the Search ID in the GET request to retrieve the search results. + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::SearchTransactionsApi.new + +id = "id_example" # String | Search ID. + + +begin + #Get Search results + result = api_instance.get_search(id) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling SearchTransactionsApi->get_search: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Search ID. | + +### Return type + +[**InlineResponse2017**](InlineResponse2017.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 + + + diff --git a/docs/SecureFileShareApi.md b/docs/SecureFileShareApi.md new file mode 100644 index 00000000..fa4c310b --- /dev/null +++ b/docs/SecureFileShareApi.md @@ -0,0 +1,114 @@ +# CyberSource::SecureFileShareApi + +All URIs are relative to *https://apitest.cybersource.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_file**](SecureFileShareApi.md#get_file) | **GET** /v1/files/{fileId} | Download a file with file identifier +[**get_file_details**](SecureFileShareApi.md#get_file_details) | **GET** /v1/file-details | Get list of files + + +# **get_file** +> get_file(file_id, opts) + +Download a file with file identifier + +Download a file for the given file identifier + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::SecureFileShareApi.new + +file_id = "file_id_example" # String | Unique identifier for each file + +opts = { + organization_id: "organization_id_example" # String | Valid Cybersource Organization Id +} + +begin + #Download a file with file identifier + api_instance.get_file(file_id, opts) +rescue CyberSource::ApiError => e + puts "Exception when calling SecureFileShareApi->get_file: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **file_id** | **String**| Unique identifier for each file | + **organization_id** | **String**| Valid Cybersource Organization Id | [optional] + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/xml, text/csv, application/pdf + + + +# **get_file_details** +> InlineResponse2009 get_file_details(start_date, end_date, opts) + +Get list of files + +Get list of files and it's information of them available inside the report directory + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::SecureFileShareApi.new + +start_date = Date.parse("2013-10-20") # Date | Valid start 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 + +end_date = Date.parse("2013-10-20") # 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 + +opts = { + organization_id: "organization_id_example" # String | Valid Cybersource Organization Id +} + +begin + #Get list of files + result = api_instance.get_file_details(start_date, end_date, opts) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling SecureFileShareApi->get_file_details: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start_date** | **Date**| Valid start 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 | + **end_date** | **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 | + **organization_id** | **String**| Valid Cybersource Organization Id | [optional] + +### Return type + +[**InlineResponse2009**](InlineResponse2009.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/hal+json + + + diff --git a/docs/Tmsv1instrumentidentifiersBankAccount.md b/docs/Tmsv1instrumentidentifiersBankAccount.md new file mode 100644 index 00000000..78e2ffee --- /dev/null +++ b/docs/Tmsv1instrumentidentifiersBankAccount.md @@ -0,0 +1,9 @@ +# CyberSource::Tmsv1instrumentidentifiersBankAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number** | **String** | Bank account number. | [optional] +**routing_number** | **String** | Routing number. | [optional] + + diff --git a/docs/Tmsv1instrumentidentifiersCard.md b/docs/Tmsv1instrumentidentifiersCard.md new file mode 100644 index 00000000..356f38f4 --- /dev/null +++ b/docs/Tmsv1instrumentidentifiersCard.md @@ -0,0 +1,8 @@ +# CyberSource::Tmsv1instrumentidentifiersCard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number** | **String** | Credit card number (PAN). | [optional] + + diff --git a/docs/Tmsv1instrumentidentifiersDetails.md b/docs/Tmsv1instrumentidentifiersDetails.md new file mode 100644 index 00000000..3bbce817 --- /dev/null +++ b/docs/Tmsv1instrumentidentifiersDetails.md @@ -0,0 +1,9 @@ +# CyberSource::Tmsv1instrumentidentifiersDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | The name of the field that threw the error. | [optional] +**location** | **String** | The location of the field that threw the error. | [optional] + + diff --git a/docs/Tmsv1instrumentidentifiersLinks.md b/docs/Tmsv1instrumentidentifiersLinks.md new file mode 100644 index 00000000..a575cc12 --- /dev/null +++ b/docs/Tmsv1instrumentidentifiersLinks.md @@ -0,0 +1,10 @@ +# CyberSource::Tmsv1instrumentidentifiersLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_self** | [**Tmsv1instrumentidentifiersLinksSelf**](Tmsv1instrumentidentifiersLinksSelf.md) | | [optional] +**ancestor** | [**Tmsv1instrumentidentifiersLinksSelf**](Tmsv1instrumentidentifiersLinksSelf.md) | | [optional] +**successor** | [**Tmsv1instrumentidentifiersLinksSelf**](Tmsv1instrumentidentifiersLinksSelf.md) | | [optional] + + diff --git a/docs/Tmsv1instrumentidentifiersLinksSelf.md b/docs/Tmsv1instrumentidentifiersLinksSelf.md new file mode 100644 index 00000000..1ca4f2dd --- /dev/null +++ b/docs/Tmsv1instrumentidentifiersLinksSelf.md @@ -0,0 +1,8 @@ +# CyberSource::Tmsv1instrumentidentifiersLinksSelf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | | [optional] + + diff --git a/docs/Tmsv1instrumentidentifiersMetadata.md b/docs/Tmsv1instrumentidentifiersMetadata.md new file mode 100644 index 00000000..3691cf7b --- /dev/null +++ b/docs/Tmsv1instrumentidentifiersMetadata.md @@ -0,0 +1,8 @@ +# CyberSource::Tmsv1instrumentidentifiersMetadata + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creator** | **String** | The creator of the token. | [optional] + + diff --git a/docs/Tmsv1instrumentidentifiersProcessingInformation.md b/docs/Tmsv1instrumentidentifiersProcessingInformation.md new file mode 100644 index 00000000..92a78a33 --- /dev/null +++ b/docs/Tmsv1instrumentidentifiersProcessingInformation.md @@ -0,0 +1,8 @@ +# CyberSource::Tmsv1instrumentidentifiersProcessingInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**authorization_options** | [**Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptions**](Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptions.md) | | [optional] + + diff --git a/docs/Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptions.md b/docs/Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptions.md new file mode 100644 index 00000000..20c512fb --- /dev/null +++ b/docs/Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptions.md @@ -0,0 +1,8 @@ +# CyberSource::Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**initiator** | [**Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator**](Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.md) | | [optional] + + diff --git a/docs/Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.md b/docs/Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.md new file mode 100644 index 00000000..31268f86 --- /dev/null +++ b/docs/Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.md @@ -0,0 +1,8 @@ +# CyberSource::Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**merchant_initiated_transaction** | [**Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction**](Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction.md) | | [optional] + + diff --git a/docs/Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md b/docs/Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md new file mode 100644 index 00000000..bc09773f --- /dev/null +++ b/docs/Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md @@ -0,0 +1,8 @@ +# CyberSource::Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**previous_transaction_id** | **String** | Previous Consumer Initiated Transaction Id. | [optional] + + diff --git a/docs/Tmsv1paymentinstrumentsBankAccount.md b/docs/Tmsv1paymentinstrumentsBankAccount.md new file mode 100644 index 00000000..73399d7b --- /dev/null +++ b/docs/Tmsv1paymentinstrumentsBankAccount.md @@ -0,0 +1,8 @@ +# CyberSource::Tmsv1paymentinstrumentsBankAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | Type of Bank Account. | [optional] + + diff --git a/docs/Tmsv1paymentinstrumentsBillTo.md b/docs/Tmsv1paymentinstrumentsBillTo.md new file mode 100644 index 00000000..cf71a2e7 --- /dev/null +++ b/docs/Tmsv1paymentinstrumentsBillTo.md @@ -0,0 +1,18 @@ +# CyberSource::Tmsv1paymentinstrumentsBillTo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**first_name** | **String** | Bill to First Name. | [optional] +**last_name** | **String** | Bill to Last Name. | [optional] +**company** | **String** | Bill to Company. | [optional] +**address1** | **String** | Bill to Address Line 1. | [optional] +**address2** | **String** | Bill to Address Line 2. | [optional] +**locality** | **String** | Bill to City. | [optional] +**administrative_area** | **String** | Bill to State. | [optional] +**postal_code** | **String** | Bill to Postal Code. | [optional] +**country** | **String** | Bill to Country. Accepts input in the ISO 3166-1 standard, stores as ISO 3166-1-Alpha-2 | [optional] +**email** | **String** | Valid Bill to Email. | [optional] +**phone_number** | **String** | Bill to Phone Number. | [optional] + + diff --git a/docs/Tmsv1paymentinstrumentsBuyerInformation.md b/docs/Tmsv1paymentinstrumentsBuyerInformation.md new file mode 100644 index 00000000..7f8c1a44 --- /dev/null +++ b/docs/Tmsv1paymentinstrumentsBuyerInformation.md @@ -0,0 +1,11 @@ +# CyberSource::Tmsv1paymentinstrumentsBuyerInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**company_tax_id** | **String** | Company Tax ID. | [optional] +**currency** | **String** | Currency. Accepts input in the ISO 4217 standard, stores as ISO 4217 Alpha | [optional] +**date_o_birth** | **String** | Date of birth YYYY-MM-DD. | [optional] +**personal_identification** | [**Array<Tmsv1paymentinstrumentsBuyerInformationPersonalIdentification>**](Tmsv1paymentinstrumentsBuyerInformationPersonalIdentification.md) | | [optional] + + diff --git a/docs/Tmsv1paymentinstrumentsBuyerInformationIssuedBy.md b/docs/Tmsv1paymentinstrumentsBuyerInformationIssuedBy.md new file mode 100644 index 00000000..7567dc37 --- /dev/null +++ b/docs/Tmsv1paymentinstrumentsBuyerInformationIssuedBy.md @@ -0,0 +1,8 @@ +# CyberSource::Tmsv1paymentinstrumentsBuyerInformationIssuedBy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**administrative_area** | **String** | State or province where the identification was issued. | [optional] + + diff --git a/docs/Tmsv1paymentinstrumentsBuyerInformationPersonalIdentification.md b/docs/Tmsv1paymentinstrumentsBuyerInformationPersonalIdentification.md new file mode 100644 index 00000000..ebf4c913 --- /dev/null +++ b/docs/Tmsv1paymentinstrumentsBuyerInformationPersonalIdentification.md @@ -0,0 +1,10 @@ +# CyberSource::Tmsv1paymentinstrumentsBuyerInformationPersonalIdentification + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Identification Number. | [optional] +**type** | **String** | Type of personal identification. | [optional] +**issued_by** | [**Tmsv1paymentinstrumentsBuyerInformationIssuedBy**](Tmsv1paymentinstrumentsBuyerInformationIssuedBy.md) | | [optional] + + diff --git a/docs/Tmsv1paymentinstrumentsCard.md b/docs/Tmsv1paymentinstrumentsCard.md new file mode 100644 index 00000000..3e52ff04 --- /dev/null +++ b/docs/Tmsv1paymentinstrumentsCard.md @@ -0,0 +1,14 @@ +# CyberSource::Tmsv1paymentinstrumentsCard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expiration_month** | **String** | Credit card expiration month. | [optional] +**expiration_year** | **String** | Credit card expiration year. | [optional] +**type** | **String** | Credit card brand. | [optional] +**issue_number** | **String** | Credit card issue number. | [optional] +**start_month** | **String** | Credit card start month. | [optional] +**start_year** | **String** | Credit card start year. | [optional] +**use_as** | **String** | Card Use As Field. Supported value of \"pinless debit\" only. Only for use with Pinless Debit tokens. | [optional] + + diff --git a/docs/Tmsv1paymentinstrumentsInstrumentIdentifier.md b/docs/Tmsv1paymentinstrumentsInstrumentIdentifier.md new file mode 100644 index 00000000..46f882a2 --- /dev/null +++ b/docs/Tmsv1paymentinstrumentsInstrumentIdentifier.md @@ -0,0 +1,15 @@ +# CyberSource::Tmsv1paymentinstrumentsInstrumentIdentifier + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**Tmsv1instrumentidentifiersLinks**](Tmsv1instrumentidentifiersLinks.md) | | [optional] +**object** | **String** | Describes type of token. For example: customer, paymentInstrument or instrumentIdentifier. | [optional] +**state** | **String** | Current state of the token. | [optional] +**id** | **String** | The id of the existing instrument identifier to be linked to the newly created payment instrument. | [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/Tmsv1paymentinstrumentsMerchantInformation.md b/docs/Tmsv1paymentinstrumentsMerchantInformation.md new file mode 100644 index 00000000..dfa618e7 --- /dev/null +++ b/docs/Tmsv1paymentinstrumentsMerchantInformation.md @@ -0,0 +1,8 @@ +# CyberSource::Tmsv1paymentinstrumentsMerchantInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**merchant_descriptor** | [**Tmsv1paymentinstrumentsMerchantInformationMerchantDescriptor**](Tmsv1paymentinstrumentsMerchantInformationMerchantDescriptor.md) | | [optional] + + diff --git a/docs/Tmsv1paymentinstrumentsMerchantInformationMerchantDescriptor.md b/docs/Tmsv1paymentinstrumentsMerchantInformationMerchantDescriptor.md new file mode 100644 index 00000000..d97aa3af --- /dev/null +++ b/docs/Tmsv1paymentinstrumentsMerchantInformationMerchantDescriptor.md @@ -0,0 +1,8 @@ +# CyberSource::Tmsv1paymentinstrumentsMerchantInformationMerchantDescriptor + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**alternate_name** | **String** | Alternate information for your business. This API field overrides the company entry description value in your CyberSource account. | [optional] + + diff --git a/docs/Tmsv1paymentinstrumentsProcessingInformation.md b/docs/Tmsv1paymentinstrumentsProcessingInformation.md new file mode 100644 index 00000000..034b4abb --- /dev/null +++ b/docs/Tmsv1paymentinstrumentsProcessingInformation.md @@ -0,0 +1,9 @@ +# CyberSource::Tmsv1paymentinstrumentsProcessingInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bill_payment_program_enabled** | **BOOLEAN** | Bill Payment Program Enabled. | [optional] +**bank_transfer_options** | [**Tmsv1paymentinstrumentsProcessingInformationBankTransferOptions**](Tmsv1paymentinstrumentsProcessingInformationBankTransferOptions.md) | | [optional] + + diff --git a/docs/Tmsv1paymentinstrumentsProcessingInformationBankTransferOptions.md b/docs/Tmsv1paymentinstrumentsProcessingInformationBankTransferOptions.md new file mode 100644 index 00000000..e0316566 --- /dev/null +++ b/docs/Tmsv1paymentinstrumentsProcessingInformationBankTransferOptions.md @@ -0,0 +1,8 @@ +# CyberSource::Tmsv1paymentinstrumentsProcessingInformationBankTransferOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sec_code** | **String** | Authorization method used for the transaction.(acceptable values are CCD, PPD, TEL, WEB). | [optional] + + diff --git a/docs/TokenizationApi.md b/docs/TokenizationApi.md deleted file mode 100644 index 5dbcd1f2..00000000 --- a/docs/TokenizationApi.md +++ /dev/null @@ -1,57 +0,0 @@ -# CyberSource::TokenizationApi - -All URIs are relative to *https://api.cybersource.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**tokenize**](TokenizationApi.md#tokenize) | **POST** /payments/flex/v1/tokens/ | Tokenize card - - -# **tokenize** -> InlineResponse2001 tokenize(opts) - -Tokenize card - -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. - -### Example -```ruby -# load the gem -require 'cyberSource_client' - -api_instance = CyberSource::TokenizationApi.new - -opts = { - tokenize_request: CyberSource::TokenizeRequest.new # TokenizeRequest | -} - -begin - #Tokenize card - result = api_instance.tokenize(opts) - p result -rescue CyberSource::ApiError => e - puts "Exception when calling TokenizationApi->tokenize: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tokenize_request** | [**TokenizeRequest**](TokenizeRequest.md)| | [optional] - -### Return type - -[**InlineResponse2001**](InlineResponse2001.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - diff --git a/docs/TokenizeParameters.md b/docs/TokenizeParameters.md index 34760280..f54c2e20 100644 --- a/docs/TokenizeParameters.md +++ b/docs/TokenizeParameters.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **key_id** | **String** | Unique identifier for the generated token. This is obtained from the Generate Key request. See the [Java Script and Java examples] (http://apps.cybersource.com/library/documentation/dev_guides/Secure_Acceptance_Flex/Key/html) on how to import the key and encrypt using the imported key. | [optional] -**card_info** | [**Paymentsflexv1tokensCardInfo**](Paymentsflexv1tokensCardInfo.md) | | [optional] +**card_info** | [**Flexv1tokensCardInfo**](Flexv1tokensCardInfo.md) | | [optional] diff --git a/docs/TokenizeRequest.md b/docs/TokenizeRequest.md index 65023c8e..7260e1b0 100644 --- a/docs/TokenizeRequest.md +++ b/docs/TokenizeRequest.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **key_id** | **String** | Unique identifier for the generated token. This is obtained from the Generate Key request. See the [Java Script and Java examples] (http://apps.cybersource.com/library/documentation/dev_guides/Secure_Acceptance_Flex/Key/html) on how to import the key and encrypt using the imported key. | [optional] -**card_info** | [**Paymentsflexv1tokensCardInfo**](Paymentsflexv1tokensCardInfo.md) | | [optional] +**card_info** | [**Flexv1tokensCardInfo**](Flexv1tokensCardInfo.md) | | [optional] diff --git a/docs/TransactionBatchApi.md b/docs/TransactionBatchApi.md new file mode 100644 index 00000000..dfb12c2e --- /dev/null +++ b/docs/TransactionBatchApi.md @@ -0,0 +1,55 @@ +# CyberSource::TransactionBatchApi + +All URIs are relative to *https://apitest.cybersource.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**pts_v1_transaction_batches_id_get**](TransactionBatchApi.md#pts_v1_transaction_batches_id_get) | **GET** /pts/v1/transaction-batches/{id} | Get an individual batch file Details processed through the Offline Transaction Submission Services + + +# **pts_v1_transaction_batches_id_get** +> pts_v1_transaction_batches_id_get(id) + +Get an individual batch file Details processed through the Offline Transaction Submission Services + +Provide the search range + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::TransactionBatchApi.new + +id = "id_example" # String | The batch id assigned for the template. + + +begin + #Get an individual batch file Details processed through the Offline Transaction Submission Services + api_instance.pts_v1_transaction_batches_id_get(id) +rescue CyberSource::ApiError => e + puts "Exception when calling TransactionBatchApi->pts_v1_transaction_batches_id_get: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The batch id assigned for the template. | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/hal+json + + + diff --git a/docs/TransactionBatchesApi.md b/docs/TransactionBatchesApi.md new file mode 100644 index 00000000..b183bc5f --- /dev/null +++ b/docs/TransactionBatchesApi.md @@ -0,0 +1,59 @@ +# CyberSource::TransactionBatchesApi + +All URIs are relative to *https://apitest.cybersource.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**pts_v1_transaction_batches_get**](TransactionBatchesApi.md#pts_v1_transaction_batches_get) | **GET** /pts/v1/transaction-batches | Get a list of batch files processed through the Offline Transaction Submission Services + + +# **pts_v1_transaction_batches_get** +> InlineResponse2002 pts_v1_transaction_batches_get(start_time, end_time) + +Get a list of batch files processed through the Offline Transaction Submission Services + +Provide the search range + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::TransactionBatchesApi.new + +start_time = DateTime.parse("2013-10-20T19:20:30+01:00") # DateTime | 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 + +end_time = DateTime.parse("2013-10-20T19:20:30+01:00") # DateTime | 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 + + +begin + #Get a list of batch files processed through the Offline Transaction Submission Services + result = api_instance.pts_v1_transaction_batches_get(start_time, end_time) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling TransactionBatchesApi->pts_v1_transaction_batches_get: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start_time** | **DateTime**| 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 | + **end_time** | **DateTime**| 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 | + +### Return type + +[**InlineResponse2002**](InlineResponse2002.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/hal+json + + + diff --git a/docs/TransactionDetailsApi.md b/docs/TransactionDetailsApi.md new file mode 100644 index 00000000..00538826 --- /dev/null +++ b/docs/TransactionDetailsApi.md @@ -0,0 +1,56 @@ +# CyberSource::TransactionDetailsApi + +All URIs are relative to *https://apitest.cybersource.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_transaction**](TransactionDetailsApi.md#get_transaction) | **GET** /tss/v2/transactions/{id} | Retrieve a Transaction + + +# **get_transaction** +> InlineResponse20012 get_transaction(id) + +Retrieve a Transaction + +Include the Request ID in the GET request to retrieve the transaction details. + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::TransactionDetailsApi.new + +id = "id_example" # String | Request ID. + + +begin + #Retrieve a Transaction + result = api_instance.get_transaction(id) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling TransactionDetailsApi->get_transaction: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Request ID. | + +### Return type + +[**InlineResponse20012**](InlineResponse20012.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 + + + diff --git a/docs/UserManagementApi.md b/docs/UserManagementApi.md new file mode 100644 index 00000000..89b60cc6 --- /dev/null +++ b/docs/UserManagementApi.md @@ -0,0 +1,63 @@ +# CyberSource::UserManagementApi + +All URIs are relative to *https://apitest.cybersource.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_users**](UserManagementApi.md#get_users) | **GET** /ums/v1/users | Get user based on organization Id, username, permission and role + + +# **get_users** +> InlineResponse20013 get_users(opts) + +Get user based on organization Id, username, permission and role + +This endpoint is to get all the user information depending on the filter criteria passed in the query. + +### Example +```ruby +# load the gem +require 'cybersource_rest_client' + +api_instance = CyberSource::UserManagementApi.new + +opts = { + organization_id: "organization_id_example", # String | This is the orgId of the organization which the user belongs to. + user_name: "user_name_example", # String | User ID of the user you want to get details on. + permission_id: "permission_id_example", # String | permission that you are trying to search user on. + role_id: "role_id_example" # String | role of the user you are trying to search on. +} + +begin + #Get user based on organization Id, username, permission and role + result = api_instance.get_users(opts) + p result +rescue CyberSource::ApiError => e + puts "Exception when calling UserManagementApi->get_users: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **organization_id** | **String**| This is the orgId of the organization which the user belongs to. | [optional] + **user_name** | **String**| User ID of the user you want to get details on. | [optional] + **permission_id** | **String**| permission that you are trying to search user on. | [optional] + **role_id** | **String**| role of the user you are trying to search on. | [optional] + +### Return type + +[**InlineResponse20013**](InlineResponse20013.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 + + + diff --git a/docs/V2creditsPointOfSaleInformation.md b/docs/V2creditsPointOfSaleInformation.md deleted file mode 100644 index cce41e14..00000000 --- a/docs/V2creditsPointOfSaleInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::V2creditsPointOfSaleInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**emv** | [**V2creditsPointOfSaleInformationEmv**](V2creditsPointOfSaleInformationEmv.md) | | [optional] - - diff --git a/docs/V2creditsPointOfSaleInformationEmv.md b/docs/V2creditsPointOfSaleInformationEmv.md deleted file mode 100644 index 28c23a75..00000000 --- a/docs/V2creditsPointOfSaleInformationEmv.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::V2creditsPointOfSaleInformationEmv - -## 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] -**fallback** | **BOOLEAN** | Indicates whether a fallback method was used to enter credit card information into the POS terminal. When a technical problem prevents a successful exchange of information between a chip card and a chip-capable terminal: 1. Swipe the card or key the credit card information into the POS terminal. 2. Use the pos_entry_mode field to indicate whether the information was swiped or keyed. This field is supported only on **Chase Paymentech Solutions** and **GPN**. | [optional] [default to false] -**fallback_condition** | **Float** | Reason for the EMV fallback transaction. An EMV fallback transaction occurs when an EMV transaction fails for one of these reasons: - Technical failure: the EMV terminal or EMV card cannot read and process chip data. - Empty candidate list failure: the EMV terminal does not have any applications in common with the EMV card. EMV terminals are coded to determine whether the terminal and EMV card have any applications in common. EMV terminals provide this information to you. Possible values: - **1**: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal either used information from a successful chip read or it was not a chip transaction. - **2**: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal was an EMV fallback transaction because the attempted chip read was unsuccessful. This field is supported only on **GPN**. | [optional] - - diff --git a/docs/V2creditsProcessingInformation.md b/docs/V2creditsProcessingInformation.md deleted file mode 100644 index 0136c259..00000000 --- a/docs/V2creditsProcessingInformation.md +++ /dev/null @@ -1,16 +0,0 @@ -# CyberSource::V2creditsProcessingInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] -**processor_id** | **String** | Value that identifies the processor/acquirer to use for the transaction. This value is supported only for **CyberSource through VisaNet**. | [optional] -**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] -**reconciliation_id** | **String** | Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). | [optional] -**link_id** | **String** | Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. | [optional] -**report_group** | **String** | Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. | [optional] -**visa_checkout_id** | **String** | Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. | [optional] -**purchase_level** | **String** | Set this field to 3 to indicate that the request includes Level III data. | [optional] -**recurring_options** | [**V2paymentsidrefundsProcessingInformationRecurringOptions**](V2paymentsidrefundsProcessingInformationRecurringOptions.md) | | [optional] - - diff --git a/docs/V2paymentsAggregatorInformation.md b/docs/V2paymentsAggregatorInformation.md deleted file mode 100644 index fef30695..00000000 --- a/docs/V2paymentsAggregatorInformation.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::V2paymentsAggregatorInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**aggregator_id** | **String** | Value that identifies you as a payment aggregator. Get this value from the processor. For processor-specific information, see the aggregator_id field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**name** | **String** | Your payment aggregator business name. For processor-specific information, see the aggregator_name field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**sub_merchant** | [**V2paymentsAggregatorInformationSubMerchant**](V2paymentsAggregatorInformationSubMerchant.md) | | [optional] - - diff --git a/docs/V2paymentsAggregatorInformationSubMerchant.md b/docs/V2paymentsAggregatorInformationSubMerchant.md deleted file mode 100644 index 4ba124ff..00000000 --- a/docs/V2paymentsAggregatorInformationSubMerchant.md +++ /dev/null @@ -1,17 +0,0 @@ -# CyberSource::V2paymentsAggregatorInformationSubMerchant - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**card_acceptor_id** | **String** | Unique identifier assigned by the payment card company to the sub-merchant. | [optional] -**name** | **String** | Sub-merchant’s business name. | [optional] -**address1** | **String** | First line of the sub-merchant’s street address. | [optional] -**locality** | **String** | Sub-merchant’s city. | [optional] -**administrative_area** | **String** | Sub-merchant’s state or province. Use the State, Province, and Territory Codes for the United States and Canada. | [optional] -**region** | **String** | Sub-merchant’s region. Example `NE` indicates that the sub-merchant is in the northeast region. | [optional] -**postal_code** | **String** | Partial postal code for the sub-merchant’s address. | [optional] -**country** | **String** | Sub-merchant’s country. Use the two-character ISO Standard Country Codes. | [optional] -**email** | **String** | Sub-merchant’s email address. **Maximum length for processors** - American Express Direct: 40 - CyberSource through VisaNet: 40 - FDC Compass: 40 - FDC Nashville Global: 19 | [optional] -**phone_number** | **String** | Sub-merchant’s telephone number. **Maximum length for procesors** - American Express Direct: 20 - CyberSource through VisaNet: 20 - FDC Compass: 13 - FDC Nashville Global: 10 | [optional] - - diff --git a/docs/V2paymentsBuyerInformation.md b/docs/V2paymentsBuyerInformation.md deleted file mode 100644 index 57c747a9..00000000 --- a/docs/V2paymentsBuyerInformation.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::V2paymentsBuyerInformation - -## 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] -**date_of_birth** | **String** | Recipient’s date of birth. **Format**: `YYYYMMDD`. This field is a pass-through, which means that CyberSource ensures that the value is eight numeric characters but otherwise does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. | [optional] -**vat_registration_number** | **String** | Customer’s government-assigned tax identification number. For processor-specific information, see the purchaser_vat_registration_number 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] -**personal_identification** | [**Array<V2paymentsBuyerInformationPersonalIdentification>**](V2paymentsBuyerInformationPersonalIdentification.md) | | [optional] -**hashed_password** | **String** | TODO | [optional] - - diff --git a/docs/V2paymentsBuyerInformationPersonalIdentification.md b/docs/V2paymentsBuyerInformationPersonalIdentification.md deleted file mode 100644 index 1b4cf3c7..00000000 --- a/docs/V2paymentsBuyerInformationPersonalIdentification.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::V2paymentsBuyerInformationPersonalIdentification - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | | [optional] -**id** | **String** | Personal Identifier for the customer based on various type. This field is supported only on the processors listed in this description. For processor-specific information, see the personal_id field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**issued_by** | **String** | TBD | [optional] - - diff --git a/docs/V2paymentsClientReferenceInformation.md b/docs/V2paymentsClientReferenceInformation.md deleted file mode 100644 index 2a1dafde..00000000 --- a/docs/V2paymentsClientReferenceInformation.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::V2paymentsClientReferenceInformation - -## 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] -**transaction_id** | **String** | Identifier that you assign to the transaction. See \"Merchant-Initiated Reversals and Voids,\" page 176 | [optional] -**comments** | **String** | Comments | [optional] - - diff --git a/docs/V2paymentsConsumerAuthenticationInformation.md b/docs/V2paymentsConsumerAuthenticationInformation.md deleted file mode 100644 index bd3cad07..00000000 --- a/docs/V2paymentsConsumerAuthenticationInformation.md +++ /dev/null @@ -1,15 +0,0 @@ -# CyberSource::V2paymentsConsumerAuthenticationInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cavv** | **String** | Cardholder authentication verification value (CAVV). | [optional] -**cavv_algorithm** | **String** | Algorithm used to generate the CAVV for Verified by Visa or the UCAF authentication data for Mastercard SecureCode. | [optional] -**eci_raw** | **String** | Raw electronic commerce indicator (ECI). | [optional] -**pares_status** | **String** | Payer authentication response status. | [optional] -**veres_enrolled** | **String** | Verification response enrollment status. | [optional] -**xid** | **String** | Transaction identifier. | [optional] -**ucaf_authentication_data** | **String** | Universal cardholder authentication field (UCAF) data. | [optional] -**ucaf_collection_indicator** | **String** | Universal cardholder authentication field (UCAF) collection indicator. | [optional] - - diff --git a/docs/V2paymentsDeviceInformation.md b/docs/V2paymentsDeviceInformation.md deleted file mode 100644 index a0201aec..00000000 --- a/docs/V2paymentsDeviceInformation.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::V2paymentsDeviceInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**host_name** | **String** | DNS resolved hostname from above _ipAddress_. | [optional] -**ip_address** | **String** | IP address of the customer. | [optional] -**user_agent** | **String** | Customer’s browser as identified from the HTTP header data. For example, Mozilla is the value that identifies the Netscape browser. | [optional] - - diff --git a/docs/V2paymentsMerchantDefinedInformation.md b/docs/V2paymentsMerchantDefinedInformation.md deleted file mode 100644 index 693ca32a..00000000 --- a/docs/V2paymentsMerchantDefinedInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::V2paymentsMerchantDefinedInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **String** | TBD | [optional] -**value** | **String** | TBD | [optional] - - diff --git a/docs/V2paymentsMerchantInformation.md b/docs/V2paymentsMerchantInformation.md deleted file mode 100644 index ea048c8f..00000000 --- a/docs/V2paymentsMerchantInformation.md +++ /dev/null @@ -1,13 +0,0 @@ -# CyberSource::V2paymentsMerchantInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**merchant_descriptor** | [**V2paymentsMerchantInformationMerchantDescriptor**](V2paymentsMerchantInformationMerchantDescriptor.md) | | [optional] -**sales_organization_id** | **String** | Company ID assigned to an independent sales organization. Get this value from Mastercard. For processor-specific information, see the sales_organization_ID field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**category_code** | **Integer** | Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**vat_registration_number** | **String** | Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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] -**card_acceptor_reference_number** | **String** | Reference number that facilitates card acceptor/corporation communication and record keeping. For processor-specific information, see the card_acceptor_ref_number 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] -**transaction_local_date_time** | **String** | Local date and time at your physical location. Include both the date and time in this field or leave it blank. This field is supported only for **CyberSource through VisaNet**. For processor-specific information, see the transaction_local_date_time field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) `Format: YYYYMMDDhhmmss`, where: - YYYY = year - MM = month - DD = day - hh = hour - mm = minutes - ss = seconds | [optional] - - diff --git a/docs/V2paymentsMerchantInformationMerchantDescriptor.md b/docs/V2paymentsMerchantInformationMerchantDescriptor.md deleted file mode 100644 index c780626f..00000000 --- a/docs/V2paymentsMerchantInformationMerchantDescriptor.md +++ /dev/null @@ -1,15 +0,0 @@ -# CyberSource::V2paymentsMerchantInformationMerchantDescriptor - -## 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] -**alternate_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) | [optional] -**contact** | **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) * FDCCompass (13) * Paymentech (13) | [optional] -**address1** | **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) | [optional] -**locality** | **String** | Merchant City. 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) | [optional] -**country** | **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) | [optional] -**postal_code** | **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) | [optional] -**administrative_area** | **String** | Merchant State. 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) | [optional] - - diff --git a/docs/V2paymentsOrderInformation.md b/docs/V2paymentsOrderInformation.md deleted file mode 100644 index c546e99e..00000000 --- a/docs/V2paymentsOrderInformation.md +++ /dev/null @@ -1,13 +0,0 @@ -# CyberSource::V2paymentsOrderInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount_details** | [**V2paymentsOrderInformationAmountDetails**](V2paymentsOrderInformationAmountDetails.md) | | [optional] -**bill_to** | [**V2paymentsOrderInformationBillTo**](V2paymentsOrderInformationBillTo.md) | | [optional] -**ship_to** | [**V2paymentsOrderInformationShipTo**](V2paymentsOrderInformationShipTo.md) | | [optional] -**line_items** | [**Array<V2paymentsOrderInformationLineItems>**](V2paymentsOrderInformationLineItems.md) | | [optional] -**invoice_details** | [**V2paymentsOrderInformationInvoiceDetails**](V2paymentsOrderInformationInvoiceDetails.md) | | [optional] -**shipping_details** | [**V2paymentsOrderInformationShippingDetails**](V2paymentsOrderInformationShippingDetails.md) | | [optional] - - diff --git a/docs/V2paymentsOrderInformationAmountDetails.md b/docs/V2paymentsOrderInformationAmountDetails.md deleted file mode 100644 index 6cd682cb..00000000 --- a/docs/V2paymentsOrderInformationAmountDetails.md +++ /dev/null @@ -1,26 +0,0 @@ -# CyberSource::V2paymentsOrderInformationAmountDetails - -## 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] -**discount_amount** | **String** | Total discount amount applied to the order. For processor-specific information, see the order_discount_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] -**duty_amount** | **String** | Total charges for any import or export duties included in the order. For processor-specific information, see the duty_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] -**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] -**national_tax_included** | **String** | Flag that indicates whether a national tax is included in the order total. Possible values: - **0**: national tax not included - **1**: national tax included For processor-specific information, see the national_tax_indicator 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] -**tax_applied_after_discount** | **String** | Flag that indicates how the merchant manages discounts. Possible values: - **0**: no invoice level discount included - **1**: tax calculated on the postdiscount invoice total - **2**: tax calculated on the prediscount invoice total For processor-specific information, see the order_discount_management_indicator 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] -**tax_applied_level** | **String** | Flag that indicates how you calculate tax. Possible values: - **0**: net prices with tax calculated at line item level - **1**: net prices with tax calculated at invoice level - **2**: gross prices with tax provided at line item level - **3**: gross prices with tax provided at invoice level - **4**: no tax applies on the invoice for the transaction For processor-specific information, see the tax_management_indicator 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] -**tax_type_code** | **String** | For tax amounts that can be categorized as one tax type. This field contains the tax type code that corresponds to the entry in the _lineItems.taxAmount_ field. Possible values: - **056**: sales tax (U.S only) - **TX~**: all taxes (Canada only) Note ~ = space. For processor-specific information, see the total_tax_type_code 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] -**freight_amount** | **String** | Total freight or shipping and handling charges for the order. When you include this field in your request, you must also include the **totalAmount** field. For processor-specific information, see the freight_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] -**foreign_amount** | **String** | Converted amount returned by the DCC service. For processor-specific information, see the foreign_amount field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**foreign_currency** | **String** | Billing currency returned by the DCC service. For processor-specific information, see the foreign_currency field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**exchange_rate** | **String** | Exchange rate returned by the DCC service. Includes a decimal point and a maximum of 4 decimal places. For processor-specific information, see the exchange_rate field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**exchange_rate_time_stamp** | **String** | Time stamp for the exchange rate. This value is returned by the DCC service. Format: `YYYYMMDD~HH:MM` where ~ denotes a space. For processor-specific information, see the exchange_rate_timestamp field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**surcharge** | [**V2paymentsOrderInformationAmountDetailsSurcharge**](V2paymentsOrderInformationAmountDetailsSurcharge.md) | | [optional] -**settlement_amount** | **String** | This is a multicurrency field. It contains the transaction amount (field 4), converted to the Currency used to bill the cardholder’s account. | [optional] -**settlement_currency** | **String** | This is a multicurrency-only field. It contains a 3-digit numeric code that identifies the currency used by the issuer to bill the cardholder's account. | [optional] -**amex_additional_amounts** | [**Array<V2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts>**](V2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts.md) | | [optional] -**tax_details** | [**Array<V2paymentsOrderInformationAmountDetailsTaxDetails>**](V2paymentsOrderInformationAmountDetailsTaxDetails.md) | | [optional] - - diff --git a/docs/V2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts.md b/docs/V2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts.md deleted file mode 100644 index 243e88f6..00000000 --- a/docs/V2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::V2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **String** | Additional amount type. This field is supported only for **American Express Direct**. For processor-specific information, see the additional_amount_type field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**amount** | **String** | Additional amount. This field is supported only for **American Express Direct**. For processor-specific information, see the additional_amount 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/V2paymentsOrderInformationAmountDetailsSurcharge.md b/docs/V2paymentsOrderInformationAmountDetailsSurcharge.md deleted file mode 100644 index 09b16394..00000000 --- a/docs/V2paymentsOrderInformationAmountDetailsSurcharge.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::V2paymentsOrderInformationAmountDetailsSurcharge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount** | **String** | The surcharge amount is included in the total transaction amount but is passed in a separate field to the issuer and acquirer for tracking. The issuer can provide information about the surcharge amount to the customer. - Applicable only for CTV for Payouts. - CTV (<= 08) For processor-specific information, see the surcharge_amount field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**description** | **String** | TBD | [optional] - - diff --git a/docs/V2paymentsOrderInformationAmountDetailsTaxDetails.md b/docs/V2paymentsOrderInformationAmountDetailsTaxDetails.md deleted file mode 100644 index a8c3e49e..00000000 --- a/docs/V2paymentsOrderInformationAmountDetailsTaxDetails.md +++ /dev/null @@ -1,13 +0,0 @@ -# CyberSource::V2paymentsOrderInformationAmountDetailsTaxDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | This is used to determine what type of tax related data should be inclued under _taxDetails_ object. | [optional] -**amount** | **String** | Please see below table for related decription based on above _type_ field. | type | amount description | |-----------|--------------------| | alternate | Total amount of alternate tax for the order. | | local | Sales tax for the order. | | national | National tax for the order. | | vat | Total amount of VAT or other tax included in the order. | | [optional] -**rate** | **String** | Rate of VAT or other tax for the order. Example 0.040 (=4%) Valid range: 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated) | [optional] -**code** | **String** | Type of tax being applied to the item. Possible values: Below values are used by **RBS WorldPay Atlanta**, **FDC Nashville Global**, **Litle** - 0000: unknown tax type - 0001: federal/national sales tax - 0002: state sales tax - 0003: city sales tax - 0004: local sales tax - 0005: municipal sales tax - 0006: other tax - 0010: value-added tax - 0011: goods and services tax - 0012: provincial sales tax - 0013: harmonized sales tax - 0014: Quebec sales tax (QST) - 0020: room tax - 0021: occupancy tax - 0022: energy tax - Blank: Tax not supported on line item. | [optional] -**tax_id** | **String** | Your tax ID number to use for the alternate tax amount. Required if you set alternate tax amount to any value, including zero. You may send this field without sending alternate tax amount. | [optional] -**applied** | **BOOLEAN** | The tax is applied. Valid value is `true` or `false`. | [optional] - - diff --git a/docs/V2paymentsOrderInformationBillTo.md b/docs/V2paymentsOrderInformationBillTo.md deleted file mode 100644 index 7fa9e71a..00000000 --- a/docs/V2paymentsOrderInformationBillTo.md +++ /dev/null @@ -1,24 +0,0 @@ -# CyberSource::V2paymentsOrderInformationBillTo - -## 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] -**middle_name** | **String** | Customer’s middle name. | [optional] -**name_suffix** | **String** | Customer’s name suffix. | [optional] -**title** | **String** | Title. | [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] -**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] -**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] -**district** | **String** | Customer’s neighborhood, community, or region (a barrio in Brazil) within the city or municipality. This field is available only on **Cielo**. | [optional] -**building_number** | **String** | Building number in the street address. This field is supported only for: - Cielo transactions. - Redecard customer validation with CyberSource Latin American Processing. | [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] -**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] -**phone_type** | **String** | Customer's phone number type. For Payouts: This field may be sent only for FDC Compass. Possible Values - * day * home * night * work | [optional] - - diff --git a/docs/V2paymentsOrderInformationInvoiceDetails.md b/docs/V2paymentsOrderInformationInvoiceDetails.md deleted file mode 100644 index 6f9e3a31..00000000 --- a/docs/V2paymentsOrderInformationInvoiceDetails.md +++ /dev/null @@ -1,15 +0,0 @@ -# CyberSource::V2paymentsOrderInformationInvoiceDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**purchase_order_number** | **String** | Value used by your customer to identify the order. This value is typically a purchase order number. CyberSource recommends that you do not populate the field with all zeros or nines. For processor-specific information, see the user_po 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] -**purchase_order_date** | **String** | Date the order was processed. `Format: YYYY-MM-DD`. For processor-specific information, see the purchaser_order_date 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] -**purchase_contact_name** | **String** | The name of the individual or the company contacted for company authorized purchases. For processor-specific information, see the authorized_contact_name 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] -**taxable** | **BOOLEAN** | Flag that indicates whether an order is taxable. This value must be true if the sum of all _lineItems[].taxAmount_ values > 0. If you do not include any _lineItems[].taxAmount_ values in your request, CyberSource does not include _invoiceDetails.taxable_ in the data it sends to the processor. For processor-specific information, see the tax_indicator 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] -**vat_invoice_reference_number** | **String** | VAT invoice number associated with the transaction. For processor-specific information, see the vat_invoice_ref_number 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] -**commodity_code** | **String** | International description code of the overall order’s goods or services or the Categorizes purchases for VAT reporting. Contact your acquirer for a list of codes. For processor-specific information, see the summary_commodity_code 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] -**merchandise_code** | **Float** | Identifier for the merchandise. Possible value: - 1000: Gift card This field is supported only for **American Express Direct**. | [optional] -**transaction_advice_addendum** | [**Array<V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum>**](V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum.md) | | [optional] - - diff --git a/docs/V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum.md b/docs/V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum.md deleted file mode 100644 index 5e3143f6..00000000 --- a/docs/V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | **String** | Four Transaction Advice Addendum (TAA) fields. These fields are used to display descriptive information about a transaction on the customer’s American Express card statement. When you send TAA fields, start with amexdata_taa1, then ...taa2, and so on. Skipping a TAA field causes subsequent TAA fields to be ignored. To use these fields, contact CyberSource Customer Support to have your account enabled for this feature. | [optional] - - diff --git a/docs/V2paymentsOrderInformationLineItems.md b/docs/V2paymentsOrderInformationLineItems.md deleted file mode 100644 index 16bd00b9..00000000 --- a/docs/V2paymentsOrderInformationLineItems.md +++ /dev/null @@ -1,28 +0,0 @@ -# CyberSource::V2paymentsOrderInformationLineItems - -## 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] -**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] -**unit_of_measure** | **String** | Unit of measure, or unit of measure code, for the item. | [optional] -**total_amount** | **String** | Total amount for the item. Normally calculated as the unit price x quantity. | [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] -**tax_rate** | **String** | Tax rate applied to the item. See \"Numbered Elements,\" page 14. Visa: Valid range is 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated). Mastercard: Valid range is 0.00001 to 0.99999 (0.001% to 99.999%). | [optional] -**tax_applied_after_discount** | **String** | Flag to indicate how you handle discount at the line item level. - 0: no line level discount provided - 1: tax was calculated on the post-discount line item total - 2: tax was calculated on the pre-discount line item total `Note` Visa will inset 0 (zero) if an invalid value is included in this field. This field relates to the value in the _lineItems[].discountAmount_ field. | [optional] -**tax_status_indicator** | **String** | Flag to indicate whether tax is exempted or not included. - 0: tax not included - 1: tax included - 2: transaction is not subject to tax | [optional] -**tax_type_code** | **String** | Type of tax being applied to the item. Possible values: Below values are used by **RBS WorldPay Atlanta**, **FDC Nashville Global**, **Litle** - 0000: unknown tax type - 0001: federal/national sales tax - 0002: state sales tax - 0003: city sales tax - 0004: local sales tax - 0005: municipal sales tax - 0006: other tax - 0010: value-added tax - 0011: goods and services tax - 0012: provincial sales tax - 0013: harmonized sales tax - 0014: Quebec sales tax (QST) - 0020: room tax - 0021: occupancy tax - 0022: energy tax - Blank: Tax not supported on line item. | [optional] -**amount_includes_tax** | **BOOLEAN** | Flag that indicates whether the tax amount is included in the Line Item Total. | [optional] -**type_of_supply** | **String** | Flag to indicate whether the purchase is categorized as goods or services. Possible values: - 00: goods - 01: services | [optional] -**commodity_code** | **String** | Commodity code or International description code used to classify the item. Contact your acquirer for a list of codes. | [optional] -**discount_amount** | **String** | Discount applied to the item. | [optional] -**discount_applied** | **BOOLEAN** | Flag that indicates whether the amount is discounted. If you do not provide a value but you set Discount Amount to a value greater than zero, then CyberSource sets this field to **true**. | [optional] -**discount_rate** | **String** | Rate the item is discounted. Maximum of 2 decimal places. Example 5.25 (=5.25%) | [optional] -**invoice_number** | **String** | Field to support an invoice number for a transaction. You must specify the number of line items that will include an invoice number. By default, the first line item will include an invoice number field. The invoice number field can be included for up to 10 line items. | [optional] -**tax_details** | [**Array<V2paymentsOrderInformationAmountDetailsTaxDetails>**](V2paymentsOrderInformationAmountDetailsTaxDetails.md) | | [optional] -**fulfillment_type** | **String** | TODO | [optional] - - diff --git a/docs/V2paymentsOrderInformationShipTo.md b/docs/V2paymentsOrderInformationShipTo.md deleted file mode 100644 index ca699bbc..00000000 --- a/docs/V2paymentsOrderInformationShipTo.md +++ /dev/null @@ -1,19 +0,0 @@ -# CyberSource::V2paymentsOrderInformationShipTo - -## 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] -**country** | **String** | Country of the shipping address. Use the two character ISO Standard Country Codes. | [optional] -**district** | **String** | Neighborhood, community, or region within a city or municipality. | [optional] -**building_number** | **String** | Building number in the street address. For example, the building number is 187 in the following address: Rua da Quitanda 187 | [optional] -**phone_number** | **String** | Phone number for the shipping address. | [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] - - diff --git a/docs/V2paymentsOrderInformationShippingDetails.md b/docs/V2paymentsOrderInformationShippingDetails.md deleted file mode 100644 index d682fec6..00000000 --- a/docs/V2paymentsOrderInformationShippingDetails.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::V2paymentsOrderInformationShippingDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**gift_wrap** | **BOOLEAN** | TBD | [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] -**ship_from_postal_code** | **String** | Postal code for the address from which the goods are shipped, which is used to establish nexus. The default is the postal code associated with your CyberSource account. 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 This field is frequently used for Level II and Level III transactions. | [optional] - - diff --git a/docs/V2paymentsPaymentInformation.md b/docs/V2paymentsPaymentInformation.md deleted file mode 100644 index 8a94491a..00000000 --- a/docs/V2paymentsPaymentInformation.md +++ /dev/null @@ -1,11 +0,0 @@ -# CyberSource::V2paymentsPaymentInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**card** | [**V2paymentsPaymentInformationCard**](V2paymentsPaymentInformationCard.md) | | [optional] -**tokenized_card** | [**V2paymentsPaymentInformationTokenizedCard**](V2paymentsPaymentInformationTokenizedCard.md) | | [optional] -**fluid_data** | [**V2paymentsPaymentInformationFluidData**](V2paymentsPaymentInformationFluidData.md) | | [optional] -**customer** | [**V2paymentsPaymentInformationCustomer**](V2paymentsPaymentInformationCustomer.md) | | [optional] - - diff --git a/docs/V2paymentsPaymentInformationCard.md b/docs/V2paymentsPaymentInformationCard.md deleted file mode 100644 index 00e4a7f4..00000000 --- a/docs/V2paymentsPaymentInformationCard.md +++ /dev/null @@ -1,19 +0,0 @@ -# CyberSource::V2paymentsPaymentInformationCard - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**number** | **String** | Customer’s credit card number. Encoded Account Numbers when processing encoded account numbers, use this field for the encoded account number. For processor-specific information, see the customer_cc_number field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [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] -**type** | **String** | Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover | [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] -**source_account_type** | **String** | Flag that specifies the type of account associated with the card. The cardholder provides this information during the payment process. This field is required in the following cases. - Debit transactions on Cielo and Comercio Latino. - Transactions with Brazilian-issued cards on CyberSource through VisaNet. - Applicable only for CTV. **Note** Combo cards in Brazil contain credit and debit functionality in a single card. Visa systems use a credit bank identification number (BIN) for this type of card. Using the BIN to determine whether a card is debit or credit can cause transactions with these cards to be processed incorrectly. CyberSource strongly recommends that you include this field for combo card transactions. Possible values include the following. - CHECKING: Checking account - CREDIT: Credit card account - SAVING: Saving account - LINE_OF_CREDIT: Line of credit - PREPAID: Prepaid card account - UNIVERSAL: Universal account | [optional] -**security_code** | **String** | Card Verification Number. | [optional] -**security_code_indicator** | **String** | Flag that indicates whether a CVN code was sent. Possible values: - 0 (default): CVN service not requested. CyberSource uses this default value when you do not include _securityCode_ in the request. - 1 (default): CVN service requested and supported. CyberSource uses this default value when you include _securityCode_ in the request. - 2: CVN on credit card is illegible. - 9: CVN was not imprinted on credit card. | [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] -**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] -**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] - - diff --git a/docs/V2paymentsPaymentInformationCustomer.md b/docs/V2paymentsPaymentInformationCustomer.md deleted file mode 100644 index f5b07f1c..00000000 --- a/docs/V2paymentsPaymentInformationCustomer.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::V2paymentsPaymentInformationCustomer - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**customer_id** | **String** | Unique identifier for the customer's card and billing information. | [optional] - - diff --git a/docs/V2paymentsPaymentInformationFluidData.md b/docs/V2paymentsPaymentInformationFluidData.md deleted file mode 100644 index 8c40a963..00000000 --- a/docs/V2paymentsPaymentInformationFluidData.md +++ /dev/null @@ -1,11 +0,0 @@ -# CyberSource::V2paymentsPaymentInformationFluidData - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **String** | TBD | [optional] -**descriptor** | **String** | Format of the encrypted payment data. | [optional] -**value** | **String** | The encrypted payment data value. If using Apple Pay or Samsung Pay, the values are: - Apple Pay: RklEPUNPTU1PTi5BUFBMRS5JTkFQUC5QQVlNRU5U - Samsung Pay: RklEPUNPTU1PTi5TQU1TVU5HLklOQVBQLlBBWU1FTlQ= | [optional] -**encoding** | **String** | Encoding method used to encrypt the payment data. Possible value: Base64 | [optional] - - diff --git a/docs/V2paymentsPaymentInformationTokenizedCard.md b/docs/V2paymentsPaymentInformationTokenizedCard.md deleted file mode 100644 index dd6f637c..00000000 --- a/docs/V2paymentsPaymentInformationTokenizedCard.md +++ /dev/null @@ -1,17 +0,0 @@ -# CyberSource::V2paymentsPaymentInformationTokenizedCard - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**number** | **String** | Customer’s payment network token value. | [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] -**type** | **String** | Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover | [optional] -**cryptogram** | **String** | This field is used internally. | [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] -**transaction_type** | **String** | Type of transaction that provided the token data. This value does not specify the token service provider; it specifies the entity that provided you with information about the token. Set the value for this field to 1. An application on the customer’s mobile device provided the token data. | [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] -**storage_method** | **String** | Type of technology used in the device to store token data. Possible values: - 001: Secure Element (SE) Smart card or memory with restricted access and encryption to prevent data tampering. For storing payment credentials, a SE is tested against a set of requirements defined by the payment networks. `Note` This field is supported only for **FDC Compass**. - 002: Host Card Emulation (HCE) Emulation of a smart card by using software to create a virtual and exact representation of the card. Sensitive data is stored in a database that is hosted in the cloud. For storing payment credentials, a database must meet very stringent security requirements that exceed PCI DSS. `Note` This field is supported only for **FDC Compass**. | [optional] -**security_code** | **String** | CVN. | [optional] - - diff --git a/docs/V2paymentsPointOfSaleInformation.md b/docs/V2paymentsPointOfSaleInformation.md deleted file mode 100644 index 416da6b6..00000000 --- a/docs/V2paymentsPointOfSaleInformation.md +++ /dev/null @@ -1,19 +0,0 @@ -# CyberSource::V2paymentsPointOfSaleInformation - -## 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** | TBD | [optional] -**lane_number** | **String** | Identifier for an alternate terminal at your retail location. You define the value for this field. This field is supported only for MasterCard transactions on FDC Nashville Global. Use the _terminalID_ field to identify the main terminal at your retail location. If your retail location has multiple terminals, use this _alternateTerminalID_ field to identify the terminal used for the transaction. This field is a pass-through, which means that CyberSource does not check the value or modify the value in any way before sending it to the processor. | [optional] -**card_present** | **BOOLEAN** | Indicates whether the card is present at the time of the transaction. Possible values: - **true**: Card is present. - **false**: Card is not present. | [optional] -**cat_level** | **Integer** | Type of cardholder-activated terminal. Possible values: - 1: Automated dispensing machine - 2: Self-service terminal - 3: Limited amount terminal - 4: In-flight commerce (IFC) terminal - 5: Radio frequency device - 6: Mobile acceptance terminal - 7: Electronic cash register - 8: E-commerce device at your location - 9: Terminal or cash register that uses a dialup connection to connect to the transaction processing network * Applicable only for CTV for Payouts. | [optional] -**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] -**pin_entry_capability** | **Integer** | A one-digit code that identifies the capability of terminal to capture PINs. This code does not necessarily mean that a PIN was entered or is included in this message. For Payouts: This field is applicable for CtV. | [optional] -**operating_environment** | **String** | Operating environment. Possible values: - 0: No terminal used or unknown environment. - 1: On merchant premises, attended. - 2: On merchant premises, unattended, or cardholder terminal. Examples: oil, kiosks, self-checkout, home computer, mobile telephone, personal digital assistant (PDA). Cardholder terminal is supported only for MasterCard transactions on **CyberSource through VisaNet**. - 3: Off merchant premises, attended. Examples: portable POS devices at trade shows, at service calls, or in taxis. - 4: Off merchant premises, unattended, or cardholder terminal. Examples: vending machines, home computer, mobile telephone, PDA. Cardholder terminal is supported only for MasterCard transactions on **CyberSource through VisaNet**. - 5: On premises of cardholder, unattended. - 9: Unknown delivery mode. - S: Electronic delivery of product. Examples: music, software, or eTickets that are downloaded over the internet. - T: Physical delivery of product. Examples: music or software that is delivered by mail or by a courier. This field is supported only for **American Express Direct** and **CyberSource through VisaNet**. **CyberSource through VisaNet** For MasterCard transactions, the only valid values are 2 and 4. | [optional] -**emv** | [**V2paymentsPointOfSaleInformationEmv**](V2paymentsPointOfSaleInformationEmv.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] -**track_data** | **String** | Card’s track 1 and 2 data. For all processors except FDMS Nashville, this value consists of one of the following: - Track 1 data - Track 2 data - Data for both tracks 1 and 2 For FDMS Nashville, this value consists of one of the following: - Track 1 data - Data for both tracks 1 and 2 Example: %B4111111111111111^SMITH/JOHN ^1612101976110000868000000?;4111111111111111=16121019761186800000? | [optional] - - diff --git a/docs/V2paymentsPointOfSaleInformationEmv.md b/docs/V2paymentsPointOfSaleInformationEmv.md deleted file mode 100644 index 5cb1e644..00000000 --- a/docs/V2paymentsPointOfSaleInformationEmv.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::V2paymentsPointOfSaleInformationEmv - -## 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] -**cardholder_verification_method** | **Float** | Method that was used to verify the cardholder's identity. Possible values: - **0**: No verification - **1**: Signature This field is supported only on **American Express Direct**. | [optional] -**card_sequence_number** | **String** | Number assigned to a specific card when two or more cards are associated with the same primary account number. This value enables issuers to distinguish among multiple cards that are linked to the same account. This value can also act as a tracking tool when reissuing cards. When this value is available, it is provided by the chip reader. When the chip reader does not provide this value, do not include this field in your request. | [optional] -**fallback** | **BOOLEAN** | Indicates whether a fallback method was used to enter credit card information into the POS terminal. When a technical problem prevents a successful exchange of information between a chip card and a chip-capable terminal: 1. Swipe the card or key the credit card information into the POS terminal. 2. Use the pos_entry_mode field to indicate whether the information was swiped or keyed. This field is supported only on **Chase Paymentech Solutions** and **GPN**. | [optional] [default to false] -**fallback_condition** | **Float** | Reason for the EMV fallback transaction. An EMV fallback transaction occurs when an EMV transaction fails for one of these reasons: - Technical failure: the EMV terminal or EMV card cannot read and process chip data. - Empty candidate list failure: the EMV terminal does not have any applications in common with the EMV card. EMV terminals are coded to determine whether the terminal and EMV card have any applications in common. EMV terminals provide this information to you. Possible values: - **1**: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal either used information from a successful chip read or it was not a chip transaction. - **2**: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal was an EMV fallback transaction because the attempted chip read was unsuccessful. This field is supported only on **GPN**. | [optional] - - diff --git a/docs/V2paymentsProcessingInformation.md b/docs/V2paymentsProcessingInformation.md deleted file mode 100644 index dc7d2369..00000000 --- a/docs/V2paymentsProcessingInformation.md +++ /dev/null @@ -1,21 +0,0 @@ -# CyberSource::V2paymentsProcessingInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**capture** | **BOOLEAN** | Flag that specifies whether to also include capture service in the submitted request or not. | [optional] [default to false] -**processor_id** | **String** | Value that identifies the processor/acquirer to use for the transaction. This value is supported only for **CyberSource through VisaNet**. | [optional] -**business_application_id** | **String** | TBD | [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] -**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] -**reconciliation_id** | **String** | Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). | [optional] -**link_id** | **String** | Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. | [optional] -**purchase_level** | **String** | Set this field to 3 to indicate that the request includes Level III data. | [optional] -**report_group** | **String** | Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. | [optional] -**visa_checkout_id** | **String** | Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. | [optional] -**issuer** | [**V2paymentsProcessingInformationIssuer**](V2paymentsProcessingInformationIssuer.md) | | [optional] -**authorization_options** | [**V2paymentsProcessingInformationAuthorizationOptions**](V2paymentsProcessingInformationAuthorizationOptions.md) | | [optional] -**capture_options** | [**V2paymentsProcessingInformationCaptureOptions**](V2paymentsProcessingInformationCaptureOptions.md) | | [optional] -**recurring_options** | [**V2paymentsProcessingInformationRecurringOptions**](V2paymentsProcessingInformationRecurringOptions.md) | | [optional] - - diff --git a/docs/V2paymentsProcessingInformationAuthorizationOptions.md b/docs/V2paymentsProcessingInformationAuthorizationOptions.md deleted file mode 100644 index 62c52f02..00000000 --- a/docs/V2paymentsProcessingInformationAuthorizationOptions.md +++ /dev/null @@ -1,17 +0,0 @@ -# CyberSource::V2paymentsProcessingInformationAuthorizationOptions - -## 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] -**verbal_auth_code** | **String** | Authorization code. **Forced Capture** Use this field to send the authorization code you received from a payment that you authorized outside the CyberSource system. **Verbal Authorization** Use this field in CAPTURE API to send the verbally received authorization code. For processor-specific information, see the auth_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**verbal_auth_transaction_id** | **String** | Transaction ID (TID). | [optional] -**auth_indicator** | **String** | Flag that specifies the purpose of the authorization. Possible values: - **0**: Preauthorization - **1**: Final authorization For processor-specific information, see the auth_indicator field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**partial_auth_indicator** | **BOOLEAN** | Flag that indicates whether the transaction is enabled for partial authorization or not. When your request includes this field, this value overrides the information in your CyberSource account. For processor-specific information, see the auth_partial_auth_indicator field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**balance_inquiry** | **BOOLEAN** | Flag that indicates whether to return balance information. | [optional] -**ignore_avs_result** | **BOOLEAN** | Flag that indicates whether to allow the capture service to run even when the payment receives an AVS decline. | [optional] [default to false] -**decline_avs_flags** | **Array<String>** | An array of AVS flags that cause the reply flag to be returned. `Important` To receive declines for the AVS code N, include the value N in the array. | [optional] -**ignore_cv_result** | **BOOLEAN** | Flag that indicates whether to allow the capture service to run even when the payment receives a CVN decline. | [optional] [default to false] -**initiator** | [**V2paymentsProcessingInformationAuthorizationOptionsInitiator**](V2paymentsProcessingInformationAuthorizationOptionsInitiator.md) | | [optional] - - diff --git a/docs/V2paymentsProcessingInformationAuthorizationOptionsInitiator.md b/docs/V2paymentsProcessingInformationAuthorizationOptionsInitiator.md deleted file mode 100644 index ff99baf4..00000000 --- a/docs/V2paymentsProcessingInformationAuthorizationOptionsInitiator.md +++ /dev/null @@ -1,11 +0,0 @@ -# CyberSource::V2paymentsProcessingInformationAuthorizationOptionsInitiator - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | This field indicates whether the transaction is a merchant-initiated transaction or customer-initiated transaction. | [optional] -**credential_stored_on_file** | **BOOLEAN** | Flag that indicates whether merchant is intend to use this transaction to store payment credential for follow-up merchant-initiated transactions or not. | [optional] -**stored_credential_used** | **BOOLEAN** | Flag that indicates whether merchant is intend to use this transaction to store payment credential for follow-up merchant-initiated transactions or not. | [optional] -**merchant_initiated_transaction** | [**V2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction**](V2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction.md) | | [optional] - - diff --git a/docs/V2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md b/docs/V2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md deleted file mode 100644 index 15d01e7f..00000000 --- a/docs/V2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::V2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reason** | **String** | Reason for the merchant-initiated transaction. Possible values: - **1**: Resubmission - **2**: Delayed charge - **3**: Reauthorization for split shipment - **4**: No show - **5**: Account top up This field is not required for installment payments or recurring payments or when _reAuth.first_ is true. It is required for all other merchant-initiated transactions. This field is supported only for Visa transactions on CyberSource through VisaNet. | [optional] -**previous_transaction_id** | **String** | Transaction identifier that was returned in the payment response field _processorInformation.transactionID_ in the reply message for either the original merchant initiated payment in the series or the previous merchant-initiated payment in the series. <p/> If the current payment request includes a token instead of an account number, the following time limits apply for the value of this field: For a **resubmission**, the transaction ID must be less than 14 days old. For a **delayed charge** or **reauthorization**, the transaction ID must be less than 30 days old. The value for this field does not correspond to any data in the TC 33 capture file. This field is supported only for Visa transactions on CyberSource through VisaNet. | [optional] - - diff --git a/docs/V2paymentsProcessingInformationCaptureOptions.md b/docs/V2paymentsProcessingInformationCaptureOptions.md deleted file mode 100644 index 40bde518..00000000 --- a/docs/V2paymentsProcessingInformationCaptureOptions.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::V2paymentsProcessingInformationCaptureOptions - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**capture_sequence_number** | **Float** | Capture number when requesting multiple partial captures for one payment. Used along with _totalCaptureCount_ to track which capture is being processed. For example, the second of five captures would be passed to CyberSource as: - _captureSequenceNumber_ = 2, and - _totalCaptureCount_ = 5 | [optional] -**total_capture_count** | **Float** | Total number of captures when requesting multiple partial captures for one payment. Used along with _captureSequenceNumber_ which capture is being processed. For example, the second of five captures would be passed to CyberSource as: - _captureSequenceNumber_ = 2, and - _totalCaptureCount_ = 5 | [optional] -**date_to_capture** | **String** | Date on which you want the capture to occur. This field is supported only for **CyberSource through VisaNet**. `Format: MMDD` | [optional] - - diff --git a/docs/V2paymentsProcessingInformationIssuer.md b/docs/V2paymentsProcessingInformationIssuer.md deleted file mode 100644 index 0b52cd6d..00000000 --- a/docs/V2paymentsProcessingInformationIssuer.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::V2paymentsProcessingInformationIssuer - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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/V2paymentsProcessingInformationRecurringOptions.md b/docs/V2paymentsProcessingInformationRecurringOptions.md deleted file mode 100644 index 8b1a1984..00000000 --- a/docs/V2paymentsProcessingInformationRecurringOptions.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::V2paymentsProcessingInformationRecurringOptions - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**loan_payment** | **BOOLEAN** | Flag that indicates whether this is a payment towards an existing contractual loan. | [optional] [default to false] -**first_recurring_payment** | **BOOLEAN** | Flag that indicates whether this transaction is the first in a series of recurring payments. This field is supported only for **Atos**, **FDC Nashville Global**, and **OmniPay Direct**. | [optional] [default to false] - - diff --git a/docs/V2paymentsRecipientInformation.md b/docs/V2paymentsRecipientInformation.md deleted file mode 100644 index 9a05d84c..00000000 --- a/docs/V2paymentsRecipientInformation.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::V2paymentsRecipientInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_id** | **String** | Identifier for the recipient’s account. Use the first six digits and last four digits of the recipient’s account number. This field is a pass-through, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. | [optional] -**last_name** | **String** | Recipient’s last name. This field is a passthrough, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. | [optional] -**postal_code** | **String** | Partial postal code for the recipient’s address. For example, if the postal code is **NN5 7SG**, the value for this field should be the first part of the postal code: **NN5**. This field is a pass-through, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. | [optional] - - diff --git a/docs/V2paymentsidcapturesAggregatorInformation.md b/docs/V2paymentsidcapturesAggregatorInformation.md deleted file mode 100644 index 4582c7ae..00000000 --- a/docs/V2paymentsidcapturesAggregatorInformation.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::V2paymentsidcapturesAggregatorInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**aggregator_id** | **String** | Value that identifies you as a payment aggregator. Get this value from the processor. For processor-specific information, see the aggregator_id field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**name** | **String** | Your payment aggregator business name. For processor-specific information, see the aggregator_name field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**sub_merchant** | [**V2paymentsidcapturesAggregatorInformationSubMerchant**](V2paymentsidcapturesAggregatorInformationSubMerchant.md) | | [optional] - - diff --git a/docs/V2paymentsidcapturesAggregatorInformationSubMerchant.md b/docs/V2paymentsidcapturesAggregatorInformationSubMerchant.md deleted file mode 100644 index 3ff570ff..00000000 --- a/docs/V2paymentsidcapturesAggregatorInformationSubMerchant.md +++ /dev/null @@ -1,15 +0,0 @@ -# CyberSource::V2paymentsidcapturesAggregatorInformationSubMerchant - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Sub-merchant’s business name. | [optional] -**address1** | **String** | First line of the sub-merchant’s street address. | [optional] -**locality** | **String** | Sub-merchant’s city. | [optional] -**administrative_area** | **String** | Sub-merchant’s state or province. Use the State, Province, and Territory Codes for the United States and Canada. | [optional] -**postal_code** | **String** | Partial postal code for the sub-merchant’s address. | [optional] -**country** | **String** | Sub-merchant’s country. Use the two-character ISO Standard Country Codes. | [optional] -**email** | **String** | Sub-merchant’s email address. **Maximum length for processors** - American Express Direct: 40 - CyberSource through VisaNet: 40 - FDC Compass: 40 - FDC Nashville Global: 19 | [optional] -**phone_number** | **String** | Sub-merchant’s telephone number. **Maximum length for procesors** - American Express Direct: 20 - CyberSource through VisaNet: 20 - FDC Compass: 13 - FDC Nashville Global: 10 | [optional] - - diff --git a/docs/V2paymentsidcapturesBuyerInformation.md b/docs/V2paymentsidcapturesBuyerInformation.md deleted file mode 100644 index 7b8164ee..00000000 --- a/docs/V2paymentsidcapturesBuyerInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::V2paymentsidcapturesBuyerInformation - -## 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] -**vat_registration_number** | **String** | Customer’s government-assigned tax identification number. For processor-specific information, see the purchaser_vat_registration_number 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/V2paymentsidcapturesMerchantInformation.md b/docs/V2paymentsidcapturesMerchantInformation.md deleted file mode 100644 index 423775ec..00000000 --- a/docs/V2paymentsidcapturesMerchantInformation.md +++ /dev/null @@ -1,11 +0,0 @@ -# CyberSource::V2paymentsidcapturesMerchantInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**merchant_descriptor** | [**V2paymentsMerchantInformationMerchantDescriptor**](V2paymentsMerchantInformationMerchantDescriptor.md) | | [optional] -**card_acceptor_reference_number** | **String** | Reference number that facilitates card acceptor/corporation communication and record keeping. For processor-specific information, see the card_acceptor_ref_number 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] -**category_code** | **Integer** | Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**vat_registration_number** | **String** | Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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/V2paymentsidcapturesOrderInformation.md b/docs/V2paymentsidcapturesOrderInformation.md deleted file mode 100644 index 9363f7d3..00000000 --- a/docs/V2paymentsidcapturesOrderInformation.md +++ /dev/null @@ -1,13 +0,0 @@ -# CyberSource::V2paymentsidcapturesOrderInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount_details** | [**V2paymentsidcapturesOrderInformationAmountDetails**](V2paymentsidcapturesOrderInformationAmountDetails.md) | | [optional] -**bill_to** | [**V2paymentsidcapturesOrderInformationBillTo**](V2paymentsidcapturesOrderInformationBillTo.md) | | [optional] -**ship_to** | [**V2paymentsidcapturesOrderInformationShipTo**](V2paymentsidcapturesOrderInformationShipTo.md) | | [optional] -**line_items** | [**Array<V2paymentsOrderInformationLineItems>**](V2paymentsOrderInformationLineItems.md) | | [optional] -**invoice_details** | [**V2paymentsidcapturesOrderInformationInvoiceDetails**](V2paymentsidcapturesOrderInformationInvoiceDetails.md) | | [optional] -**shipping_details** | [**V2paymentsidcapturesOrderInformationShippingDetails**](V2paymentsidcapturesOrderInformationShippingDetails.md) | | [optional] - - diff --git a/docs/V2paymentsidcapturesOrderInformationAmountDetails.md b/docs/V2paymentsidcapturesOrderInformationAmountDetails.md deleted file mode 100644 index 3366971b..00000000 --- a/docs/V2paymentsidcapturesOrderInformationAmountDetails.md +++ /dev/null @@ -1,23 +0,0 @@ -# CyberSource::V2paymentsidcapturesOrderInformationAmountDetails - -## 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] -**discount_amount** | **String** | Total discount amount applied to the order. For processor-specific information, see the order_discount_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] -**duty_amount** | **String** | Total charges for any import or export duties included in the order. For processor-specific information, see the duty_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] -**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] -**national_tax_included** | **String** | Flag that indicates whether a national tax is included in the order total. Possible values: - **0**: national tax not included - **1**: national tax included For processor-specific information, see the national_tax_indicator 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] -**tax_applied_after_discount** | **String** | Flag that indicates how the merchant manages discounts. Possible values: - **0**: no invoice level discount included - **1**: tax calculated on the postdiscount invoice total - **2**: tax calculated on the prediscount invoice total For processor-specific information, see the order_discount_management_indicator 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] -**tax_applied_level** | **String** | Flag that indicates how you calculate tax. Possible values: - **0**: net prices with tax calculated at line item level - **1**: net prices with tax calculated at invoice level - **2**: gross prices with tax provided at line item level - **3**: gross prices with tax provided at invoice level - **4**: no tax applies on the invoice for the transaction For processor-specific information, see the tax_management_indicator 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] -**tax_type_code** | **String** | For tax amounts that can be categorized as one tax type. This field contains the tax type code that corresponds to the entry in the _lineItems.taxAmount_ field. Possible values: - **056**: sales tax (U.S only) - **TX~**: all taxes (Canada only) Note ~ = space. For processor-specific information, see the total_tax_type_code 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] -**freight_amount** | **String** | Total freight or shipping and handling charges for the order. When you include this field in your request, you must also include the **totalAmount** field. For processor-specific information, see the freight_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] -**foreign_amount** | **String** | Converted amount returned by the DCC service. For processor-specific information, see the foreign_amount field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**foreign_currency** | **String** | Billing currency returned by the DCC service. For processor-specific information, see the foreign_currency field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**exchange_rate** | **String** | Exchange rate returned by the DCC service. Includes a decimal point and a maximum of 4 decimal places. For processor-specific information, see the exchange_rate field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**exchange_rate_time_stamp** | **String** | Time stamp for the exchange rate. This value is returned by the DCC service. Format: `YYYYMMDD~HH:MM` where ~ denotes a space. For processor-specific information, see the exchange_rate_timestamp field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**amex_additional_amounts** | [**Array<V2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts>**](V2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts.md) | | [optional] -**tax_details** | [**Array<V2paymentsOrderInformationAmountDetailsTaxDetails>**](V2paymentsOrderInformationAmountDetailsTaxDetails.md) | | [optional] - - diff --git a/docs/V2paymentsidcapturesOrderInformationBillTo.md b/docs/V2paymentsidcapturesOrderInformationBillTo.md deleted file mode 100644 index c07f0a8a..00000000 --- a/docs/V2paymentsidcapturesOrderInformationBillTo.md +++ /dev/null @@ -1,18 +0,0 @@ -# CyberSource::V2paymentsidcapturesOrderInformationBillTo - -## 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] -**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] -**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] -**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] -**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] -**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/V2paymentsidcapturesOrderInformationInvoiceDetails.md b/docs/V2paymentsidcapturesOrderInformationInvoiceDetails.md deleted file mode 100644 index 8f36f4ee..00000000 --- a/docs/V2paymentsidcapturesOrderInformationInvoiceDetails.md +++ /dev/null @@ -1,14 +0,0 @@ -# CyberSource::V2paymentsidcapturesOrderInformationInvoiceDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**purchase_order_number** | **String** | Value used by your customer to identify the order. This value is typically a purchase order number. CyberSource recommends that you do not populate the field with all zeros or nines. For processor-specific information, see the user_po 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] -**purchase_order_date** | **String** | Date the order was processed. `Format: YYYY-MM-DD`. For processor-specific information, see the purchaser_order_date 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] -**purchase_contact_name** | **String** | The name of the individual or the company contacted for company authorized purchases. For processor-specific information, see the authorized_contact_name 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] -**taxable** | **BOOLEAN** | Flag that indicates whether an order is taxable. This value must be true if the sum of all _lineItems[].taxAmount_ values > 0. If you do not include any _lineItems[].taxAmount_ values in your request, CyberSource does not include _invoiceDetails.taxable_ in the data it sends to the processor. For processor-specific information, see the tax_indicator 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] -**vat_invoice_reference_number** | **String** | VAT invoice number associated with the transaction. For processor-specific information, see the vat_invoice_ref_number 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] -**commodity_code** | **String** | International description code of the overall order’s goods or services or the Categorizes purchases for VAT reporting. Contact your acquirer for a list of codes. For processor-specific information, see the summary_commodity_code 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] -**transaction_advice_addendum** | [**Array<V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum>**](V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum.md) | | [optional] - - diff --git a/docs/V2paymentsidcapturesOrderInformationShipTo.md b/docs/V2paymentsidcapturesOrderInformationShipTo.md deleted file mode 100644 index 8bccc942..00000000 --- a/docs/V2paymentsidcapturesOrderInformationShipTo.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::V2paymentsidcapturesOrderInformationShipTo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**administrative_area** | **String** | State or province of the shipping address. Use the State, Province, and Territory Codes for the United States and Canada. | [optional] -**country** | **String** | Country of the shipping address. Use the two character ISO Standard Country Codes. | [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] - - diff --git a/docs/V2paymentsidcapturesOrderInformationShippingDetails.md b/docs/V2paymentsidcapturesOrderInformationShippingDetails.md deleted file mode 100644 index 059ee183..00000000 --- a/docs/V2paymentsidcapturesOrderInformationShippingDetails.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::V2paymentsidcapturesOrderInformationShippingDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ship_from_postal_code** | **String** | Postal code for the address from which the goods are shipped, which is used to establish nexus. The default is the postal code associated with your CyberSource account. 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 This field is frequently used for Level II and Level III transactions. | [optional] - - diff --git a/docs/V2paymentsidcapturesPaymentInformation.md b/docs/V2paymentsidcapturesPaymentInformation.md deleted file mode 100644 index b2b72ca0..00000000 --- a/docs/V2paymentsidcapturesPaymentInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::V2paymentsidcapturesPaymentInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**customer** | [**V2paymentsPaymentInformationCustomer**](V2paymentsPaymentInformationCustomer.md) | | [optional] - - diff --git a/docs/V2paymentsidcapturesPointOfSaleInformation.md b/docs/V2paymentsidcapturesPointOfSaleInformation.md deleted file mode 100644 index 8380838d..00000000 --- a/docs/V2paymentsidcapturesPointOfSaleInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::V2paymentsidcapturesPointOfSaleInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**emv** | [**V2paymentsidcapturesPointOfSaleInformationEmv**](V2paymentsidcapturesPointOfSaleInformationEmv.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/V2paymentsidcapturesPointOfSaleInformationEmv.md b/docs/V2paymentsidcapturesPointOfSaleInformationEmv.md deleted file mode 100644 index 59966a43..00000000 --- a/docs/V2paymentsidcapturesPointOfSaleInformationEmv.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::V2paymentsidcapturesPointOfSaleInformationEmv - -## 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] -**fallback** | **BOOLEAN** | Indicates whether a fallback method was used to enter credit card information into the POS terminal. When a technical problem prevents a successful exchange of information between a chip card and a chip-capable terminal: 1. Swipe the card or key the credit card information into the POS terminal. 2. Use the pos_entry_mode field to indicate whether the information was swiped or keyed. This field is supported only on **Chase Paymentech Solutions** and **GPN**. | [optional] [default to false] - - diff --git a/docs/V2paymentsidcapturesProcessingInformation.md b/docs/V2paymentsidcapturesProcessingInformation.md deleted file mode 100644 index a6f56f8e..00000000 --- a/docs/V2paymentsidcapturesProcessingInformation.md +++ /dev/null @@ -1,16 +0,0 @@ -# CyberSource::V2paymentsidcapturesProcessingInformation - -## 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] -**reconciliation_id** | **String** | Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). | [optional] -**link_id** | **String** | Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. | [optional] -**report_group** | **String** | Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. | [optional] -**visa_checkout_id** | **String** | Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. | [optional] -**purchase_level** | **String** | Set this field to 3 to indicate that the request includes Level III data. | [optional] -**issuer** | [**V2paymentsProcessingInformationIssuer**](V2paymentsProcessingInformationIssuer.md) | | [optional] -**authorization_options** | [**V2paymentsidcapturesProcessingInformationAuthorizationOptions**](V2paymentsidcapturesProcessingInformationAuthorizationOptions.md) | | [optional] -**capture_options** | [**V2paymentsidcapturesProcessingInformationCaptureOptions**](V2paymentsidcapturesProcessingInformationCaptureOptions.md) | | [optional] - - diff --git a/docs/V2paymentsidcapturesProcessingInformationAuthorizationOptions.md b/docs/V2paymentsidcapturesProcessingInformationAuthorizationOptions.md deleted file mode 100644 index 010261d6..00000000 --- a/docs/V2paymentsidcapturesProcessingInformationAuthorizationOptions.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::V2paymentsidcapturesProcessingInformationAuthorizationOptions - -## 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] -**verbal_auth_code** | **String** | Authorization code. **Forced Capture** Use this field to send the authorization code you received from a payment that you authorized outside the CyberSource system. **Verbal Authorization** Use this field in CAPTURE API to send the verbally received authorization code. For processor-specific information, see the auth_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**verbal_auth_transaction_id** | **String** | Transaction ID (TID). | [optional] - - diff --git a/docs/V2paymentsidcapturesProcessingInformationCaptureOptions.md b/docs/V2paymentsidcapturesProcessingInformationCaptureOptions.md deleted file mode 100644 index 71229b1d..00000000 --- a/docs/V2paymentsidcapturesProcessingInformationCaptureOptions.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::V2paymentsidcapturesProcessingInformationCaptureOptions - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**capture_sequence_number** | **Float** | Capture number when requesting multiple partial captures for one payment. Used along with _totalCaptureCount_ to track which capture is being processed. For example, the second of five captures would be passed to CyberSource as: - _captureSequenceNumber_ = 2, and - _totalCaptureCount_ = 5 | [optional] -**total_capture_count** | **Float** | Total number of captures when requesting multiple partial captures for one payment. Used along with _captureSequenceNumber_ which capture is being processed. For example, the second of five captures would be passed to CyberSource as: - _captureSequenceNumber_ = 2, and - _totalCaptureCount_ = 5 | [optional] - - diff --git a/docs/V2paymentsidrefundsMerchantInformation.md b/docs/V2paymentsidrefundsMerchantInformation.md deleted file mode 100644 index 6a11151c..00000000 --- a/docs/V2paymentsidrefundsMerchantInformation.md +++ /dev/null @@ -1,11 +0,0 @@ -# CyberSource::V2paymentsidrefundsMerchantInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**merchant_descriptor** | [**V2paymentsMerchantInformationMerchantDescriptor**](V2paymentsMerchantInformationMerchantDescriptor.md) | | [optional] -**category_code** | **Integer** | Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**vat_registration_number** | **String** | Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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] -**card_acceptor_reference_number** | **String** | Reference number that facilitates card acceptor/corporation communication and record keeping. For processor-specific information, see the card_acceptor_ref_number 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/V2paymentsidrefundsOrderInformation.md b/docs/V2paymentsidrefundsOrderInformation.md deleted file mode 100644 index 2a4c4d5c..00000000 --- a/docs/V2paymentsidrefundsOrderInformation.md +++ /dev/null @@ -1,13 +0,0 @@ -# CyberSource::V2paymentsidrefundsOrderInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount_details** | [**V2paymentsidcapturesOrderInformationAmountDetails**](V2paymentsidcapturesOrderInformationAmountDetails.md) | | [optional] -**bill_to** | [**V2paymentsidcapturesOrderInformationBillTo**](V2paymentsidcapturesOrderInformationBillTo.md) | | [optional] -**ship_to** | [**V2paymentsidcapturesOrderInformationShipTo**](V2paymentsidcapturesOrderInformationShipTo.md) | | [optional] -**line_items** | [**Array<V2paymentsidrefundsOrderInformationLineItems>**](V2paymentsidrefundsOrderInformationLineItems.md) | | [optional] -**invoice_details** | [**V2paymentsidcapturesOrderInformationInvoiceDetails**](V2paymentsidcapturesOrderInformationInvoiceDetails.md) | | [optional] -**shipping_details** | [**V2paymentsidcapturesOrderInformationShippingDetails**](V2paymentsidcapturesOrderInformationShippingDetails.md) | | [optional] - - diff --git a/docs/V2paymentsidrefundsOrderInformationLineItems.md b/docs/V2paymentsidrefundsOrderInformationLineItems.md deleted file mode 100644 index 0c482366..00000000 --- a/docs/V2paymentsidrefundsOrderInformationLineItems.md +++ /dev/null @@ -1,27 +0,0 @@ -# CyberSource::V2paymentsidrefundsOrderInformationLineItems - -## 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] -**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] -**unit_of_measure** | **String** | Unit of measure, or unit of measure code, for the item. | [optional] -**total_amount** | **String** | Total amount for the item. Normally calculated as the unit price x quantity. | [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] -**tax_rate** | **String** | Tax rate applied to the item. See \"Numbered Elements,\" page 14. Visa: Valid range is 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated). Mastercard: Valid range is 0.00001 to 0.99999 (0.001% to 99.999%). | [optional] -**tax_applied_after_discount** | **String** | Flag to indicate how you handle discount at the line item level. - 0: no line level discount provided - 1: tax was calculated on the post-discount line item total - 2: tax was calculated on the pre-discount line item total `Note` Visa will inset 0 (zero) if an invalid value is included in this field. This field relates to the value in the _lineItems[].discountAmount_ field. | [optional] -**tax_status_indicator** | **String** | Flag to indicate whether tax is exempted or not included. - 0: tax not included - 1: tax included - 2: transaction is not subject to tax | [optional] -**tax_type_code** | **String** | Type of tax being applied to the item. Possible values: Below values are used by **RBS WorldPay Atlanta**, **FDC Nashville Global**, **Litle** - 0000: unknown tax type - 0001: federal/national sales tax - 0002: state sales tax - 0003: city sales tax - 0004: local sales tax - 0005: municipal sales tax - 0006: other tax - 0010: value-added tax - 0011: goods and services tax - 0012: provincial sales tax - 0013: harmonized sales tax - 0014: Quebec sales tax (QST) - 0020: room tax - 0021: occupancy tax - 0022: energy tax - Blank: Tax not supported on line item. | [optional] -**amount_includes_tax** | **BOOLEAN** | Flag that indicates whether the tax amount is included in the Line Item Total. | [optional] -**type_of_supply** | **String** | Flag to indicate whether the purchase is categorized as goods or services. Possible values: - 00: goods - 01: services | [optional] -**commodity_code** | **String** | Commodity code or International description code used to classify the item. Contact your acquirer for a list of codes. | [optional] -**discount_amount** | **String** | Discount applied to the item. | [optional] -**discount_applied** | **BOOLEAN** | Flag that indicates whether the amount is discounted. If you do not provide a value but you set Discount Amount to a value greater than zero, then CyberSource sets this field to **true**. | [optional] -**discount_rate** | **String** | Rate the item is discounted. Maximum of 2 decimal places. Example 5.25 (=5.25%) | [optional] -**invoice_number** | **String** | Field to support an invoice number for a transaction. You must specify the number of line items that will include an invoice number. By default, the first line item will include an invoice number field. The invoice number field can be included for up to 10 line items. | [optional] -**tax_details** | [**Array<V2paymentsOrderInformationAmountDetailsTaxDetails>**](V2paymentsOrderInformationAmountDetailsTaxDetails.md) | | [optional] - - diff --git a/docs/V2paymentsidrefundsPaymentInformation.md b/docs/V2paymentsidrefundsPaymentInformation.md deleted file mode 100644 index c88ec255..00000000 --- a/docs/V2paymentsidrefundsPaymentInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::V2paymentsidrefundsPaymentInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**card** | [**V2paymentsidrefundsPaymentInformationCard**](V2paymentsidrefundsPaymentInformationCard.md) | | [optional] - - diff --git a/docs/V2paymentsidrefundsPaymentInformationCard.md b/docs/V2paymentsidrefundsPaymentInformationCard.md deleted file mode 100644 index 7a3fe588..00000000 --- a/docs/V2paymentsidrefundsPaymentInformationCard.md +++ /dev/null @@ -1,15 +0,0 @@ -# CyberSource::V2paymentsidrefundsPaymentInformationCard - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**number** | **String** | Customer’s credit card number. Encoded Account Numbers when processing encoded account numbers, use this field for the encoded account number. For processor-specific information, see the customer_cc_number field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [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] -**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] -**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] -**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] - - diff --git a/docs/V2paymentsidrefundsPointOfSaleInformation.md b/docs/V2paymentsidrefundsPointOfSaleInformation.md deleted file mode 100644 index d95f7dee..00000000 --- a/docs/V2paymentsidrefundsPointOfSaleInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::V2paymentsidrefundsPointOfSaleInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**emv** | [**V2paymentsidcapturesPointOfSaleInformationEmv**](V2paymentsidcapturesPointOfSaleInformationEmv.md) | | [optional] - - diff --git a/docs/V2paymentsidrefundsProcessingInformation.md b/docs/V2paymentsidrefundsProcessingInformation.md deleted file mode 100644 index fcb560f1..00000000 --- a/docs/V2paymentsidrefundsProcessingInformation.md +++ /dev/null @@ -1,14 +0,0 @@ -# CyberSource::V2paymentsidrefundsProcessingInformation - -## 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] -**reconciliation_id** | **String** | Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). | [optional] -**link_id** | **String** | Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. | [optional] -**report_group** | **String** | Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. | [optional] -**visa_checkout_id** | **String** | Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. | [optional] -**purchase_level** | **String** | Set this field to 3 to indicate that the request includes Level III data. | [optional] -**recurring_options** | [**V2paymentsidrefundsProcessingInformationRecurringOptions**](V2paymentsidrefundsProcessingInformationRecurringOptions.md) | | [optional] - - diff --git a/docs/V2paymentsidrefundsProcessingInformationRecurringOptions.md b/docs/V2paymentsidrefundsProcessingInformationRecurringOptions.md deleted file mode 100644 index d1951f75..00000000 --- a/docs/V2paymentsidrefundsProcessingInformationRecurringOptions.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::V2paymentsidrefundsProcessingInformationRecurringOptions - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**loan_payment** | **BOOLEAN** | Flag that indicates whether this is a payment towards an existing contractual loan. | [optional] [default to false] - - diff --git a/docs/V2paymentsidreversalsClientReferenceInformation.md b/docs/V2paymentsidreversalsClientReferenceInformation.md deleted file mode 100644 index 0dccf8a4..00000000 --- a/docs/V2paymentsidreversalsClientReferenceInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::V2paymentsidreversalsClientReferenceInformation - -## 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] -**comments** | **String** | Comments | [optional] - - diff --git a/docs/V2paymentsidreversalsOrderInformation.md b/docs/V2paymentsidreversalsOrderInformation.md deleted file mode 100644 index b515cf80..00000000 --- a/docs/V2paymentsidreversalsOrderInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::V2paymentsidreversalsOrderInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**line_items** | [**Array<V2paymentsidreversalsOrderInformationLineItems>**](V2paymentsidreversalsOrderInformationLineItems.md) | | [optional] - - diff --git a/docs/V2paymentsidreversalsOrderInformationLineItems.md b/docs/V2paymentsidreversalsOrderInformationLineItems.md deleted file mode 100644 index 9abf8f22..00000000 --- a/docs/V2paymentsidreversalsOrderInformationLineItems.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::V2paymentsidreversalsOrderInformationLineItems - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - - diff --git a/docs/V2paymentsidreversalsPointOfSaleInformation.md b/docs/V2paymentsidreversalsPointOfSaleInformation.md deleted file mode 100644 index d8de34a9..00000000 --- a/docs/V2paymentsidreversalsPointOfSaleInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::V2paymentsidreversalsPointOfSaleInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**emv** | [**InlineResponse201PointOfSaleInformationEmv**](InlineResponse201PointOfSaleInformationEmv.md) | | [optional] - - diff --git a/docs/V2paymentsidreversalsProcessingInformation.md b/docs/V2paymentsidreversalsProcessingInformation.md deleted file mode 100644 index 5e8745e8..00000000 --- a/docs/V2paymentsidreversalsProcessingInformation.md +++ /dev/null @@ -1,13 +0,0 @@ -# CyberSource::V2paymentsidreversalsProcessingInformation - -## 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] -**reconciliation_id** | **String** | Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). | [optional] -**link_id** | **String** | Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. | [optional] -**report_group** | **String** | Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. | [optional] -**visa_checkout_id** | **String** | Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. | [optional] -**issuer** | [**V2paymentsProcessingInformationIssuer**](V2paymentsProcessingInformationIssuer.md) | | [optional] - - diff --git a/docs/V2paymentsidreversalsReversalInformation.md b/docs/V2paymentsidreversalsReversalInformation.md deleted file mode 100644 index d82f0bb5..00000000 --- a/docs/V2paymentsidreversalsReversalInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::V2paymentsidreversalsReversalInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount_details** | [**V2paymentsidreversalsReversalInformationAmountDetails**](V2paymentsidreversalsReversalInformationAmountDetails.md) | | [optional] -**reason** | **String** | Reason for the authorization reversal. Possible value: - 34: Suspected fraud CyberSource ignores this field for processors that do not support this value. | [optional] - - diff --git a/docs/V2paymentsidreversalsReversalInformationAmountDetails.md b/docs/V2paymentsidreversalsReversalInformationAmountDetails.md deleted file mode 100644 index 9ea6199e..00000000 --- a/docs/V2paymentsidreversalsReversalInformationAmountDetails.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::V2paymentsidreversalsReversalInformationAmountDetails - -## 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] - - diff --git a/docs/V2payoutsMerchantInformation.md b/docs/V2payoutsMerchantInformation.md deleted file mode 100644 index 1fccb7e8..00000000 --- a/docs/V2payoutsMerchantInformation.md +++ /dev/null @@ -1,11 +0,0 @@ -# CyberSource::V2payoutsMerchantInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**category_code** | **Integer** | Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [optional] -**submit_local_date_time** | **String** | Time that the transaction was submitted in local time. The time is in hhmmss format. | [optional] -**vat_registration_number** | **String** | Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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] -**merchant_descriptor** | [**V2payoutsMerchantInformationMerchantDescriptor**](V2payoutsMerchantInformationMerchantDescriptor.md) | | [optional] - - diff --git a/docs/V2payoutsMerchantInformationMerchantDescriptor.md b/docs/V2payoutsMerchantInformationMerchantDescriptor.md deleted file mode 100644 index 7c4b3a36..00000000 --- a/docs/V2payoutsMerchantInformationMerchantDescriptor.md +++ /dev/null @@ -1,13 +0,0 @@ -# CyberSource::V2payoutsMerchantInformationMerchantDescriptor - -## 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] -**locality** | **String** | Merchant City. 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) | [optional] -**country** | **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) | [optional] -**administrative_area** | **String** | Merchant State. 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) | [optional] -**postal_code** | **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) | [optional] -**contact** | **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) * FDCCompass (13) * Paymentech (13) | [optional] - - diff --git a/docs/V2payoutsOrderInformation.md b/docs/V2payoutsOrderInformation.md deleted file mode 100644 index c9c5ff75..00000000 --- a/docs/V2payoutsOrderInformation.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::V2payoutsOrderInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount_details** | [**V2payoutsOrderInformationAmountDetails**](V2payoutsOrderInformationAmountDetails.md) | | [optional] -**bill_to** | [**V2payoutsOrderInformationBillTo**](V2payoutsOrderInformationBillTo.md) | | [optional] - - diff --git a/docs/V2payoutsOrderInformationAmountDetails.md b/docs/V2payoutsOrderInformationAmountDetails.md deleted file mode 100644 index 73921f11..00000000 --- a/docs/V2payoutsOrderInformationAmountDetails.md +++ /dev/null @@ -1,10 +0,0 @@ -# CyberSource::V2payoutsOrderInformationAmountDetails - -## 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] -**surcharge_amount** | **String** | The surcharge amount is included in the total transaction amount but is passed in a separate field to the issuer and acquirer for tracking. The issuer can provide information about the surcharge amount to the customer. * Applicable only for CTV for Payouts. * CTV (<= 08) For processor-specific information, see the surcharge_amount 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/V2payoutsOrderInformationBillTo.md b/docs/V2payoutsOrderInformationBillTo.md deleted file mode 100644 index 67142eda..00000000 --- a/docs/V2payoutsOrderInformationBillTo.md +++ /dev/null @@ -1,17 +0,0 @@ -# CyberSource::V2payoutsOrderInformationBillTo - -## 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] -**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] -**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] -**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] -**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] -**phone_type** | **String** | Customer's phone number type. For Payouts: This field may be sent only for FDC Compass. Possible Values - * day * home * night * work | [optional] - - diff --git a/docs/V2payoutsPaymentInformation.md b/docs/V2payoutsPaymentInformation.md deleted file mode 100644 index 8b343d97..00000000 --- a/docs/V2payoutsPaymentInformation.md +++ /dev/null @@ -1,8 +0,0 @@ -# CyberSource::V2payoutsPaymentInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**card** | [**V2payoutsPaymentInformationCard**](V2payoutsPaymentInformationCard.md) | | [optional] - - diff --git a/docs/V2payoutsPaymentInformationCard.md b/docs/V2payoutsPaymentInformationCard.md deleted file mode 100644 index 247e689c..00000000 --- a/docs/V2payoutsPaymentInformationCard.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::V2payoutsPaymentInformationCard - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | Type of card to authorize. * 001 Visa * 002 Mastercard * 003 Amex * 004 Discover | [optional] -**number** | **String** | Customer’s credit card number. Encoded Account Numbers when processing encoded account numbers, use this field for the encoded account number. For processor-specific information, see the customer_cc_number field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) | [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] -**source_account_type** | **String** | Flag that specifies the type of account associated with the card. The cardholder provides this information during the payment process. This field is required in the following cases. * Debit transactions on Cielo and Comercio Latino. * Transactions with Brazilian-issued cards on CyberSource through VisaNet. * Applicable only for CTV. Note Combo cards in Brazil contain credit and debit functionality in a single card. Visa systems use a credit bank identification number (BIN) for this type of card. Using the BIN to determine whether a card is debit or credit can cause transactions with these cards to be processed incorrectly. CyberSource strongly recommends that you include this field for combo card transactions. Possible values include the following. * CH: Checking account * CR: Credit card account * SA: Savings account * UA: Universal Account For combo card transactions with Mastercard in Brazil on CyberSource through VisaNet, the **cardUsage** field is also supported. | [optional] - - diff --git a/docs/V2payoutsProcessingInformation.md b/docs/V2payoutsProcessingInformation.md deleted file mode 100644 index 672ed0b4..00000000 --- a/docs/V2payoutsProcessingInformation.md +++ /dev/null @@ -1,12 +0,0 @@ -# CyberSource::V2payoutsProcessingInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**business_application_id** | **String** | Payouts transaction type. Applicable Processors: FDC Compass, Paymentech, CtV Possible values: **Credit Card Bill Payment** - **CP**: credit card bill payment **Funds Disbursement** - **FD**: funds disbursement - **GD**: government disbursement - **MD**: merchant disbursement **Money Transfer** - **AA**: account to account. Sender and receiver are same person. - **PP**: person to person. Sender and receiver are different. **Prepaid Load** - **TU**: top up | [optional] -**network_routing_order** | **String** | This field is optionally used by Push Payments Gateway participants (merchants and acquirers) to get the attributes for specified networks only. The networks specified in this field must be a subset of the information provided during program enrollment. Refer to Sharing Group Code/Network Routing Order. Note: Supported only in US for domestic transactions involving Push Payments Gateway Service. VisaNet checks to determine if there are issuer routing preferences for any of the networks specified by the network routing order. If an issuer preference exists for one of the specified debit networks, VisaNet makes a routing selection based on the issuer’s preference. If an issuer preference exists for more than one of the specified debit networks, or if no issuer preference exists, VisaNet makes a selection based on the acquirer’s routing priorities. See https://developer.visa.com/request_response_codes#network_id_and_sharing_group_code , under section 'Network ID and Sharing Group Code' on the left panel for available values | [optional] -**commerce_indicator** | **String** | Type of transaction. Possible value for Fast Payments transactions: - internet | [optional] -**reconciliation_id** | **String** | Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). | [optional] -**payouts_options** | [**V2payoutsProcessingInformationPayoutsOptions**](V2payoutsProcessingInformationPayoutsOptions.md) | | [optional] - - diff --git a/docs/V2payoutsProcessingInformationPayoutsOptions.md b/docs/V2payoutsProcessingInformationPayoutsOptions.md deleted file mode 100644 index 199b7980..00000000 --- a/docs/V2payoutsProcessingInformationPayoutsOptions.md +++ /dev/null @@ -1,11 +0,0 @@ -# CyberSource::V2payoutsProcessingInformationPayoutsOptions - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**acquirer_merchant_id** | **String** | This field identifies the card acceptor for defining the point of service terminal in both local and interchange environments. An acquirer-assigned code identifying the card acceptor for the transaction. Depending on the acquirer and merchant billing and reporting requirements, the code can represent a merchant, a specific merchant location, or a specific merchant location terminal. Acquiring Institution Identification Code uniquely identifies the merchant. The value from the original is required in any subsequent messages, including reversals, chargebacks, and representments. * Applicable only for CTV for Payouts. | [optional] -**acquirer_bin** | **String** | This code identifies the financial institution acting as the acquirer of this customer transaction. The acquirer is the member or system user that signed the merchant or ADM or dispensed cash. This number is usually Visa-assigned. * Applicable only for CTV for Payouts. | [optional] -**retrieval_reference_number** | **String** | This field contains a number that is used with other data elements as a key to identify and track all messages related to a given cardholder transaction; that is, to a given transaction set. * Applicable only for CTV for Payouts. | [optional] -**account_funding_reference_id** | **String** | Visa-generated transaction identifier (TID) that is unique for each original authorization and financial request. * Applicable only for CTV for Payouts. | [optional] - - diff --git a/docs/V2payoutsRecipientInformation.md b/docs/V2payoutsRecipientInformation.md deleted file mode 100644 index 65346717..00000000 --- a/docs/V2payoutsRecipientInformation.md +++ /dev/null @@ -1,17 +0,0 @@ -# CyberSource::V2payoutsRecipientInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**first_name** | **String** | First name of recipient. characters. * CTV (14) * Paymentech (30) | [optional] -**middle_initial** | **String** | Middle Initial of recipient. Required only for FDCCompass. | [optional] -**last_name** | **String** | Last name of recipient. characters. * CTV (14) * Paymentech (30) | [optional] -**address1** | **String** | Recipient address information. Required only for FDCCompass. | [optional] -**locality** | **String** | Recipient city. Required only for FDCCompass. | [optional] -**administrative_area** | **String** | Recipient State. Required only for FDCCompass. | [optional] -**country** | **String** | Recipient country code. Required only for FDCCompass. | [optional] -**postal_code** | **String** | Recipient postal code. Required only for FDCCompass. | [optional] -**phone_number** | **String** | Recipient phone number. Required only for FDCCompass. | [optional] -**date_of_birth** | **String** | Recipient date of birth in YYYYMMDD format. Required only for FDCCompass. | [optional] - - diff --git a/docs/V2payoutsSenderInformation.md b/docs/V2payoutsSenderInformation.md deleted file mode 100644 index 376eb3d5..00000000 --- a/docs/V2payoutsSenderInformation.md +++ /dev/null @@ -1,21 +0,0 @@ -# CyberSource::V2payoutsSenderInformation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reference_number** | **String** | Reference number generated by you that uniquely identifies the sender. | [optional] -**account** | [**V2payoutsSenderInformationAccount**](V2payoutsSenderInformationAccount.md) | | [optional] -**first_name** | **String** | First name of sender (Optional). * CTV (14) * Paymentech (30) | [optional] -**middle_initial** | **String** | Recipient middle initial (Optional). | [optional] -**last_name** | **String** | Recipient last name (Optional). * CTV (14) * Paymentech (30) | [optional] -**name** | **String** | Name of sender. **Funds Disbursement** This value is the name of the originator sending the funds disbursement. * CTV, Paymentech (30) | [optional] -**address1** | **String** | Street address of sender. **Funds Disbursement** This value is the address of the originator sending the funds disbursement. | [optional] -**locality** | **String** | City of sender. **Funds Disbursement** This value is the city of the originator sending the funds disbursement. | [optional] -**administrative_area** | **String** | Sender’s state. Use the State, Province, and Territory Codes for the United States and Canada. | [optional] -**country_code** | **String** | Country of sender. Use the ISO Standard Country Codes. * CTV (3) | [optional] -**postal_code** | **String** | Sender’s postal code. Required only for FDCCompass. | [optional] -**phone_number** | **String** | Sender’s phone number. Required only for FDCCompass. | [optional] -**date_of_birth** | **String** | Sender’s date of birth in YYYYMMDD format. Required only for FDCCompass. | [optional] -**vat_registration_number** | **String** | Customer's government-assigned tax identification number. | [optional] - - diff --git a/docs/V2payoutsSenderInformationAccount.md b/docs/V2payoutsSenderInformationAccount.md deleted file mode 100644 index 6b916b96..00000000 --- a/docs/V2payoutsSenderInformationAccount.md +++ /dev/null @@ -1,9 +0,0 @@ -# CyberSource::V2payoutsSenderInformationAccount - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**funds_source** | **String** | Source of funds. Possible values: Paymentech, CTV, FDC Compass: - 01: Credit card - 02: Debit card - 03: Prepaid card Paymentech, CTV - - 04: Cash - 05: Debit or deposit account that is not linked to a Visa card. Includes checking accounts, savings accounts, and proprietary debit or ATM cards. - 06: Credit account that is not linked to a Visa card. Includes credit cards and proprietary lines of credit. FDCCompass - - 04: Deposit Account **Funds Disbursement** This value is most likely 05 to identify that the originator used a deposit account to fund the disbursement. **Credit Card Bill Payment** This value must be 02, 03, 04, or 05. | [optional] -**number** | **String** | The account number of the entity funding the transaction. It is the sender’s account number. It can be a debit/credit card account number or bank account number. **Funds disbursements** This field is optional. **All other transactions** This field is required when the sender funds the transaction with a financial instrument, for example debit card. Length: * FDCCompass (<= 19) * Paymentech (<= 16) | [optional] - - diff --git a/docs/VoidApi.md b/docs/VoidApi.md index f1b88590..63d3835c 100644 --- a/docs/VoidApi.md +++ b/docs/VoidApi.md @@ -1,61 +1,13 @@ # CyberSource::VoidApi -All URIs are relative to *https://api.cybersource.com* +All URIs are relative to *https://apitest.cybersource.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_void**](VoidApi.md#get_void) | **GET** /v2/voids/{id} | Retrieve A Void -[**void_capture**](VoidApi.md#void_capture) | **POST** /v2/captures/{id}/voids | Void a Capture -[**void_credit**](VoidApi.md#void_credit) | **POST** /v2/credits/{id}/voids | Void a Credit -[**void_payment**](VoidApi.md#void_payment) | **POST** /v2/payments/{id}/voids | Void a Payment -[**void_refund**](VoidApi.md#void_refund) | **POST** /v2/refunds/{id}/voids | Void a Refund - - -# **get_void** -> InlineResponse2015 get_void(id) - -Retrieve A Void - -Include the void ID in the GET request to retrieve the void details. - -### Example -```ruby -# load the gem -require 'cyberSource_client' - -api_instance = CyberSource::VoidApi.new - -id = "id_example" # String | The void ID returned from a previous void request. - - -begin - #Retrieve A Void - result = api_instance.get_void(id) - p result -rescue CyberSource::ApiError => e - puts "Exception when calling VoidApi->get_void: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The void ID returned from a previous void request. | - -### Return type - -[**InlineResponse2015**](InlineResponse2015.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - +[**void_capture**](VoidApi.md#void_capture) | **POST** /pts/v2/captures/{id}/voids | Void a Capture +[**void_credit**](VoidApi.md#void_credit) | **POST** /pts/v2/credits/{id}/voids | Void a Credit +[**void_payment**](VoidApi.md#void_payment) | **POST** /pts/v2/payments/{id}/voids | Void a Payment +[**void_refund**](VoidApi.md#void_refund) | **POST** /pts/v2/refunds/{id}/voids | Void a Refund # **void_capture** @@ -68,7 +20,7 @@ Include the capture ID in the POST request to cancel the capture. ### Example ```ruby # load the gem -require 'cyberSource_client' +require 'cybersource_rest_client' api_instance = CyberSource::VoidApi.new @@ -103,8 +55,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 @@ -118,7 +70,7 @@ Include the credit ID in the POST request to cancel the credit. ### Example ```ruby # load the gem -require 'cyberSource_client' +require 'cybersource_rest_client' api_instance = CyberSource::VoidApi.new @@ -153,8 +105,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 @@ -168,7 +120,7 @@ Include the payment ID in the POST request to cancel the payment. ### Example ```ruby # load the gem -require 'cyberSource_client' +require 'cybersource_rest_client' api_instance = CyberSource::VoidApi.new @@ -203,8 +155,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 @@ -218,7 +170,7 @@ Include the refund ID in the POST request to cancel the refund. ### Example ```ruby # load the gem -require 'cyberSource_client' +require 'cybersource_rest_client' api_instance = CyberSource::VoidApi.new @@ -253,8 +205,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/json;charset=utf-8 diff --git a/docs/VoidCaptureRequest.md b/docs/VoidCaptureRequest.md index ca5af4ca..3f95a913 100644 --- a/docs/VoidCaptureRequest.md +++ b/docs/VoidCaptureRequest.md @@ -3,6 +3,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**client_reference_information** | [**V2paymentsidreversalsClientReferenceInformation**](V2paymentsidreversalsClientReferenceInformation.md) | | [optional] +**client_reference_information** | [**Ptsv2paymentsidreversalsClientReferenceInformation**](Ptsv2paymentsidreversalsClientReferenceInformation.md) | | [optional] diff --git a/docs/VoidCreditRequest.md b/docs/VoidCreditRequest.md index 1968573a..e156f948 100644 --- a/docs/VoidCreditRequest.md +++ b/docs/VoidCreditRequest.md @@ -3,6 +3,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**client_reference_information** | [**V2paymentsidreversalsClientReferenceInformation**](V2paymentsidreversalsClientReferenceInformation.md) | | [optional] +**client_reference_information** | [**Ptsv2paymentsidreversalsClientReferenceInformation**](Ptsv2paymentsidreversalsClientReferenceInformation.md) | | [optional] diff --git a/docs/VoidPaymentRequest.md b/docs/VoidPaymentRequest.md index 2bad6464..dee66984 100644 --- a/docs/VoidPaymentRequest.md +++ b/docs/VoidPaymentRequest.md @@ -3,6 +3,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**client_reference_information** | [**V2paymentsidreversalsClientReferenceInformation**](V2paymentsidreversalsClientReferenceInformation.md) | | [optional] +**client_reference_information** | [**Ptsv2paymentsidreversalsClientReferenceInformation**](Ptsv2paymentsidreversalsClientReferenceInformation.md) | | [optional] diff --git a/docs/VoidRefundRequest.md b/docs/VoidRefundRequest.md index 46f9c821..b79ae179 100644 --- a/docs/VoidRefundRequest.md +++ b/docs/VoidRefundRequest.md @@ -3,6 +3,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**client_reference_information** | [**V2paymentsidreversalsClientReferenceInformation**](V2paymentsidreversalsClientReferenceInformation.md) | | [optional] +**client_reference_information** | [**Ptsv2paymentsidreversalsClientReferenceInformation**](Ptsv2paymentsidreversalsClientReferenceInformation.md) | | [optional] diff --git a/lib/cyberSource_client.rb b/lib/cyberSource_client.rb deleted file mode 100644 index 07bcaada..00000000 --- a/lib/cyberSource_client.rb +++ /dev/null @@ -1,286 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -# Common files -require 'cyberSource_client/api_client' -require 'cyberSource_client/api_error' -require 'cyberSource_client/version' -require 'cyberSource_client/configuration' - -# Models -require 'cyberSource_client/models/auth_reversal_request' -require 'cyberSource_client/models/body' -require 'cyberSource_client/models/body_1' -require 'cyberSource_client/models/body_2' -require 'cyberSource_client/models/body_3' -require 'cyberSource_client/models/capture_payment_request' -require 'cyberSource_client/models/card_info' -require 'cyberSource_client/models/create_credit_request' -require 'cyberSource_client/models/create_payment_request' -require 'cyberSource_client/models/der_public_key' -require 'cyberSource_client/models/error' -require 'cyberSource_client/models/error_links' -require 'cyberSource_client/models/error_response' -require 'cyberSource_client/models/generate_public_key_request' -require 'cyberSource_client/models/inline_response_200' -require 'cyberSource_client/models/inline_response_200_1' -require 'cyberSource_client/models/inline_response_200_2' -require 'cyberSource_client/models/inline_response_200_2_buyer_information' -require 'cyberSource_client/models/inline_response_200_2_device_information' -require 'cyberSource_client/models/inline_response_200_2_merchant_information' -require 'cyberSource_client/models/inline_response_200_2_order_information' -require 'cyberSource_client/models/inline_response_200_2_order_information_amount_details' -require 'cyberSource_client/models/inline_response_200_2_order_information_bill_to' -require 'cyberSource_client/models/inline_response_200_2_order_information_invoice_details' -require 'cyberSource_client/models/inline_response_200_2_order_information_line_items' -require 'cyberSource_client/models/inline_response_200_2_order_information_ship_to' -require 'cyberSource_client/models/inline_response_200_2_payment_information' -require 'cyberSource_client/models/inline_response_200_2_payment_information_card' -require 'cyberSource_client/models/inline_response_200_2_payment_information_tokenized_card' -require 'cyberSource_client/models/inline_response_200_2_processing_information' -require 'cyberSource_client/models/inline_response_200_2_processor_information' -require 'cyberSource_client/models/inline_response_200_2_processor_information_avs' -require 'cyberSource_client/models/inline_response_200_2_processor_information_card_verification' -require 'cyberSource_client/models/inline_response_200_3' -require 'cyberSource_client/models/inline_response_200_4' -require 'cyberSource_client/models/inline_response_200_4_device_information' -require 'cyberSource_client/models/inline_response_200_4_order_information' -require 'cyberSource_client/models/inline_response_200_4_order_information_amount_details' -require 'cyberSource_client/models/inline_response_200_4_order_information_invoice_details' -require 'cyberSource_client/models/inline_response_200_4_order_information_ship_to' -require 'cyberSource_client/models/inline_response_200_4_processing_information' -require 'cyberSource_client/models/inline_response_200_4_processing_information_authorization_options' -require 'cyberSource_client/models/inline_response_200_5' -require 'cyberSource_client/models/inline_response_200_6' -require 'cyberSource_client/models/inline_response_200_7' -require 'cyberSource_client/models/inline_response_200_8' -require 'cyberSource_client/models/inline_response_200_8__links' -require 'cyberSource_client/models/inline_response_200_8__links_first' -require 'cyberSource_client/models/inline_response_200_8__links_last' -require 'cyberSource_client/models/inline_response_200_8__links_next' -require 'cyberSource_client/models/inline_response_200_8__links_prev' -require 'cyberSource_client/models/inline_response_200_8__links_self' -require 'cyberSource_client/models/inline_response_200_der' -require 'cyberSource_client/models/inline_response_200_jwk' -require 'cyberSource_client/models/inline_response_201' -require 'cyberSource_client/models/inline_response_201_1' -require 'cyberSource_client/models/inline_response_201_1_authorization_information' -require 'cyberSource_client/models/inline_response_201_1_processor_information' -require 'cyberSource_client/models/inline_response_201_1_reversal_amount_details' -require 'cyberSource_client/models/inline_response_201_2' -require 'cyberSource_client/models/inline_response_201_2__links' -require 'cyberSource_client/models/inline_response_201_2_order_information' -require 'cyberSource_client/models/inline_response_201_2_order_information_amount_details' -require 'cyberSource_client/models/inline_response_201_2_processor_information' -require 'cyberSource_client/models/inline_response_201_3' -require 'cyberSource_client/models/inline_response_201_3__links' -require 'cyberSource_client/models/inline_response_201_3_order_information' -require 'cyberSource_client/models/inline_response_201_3_processor_information' -require 'cyberSource_client/models/inline_response_201_3_refund_amount_details' -require 'cyberSource_client/models/inline_response_201_4' -require 'cyberSource_client/models/inline_response_201_4_credit_amount_details' -require 'cyberSource_client/models/inline_response_201_5' -require 'cyberSource_client/models/inline_response_201_5_void_amount_details' -require 'cyberSource_client/models/inline_response_201_6' -require 'cyberSource_client/models/inline_response_201_client_reference_information' -require 'cyberSource_client/models/inline_response_201__embedded' -require 'cyberSource_client/models/inline_response_201__embedded_capture' -require 'cyberSource_client/models/inline_response_201__embedded_capture__links' -require 'cyberSource_client/models/inline_response_201_error_information' -require 'cyberSource_client/models/inline_response_201_error_information_details' -require 'cyberSource_client/models/inline_response_201__links' -require 'cyberSource_client/models/inline_response_201__links_self' -require 'cyberSource_client/models/inline_response_201_order_information' -require 'cyberSource_client/models/inline_response_201_order_information_amount_details' -require 'cyberSource_client/models/inline_response_201_order_information_invoice_details' -require 'cyberSource_client/models/inline_response_201_payment_information' -require 'cyberSource_client/models/inline_response_201_payment_information_account_features' -require 'cyberSource_client/models/inline_response_201_payment_information_card' -require 'cyberSource_client/models/inline_response_201_payment_information_tokenized_card' -require 'cyberSource_client/models/inline_response_201_point_of_sale_information' -require 'cyberSource_client/models/inline_response_201_point_of_sale_information_emv' -require 'cyberSource_client/models/inline_response_201_processor_information' -require 'cyberSource_client/models/inline_response_201_processor_information_avs' -require 'cyberSource_client/models/inline_response_201_processor_information_card_verification' -require 'cyberSource_client/models/inline_response_201_processor_information_consumer_authentication_response' -require 'cyberSource_client/models/inline_response_201_processor_information_customer' -require 'cyberSource_client/models/inline_response_201_processor_information_electronic_verification_results' -require 'cyberSource_client/models/inline_response_201_processor_information_issuer' -require 'cyberSource_client/models/inline_response_201_processor_information_merchant_advice' -require 'cyberSource_client/models/inline_response_400' -require 'cyberSource_client/models/inline_response_400_1' -require 'cyberSource_client/models/inline_response_400_2' -require 'cyberSource_client/models/inline_response_400_3' -require 'cyberSource_client/models/inline_response_400_4' -require 'cyberSource_client/models/inline_response_400_5' -require 'cyberSource_client/models/inline_response_400_6' -require 'cyberSource_client/models/inline_response_409' -require 'cyberSource_client/models/inline_response_409__links' -require 'cyberSource_client/models/inline_response_409__links_payment_instruments' -require 'cyberSource_client/models/inline_response_502' -require 'cyberSource_client/models/inline_response_default' -require 'cyberSource_client/models/inline_response_default__links' -require 'cyberSource_client/models/inline_response_default__links_next' -require 'cyberSource_client/models/inline_response_default_response_status' -require 'cyberSource_client/models/inline_response_default_response_status_details' -require 'cyberSource_client/models/instrumentidentifiers_bank_account' -require 'cyberSource_client/models/instrumentidentifiers_card' -require 'cyberSource_client/models/instrumentidentifiers_details' -require 'cyberSource_client/models/instrumentidentifiers__links' -require 'cyberSource_client/models/instrumentidentifiers__links_self' -require 'cyberSource_client/models/instrumentidentifiers_metadata' -require 'cyberSource_client/models/instrumentidentifiers_processing_information' -require 'cyberSource_client/models/instrumentidentifiers_processing_information_authorization_options' -require 'cyberSource_client/models/instrumentidentifiers_processing_information_authorization_options_initiator' -require 'cyberSource_client/models/instrumentidentifiers_authorization_options_merchant_initiated_transaction' -require 'cyberSource_client/models/json_web_key' -require 'cyberSource_client/models/key_parameters' -require 'cyberSource_client/models/key_result' -require 'cyberSource_client/models/link' -require 'cyberSource_client/models/links' -require 'cyberSource_client/models/oct_create_payment_request' -require 'cyberSource_client/models/paymentinstruments_bank_account' -require 'cyberSource_client/models/paymentinstruments_bill_to' -require 'cyberSource_client/models/paymentinstruments_buyer_information' -require 'cyberSource_client/models/paymentinstruments_buyer_information_issued_by' -require 'cyberSource_client/models/paymentinstruments_buyer_information_personal_identification' -require 'cyberSource_client/models/paymentinstruments_card' -require 'cyberSource_client/models/paymentinstruments_instrument_identifier' -require 'cyberSource_client/models/paymentinstruments_merchant_information' -require 'cyberSource_client/models/paymentinstruments_merchant_information_merchant_descriptor' -require 'cyberSource_client/models/paymentinstruments_processing_information' -require 'cyberSource_client/models/paymentinstruments_processing_information_bank_transfer_options' -require 'cyberSource_client/models/paymentsflexv1tokens_card_info' -require 'cyberSource_client/models/refund_capture_request' -require 'cyberSource_client/models/refund_payment_request' -require 'cyberSource_client/models/response_status' -require 'cyberSource_client/models/response_status_details' -require 'cyberSource_client/models/tokenize_parameters' -require 'cyberSource_client/models/tokenize_request' -require 'cyberSource_client/models/tokenize_result' -require 'cyberSource_client/models/v2credits_point_of_sale_information' -require 'cyberSource_client/models/v2credits_point_of_sale_information_emv' -require 'cyberSource_client/models/v2credits_processing_information' -require 'cyberSource_client/models/v2payments_aggregator_information' -require 'cyberSource_client/models/v2payments_aggregator_information_sub_merchant' -require 'cyberSource_client/models/v2payments_buyer_information' -require 'cyberSource_client/models/v2payments_buyer_information_personal_identification' -require 'cyberSource_client/models/v2payments_client_reference_information' -require 'cyberSource_client/models/v2payments_consumer_authentication_information' -require 'cyberSource_client/models/v2payments_device_information' -require 'cyberSource_client/models/v2payments_merchant_defined_information' -require 'cyberSource_client/models/v2payments_merchant_information' -require 'cyberSource_client/models/v2payments_merchant_information_merchant_descriptor' -require 'cyberSource_client/models/v2payments_order_information' -require 'cyberSource_client/models/v2payments_order_information_amount_details' -require 'cyberSource_client/models/v2payments_order_information_amount_details_amex_additional_amounts' -require 'cyberSource_client/models/v2payments_order_information_amount_details_surcharge' -require 'cyberSource_client/models/v2payments_order_information_amount_details_tax_details' -require 'cyberSource_client/models/v2payments_order_information_bill_to' -require 'cyberSource_client/models/v2payments_order_information_invoice_details' -require 'cyberSource_client/models/v2payments_order_information_invoice_details_transaction_advice_addendum' -require 'cyberSource_client/models/v2payments_order_information_line_items' -require 'cyberSource_client/models/v2payments_order_information_ship_to' -require 'cyberSource_client/models/v2payments_order_information_shipping_details' -require 'cyberSource_client/models/v2payments_payment_information' -require 'cyberSource_client/models/v2payments_payment_information_card' -require 'cyberSource_client/models/v2payments_payment_information_customer' -require 'cyberSource_client/models/v2payments_payment_information_fluid_data' -require 'cyberSource_client/models/v2payments_payment_information_tokenized_card' -require 'cyberSource_client/models/v2payments_point_of_sale_information' -require 'cyberSource_client/models/v2payments_point_of_sale_information_emv' -require 'cyberSource_client/models/v2payments_processing_information' -require 'cyberSource_client/models/v2payments_processing_information_authorization_options' -require 'cyberSource_client/models/v2payments_processing_information_authorization_options_initiator' -require 'cyberSource_client/models/v2payments_processing_information_authorization_options_merchant_initiated_transaction' -require 'cyberSource_client/models/v2payments_processing_information_capture_options' -require 'cyberSource_client/models/v2payments_processing_information_issuer' -require 'cyberSource_client/models/v2payments_processing_information_recurring_options' -require 'cyberSource_client/models/v2payments_recipient_information' -require 'cyberSource_client/models/v2paymentsidcaptures_aggregator_information' -require 'cyberSource_client/models/v2paymentsidcaptures_aggregator_information_sub_merchant' -require 'cyberSource_client/models/v2paymentsidcaptures_buyer_information' -require 'cyberSource_client/models/v2paymentsidcaptures_merchant_information' -require 'cyberSource_client/models/v2paymentsidcaptures_order_information' -require 'cyberSource_client/models/v2paymentsidcaptures_order_information_amount_details' -require 'cyberSource_client/models/v2paymentsidcaptures_order_information_bill_to' -require 'cyberSource_client/models/v2paymentsidcaptures_order_information_invoice_details' -require 'cyberSource_client/models/v2paymentsidcaptures_order_information_ship_to' -require 'cyberSource_client/models/v2paymentsidcaptures_order_information_shipping_details' -require 'cyberSource_client/models/v2paymentsidcaptures_payment_information' -require 'cyberSource_client/models/v2paymentsidcaptures_point_of_sale_information' -require 'cyberSource_client/models/v2paymentsidcaptures_point_of_sale_information_emv' -require 'cyberSource_client/models/v2paymentsidcaptures_processing_information' -require 'cyberSource_client/models/v2paymentsidcaptures_processing_information_authorization_options' -require 'cyberSource_client/models/v2paymentsidcaptures_processing_information_capture_options' -require 'cyberSource_client/models/v2paymentsidrefunds_merchant_information' -require 'cyberSource_client/models/v2paymentsidrefunds_order_information' -require 'cyberSource_client/models/v2paymentsidrefunds_order_information_line_items' -require 'cyberSource_client/models/v2paymentsidrefunds_payment_information' -require 'cyberSource_client/models/v2paymentsidrefunds_payment_information_card' -require 'cyberSource_client/models/v2paymentsidrefunds_point_of_sale_information' -require 'cyberSource_client/models/v2paymentsidrefunds_processing_information' -require 'cyberSource_client/models/v2paymentsidrefunds_processing_information_recurring_options' -require 'cyberSource_client/models/v2paymentsidreversals_client_reference_information' -require 'cyberSource_client/models/v2paymentsidreversals_order_information' -require 'cyberSource_client/models/v2paymentsidreversals_order_information_line_items' -require 'cyberSource_client/models/v2paymentsidreversals_point_of_sale_information' -require 'cyberSource_client/models/v2paymentsidreversals_processing_information' -require 'cyberSource_client/models/v2paymentsidreversals_reversal_information' -require 'cyberSource_client/models/v2paymentsidreversals_reversal_information_amount_details' -require 'cyberSource_client/models/v2payouts_merchant_information' -require 'cyberSource_client/models/v2payouts_merchant_information_merchant_descriptor' -require 'cyberSource_client/models/v2payouts_order_information' -require 'cyberSource_client/models/v2payouts_order_information_amount_details' -require 'cyberSource_client/models/v2payouts_order_information_bill_to' -require 'cyberSource_client/models/v2payouts_payment_information' -require 'cyberSource_client/models/v2payouts_payment_information_card' -require 'cyberSource_client/models/v2payouts_processing_information' -require 'cyberSource_client/models/v2payouts_processing_information_payouts_options' -require 'cyberSource_client/models/v2payouts_recipient_information' -require 'cyberSource_client/models/v2payouts_sender_information' -require 'cyberSource_client/models/v2payouts_sender_information_account' -require 'cyberSource_client/models/void_capture_request' -require 'cyberSource_client/models/void_credit_request' -require 'cyberSource_client/models/void_payment_request' -require 'cyberSource_client/models/void_refund_request' - -# APIs -require 'cyberSource_client/api/capture_api' -require 'cyberSource_client/api/credit_api' -require 'cyberSource_client/api/default_api' -require 'cyberSource_client/api/instrument_identifier_api' -require 'cyberSource_client/api/key_generation_api' -require 'cyberSource_client/api/payment_api' -require 'cyberSource_client/api/payment_instrument_api' -require 'cyberSource_client/api/refund_api' -require 'cyberSource_client/api/reversal_api' -require 'cyberSource_client/api/tokenization_api' -require 'cyberSource_client/api/void_api' - -module CyberSource - class << self - # Customize default settings for the SDK using block. - # CyberSource.configure do |config| - # config.username = "xxx" - # config.password = "xxx" - # end - # If no block given, return the default Configuration object. - def configure - if block_given? - yield(Configuration.default) - else - Configuration.default - end - end - end -end diff --git a/lib/cyberSource_client/api/capture_api.rb b/lib/cyberSource_client/api/capture_api.rb deleted file mode 100644 index 29bb2eab..00000000 --- a/lib/cyberSource_client/api/capture_api.rb +++ /dev/null @@ -1,133 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'uri' - -module CyberSource - class CaptureApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Capture a Payment - # Include the payment ID in the POST request to capture the payment amount. - # @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] - 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 - end - - # Capture a Payment - # Include the payment ID in the POST request to capture the payment amount. - # @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 - 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 ...' - end - # verify the required parameter 'capture_payment_request' is set - if @api_client.config.client_side_validation && capture_payment_request.nil? - fail ArgumentError, "Missing the required parameter 'capture_payment_request' when calling CaptureApi.capture_payment" - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling CaptureApi.capture_payment" - end - # resource path - local_var_path = 'pts/v2/payments/{id}/captures'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(capture_payment_request) - auth_names = [] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2012') - 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 - return data, status_code, headers - end - # Retrieve a Capture - # Include the capture ID in the GET request to retrieve the capture details. - # @param id The capture ID returned from a previous capture request. - # @param [Hash] opts the optional parameters - # @return [InlineResponse2004] - def get_capture(id, opts = {}) - data, _status_code, _headers = get_capture_with_http_info(id, opts) - data - end - - # Retrieve a Capture - # Include the capture ID in the GET request to retrieve the capture details. - # @param id The capture ID returned from a previous capture request. - # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2004, Fixnum, Hash)>] InlineResponse2004 data, response status code and response headers - def get_capture_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaptureApi.get_capture ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling CaptureApi.get_capture" - end - # resource path - local_var_path = 'pts/v2/captures/{id}'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = [] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2004') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaptureApi#get_capture\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/cyberSource_client/api/credit_api.rb b/lib/cyberSource_client/api/credit_api.rb deleted file mode 100644 index dee45280..00000000 --- a/lib/cyberSource_client/api/credit_api.rb +++ /dev/null @@ -1,127 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'uri' - -module CyberSource - class CreditApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Process a Credit - # 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] - 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 - end - - # Process a Credit - # 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 - 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 ...' - end - # verify the required parameter 'create_credit_request' is set - if @api_client.config.client_side_validation && create_credit_request.nil? - fail ArgumentError, "Missing the required parameter 'create_credit_request' when calling CreditApi.create_credit" - end - # resource path - local_var_path = 'pts/v2/credits/' - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(create_credit_request) - auth_names = [] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2014') - 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 - return data, status_code, headers - end - # Retrieve a Credit - # Include the credit ID in the GET request to return details of the credit. - # @param id The credit ID returned from a previous stand-alone credit request. - # @param [Hash] opts the optional parameters - # @return [InlineResponse2006] - def get_credit(id, opts = {}) - data, _status_code, _headers = get_credit_with_http_info(id, opts) - return data, _status_code, _headers - end - - # Retrieve a Credit - # Include the credit ID in the GET request to return details of the credit. - # @param id The credit ID returned from a previous stand-alone credit request. - # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2006, Fixnum, Hash)>] InlineResponse2006 data, response status code and response headers - def get_credit_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CreditApi.get_credit ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling CreditApi.get_credit" - end - # resource path - local_var_path = 'pts/v2/credits/{id}'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = [] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2006') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CreditApi#get_credit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/cyberSource_client/api/default_api.rb b/lib/cyberSource_client/api/default_api.rb deleted file mode 100644 index 21a1b319..00000000 --- a/lib/cyberSource_client/api/default_api.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 'uri' - -module CyberSource - class DefaultApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Process a Payout - # Send funds from a selected funding source to a designated credit/debit card account or a prepaid card using an Original Credit Transaction (OCT). - # @param oct_create_payment_request - # @param [Hash] opts the optional parameters - # @return [nil] - def oct_create_payment(oct_create_payment_request, opts = {}) - # anjana - data, _status_code, _headers = oct_create_payment_with_http_info(oct_create_payment_request, opts) - return data, _status_code, _headers - end - - # Process a Payout - # Send funds from a selected funding source to a designated credit/debit card account or a prepaid card using an Original Credit Transaction (OCT). - # @param oct_create_payment_request - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def oct_create_payment_with_http_info(oct_create_payment_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.oct_create_payment ...' - end - # verify the required parameter 'oct_create_payment_request' is set - if @api_client.config.client_side_validation && oct_create_payment_request.nil? - fail ArgumentError, "Missing the required parameter 'oct_create_payment_request' when calling DefaultApi.oct_create_payment" - end - # resource path - local_var_path = 'pts/v2/payouts/' - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(oct_create_payment_request) - auth_names = [] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: DefaultApi#oct_create_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/cyberSource_client/api/instrument_identifier_api.rb b/lib/cyberSource_client/api/instrument_identifier_api.rb deleted file mode 100644 index ef2a4bca..00000000 --- a/lib/cyberSource_client/api/instrument_identifier_api.rb +++ /dev/null @@ -1,393 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'uri' - -module CyberSource - class InstrumentIdentifierApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Create an Instrument Identifier - # @param profile_id The id of a profile containing user specific TMS configuration. - # @param [Hash] opts the optional parameters - # @option opts [Body] :body Please specify either a Card or Bank Account. - # @return [InlineResponse2007] - def instrumentidentifiers_post(profile_id, opts = {}) - data, _status_code, _headers = instrumentidentifiers_post_with_http_info(profile_id, opts) - return data, _status_code, _headers - end - - # Create an Instrument Identifier - # @param profile_id The id of a profile containing user specific TMS configuration. - # @param [Hash] opts the optional parameters - # @option opts [Body] :body Please specify either a Card or Bank Account. - # @return [Array<(InlineResponse2007, Fixnum, Hash)>] InlineResponse2007 data, response status code and response headers - def instrumentidentifiers_post_with_http_info(profile_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: InstrumentIdentifierApi.instrumentidentifiers_post ...' - end - # verify the required parameter 'profile_id' is set - if @api_client.config.client_side_validation && profile_id.nil? - fail ArgumentError, "Missing the required parameter 'profile_id' when calling InstrumentIdentifierApi.instrumentidentifiers_post" - end - # if @api_client.config.client_side_validation && profile_id > 36 - # fail ArgumentError, 'invalid value for "profile_id" when calling InstrumentIdentifierApi.instrumentidentifiers_post, must be smaller than or equal to 36.' - # end - - # if @api_client.config.client_side_validation && profile_id < 36 - # fail ArgumentError, 'invalid value for "profile_id" when calling InstrumentIdentifierApi.instrumentidentifiers_post, must be greater than or equal to 36.' - # end - - # resource path - local_var_path = 'tms/v1/instrumentidentifiers' - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - header_params[:'profile-id'] = profile_id - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = [] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2007') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: InstrumentIdentifierApi#instrumentidentifiers_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Delete an Instrument Identifier - # @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 [nil] - def instrumentidentifiers_token_id_delete(profile_id, token_id, opts = {}) - data, _status_code, _headers = instrumentidentifiers_token_id_delete_with_http_info(profile_id, token_id, opts) - return data, _status_code, _headers - end - - # Delete an Instrument Identifier - # @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<(nil, Fixnum, Hash)>] nil, response status code and response headers - def instrumentidentifiers_token_id_delete_with_http_info(profile_id, token_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: InstrumentIdentifierApi.instrumentidentifiers_token_id_delete ...' - end - # verify the required parameter 'profile_id' is set - if @api_client.config.client_side_validation && profile_id.nil? - fail ArgumentError, "Missing the required parameter 'profile_id' when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_delete" - end - # z - - # 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.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.instrumentidentifiers_token_id_delete, must be smaller than or equal to 32.' - # end - - # if @api_client.config.client_side_validation && token_id < 16 - # fail ArgumentError, 'invalid value for "token_id" when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_delete, must be greater than or equal to 16.' - # end - - # resource path - local_var_path = 'tms/v1/instrumentidentifiers/{tokenId}'.sub('{' + 'tokenId' + '}', token_id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - header_params[:'profile-id'] = profile_id - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = [] - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: InstrumentIdentifierApi#instrumentidentifiers_token_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Retrieve an Instrument Identifier - # @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 [InlineResponse2007] - def instrumentidentifiers_token_id_get(profile_id, token_id, opts = {}) - data, _status_code, _headers = instrumentidentifiers_token_id_get_with_http_info(profile_id, token_id, opts) - return data, _status_code, _headers - end - - # Retrieve an Instrument Identifier - # @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<(InlineResponse2007, Fixnum, Hash)>] InlineResponse2007 data, response status code and response headers - def 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.instrumentidentifiers_token_id_get ...' - end - # verify the required parameter 'profile_id' is set - if @api_client.config.client_side_validation && profile_id.nil? - fail ArgumentError, "Missing the required parameter 'profile_id' when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_get" - end - # if @api_client.config.client_side_validation && profile_id > "36" - # fail ArgumentError, 'invalid value for "profile_id" when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_get, must be smaller than or equal to 36.' - # end - - # if @api_client.config.client_side_validation && profile_id < "36" - # fail ArgumentError, 'invalid value for "profile_id" when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_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 InstrumentIdentifierApi.instrumentidentifiers_token_id_get" - # end - # if @api_client.config.client_side_validation && token_id > 32 - # fail ArgumentError, 'invalid value for "token_id" when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_get, must be smaller than or equal to 32.' - # end - - # if @api_client.config.client_side_validation && token_id < 16 - # fail ArgumentError, 'invalid value for "token_id" when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_get, must be greater than or equal to 16.' - # end - - # resource path - local_var_path = 'tms/v1/instrumentidentifiers/{tokenId}'.sub('{' + 'tokenId' + '}', token_id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - header_params[:'profile-id'] = profile_id - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = [] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2007') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: InstrumentIdentifierApi#instrumentidentifiers_token_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Update a Instrument Identifier - # @param profile_id The id of a profile containing user specific TMS configuration. - # @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 [InlineResponse2007] - def instrumentidentifiers_token_id_patch(profile_id, token_id, body, opts = {}) - data, _status_code, _headers = instrumentidentifiers_token_id_patch_with_http_info(profile_id, token_id, body, opts) - return data, _status_code, _headers - end - - # Update a Instrument Identifier - # @param profile_id The id of a profile containing user specific TMS configuration. - # @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<(InlineResponse2007, Fixnum, Hash)>] InlineResponse2007 data, response status code and response headers - def 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.instrumentidentifiers_token_id_patch ...' - end - # verify the required parameter 'profile_id' is set - if @api_client.config.client_side_validation && profile_id.nil? - fail ArgumentError, "Missing the required parameter 'profile_id' when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_patch" - end - if @api_client.config.client_side_validation && profile_id > 36 - fail ArgumentError, 'invalid value for "profile_id" when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_patch, must be smaller than or equal to 36.' - end - - if @api_client.config.client_side_validation && profile_id < 36 - fail ArgumentError, 'invalid value for "profile_id" when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_patch, 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.instrumentidentifiers_token_id_patch" - end - if @api_client.config.client_side_validation && token_id > 32 - fail ArgumentError, 'invalid value for "token_id" when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_patch, must be smaller than or equal to 32.' - end - - if @api_client.config.client_side_validation && token_id < 16 - fail ArgumentError, 'invalid value for "token_id" when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_patch, must be greater than or equal to 16.' - end - - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_patch" - end - # resource path - local_var_path = '/instrumentidentifiers/{tokenId}'.sub('{' + 'tokenId' + '}', token_id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - header_params[:'profile-id'] = profile_id - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(body) - auth_names = [] - data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2007') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: InstrumentIdentifierApi#instrumentidentifiers_token_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Retrieve all Payment Instruments associated with an Instrument Identifier - # @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 - # @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 [InlineResponse2008] - def instrumentidentifiers_token_id_paymentinstruments_get(profile_id, token_id, opts = {}) - data, _status_code, _headers = instrumentidentifiers_token_id_paymentinstruments_get_with_http_info(profile_id, token_id, opts) - return data, _status_code, _headers - end - - # Retrieve all Payment Instruments associated with an Instrument Identifier - # @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 - # @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<(InlineResponse2008, Fixnum, Hash)>] InlineResponse2008 data, response status code and response headers - def 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: InstrumentIdentifierApi.instrumentidentifiers_token_id_paymentinstruments_get ...' - end - # verify the required parameter 'profile_id' is set - if @api_client.config.client_side_validation && profile_id.nil? - fail ArgumentError, "Missing the required parameter 'profile_id' when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_paymentinstruments_get" - end - # if @api_client.config.client_side_validation && profile_id > 36 - # fail ArgumentError, 'invalid value for "profile_id" when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_paymentinstruments_get, must be smaller than or equal to 36.' - # end - - # if @api_client.config.client_side_validation && profile_id < 36 - # fail ArgumentError, 'invalid value for "profile_id" when calling InstrumentIdentifierApi.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 InstrumentIdentifierApi.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 InstrumentIdentifierApi.instrumentidentifiers_token_id_paymentinstruments_get, must be smaller than or equal to 32.' - # end - - # if @api_client.config.client_side_validation && token_id < 16 - # fail ArgumentError, 'invalid value for "token_id" when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_paymentinstruments_get, must be greater than or equal to 16.' - # end - - if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 - fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_paymentinstruments_get, must be greater than or equal to 0.' - end - - if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_paymentinstruments_get, must be smaller than or equal to 100.' - end - - if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling InstrumentIdentifierApi.instrumentidentifiers_token_id_paymentinstruments_get, must be greater than or equal to 1.' - end - - # resource path - local_var_path = 'tms/v1/instrumentidentifiers/{tokenId}/paymentinstruments'.sub('{' + 'tokenId' + '}', token_id.to_s) - - # query parameters - query_params = {} - query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - header_params[:'profile-id'] = profile_id - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = [] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2008') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: InstrumentIdentifierApi#instrumentidentifiers_token_id_paymentinstruments_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/cyberSource_client/api/payment_api.rb b/lib/cyberSource_client/api/payment_api.rb deleted file mode 100644 index 38812eba..00000000 --- a/lib/cyberSource_client/api/payment_api.rb +++ /dev/null @@ -1,127 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'uri' - -module CyberSource - class PaymentApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Process a Payment - # Authorize the payment for the transaction. - # @param create_payment_request - # @param [Hash] opts the optional parameters - # @return [InlineResponse201] - 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 - end - - # Process a Payment - # 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 - def create_payment_with_http_info(create_payment_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PaymentApi.create_payment ...' - end - # verify the required parameter 'create_payment_request' is set - if @api_client.config.client_side_validation && create_payment_request.nil? - fail ArgumentError, "Missing the required parameter 'create_payment_request' when calling PaymentApi.create_payment" - end - # resource path - local_var_path = 'pts/v2/payments/' - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(create_payment_request) - auth_names = [] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse201') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PaymentApi#create_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Retrieve a Payment - # Include the payment ID in the GET request to retrieve the payment details. - # @param id The payment ID returned from a previous payment request. - # @param [Hash] opts the optional parameters - # @return [InlineResponse2002] - def get_payment(id, opts = {}) - data, _status_code, _headers = get_payment_with_http_info(id, opts) - return data, _status_code, _headers - end - - # Retrieve a Payment - # Include the payment ID in the GET request to retrieve the payment details. - # @param id The payment ID returned from a previous payment request. - # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2002, Fixnum, Hash)>] InlineResponse2002 data, response status code and response headers - def get_payment_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PaymentApi.get_payment ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling PaymentApi.get_payment" - end - # resource path - local_var_path = 'pts/v2/payments/{id}'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = [] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2002') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PaymentApi#get_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/cyberSource_client/api/payment_instrument_api.rb b/lib/cyberSource_client/api/payment_instrument_api.rb deleted file mode 100644 index 37342646..00000000 --- a/lib/cyberSource_client/api/payment_instrument_api.rb +++ /dev/null @@ -1,312 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'uri' - -module CyberSource - class PaymentInstrumentApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Create a Payment Instrument - # @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] - def paymentinstruments_post(profile_id, body, opts = {}) - data, _status_code, _headers = paymentinstruments_post_with_http_info(profile_id, body, opts) - return data, _status_code, _headers - end - - # Create a Payment Instrument - # @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 - def paymentinstruments_post_with_http_info(profile_id, body, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PaymentInstrumentApi.paymentinstruments_post ...' - end - # verify the required parameter 'profile_id' is set - if @api_client.config.client_side_validation && profile_id.nil? - fail ArgumentError, "Missing the required parameter 'profile_id' when calling PaymentInstrumentApi.paymentinstruments_post" - end - # if @api_client.config.client_side_validation && profile_id > 36 - # fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentApi.paymentinstruments_post, must be smaller than or equal to 36.' - # end - - # if @api_client.config.client_side_validation && profile_id < 36 - # fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentApi.paymentinstruments_post, must be greater than or equal to 36.' - # end - - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling PaymentInstrumentApi.paymentinstruments_post" - end - # resource path - local_var_path = 'tms/v1/paymentinstruments' - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - header_params[:'profile-id'] = profile_id - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(body) - auth_names = [] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2016') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PaymentInstrumentApi#paymentinstruments_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Delete a Payment Instrument - # @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 [nil] - def paymentinstruments_token_id_delete(profile_id, token_id, opts = {}) - data, _status_code, _headers = paymentinstruments_token_id_delete_with_http_info(profile_id, token_id, opts) - return data, _status_code, _headers - end - - # Delete a Payment Instrument - # @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<(nil, Fixnum, Hash)>] nil, response status code and response headers - def paymentinstruments_token_id_delete_with_http_info(profile_id, token_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PaymentInstrumentApi.paymentinstruments_token_id_delete ...' - end - # verify the required parameter 'profile_id' is set - if @api_client.config.client_side_validation && profile_id.nil? - fail ArgumentError, "Missing the required parameter 'profile_id' when calling PaymentInstrumentApi.paymentinstruments_token_id_delete" - end - # if @api_client.config.client_side_validation && profile_id > 36 - # fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentApi.paymentinstruments_token_id_delete, must be smaller than or equal to 36.' - # end - - # if @api_client.config.client_side_validation && profile_id < 36 - # fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentApi.paymentinstruments_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 PaymentInstrumentApi.paymentinstruments_token_id_delete" - end - # if @api_client.config.client_side_validation && token_id > 32 - # fail ArgumentError, 'invalid value for "token_id" when calling PaymentInstrumentApi.paymentinstruments_token_id_delete, must be smaller than or equal to 32.' - # end - - # if @api_client.config.client_side_validation && token_id < 16 - # fail ArgumentError, 'invalid value for "token_id" when calling PaymentInstrumentApi.paymentinstruments_token_id_delete, must be greater than or equal to 16.' - # end - - # resource path - local_var_path = 'tms/v1/paymentinstruments/{tokenId}'.sub('{' + 'tokenId' + '}', token_id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - header_params[:'profile-id'] = profile_id - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = [] - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PaymentInstrumentApi#paymentinstruments_token_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Retrieve a Payment Instrument - # @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] - def paymentinstruments_token_id_get(profile_id, token_id, opts = {}) - data, _status_code, _headers = paymentinstruments_token_id_get_with_http_info(profile_id, token_id, opts) - return data, _status_code, _headers - end - - # Retrieve a Payment Instrument - # @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 - def paymentinstruments_token_id_get_with_http_info(profile_id, token_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PaymentInstrumentApi.paymentinstruments_token_id_get ...' - end - # verify the required parameter 'profile_id' is set - if @api_client.config.client_side_validation && profile_id.nil? - fail ArgumentError, "Missing the required parameter 'profile_id' when calling PaymentInstrumentApi.paymentinstruments_token_id_get" - end - # if @api_client.config.client_side_validation && profile_id > 36 - # fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentApi.paymentinstruments_token_id_get, must be smaller than or equal to 36.' - # end - - # if @api_client.config.client_side_validation && profile_id < 36 - # fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentApi.paymentinstruments_token_id_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 PaymentInstrumentApi.paymentinstruments_token_id_get" - end - # if @api_client.config.client_side_validation && token_id > 32 - # fail ArgumentError, 'invalid value for "token_id" when calling PaymentInstrumentApi.paymentinstruments_token_id_get, must be smaller than or equal to 32.' - # end - - # if @api_client.config.client_side_validation && token_id < 16 - # fail ArgumentError, 'invalid value for "token_id" when calling PaymentInstrumentApi.paymentinstruments_token_id_get, must be greater than or equal to 16.' - # end - - # resource path - local_var_path = 'tms/v1/paymentinstruments/{tokenId}'.sub('{' + 'tokenId' + '}', token_id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - header_params[:'profile-id'] = profile_id - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = [] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2016') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PaymentInstrumentApi#paymentinstruments_token_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Update a Payment Instrument - # @param profile_id The id of a profile containing user specific TMS configuration. - # @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] - def paymentinstruments_token_id_patch(profile_id, token_id, body, opts = {}) - data, _status_code, _headers = paymentinstruments_token_id_patch_with_http_info(profile_id, token_id, body, opts) - return data, _status_code, _headers - end - - # Update a Payment Instrument - # @param profile_id The id of a profile containing user specific TMS configuration. - # @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 - def 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: PaymentInstrumentApi.paymentinstruments_token_id_patch ...' - end - # verify the required parameter 'profile_id' is set - if @api_client.config.client_side_validation && profile_id.nil? - fail ArgumentError, "Missing the required parameter 'profile_id' when calling PaymentInstrumentApi.paymentinstruments_token_id_patch" - end - if @api_client.config.client_side_validation && profile_id > 36 - fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentApi.paymentinstruments_token_id_patch, must be smaller than or equal to 36.' - end - - if @api_client.config.client_side_validation && profile_id < 36 - fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentApi.paymentinstruments_token_id_patch, 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 PaymentInstrumentApi.paymentinstruments_token_id_patch" - end - if @api_client.config.client_side_validation && token_id > 32 - fail ArgumentError, 'invalid value for "token_id" when calling PaymentInstrumentApi.paymentinstruments_token_id_patch, must be smaller than or equal to 32.' - end - - if @api_client.config.client_side_validation && token_id < 16 - fail ArgumentError, 'invalid value for "token_id" when calling PaymentInstrumentApi.paymentinstruments_token_id_patch, must be greater than or equal to 16.' - end - - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling PaymentInstrumentApi.paymentinstruments_token_id_patch" - end - # resource path - local_var_path = '/paymentinstruments/{tokenId}'.sub('{' + 'tokenId' + '}', token_id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - header_params[:'profile-id'] = profile_id - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(body) - auth_names = [] - data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2016') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PaymentInstrumentApi#paymentinstruments_token_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/cyberSource_client/api/refund_api.rb b/lib/cyberSource_client/api/refund_api.rb deleted file mode 100644 index 2048a5e7..00000000 --- a/lib/cyberSource_client/api/refund_api.rb +++ /dev/null @@ -1,191 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'uri' - -module CyberSource - class RefundApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Retrieve a Refund - # Include the refund ID in the GET request to to retrieve the refund details. - # @param id The refund ID. This ID is returned from a previous refund request. - # @param [Hash] opts the optional parameters - # @return [InlineResponse2005] - def get_refund(id, opts = {}) - data, _status_code, _headers = get_refund_with_http_info(id, opts) - return data, _status_code, _headers - end - - # Retrieve a Refund - # Include the refund ID in the GET request to to retrieve the refund details. - # @param id The refund ID. This ID is returned from a previous refund request. - # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2005, Fixnum, Hash)>] InlineResponse2005 data, response status code and response headers - def get_refund_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: RefundApi.get_refund ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling RefundApi.get_refund" - end - # resource path - local_var_path = 'pts/v2/refunds/{id}'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = [] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2005') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: RefundApi#get_refund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Refund a Capture - # Include the capture ID in the POST request to refund the captured amount. - # @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] - 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 - end - - # Refund a Capture - # Include the capture ID in the POST request to refund the captured amount. - # @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 - 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 ...' - end - # verify the required parameter 'refund_capture_request' is set - if @api_client.config.client_side_validation && refund_capture_request.nil? - fail ArgumentError, "Missing the required parameter 'refund_capture_request' when calling RefundApi.refund_capture" - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling RefundApi.refund_capture" - end - # resource path - local_var_path = 'pts/v2/captures/{id}/refunds'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(refund_capture_request) - auth_names = [] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2013') - 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 - return data, status_code, headers - end - # Refund a Payment - # Include the payment ID in the POST request to refund the payment amount. - # @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] - 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 - end - - # Refund a Payment - # Include the payment ID in the POST request to refund the payment amount. - # @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 - 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 ...' - end - # verify the required parameter 'refund_payment_request' is set - if @api_client.config.client_side_validation && refund_payment_request.nil? - fail ArgumentError, "Missing the required parameter 'refund_payment_request' when calling RefundApi.refund_payment" - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling RefundApi.refund_payment" - end - # resource path - local_var_path = 'pts/v2/payments/{id}/refunds'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(refund_payment_request) - auth_names = [] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2013') - 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 - return data, status_code, headers - end - end -end diff --git a/lib/cyberSource_client/api/reversal_api.rb b/lib/cyberSource_client/api/reversal_api.rb deleted file mode 100644 index 1130b002..00000000 --- a/lib/cyberSource_client/api/reversal_api.rb +++ /dev/null @@ -1,133 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'uri' - -module CyberSource - class ReversalApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Process an Authorization Reversal - # Include the payment ID in the POST request to reverse the payment amount. - # @param id The payment ID returned from a previous payment request. - # @param auth_reversal_request - # @param [Hash] opts the optional parameters - # @return [InlineResponse2011] - 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 - end - - # Process an Authorization Reversal - # Include the payment ID in the POST request to reverse the payment amount. - # @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 - 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 ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling ReversalApi.auth_reversal" - end - # verify the required parameter 'auth_reversal_request' is set - if @api_client.config.client_side_validation && auth_reversal_request.nil? - fail ArgumentError, "Missing the required parameter 'auth_reversal_request' when calling ReversalApi.auth_reversal" - end - # resource path - local_var_path = 'pts/v2/payments/{id}/reversals'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(auth_reversal_request) - auth_names = [] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2011') - 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 - return data, status_code, headers - end - # Retrieve an Authorization Reversal - # Include the authorization reversal ID in the GET request to retrieve the authorization reversal details. - # @param id The authorization reversal ID returned from a previous authorization reversal request. - # @param [Hash] opts the optional parameters - # @return [InlineResponse2003] - def get_auth_reversal(id, opts = {}) - data, _status_code, _headers = get_auth_reversal_with_http_info(id, opts) - return data, _status_code, _headers - end - - # Retrieve an Authorization Reversal - # Include the authorization reversal ID in the GET request to retrieve the authorization reversal details. - # @param id The authorization reversal ID returned from a previous authorization reversal request. - # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2003, Fixnum, Hash)>] InlineResponse2003 data, response status code and response headers - def get_auth_reversal_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ReversalApi.get_auth_reversal ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling ReversalApi.get_auth_reversal" - end - # resource path - local_var_path = 'pts/v2/reversals/{id}'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = [] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2003') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ReversalApi#get_auth_reversal\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/cyberSource_client/api/tokenization_api.rb b/lib/cyberSource_client/api/tokenization_api.rb deleted file mode 100644 index 4d716c87..00000000 --- a/lib/cyberSource_client/api/tokenization_api.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 'uri' - -module CyberSource - class TokenizationApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Tokenize card - # 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] - def tokenize(opts = {}) - data, _status_code, _headers = tokenize_with_http_info(opts) - return data, _status_code, _headers - end - - # Tokenize card - # 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 - def tokenize_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: TokenizationApi.tokenize ...' - end - # resource path - local_var_path = 'flex/v1/tokens/' - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(opts[:'tokenize_request']) - auth_names = [] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2001') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: TokenizationApi#tokenize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/cyberSource_client/models/generate_public_key_request.rb b/lib/cyberSource_client/models/generate_public_key_request.rb deleted file mode 100644 index 12e26cf3..00000000 --- a/lib/cyberSource_client/models/generate_public_key_request.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 GeneratePublicKeyRequest - # How the card number should be encrypted in the subsequent Tokenize Card request. Possible values are RsaOaep256 or None (if using this value the card number must be in plain text when included in the Tokenize Card request). The Tokenize Card request uses a secure connection (TLS 1.2+) regardless of what encryption type is specified. - attr_accessor :encryption_type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'encryption_type' => :'encryptionType' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'encryption_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?(:'encryptionType') - self.encryption_type = attributes[:'encryptionType'] - end - end - - # Show invalid properties 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 && - encryption_type == o.encryption_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 - [encryption_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_client/models/inline_response_200_2.rb b/lib/cyberSource_client/models/inline_response_200_2.rb deleted file mode 100644 index 55fecf80..00000000 --- a/lib/cyberSource_client/models/inline_response_200_2.rb +++ /dev/null @@ -1,377 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.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 :_links - - attr_accessor :_embedded - - # 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 :processing_information - - attr_accessor :processor_information - - attr_accessor :payment_information - - attr_accessor :order_information - - attr_accessor :buyer_information - - attr_accessor :merchant_information - - attr_accessor :device_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', - :'_embedded' => :'_embedded', - :'id' => :'id', - :'submit_time_utc' => :'submitTimeUtc', - :'status' => :'status', - :'reconciliation_id' => :'reconciliationId', - :'error_information' => :'errorInformation', - :'client_reference_information' => :'clientReferenceInformation', - :'processing_information' => :'processingInformation', - :'processor_information' => :'processorInformation', - :'payment_information' => :'paymentInformation', - :'order_information' => :'orderInformation', - :'buyer_information' => :'buyerInformation', - :'merchant_information' => :'merchantInformation', - :'device_information' => :'deviceInformation' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_links' => :'InlineResponse201Links', - :'_embedded' => :'InlineResponse201Embedded', - :'id' => :'String', - :'submit_time_utc' => :'String', - :'status' => :'String', - :'reconciliation_id' => :'String', - :'error_information' => :'InlineResponse201ErrorInformation', - :'client_reference_information' => :'InlineResponse201ClientReferenceInformation', - :'processing_information' => :'InlineResponse2002ProcessingInformation', - :'processor_information' => :'InlineResponse2002ProcessorInformation', - :'payment_information' => :'InlineResponse2002PaymentInformation', - :'order_information' => :'InlineResponse2002OrderInformation', - :'buyer_information' => :'InlineResponse2002BuyerInformation', - :'merchant_information' => :'InlineResponse2002MerchantInformation', - :'device_information' => :'InlineResponse2002DeviceInformation' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'_embedded') - self._embedded = attributes[:'_embedded'] - 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?(:'processingInformation') - self.processing_information = attributes[:'processingInformation'] - 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?(:'buyerInformation') - self.buyer_information = attributes[:'buyerInformation'] - end - - if attributes.has_key?(:'merchantInformation') - self.merchant_information = attributes[:'merchantInformation'] - end - - if attributes.has_key?(:'deviceInformation') - self.device_information = attributes[:'deviceInformation'] - end - end - - # Show invalid properties 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 && - _embedded == o._embedded && - 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 && - processing_information == o.processing_information && - processor_information == o.processor_information && - payment_information == o.payment_information && - order_information == o.order_information && - buyer_information == o.buyer_information && - merchant_information == o.merchant_information && - device_information == o.device_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, _embedded, id, submit_time_utc, status, reconciliation_id, error_information, client_reference_information, processing_information, processor_information, payment_information, order_information, buyer_information, merchant_information, device_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_client/models/inline_response_200_2_buyer_information.rb b/lib/cyberSource_client/models/inline_response_200_2_buyer_information.rb deleted file mode 100644 index 8a90744e..00000000 --- a/lib/cyberSource_client/models/inline_response_200_2_buyer_information.rb +++ /dev/null @@ -1,270 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2002BuyerInformation - # 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 - - # Recipient’s date of birth. **Format**: `YYYYMMDD`. This field is a pass-through, which means that CyberSource ensures that the value is eight numeric characters but otherwise does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. - attr_accessor :date_of_birth - - # Customer’s government-assigned tax identification number. For processor-specific information, see the purchaser_vat_registration_number 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 :vat_registration_number - - attr_accessor :personal_identification - - # TBD - attr_accessor :tax_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'merchant_customer_id' => :'merchantCustomerId', - :'date_of_birth' => :'dateOfBirth', - :'vat_registration_number' => :'vatRegistrationNumber', - :'personal_identification' => :'personalIdentification', - :'tax_id' => :'taxId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'merchant_customer_id' => :'String', - :'date_of_birth' => :'String', - :'vat_registration_number' => :'String', - :'personal_identification' => :'Array', - :'tax_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 - - if attributes.has_key?(:'dateOfBirth') - self.date_of_birth = attributes[:'dateOfBirth'] - end - - if attributes.has_key?(:'vatRegistrationNumber') - self.vat_registration_number = attributes[:'vatRegistrationNumber'] - end - - if attributes.has_key?(:'personalIdentification') - if (value = attributes[:'personalIdentification']).is_a?(Array) - self.personal_identification = value - end - end - - if attributes.has_key?(:'taxId') - self.tax_id = attributes[:'taxId'] - end - end - - # Show invalid properties 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 !@date_of_birth.nil? && @date_of_birth.to_s.length > 8 - invalid_properties.push('invalid value for "date_of_birth", the character length must be smaller than or equal to 8.') - end - - if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 20 - invalid_properties.push('invalid value for "vat_registration_number", 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 !@merchant_customer_id.nil? && @merchant_customer_id.to_s.length > 100 - return false if !@date_of_birth.nil? && @date_of_birth.to_s.length > 8 - return false if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 20 - 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] date_of_birth Value to be assigned - def date_of_birth=(date_of_birth) - if !date_of_birth.nil? && date_of_birth.to_s.length > 8 - fail ArgumentError, 'invalid value for "date_of_birth", the character length must be smaller than or equal to 8.' - end - - @date_of_birth = date_of_birth - end - - # Custom attribute writer method with validation - # @param [Object] vat_registration_number Value to be assigned - def vat_registration_number=(vat_registration_number) - if !vat_registration_number.nil? && vat_registration_number.to_s.length > 20 - fail ArgumentError, 'invalid value for "vat_registration_number", the character length must be smaller than or equal to 20.' - end - - @vat_registration_number = vat_registration_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 && - merchant_customer_id == o.merchant_customer_id && - date_of_birth == o.date_of_birth && - vat_registration_number == o.vat_registration_number && - personal_identification == o.personal_identification && - tax_id == o.tax_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, date_of_birth, vat_registration_number, personal_identification, tax_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_client/models/inline_response_200_2_device_information.rb b/lib/cyberSource_client/models/inline_response_200_2_device_information.rb deleted file mode 100644 index e28fd472..00000000 --- a/lib/cyberSource_client/models/inline_response_200_2_device_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 InlineResponse2002DeviceInformation - # TBD - attr_accessor :id - - # TBD - attr_accessor :fingerprint_id - - # IP address of the customer. - attr_accessor :ip_address - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id', - :'fingerprint_id' => :'fingerprintId', - :'ip_address' => :'ipAddress' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'id' => :'String', - :'fingerprint_id' => :'String', - :'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?(:'id') - self.id = attributes[:'id'] - end - - if attributes.has_key?(:'fingerprintId') - self.fingerprint_id = attributes[:'fingerprintId'] - end - - 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 && - id == o.id && - fingerprint_id == o.fingerprint_id && - 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 - [id, fingerprint_id, 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_client/models/inline_response_200_2_merchant_information.rb b/lib/cyberSource_client/models/inline_response_200_2_merchant_information.rb deleted file mode 100644 index 1cf4b3d5..00000000 --- a/lib/cyberSource_client/models/inline_response_200_2_merchant_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 InlineResponse2002MerchantInformation - # Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :category_code - - # Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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 :vat_registration_number - - attr_accessor :merchant_descriptor - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'category_code' => :'categoryCode', - :'vat_registration_number' => :'vatRegistrationNumber', - :'merchant_descriptor' => :'merchantDescriptor' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'category_code' => :'Integer', - :'vat_registration_number' => :'String', - :'merchant_descriptor' => :'V2paymentsMerchantInformationMerchantDescriptor' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'categoryCode') - self.category_code = attributes[:'categoryCode'] - end - - if attributes.has_key?(:'vatRegistrationNumber') - self.vat_registration_number = attributes[:'vatRegistrationNumber'] - end - - 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 - if !@category_code.nil? && @category_code > 9999 - invalid_properties.push('invalid value for "category_code", must be smaller than or equal to 9999.') - end - - if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 - invalid_properties.push('invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.') - 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 !@category_code.nil? && @category_code > 9999 - return false if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 - true - end - - # Custom attribute writer method with validation - # @param [Object] category_code Value to be assigned - def category_code=(category_code) - if !category_code.nil? && category_code > 9999 - fail ArgumentError, 'invalid value for "category_code", must be smaller than or equal to 9999.' - end - - @category_code = category_code - end - - # Custom attribute writer method with validation - # @param [Object] vat_registration_number Value to be assigned - def vat_registration_number=(vat_registration_number) - if !vat_registration_number.nil? && vat_registration_number.to_s.length > 21 - fail ArgumentError, 'invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.' - end - - @vat_registration_number = vat_registration_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 && - category_code == o.category_code && - vat_registration_number == o.vat_registration_number && - 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 - [category_code, vat_registration_number, 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_client/models/inline_response_200_2_order_information.rb b/lib/cyberSource_client/models/inline_response_200_2_order_information.rb deleted file mode 100644 index 05353b41..00000000 --- a/lib/cyberSource_client/models/inline_response_200_2_order_information.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2002OrderInformation - attr_accessor :amount_details - - attr_accessor :bill_to - - attr_accessor :ship_to - - attr_accessor :line_items - - attr_accessor :invoice_details - - attr_accessor :shipping_details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'amount_details' => :'amountDetails', - :'bill_to' => :'billTo', - :'ship_to' => :'shipTo', - :'line_items' => :'lineItems', - :'invoice_details' => :'invoiceDetails', - :'shipping_details' => :'shippingDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'amount_details' => :'InlineResponse2002OrderInformationAmountDetails', - :'bill_to' => :'InlineResponse2002OrderInformationBillTo', - :'ship_to' => :'InlineResponse2002OrderInformationShipTo', - :'line_items' => :'Array', - :'invoice_details' => :'InlineResponse2002OrderInformationInvoiceDetails', - :'shipping_details' => :'V2paymentsOrderInformationShippingDetails' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'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?(:'invoiceDetails') - self.invoice_details = attributes[:'invoiceDetails'] - 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 && - amount_details == o.amount_details && - bill_to == o.bill_to && - ship_to == o.ship_to && - line_items == o.line_items && - invoice_details == o.invoice_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 - [amount_details, bill_to, ship_to, line_items, invoice_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_client/models/inline_response_200_2_order_information_amount_details.rb b/lib/cyberSource_client/models/inline_response_200_2_order_information_amount_details.rb deleted file mode 100644 index 6a87c372..00000000 --- a/lib/cyberSource_client/models/inline_response_200_2_order_information_amount_details.rb +++ /dev/null @@ -1,385 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2002OrderInformationAmountDetails - # Amount that was authorized. - attr_accessor :authorized_amount - - # 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 discount amount applied to the order. For processor-specific information, see the order_discount_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 :discount_amount - - # Total charges for any import or export duties included in the order. For processor-specific information, see the duty_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 :duty_amount - - # 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 - - # Flag that indicates whether a national tax is included in the order total. Possible values: - **0**: national tax not included - **1**: national tax included For processor-specific information, see the national_tax_indicator 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 :national_tax_included - - # Total freight or shipping and handling charges for the order. When you include this field in your request, you must also include the **totalAmount** field. For processor-specific information, see the freight_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 :freight_amount - - attr_accessor :tax_details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'authorized_amount' => :'authorizedAmount', - :'total_amount' => :'totalAmount', - :'currency' => :'currency', - :'discount_amount' => :'discountAmount', - :'duty_amount' => :'dutyAmount', - :'tax_amount' => :'taxAmount', - :'national_tax_included' => :'nationalTaxIncluded', - :'freight_amount' => :'freightAmount', - :'tax_details' => :'taxDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'authorized_amount' => :'String', - :'total_amount' => :'String', - :'currency' => :'String', - :'discount_amount' => :'String', - :'duty_amount' => :'String', - :'tax_amount' => :'String', - :'national_tax_included' => :'String', - :'freight_amount' => :'String', - :'tax_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?(:'authorizedAmount') - self.authorized_amount = attributes[:'authorizedAmount'] - end - - 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?(:'discountAmount') - self.discount_amount = attributes[:'discountAmount'] - end - - if attributes.has_key?(:'dutyAmount') - self.duty_amount = attributes[:'dutyAmount'] - end - - if attributes.has_key?(:'taxAmount') - self.tax_amount = attributes[:'taxAmount'] - end - - if attributes.has_key?(:'nationalTaxIncluded') - self.national_tax_included = attributes[:'nationalTaxIncluded'] - end - - if attributes.has_key?(:'freightAmount') - self.freight_amount = attributes[:'freightAmount'] - end - - if attributes.has_key?(:'taxDetails') - if (value = attributes[:'taxDetails']).is_a?(Array) - self.tax_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 - 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 !@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 !@discount_amount.nil? && @discount_amount.to_s.length > 15 - invalid_properties.push('invalid value for "discount_amount", the character length must be smaller than or equal to 15.') - end - - if !@duty_amount.nil? && @duty_amount.to_s.length > 15 - invalid_properties.push('invalid value for "duty_amount", the character length must be smaller than or equal to 15.') - 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 !@national_tax_included.nil? && @national_tax_included.to_s.length > 1 - invalid_properties.push('invalid value for "national_tax_included", the character length must be smaller than or equal to 1.') - end - - if !@freight_amount.nil? && @freight_amount.to_s.length > 13 - invalid_properties.push('invalid value for "freight_amount", the character length must be smaller than or equal to 13.') - 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 !@authorized_amount.nil? && @authorized_amount.to_s.length > 15 - 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 !@discount_amount.nil? && @discount_amount.to_s.length > 15 - return false if !@duty_amount.nil? && @duty_amount.to_s.length > 15 - return false if !@tax_amount.nil? && @tax_amount.to_s.length > 12 - return false if !@national_tax_included.nil? && @national_tax_included.to_s.length > 1 - return false if !@freight_amount.nil? && @freight_amount.to_s.length > 13 - true - 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] 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] discount_amount Value to be assigned - def discount_amount=(discount_amount) - if !discount_amount.nil? && discount_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "discount_amount", the character length must be smaller than or equal to 15.' - end - - @discount_amount = discount_amount - end - - # Custom attribute writer method with validation - # @param [Object] duty_amount Value to be assigned - def duty_amount=(duty_amount) - if !duty_amount.nil? && duty_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "duty_amount", the character length must be smaller than or equal to 15.' - end - - @duty_amount = duty_amount - 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] national_tax_included Value to be assigned - def national_tax_included=(national_tax_included) - if !national_tax_included.nil? && national_tax_included.to_s.length > 1 - fail ArgumentError, 'invalid value for "national_tax_included", the character length must be smaller than or equal to 1.' - end - - @national_tax_included = national_tax_included - end - - # Custom attribute writer method with validation - # @param [Object] freight_amount Value to be assigned - def freight_amount=(freight_amount) - if !freight_amount.nil? && freight_amount.to_s.length > 13 - fail ArgumentError, 'invalid value for "freight_amount", the character length must be smaller than or equal to 13.' - end - - @freight_amount = freight_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 && - authorized_amount == o.authorized_amount && - total_amount == o.total_amount && - currency == o.currency && - discount_amount == o.discount_amount && - duty_amount == o.duty_amount && - tax_amount == o.tax_amount && - national_tax_included == o.national_tax_included && - freight_amount == o.freight_amount && - tax_details == o.tax_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 - [authorized_amount, total_amount, currency, discount_amount, duty_amount, tax_amount, national_tax_included, freight_amount, tax_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_client/models/inline_response_200_2_order_information_bill_to.rb b/lib/cyberSource_client/models/inline_response_200_2_order_information_bill_to.rb deleted file mode 100644 index ee822834..00000000 --- a/lib/cyberSource_client/models/inline_response_200_2_order_information_bill_to.rb +++ /dev/null @@ -1,459 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2002OrderInformationBillTo - # 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 - - # 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 - - # 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 - - # TBD - attr_accessor :county - - # 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 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 - - # 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', - :'company' => :'company', - :'address1' => :'address1', - :'address2' => :'address2', - :'locality' => :'locality', - :'administrative_area' => :'administrativeArea', - :'postal_code' => :'postalCode', - :'county' => :'county', - :'country' => :'country', - :'email' => :'email', - :'phone_number' => :'phoneNumber' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'first_name' => :'String', - :'last_name' => :'String', - :'company' => :'String', - :'address1' => :'String', - :'address2' => :'String', - :'locality' => :'String', - :'administrative_area' => :'String', - :'postal_code' => :'String', - :'county' => :'String', - :'country' => :'String', - :'email' => :'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?(:'company') - self.company = attributes[:'company'] - 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?(:'county') - self.county = attributes[:'county'] - end - - if attributes.has_key?(:'country') - self.country = attributes[:'country'] - end - - if attributes.has_key?(:'email') - self.email = attributes[:'email'] - 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 !@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 !@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 !@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 !@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 !@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 !@company.nil? && @company.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 !@country.nil? && @country.to_s.length > 2 - return false if !@email.nil? && @email.to_s.length > 255 - 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] 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] 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] 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] 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] 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 && - company == o.company && - address1 == o.address1 && - address2 == o.address2 && - locality == o.locality && - administrative_area == o.administrative_area && - postal_code == o.postal_code && - county == o.county && - country == o.country && - email == o.email && - 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, company, address1, address2, locality, administrative_area, postal_code, county, country, email, 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_client/models/inline_response_200_2_order_information_invoice_details.rb b/lib/cyberSource_client/models/inline_response_200_2_order_information_invoice_details.rb deleted file mode 100644 index b604bbe6..00000000 --- a/lib/cyberSource_client/models/inline_response_200_2_order_information_invoice_details.rb +++ /dev/null @@ -1,315 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2002OrderInformationInvoiceDetails - # Value used by your customer to identify the order. This value is typically a purchase order number. CyberSource recommends that you do not populate the field with all zeros or nines. For processor-specific information, see the user_po 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 :purchase_order_number - - # Date the order was processed. `Format: YYYY-MM-DD`. For processor-specific information, see the purchaser_order_date 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 :purchase_order_date - - # Flag that indicates whether an order is taxable. This value must be true if the sum of all _lineItems[].taxAmount_ values > 0. If you do not include any _lineItems[].taxAmount_ values in your request, CyberSource does not include _invoiceDetails.taxable_ in the data it sends to the processor. For processor-specific information, see the tax_indicator 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 :taxable - - # VAT invoice number associated with the transaction. For processor-specific information, see the vat_invoice_ref_number 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 :vat_invoice_reference_number - - # International description code of the overall order’s goods or services or the Categorizes purchases for VAT reporting. Contact your acquirer for a list of codes. For processor-specific information, see the summary_commodity_code 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 :commodity_code - - # Identifier for the merchandise. Possible value: - 1000: Gift card This field is supported only for **American Express Direct**. - attr_accessor :merchandise_code - - attr_accessor :transaction_advice_addendum - - # 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 - { - :'purchase_order_number' => :'purchaseOrderNumber', - :'purchase_order_date' => :'purchaseOrderDate', - :'taxable' => :'taxable', - :'vat_invoice_reference_number' => :'vatInvoiceReferenceNumber', - :'commodity_code' => :'commodityCode', - :'merchandise_code' => :'merchandiseCode', - :'transaction_advice_addendum' => :'transactionAdviceAddendum', - :'level3_transmission_status' => :'level3TransmissionStatus' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'purchase_order_number' => :'String', - :'purchase_order_date' => :'String', - :'taxable' => :'BOOLEAN', - :'vat_invoice_reference_number' => :'String', - :'commodity_code' => :'String', - :'merchandise_code' => :'Float', - :'transaction_advice_addendum' => :'Array', - :'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?(:'purchaseOrderNumber') - self.purchase_order_number = attributes[:'purchaseOrderNumber'] - end - - if attributes.has_key?(:'purchaseOrderDate') - self.purchase_order_date = attributes[:'purchaseOrderDate'] - end - - if attributes.has_key?(:'taxable') - self.taxable = attributes[:'taxable'] - end - - if attributes.has_key?(:'vatInvoiceReferenceNumber') - self.vat_invoice_reference_number = attributes[:'vatInvoiceReferenceNumber'] - end - - if attributes.has_key?(:'commodityCode') - self.commodity_code = attributes[:'commodityCode'] - end - - if attributes.has_key?(:'merchandiseCode') - self.merchandise_code = attributes[:'merchandiseCode'] - end - - if attributes.has_key?(:'transactionAdviceAddendum') - if (value = attributes[:'transactionAdviceAddendum']).is_a?(Array) - self.transaction_advice_addendum = value - end - end - - 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 - if !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25 - invalid_properties.push('invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.') - end - - if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10 - invalid_properties.push('invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.') - end - - if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15 - invalid_properties.push('invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.') - end - - if !@commodity_code.nil? && @commodity_code.to_s.length > 4 - invalid_properties.push('invalid value for "commodity_code", 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 !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25 - return false if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10 - return false if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15 - return false if !@commodity_code.nil? && @commodity_code.to_s.length > 4 - true - end - - # Custom attribute writer method with validation - # @param [Object] purchase_order_number Value to be assigned - def purchase_order_number=(purchase_order_number) - if !purchase_order_number.nil? && purchase_order_number.to_s.length > 25 - fail ArgumentError, 'invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.' - end - - @purchase_order_number = purchase_order_number - end - - # Custom attribute writer method with validation - # @param [Object] purchase_order_date Value to be assigned - def purchase_order_date=(purchase_order_date) - if !purchase_order_date.nil? && purchase_order_date.to_s.length > 10 - fail ArgumentError, 'invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.' - end - - @purchase_order_date = purchase_order_date - end - - # Custom attribute writer method with validation - # @param [Object] vat_invoice_reference_number Value to be assigned - def vat_invoice_reference_number=(vat_invoice_reference_number) - if !vat_invoice_reference_number.nil? && vat_invoice_reference_number.to_s.length > 15 - fail ArgumentError, 'invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.' - end - - @vat_invoice_reference_number = vat_invoice_reference_number - end - - # Custom attribute writer method with validation - # @param [Object] commodity_code Value to be assigned - def commodity_code=(commodity_code) - if !commodity_code.nil? && commodity_code.to_s.length > 4 - fail ArgumentError, 'invalid value for "commodity_code", the character length must be smaller than or equal to 4.' - end - - @commodity_code = commodity_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 && - purchase_order_number == o.purchase_order_number && - purchase_order_date == o.purchase_order_date && - taxable == o.taxable && - vat_invoice_reference_number == o.vat_invoice_reference_number && - commodity_code == o.commodity_code && - merchandise_code == o.merchandise_code && - transaction_advice_addendum == o.transaction_advice_addendum && - 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 - [purchase_order_number, purchase_order_date, taxable, vat_invoice_reference_number, commodity_code, merchandise_code, transaction_advice_addendum, 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_client/models/inline_response_200_2_order_information_line_items.rb b/lib/cyberSource_client/models/inline_response_200_2_order_information_line_items.rb deleted file mode 100644 index 75506832..00000000 --- a/lib/cyberSource_client/models/inline_response_200_2_order_information_line_items.rb +++ /dev/null @@ -1,564 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2002OrderInformationLineItems - # 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 - - # 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 - - # Unit of measure, or unit of measure code, for the item. - attr_accessor :unit_of_measure - - # Total amount for the item. Normally calculated as the unit price x quantity. - attr_accessor :total_amount - - # 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 - - # Tax rate applied to the item. See \"Numbered Elements,\" page 14. Visa: Valid range is 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated). Mastercard: Valid range is 0.00001 to 0.99999 (0.001% to 99.999%). - attr_accessor :tax_rate - - # Type of tax being applied to the item. Possible values: Below values are used by **RBS WorldPay Atlanta**, **FDC Nashville Global**, **Litle** - 0000: unknown tax type - 0001: federal/national sales tax - 0002: state sales tax - 0003: city sales tax - 0004: local sales tax - 0005: municipal sales tax - 0006: other tax - 0010: value-added tax - 0011: goods and services tax - 0012: provincial sales tax - 0013: harmonized sales tax - 0014: Quebec sales tax (QST) - 0020: room tax - 0021: occupancy tax - 0022: energy tax - Blank: Tax not supported on line item. - attr_accessor :tax_type_code - - # Flag that indicates whether the tax amount is included in the Line Item Total. - attr_accessor :amount_includes_tax - - # Commodity code or International description code used to classify the item. Contact your acquirer for a list of codes. - attr_accessor :commodity_code - - # Discount applied to the item. - attr_accessor :discount_amount - - # Flag that indicates whether the amount is discounted. If you do not provide a value but you set Discount Amount to a value greater than zero, then CyberSource sets this field to **true**. - attr_accessor :discount_applied - - # Rate the item is discounted. Maximum of 2 decimal places. Example 5.25 (=5.25%) - attr_accessor :discount_rate - - # Field to support an invoice number for a transaction. You must specify the number of line items that will include an invoice number. By default, the first line item will include an invoice number field. The invoice number field can be included for up to 10 line items. - attr_accessor :invoice_number - - attr_accessor :tax_details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'product_code' => :'productCode', - :'product_name' => :'productName', - :'product_sku' => :'productSku', - :'quantity' => :'quantity', - :'unit_price' => :'unitPrice', - :'unit_of_measure' => :'unitOfMeasure', - :'total_amount' => :'totalAmount', - :'tax_amount' => :'taxAmount', - :'tax_rate' => :'taxRate', - :'tax_type_code' => :'taxTypeCode', - :'amount_includes_tax' => :'amountIncludesTax', - :'commodity_code' => :'commodityCode', - :'discount_amount' => :'discountAmount', - :'discount_applied' => :'discountApplied', - :'discount_rate' => :'discountRate', - :'invoice_number' => :'invoiceNumber', - :'tax_details' => :'taxDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'product_code' => :'String', - :'product_name' => :'String', - :'product_sku' => :'String', - :'quantity' => :'Float', - :'unit_price' => :'String', - :'unit_of_measure' => :'String', - :'total_amount' => :'String', - :'tax_amount' => :'String', - :'tax_rate' => :'String', - :'tax_type_code' => :'String', - :'amount_includes_tax' => :'BOOLEAN', - :'commodity_code' => :'String', - :'discount_amount' => :'String', - :'discount_applied' => :'BOOLEAN', - :'discount_rate' => :'String', - :'invoice_number' => :'String', - :'tax_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?(:'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?(:'quantity') - self.quantity = attributes[:'quantity'] - end - - if attributes.has_key?(:'unitPrice') - self.unit_price = attributes[:'unitPrice'] - end - - if attributes.has_key?(:'unitOfMeasure') - self.unit_of_measure = attributes[:'unitOfMeasure'] - end - - if attributes.has_key?(:'totalAmount') - self.total_amount = attributes[:'totalAmount'] - end - - if attributes.has_key?(:'taxAmount') - self.tax_amount = attributes[:'taxAmount'] - end - - if attributes.has_key?(:'taxRate') - self.tax_rate = attributes[:'taxRate'] - end - - if attributes.has_key?(:'taxTypeCode') - self.tax_type_code = attributes[:'taxTypeCode'] - end - - if attributes.has_key?(:'amountIncludesTax') - self.amount_includes_tax = attributes[:'amountIncludesTax'] - end - - if attributes.has_key?(:'commodityCode') - self.commodity_code = attributes[:'commodityCode'] - end - - if attributes.has_key?(:'discountAmount') - self.discount_amount = attributes[:'discountAmount'] - end - - if attributes.has_key?(:'discountApplied') - self.discount_applied = attributes[:'discountApplied'] - end - - if attributes.has_key?(:'discountRate') - self.discount_rate = attributes[:'discountRate'] - end - - if attributes.has_key?(:'invoiceNumber') - self.invoice_number = attributes[:'invoiceNumber'] - end - - if attributes.has_key?(:'taxDetails') - if (value = attributes[:'taxDetails']).is_a?(Array) - self.tax_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 - 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 !@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 - - if !@unit_of_measure.nil? && @unit_of_measure.to_s.length > 12 - invalid_properties.push('invalid value for "unit_of_measure", the character length must be smaller than or equal to 12.') - end - - if !@total_amount.nil? && @total_amount.to_s.length > 13 - invalid_properties.push('invalid value for "total_amount", the character length must be smaller than or equal to 13.') - 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 !@tax_rate.nil? && @tax_rate.to_s.length > 7 - invalid_properties.push('invalid value for "tax_rate", the character length must be smaller than or equal to 7.') - end - - if !@tax_type_code.nil? && @tax_type_code.to_s.length > 4 - invalid_properties.push('invalid value for "tax_type_code", the character length must be smaller than or equal to 4.') - end - - if !@commodity_code.nil? && @commodity_code.to_s.length > 15 - invalid_properties.push('invalid value for "commodity_code", the character length must be smaller than or equal to 15.') - end - - if !@discount_amount.nil? && @discount_amount.to_s.length > 13 - invalid_properties.push('invalid value for "discount_amount", the character length must be smaller than or equal to 13.') - end - - if !@discount_rate.nil? && @discount_rate.to_s.length > 6 - invalid_properties.push('invalid value for "discount_rate", the character length must be smaller than or equal to 6.') - end - - if !@invoice_number.nil? && @invoice_number.to_s.length > 23 - invalid_properties.push('invalid value for "invoice_number", 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 !@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 !@quantity.nil? && @quantity > 9999999999 - return false if !@quantity.nil? && @quantity < 1 - return false if !@unit_price.nil? && @unit_price.to_s.length > 15 - return false if !@unit_of_measure.nil? && @unit_of_measure.to_s.length > 12 - return false if !@total_amount.nil? && @total_amount.to_s.length > 13 - return false if !@tax_amount.nil? && @tax_amount.to_s.length > 15 - return false if !@tax_rate.nil? && @tax_rate.to_s.length > 7 - return false if !@tax_type_code.nil? && @tax_type_code.to_s.length > 4 - return false if !@commodity_code.nil? && @commodity_code.to_s.length > 15 - return false if !@discount_amount.nil? && @discount_amount.to_s.length > 13 - return false if !@discount_rate.nil? && @discount_rate.to_s.length > 6 - return false if !@invoice_number.nil? && @invoice_number.to_s.length > 23 - 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] 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 - - # Custom attribute writer method with validation - # @param [Object] unit_of_measure Value to be assigned - def unit_of_measure=(unit_of_measure) - if !unit_of_measure.nil? && unit_of_measure.to_s.length > 12 - fail ArgumentError, 'invalid value for "unit_of_measure", the character length must be smaller than or equal to 12.' - end - - @unit_of_measure = unit_of_measure - 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 > 13 - fail ArgumentError, 'invalid value for "total_amount", the character length must be smaller than or equal to 13.' - end - - @total_amount = total_amount - 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] tax_rate Value to be assigned - def tax_rate=(tax_rate) - if !tax_rate.nil? && tax_rate.to_s.length > 7 - fail ArgumentError, 'invalid value for "tax_rate", the character length must be smaller than or equal to 7.' - end - - @tax_rate = tax_rate - end - - # Custom attribute writer method with validation - # @param [Object] tax_type_code Value to be assigned - def tax_type_code=(tax_type_code) - if !tax_type_code.nil? && tax_type_code.to_s.length > 4 - fail ArgumentError, 'invalid value for "tax_type_code", the character length must be smaller than or equal to 4.' - end - - @tax_type_code = tax_type_code - end - - # Custom attribute writer method with validation - # @param [Object] commodity_code Value to be assigned - def commodity_code=(commodity_code) - if !commodity_code.nil? && commodity_code.to_s.length > 15 - fail ArgumentError, 'invalid value for "commodity_code", the character length must be smaller than or equal to 15.' - end - - @commodity_code = commodity_code - end - - # Custom attribute writer method with validation - # @param [Object] discount_amount Value to be assigned - def discount_amount=(discount_amount) - if !discount_amount.nil? && discount_amount.to_s.length > 13 - fail ArgumentError, 'invalid value for "discount_amount", the character length must be smaller than or equal to 13.' - end - - @discount_amount = discount_amount - end - - # Custom attribute writer method with validation - # @param [Object] discount_rate Value to be assigned - def discount_rate=(discount_rate) - if !discount_rate.nil? && discount_rate.to_s.length > 6 - fail ArgumentError, 'invalid value for "discount_rate", the character length must be smaller than or equal to 6.' - end - - @discount_rate = discount_rate - end - - # Custom attribute writer method with validation - # @param [Object] invoice_number Value to be assigned - def invoice_number=(invoice_number) - if !invoice_number.nil? && invoice_number.to_s.length > 23 - fail ArgumentError, 'invalid value for "invoice_number", the character length must be smaller than or equal to 23.' - end - - @invoice_number = invoice_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 && - product_code == o.product_code && - product_name == o.product_name && - product_sku == o.product_sku && - quantity == o.quantity && - unit_price == o.unit_price && - unit_of_measure == o.unit_of_measure && - total_amount == o.total_amount && - tax_amount == o.tax_amount && - tax_rate == o.tax_rate && - tax_type_code == o.tax_type_code && - amount_includes_tax == o.amount_includes_tax && - commodity_code == o.commodity_code && - discount_amount == o.discount_amount && - discount_applied == o.discount_applied && - discount_rate == o.discount_rate && - invoice_number == o.invoice_number && - tax_details == o.tax_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 - [product_code, product_name, product_sku, quantity, unit_price, unit_of_measure, total_amount, tax_amount, tax_rate, tax_type_code, amount_includes_tax, commodity_code, discount_amount, discount_applied, discount_rate, invoice_number, tax_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_client/models/inline_response_200_2_order_information_ship_to.rb b/lib/cyberSource_client/models/inline_response_200_2_order_information_ship_to.rb deleted file mode 100644 index 603a0c9b..00000000 --- a/lib/cyberSource_client/models/inline_response_200_2_order_information_ship_to.rb +++ /dev/null @@ -1,429 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2002OrderInformationShipTo - # 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 - - # TBD - attr_accessor :company - - # 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 - - # TBD - attr_accessor :county - - # Country of the shipping address. Use the two character ISO Standard Country Codes. - attr_accessor :country - - # TBD - attr_accessor :email - - # 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', - :'company' => :'company', - :'address1' => :'address1', - :'address2' => :'address2', - :'locality' => :'locality', - :'administrative_area' => :'administrativeArea', - :'postal_code' => :'postalCode', - :'county' => :'county', - :'country' => :'country', - :'email' => :'email', - :'phone_number' => :'phoneNumber' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'first_name' => :'String', - :'last_name' => :'String', - :'company' => :'String', - :'address1' => :'String', - :'address2' => :'String', - :'locality' => :'String', - :'administrative_area' => :'String', - :'postal_code' => :'String', - :'county' => :'String', - :'country' => :'String', - :'email' => :'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?(:'company') - self.company = attributes[:'company'] - 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?(:'county') - self.county = attributes[:'county'] - end - - if attributes.has_key?(:'country') - self.country = attributes[:'country'] - end - - if attributes.has_key?(:'email') - self.email = attributes[:'email'] - 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 !@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 !@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] 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 && - company == o.company && - address1 == o.address1 && - address2 == o.address2 && - locality == o.locality && - administrative_area == o.administrative_area && - postal_code == o.postal_code && - county == o.county && - country == o.country && - email == o.email && - 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, company, address1, address2, locality, administrative_area, postal_code, county, country, email, 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_client/models/inline_response_200_2_payment_information.rb b/lib/cyberSource_client/models/inline_response_200_2_payment_information.rb deleted file mode 100644 index e93eafca..00000000 --- a/lib/cyberSource_client/models/inline_response_200_2_payment_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 InlineResponse2002PaymentInformation - attr_accessor :card - - attr_accessor :tokenized_card - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'card' => :'card', - :'tokenized_card' => :'tokenizedCard' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'card' => :'InlineResponse2002PaymentInformationCard', - :'tokenized_card' => :'InlineResponse2002PaymentInformationTokenizedCard' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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 - end - - # Show invalid properties 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 - end - - # @see the `==` method - # @param [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].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/inline_response_200_2_payment_information_card.rb b/lib/cyberSource_client/models/inline_response_200_2_payment_information_card.rb deleted file mode 100644 index 4c323212..00000000 --- a/lib/cyberSource_client/models/inline_response_200_2_payment_information_card.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 InlineResponse2002PaymentInformationCard - # 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 - - # 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 - - # 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', - :'expiration_month' => :'expirationMonth', - :'expiration_year' => :'expirationYear', - :'type' => :'type' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'suffix' => :'String', - :'expiration_month' => :'String', - :'expiration_year' => :'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?(:'expirationMonth') - self.expiration_month = attributes[:'expirationMonth'] - end - - if attributes.has_key?(:'expirationYear') - self.expiration_year = attributes[:'expirationYear'] - 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 !@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 !@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 !@expiration_month.nil? && @expiration_month.to_s.length > 2 - return false if !@expiration_year.nil? && @expiration_year.to_s.length > 4 - 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] 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] 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 && - expiration_month == o.expiration_month && - expiration_year == o.expiration_year && - 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, expiration_month, expiration_year, 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_client/models/inline_response_200_2_payment_information_tokenized_card.rb b/lib/cyberSource_client/models/inline_response_200_2_payment_information_tokenized_card.rb deleted file mode 100644 index 93ebf3fe..00000000 --- a/lib/cyberSource_client/models/inline_response_200_2_payment_information_tokenized_card.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 InlineResponse2002PaymentInformationTokenizedCard - # 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 - - # 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 - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'prefix' => :'prefix', - :'suffix' => :'suffix', - :'type' => :'type', - :'expiration_month' => :'expirationMonth', - :'expiration_year' => :'expirationYear' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'prefix' => :'String', - :'suffix' => :'String', - :'type' => :'String', - :'expiration_month' => :'String', - :'expiration_year' => :'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?(:'expirationMonth') - self.expiration_month = attributes[:'expirationMonth'] - end - - if attributes.has_key?(:'expirationYear') - self.expiration_year = attributes[:'expirationYear'] - end - end - - # Show invalid properties 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 !@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 - - invalid_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 !@expiration_month.nil? && @expiration_month.to_s.length > 2 - return false if !@expiration_year.nil? && @expiration_year.to_s.length > 4 - 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] 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 - - # 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 && - expiration_month == o.expiration_month && - expiration_year == o.expiration_year - end - - # @see the `==` method - # @param [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, expiration_month, expiration_year].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/inline_response_200_2_processing_information.rb b/lib/cyberSource_client/models/inline_response_200_2_processing_information.rb deleted file mode 100644 index 137c8ecd..00000000 --- a/lib/cyberSource_client/models/inline_response_200_2_processing_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 InlineResponse2002ProcessingInformation - # 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 - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'payment_solution' => :'paymentSolution' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'payment_solution' => :'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 - end - - # Show invalid properties 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 - end - - # @see the `==` method - # @param [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].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/inline_response_200_2_processor_information.rb b/lib/cyberSource_client/models/inline_response_200_2_processor_information.rb deleted file mode 100644 index 2b1f2955..00000000 --- a/lib/cyberSource_client/models/inline_response_200_2_processor_information.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 InlineResponse2002ProcessorInformation - # Authorization code. Returned only when the processor returns this value. - attr_accessor :approval_code - - attr_accessor :card_verification - - attr_accessor :avs - - # 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 - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'approval_code' => :'approvalCode', - :'card_verification' => :'cardVerification', - :'avs' => :'avs', - :'transaction_id' => :'transactionId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'approval_code' => :'String', - :'card_verification' => :'InlineResponse2002ProcessorInformationCardVerification', - :'avs' => :'InlineResponse2002ProcessorInformationAvs', - :'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?(:'approvalCode') - self.approval_code = attributes[:'approvalCode'] - end - - if attributes.has_key?(:'cardVerification') - self.card_verification = attributes[:'cardVerification'] - end - - if attributes.has_key?(:'avs') - self.avs = attributes[:'avs'] - 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 !@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 - - invalid_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 - 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 - - # 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 && - card_verification == o.card_verification && - avs == o.avs && - 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 - [approval_code, card_verification, avs, 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_client/models/inline_response_200_2_processor_information_avs.rb b/lib/cyberSource_client/models/inline_response_200_2_processor_information_avs.rb deleted file mode 100644 index 5b8bb5e4..00000000 --- a/lib/cyberSource_client/models/inline_response_200_2_processor_information_avs.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 InlineResponse2002ProcessorInformationAvs - # AVS result code. - 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 > 1 - invalid_properties.push('invalid value for "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 !@code.nil? && @code.to_s.length > 1 - 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 - - # 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_client/models/inline_response_200_2_processor_information_card_verification.rb b/lib/cyberSource_client/models/inline_response_200_2_processor_information_card_verification.rb deleted file mode 100644 index 8041a648..00000000 --- a/lib/cyberSource_client/models/inline_response_200_2_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 InlineResponse2002ProcessorInformationCardVerification - # 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_client/models/inline_response_200_3.rb b/lib/cyberSource_client/models/inline_response_200_3.rb deleted file mode 100644 index c1f2da38..00000000 --- a/lib/cyberSource_client/models/inline_response_200_3.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 InlineResponse2003 - 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 :reversal_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', - :'reconciliation_id' => :'reconciliationId', - :'client_reference_information' => :'clientReferenceInformation', - :'processor_information' => :'processorInformation', - :'reversal_amount_details' => :'reversalAmountDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_links' => :'InlineResponse201EmbeddedCaptureLinks', - :'id' => :'String', - :'submit_time_utc' => :'String', - :'status' => :'String', - :'reconciliation_id' => :'String', - :'client_reference_information' => :'InlineResponse201ClientReferenceInformation', - :'processor_information' => :'InlineResponse2011ProcessorInformation', - :'reversal_amount_details' => :'InlineResponse2011ReversalAmountDetails' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'reversalAmountDetails') - self.reversal_amount_details = attributes[:'reversalAmountDetails'] - end - end - - # Show invalid properties 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 && - processor_information == o.processor_information && - reversal_amount_details == o.reversal_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, reconciliation_id, client_reference_information, processor_information, reversal_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_client/models/inline_response_200_4.rb b/lib/cyberSource_client/models/inline_response_200_4.rb deleted file mode 100644 index 3d0fb69a..00000000 --- a/lib/cyberSource_client/models/inline_response_200_4.rb +++ /dev/null @@ -1,350 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.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 :_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 :processing_information - - attr_accessor :processor_information - - attr_accessor :order_information - - attr_accessor :buyer_information - - attr_accessor :merchant_information - - attr_accessor :device_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', - :'processing_information' => :'processingInformation', - :'processor_information' => :'processorInformation', - :'order_information' => :'orderInformation', - :'buyer_information' => :'buyerInformation', - :'merchant_information' => :'merchantInformation', - :'device_information' => :'deviceInformation' - } - 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', - :'processing_information' => :'InlineResponse2004ProcessingInformation', - :'processor_information' => :'InlineResponse2012ProcessorInformation', - :'order_information' => :'InlineResponse2004OrderInformation', - :'buyer_information' => :'V2paymentsidcapturesBuyerInformation', - :'merchant_information' => :'InlineResponse2002MerchantInformation', - :'device_information' => :'InlineResponse2004DeviceInformation' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'processingInformation') - self.processing_information = attributes[:'processingInformation'] - end - - if attributes.has_key?(:'processorInformation') - self.processor_information = attributes[:'processorInformation'] - end - - if attributes.has_key?(:'orderInformation') - self.order_information = attributes[:'orderInformation'] - end - - if attributes.has_key?(:'buyerInformation') - self.buyer_information = attributes[:'buyerInformation'] - end - - if attributes.has_key?(:'merchantInformation') - self.merchant_information = attributes[:'merchantInformation'] - end - - if attributes.has_key?(:'deviceInformation') - self.device_information = attributes[:'deviceInformation'] - end - end - - # Show invalid properties 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', 'TRANSMITTED', 'BATCH_ERROR', 'VOIDED']) - 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', 'TRANSMITTED', 'BATCH_ERROR', 'VOIDED']) - 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 && - processing_information == o.processing_information && - processor_information == o.processor_information && - order_information == o.order_information && - buyer_information == o.buyer_information && - merchant_information == o.merchant_information && - device_information == o.device_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, processing_information, processor_information, order_information, buyer_information, merchant_information, device_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_client/models/inline_response_200_4_device_information.rb b/lib/cyberSource_client/models/inline_response_200_4_device_information.rb deleted file mode 100644 index f9943ed6..00000000 --- a/lib/cyberSource_client/models/inline_response_200_4_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 InlineResponse2004DeviceInformation - # 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_client/models/inline_response_200_4_order_information.rb b/lib/cyberSource_client/models/inline_response_200_4_order_information.rb deleted file mode 100644 index 992833a4..00000000 --- a/lib/cyberSource_client/models/inline_response_200_4_order_information.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2004OrderInformation - attr_accessor :amount_details - - attr_accessor :bill_to - - attr_accessor :ship_to - - attr_accessor :line_items - - attr_accessor :invoice_details - - attr_accessor :shipping_details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'amount_details' => :'amountDetails', - :'bill_to' => :'billTo', - :'ship_to' => :'shipTo', - :'line_items' => :'lineItems', - :'invoice_details' => :'invoiceDetails', - :'shipping_details' => :'shippingDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'amount_details' => :'InlineResponse2004OrderInformationAmountDetails', - :'bill_to' => :'InlineResponse2002OrderInformationBillTo', - :'ship_to' => :'InlineResponse2004OrderInformationShipTo', - :'line_items' => :'Array', - :'invoice_details' => :'InlineResponse2004OrderInformationInvoiceDetails', - :'shipping_details' => :'V2paymentsidcapturesOrderInformationShippingDetails' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'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?(:'invoiceDetails') - self.invoice_details = attributes[:'invoiceDetails'] - 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 && - amount_details == o.amount_details && - bill_to == o.bill_to && - ship_to == o.ship_to && - line_items == o.line_items && - invoice_details == o.invoice_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 - [amount_details, bill_to, ship_to, line_items, invoice_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_client/models/inline_response_200_4_order_information_amount_details.rb b/lib/cyberSource_client/models/inline_response_200_4_order_information_amount_details.rb deleted file mode 100644 index 41b1d7fd..00000000 --- a/lib/cyberSource_client/models/inline_response_200_4_order_information_amount_details.rb +++ /dev/null @@ -1,360 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2004OrderInformationAmountDetails - # 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 discount amount applied to the order. For processor-specific information, see the order_discount_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 :discount_amount - - # Total charges for any import or export duties included in the order. For processor-specific information, see the duty_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 :duty_amount - - # 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 - - # Flag that indicates whether a national tax is included in the order total. Possible values: - **0**: national tax not included - **1**: national tax included For processor-specific information, see the national_tax_indicator 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 :national_tax_included - - # Total freight or shipping and handling charges for the order. When you include this field in your request, you must also include the **totalAmount** field. For processor-specific information, see the freight_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 :freight_amount - - attr_accessor :tax_details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'total_amount' => :'totalAmount', - :'currency' => :'currency', - :'discount_amount' => :'discountAmount', - :'duty_amount' => :'dutyAmount', - :'tax_amount' => :'taxAmount', - :'national_tax_included' => :'nationalTaxIncluded', - :'freight_amount' => :'freightAmount', - :'tax_details' => :'taxDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'total_amount' => :'String', - :'currency' => :'String', - :'discount_amount' => :'String', - :'duty_amount' => :'String', - :'tax_amount' => :'String', - :'national_tax_included' => :'String', - :'freight_amount' => :'String', - :'tax_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?(:'totalAmount') - self.total_amount = attributes[:'totalAmount'] - end - - if attributes.has_key?(:'currency') - self.currency = attributes[:'currency'] - end - - if attributes.has_key?(:'discountAmount') - self.discount_amount = attributes[:'discountAmount'] - end - - if attributes.has_key?(:'dutyAmount') - self.duty_amount = attributes[:'dutyAmount'] - end - - if attributes.has_key?(:'taxAmount') - self.tax_amount = attributes[:'taxAmount'] - end - - if attributes.has_key?(:'nationalTaxIncluded') - self.national_tax_included = attributes[:'nationalTaxIncluded'] - end - - if attributes.has_key?(:'freightAmount') - self.freight_amount = attributes[:'freightAmount'] - end - - if attributes.has_key?(:'taxDetails') - if (value = attributes[:'taxDetails']).is_a?(Array) - self.tax_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 - 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 !@discount_amount.nil? && @discount_amount.to_s.length > 15 - invalid_properties.push('invalid value for "discount_amount", the character length must be smaller than or equal to 15.') - end - - if !@duty_amount.nil? && @duty_amount.to_s.length > 15 - invalid_properties.push('invalid value for "duty_amount", the character length must be smaller than or equal to 15.') - 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 !@national_tax_included.nil? && @national_tax_included.to_s.length > 1 - invalid_properties.push('invalid value for "national_tax_included", the character length must be smaller than or equal to 1.') - end - - if !@freight_amount.nil? && @freight_amount.to_s.length > 13 - invalid_properties.push('invalid value for "freight_amount", the character length must be smaller than or equal to 13.') - 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 !@discount_amount.nil? && @discount_amount.to_s.length > 15 - return false if !@duty_amount.nil? && @duty_amount.to_s.length > 15 - return false if !@tax_amount.nil? && @tax_amount.to_s.length > 12 - return false if !@national_tax_included.nil? && @national_tax_included.to_s.length > 1 - return false if !@freight_amount.nil? && @freight_amount.to_s.length > 13 - 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] discount_amount Value to be assigned - def discount_amount=(discount_amount) - if !discount_amount.nil? && discount_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "discount_amount", the character length must be smaller than or equal to 15.' - end - - @discount_amount = discount_amount - end - - # Custom attribute writer method with validation - # @param [Object] duty_amount Value to be assigned - def duty_amount=(duty_amount) - if !duty_amount.nil? && duty_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "duty_amount", the character length must be smaller than or equal to 15.' - end - - @duty_amount = duty_amount - 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] national_tax_included Value to be assigned - def national_tax_included=(national_tax_included) - if !national_tax_included.nil? && national_tax_included.to_s.length > 1 - fail ArgumentError, 'invalid value for "national_tax_included", the character length must be smaller than or equal to 1.' - end - - @national_tax_included = national_tax_included - end - - # Custom attribute writer method with validation - # @param [Object] freight_amount Value to be assigned - def freight_amount=(freight_amount) - if !freight_amount.nil? && freight_amount.to_s.length > 13 - fail ArgumentError, 'invalid value for "freight_amount", the character length must be smaller than or equal to 13.' - end - - @freight_amount = freight_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 && - discount_amount == o.discount_amount && - duty_amount == o.duty_amount && - tax_amount == o.tax_amount && - national_tax_included == o.national_tax_included && - freight_amount == o.freight_amount && - tax_details == o.tax_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 - [total_amount, currency, discount_amount, duty_amount, tax_amount, national_tax_included, freight_amount, tax_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_client/models/inline_response_200_4_order_information_invoice_details.rb b/lib/cyberSource_client/models/inline_response_200_4_order_information_invoice_details.rb deleted file mode 100644 index 7668b717..00000000 --- a/lib/cyberSource_client/models/inline_response_200_4_order_information_invoice_details.rb +++ /dev/null @@ -1,305 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class InlineResponse2004OrderInformationInvoiceDetails - # Value used by your customer to identify the order. This value is typically a purchase order number. CyberSource recommends that you do not populate the field with all zeros or nines. For processor-specific information, see the user_po 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 :purchase_order_number - - # Date the order was processed. `Format: YYYY-MM-DD`. For processor-specific information, see the purchaser_order_date 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 :purchase_order_date - - # Flag that indicates whether an order is taxable. This value must be true if the sum of all _lineItems[].taxAmount_ values > 0. If you do not include any _lineItems[].taxAmount_ values in your request, CyberSource does not include _invoiceDetails.taxable_ in the data it sends to the processor. For processor-specific information, see the tax_indicator 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 :taxable - - # VAT invoice number associated with the transaction. For processor-specific information, see the vat_invoice_ref_number 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 :vat_invoice_reference_number - - # International description code of the overall order’s goods or services or the Categorizes purchases for VAT reporting. Contact your acquirer for a list of codes. For processor-specific information, see the summary_commodity_code 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 :commodity_code - - attr_accessor :transaction_advice_addendum - - # 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 - { - :'purchase_order_number' => :'purchaseOrderNumber', - :'purchase_order_date' => :'purchaseOrderDate', - :'taxable' => :'taxable', - :'vat_invoice_reference_number' => :'vatInvoiceReferenceNumber', - :'commodity_code' => :'commodityCode', - :'transaction_advice_addendum' => :'transactionAdviceAddendum', - :'level3_transmission_status' => :'level3TransmissionStatus' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'purchase_order_number' => :'String', - :'purchase_order_date' => :'String', - :'taxable' => :'BOOLEAN', - :'vat_invoice_reference_number' => :'String', - :'commodity_code' => :'String', - :'transaction_advice_addendum' => :'Array', - :'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?(:'purchaseOrderNumber') - self.purchase_order_number = attributes[:'purchaseOrderNumber'] - end - - if attributes.has_key?(:'purchaseOrderDate') - self.purchase_order_date = attributes[:'purchaseOrderDate'] - end - - if attributes.has_key?(:'taxable') - self.taxable = attributes[:'taxable'] - end - - if attributes.has_key?(:'vatInvoiceReferenceNumber') - self.vat_invoice_reference_number = attributes[:'vatInvoiceReferenceNumber'] - end - - if attributes.has_key?(:'commodityCode') - self.commodity_code = attributes[:'commodityCode'] - end - - if attributes.has_key?(:'transactionAdviceAddendum') - if (value = attributes[:'transactionAdviceAddendum']).is_a?(Array) - self.transaction_advice_addendum = value - end - end - - 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 - if !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25 - invalid_properties.push('invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.') - end - - if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10 - invalid_properties.push('invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.') - end - - if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15 - invalid_properties.push('invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.') - end - - if !@commodity_code.nil? && @commodity_code.to_s.length > 4 - invalid_properties.push('invalid value for "commodity_code", 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 !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25 - return false if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10 - return false if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15 - return false if !@commodity_code.nil? && @commodity_code.to_s.length > 4 - true - end - - # Custom attribute writer method with validation - # @param [Object] purchase_order_number Value to be assigned - def purchase_order_number=(purchase_order_number) - if !purchase_order_number.nil? && purchase_order_number.to_s.length > 25 - fail ArgumentError, 'invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.' - end - - @purchase_order_number = purchase_order_number - end - - # Custom attribute writer method with validation - # @param [Object] purchase_order_date Value to be assigned - def purchase_order_date=(purchase_order_date) - if !purchase_order_date.nil? && purchase_order_date.to_s.length > 10 - fail ArgumentError, 'invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.' - end - - @purchase_order_date = purchase_order_date - end - - # Custom attribute writer method with validation - # @param [Object] vat_invoice_reference_number Value to be assigned - def vat_invoice_reference_number=(vat_invoice_reference_number) - if !vat_invoice_reference_number.nil? && vat_invoice_reference_number.to_s.length > 15 - fail ArgumentError, 'invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.' - end - - @vat_invoice_reference_number = vat_invoice_reference_number - end - - # Custom attribute writer method with validation - # @param [Object] commodity_code Value to be assigned - def commodity_code=(commodity_code) - if !commodity_code.nil? && commodity_code.to_s.length > 4 - fail ArgumentError, 'invalid value for "commodity_code", the character length must be smaller than or equal to 4.' - end - - @commodity_code = commodity_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 && - purchase_order_number == o.purchase_order_number && - purchase_order_date == o.purchase_order_date && - taxable == o.taxable && - vat_invoice_reference_number == o.vat_invoice_reference_number && - commodity_code == o.commodity_code && - transaction_advice_addendum == o.transaction_advice_addendum && - 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 - [purchase_order_number, purchase_order_date, taxable, vat_invoice_reference_number, commodity_code, transaction_advice_addendum, 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_client/models/inline_response_200_4_order_information_ship_to.rb b/lib/cyberSource_client/models/inline_response_200_4_order_information_ship_to.rb deleted file mode 100644 index 837f4e7f..00000000 --- a/lib/cyberSource_client/models/inline_response_200_4_order_information_ship_to.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 InlineResponse2004OrderInformationShipTo - # 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 - - # Country of the shipping address. Use the two character ISO Standard Country Codes. - attr_accessor :country - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'administrative_area' => :'administrativeArea', - :'postal_code' => :'postalCode', - :'country' => :'country' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'administrative_area' => :'String', - :'postal_code' => :'String', - :'country' => :'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?(:'administrativeArea') - self.administrative_area = attributes[:'administrativeArea'] - end - - if attributes.has_key?(:'postalCode') - self.postal_code = attributes[:'postalCode'] - end - - if attributes.has_key?(:'country') - self.country = attributes[:'country'] - end - end - - # Show invalid properties 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 !@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 !@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 - - invalid_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 !@administrative_area.nil? && @administrative_area.to_s.length > 2 - return false if !@postal_code.nil? && @postal_code.to_s.length > 10 - return false if !@country.nil? && @country.to_s.length > 2 - true - 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] 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 - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - administrative_area == o.administrative_area && - postal_code == o.postal_code && - country == o.country - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [administrative_area, postal_code, country].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/inline_response_200_4_processing_information.rb b/lib/cyberSource_client/models/inline_response_200_4_processing_information.rb deleted file mode 100644 index 81989486..00000000 --- a/lib/cyberSource_client/models/inline_response_200_4_processing_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 InlineResponse2004ProcessingInformation - # 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 - - attr_accessor :authorization_options - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'payment_solution' => :'paymentSolution', - :'authorization_options' => :'authorizationOptions' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'payment_solution' => :'String', - :'authorization_options' => :'InlineResponse2004ProcessingInformationAuthorizationOptions' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'authorizationOptions') - self.authorization_options = attributes[:'authorizationOptions'] - end - end - - # Show invalid properties 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 && - authorization_options == o.authorization_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, authorization_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_client/models/inline_response_200_4_processing_information_authorization_options.rb b/lib/cyberSource_client/models/inline_response_200_4_processing_information_authorization_options.rb deleted file mode 100644 index d22f879b..00000000 --- a/lib/cyberSource_client/models/inline_response_200_4_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 InlineResponse2004ProcessingInformationAuthorizationOptions - # Authorization code. **Forced Capture** Use this field to send the authorization code you received from a payment that you authorized outside the CyberSource system. **Verbal Authorization** Use this field in CAPTURE API to send the verbally received authorization code. For processor-specific information, see the auth_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :verbal_auth_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'verbal_auth_code' => :'verbalAuthCode' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'verbal_auth_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?(:'verbalAuthCode') - self.verbal_auth_code = attributes[:'verbalAuthCode'] - end - end - - # Show invalid properties 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 !@verbal_auth_code.nil? && @verbal_auth_code.to_s.length > 7 - invalid_properties.push('invalid value for "verbal_auth_code", the character length must be smaller than or equal to 7.') - 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 !@verbal_auth_code.nil? && @verbal_auth_code.to_s.length > 7 - true - end - - # Custom attribute writer method with validation - # @param [Object] verbal_auth_code Value to be assigned - def verbal_auth_code=(verbal_auth_code) - if !verbal_auth_code.nil? && verbal_auth_code.to_s.length > 7 - fail ArgumentError, 'invalid value for "verbal_auth_code", the character length must be smaller than or equal to 7.' - end - - @verbal_auth_code = verbal_auth_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 && - verbal_auth_code == o.verbal_auth_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 - [verbal_auth_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_client/models/inline_response_200_5.rb b/lib/cyberSource_client/models/inline_response_200_5.rb deleted file mode 100644 index 533badd1..00000000 --- a/lib/cyberSource_client/models/inline_response_200_5.rb +++ /dev/null @@ -1,305 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.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 :_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 - - 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' - } - 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' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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 - end - - # Show invalid properties 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', 'TRANSMITTED', 'BATCH_ERROR', 'VOIDED']) - 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', 'TRANSMITTED', 'BATCH_ERROR', 'VOIDED']) - 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 - end - - # @see the `==` method - # @param [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].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/inline_response_200_6.rb b/lib/cyberSource_client/models/inline_response_200_6.rb deleted file mode 100644 index 0ed14a35..00000000 --- a/lib/cyberSource_client/models/inline_response_200_6.rb +++ /dev/null @@ -1,305 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.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 :_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 - - 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' - } - 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' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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 - end - - # Show invalid properties 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', 'TRANSMITTED', 'BATCH_ERROR', 'VOIDED']) - 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', 'TRANSMITTED', 'BATCH_ERROR', 'VOIDED']) - 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 - end - - # @see the `==` method - # @param [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].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/inline_response_200_7.rb b/lib/cyberSource_client/models/inline_response_200_7.rb deleted file mode 100644 index b1ac9dcd..00000000 --- a/lib/cyberSource_client/models/inline_response_200_7.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 InlineResponse2007 - 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' => :'InstrumentidentifiersLinks', - :'id' => :'String', - :'object' => :'String', - :'state' => :'String', - :'card' => :'InstrumentidentifiersCard', - :'bank_account' => :'InstrumentidentifiersBankAccount', - :'processing_information' => :'InstrumentidentifiersProcessingInformation', - :'metadata' => :'InstrumentidentifiersMetadata' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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_client/models/inline_response_200_8.rb b/lib/cyberSource_client/models/inline_response_200_8.rb deleted file mode 100644 index c05b4308..00000000 --- a/lib/cyberSource_client/models/inline_response_200_8.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 InlineResponse2008 - 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' => :'InlineResponse2008Links', - :'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_client/models/inline_response_200_8__links.rb b/lib/cyberSource_client/models/inline_response_200_8__links.rb deleted file mode 100644 index 8991eadc..00000000 --- a/lib/cyberSource_client/models/inline_response_200_8__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 InlineResponse2008Links - 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' => :'InlineResponse2008LinksSelf', - :'first' => :'InlineResponse2008LinksFirst', - :'prev' => :'InlineResponse2008LinksPrev', - :'_next' => :'InlineResponse2008LinksNext', - :'last' => :'InlineResponse2008LinksLast' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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_client/models/inline_response_200_8__links_first.rb b/lib/cyberSource_client/models/inline_response_200_8__links_first.rb deleted file mode 100644 index 990caf92..00000000 --- a/lib/cyberSource_client/models/inline_response_200_8__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 InlineResponse2008LinksFirst - # 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_client/models/inline_response_200_8__links_last.rb b/lib/cyberSource_client/models/inline_response_200_8__links_last.rb deleted file mode 100644 index 55a6597b..00000000 --- a/lib/cyberSource_client/models/inline_response_200_8__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 InlineResponse2008LinksLast - # 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_client/models/inline_response_200_8__links_next.rb b/lib/cyberSource_client/models/inline_response_200_8__links_next.rb deleted file mode 100644 index 49d80f7e..00000000 --- a/lib/cyberSource_client/models/inline_response_200_8__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 InlineResponse2008LinksNext - # 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_client/models/inline_response_200_8__links_prev.rb b/lib/cyberSource_client/models/inline_response_200_8__links_prev.rb deleted file mode 100644 index b9defcd7..00000000 --- a/lib/cyberSource_client/models/inline_response_200_8__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 InlineResponse2008LinksPrev - 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_client/models/inline_response_200_8__links_self.rb b/lib/cyberSource_client/models/inline_response_200_8__links_self.rb deleted file mode 100644 index 57579f0c..00000000 --- a/lib/cyberSource_client/models/inline_response_200_8__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 InlineResponse2008LinksSelf - # 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_client/models/inline_response_201__embedded.rb b/lib/cyberSource_client/models/inline_response_201__embedded.rb deleted file mode 100644 index 6ded6b3f..00000000 --- a/lib/cyberSource_client/models/inline_response_201__embedded.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 InlineResponse201Embedded - attr_accessor :capture - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'capture' => :'capture' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'capture' => :'InlineResponse201EmbeddedCapture' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - 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 && - 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 - [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_client/models/inline_response_201__embedded_capture.rb b/lib/cyberSource_client/models/inline_response_201__embedded_capture.rb deleted file mode 100644 index 2b5920dd..00000000 --- a/lib/cyberSource_client/models/inline_response_201__embedded_capture.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 InlineResponse201EmbeddedCapture - # The status of the submitted transaction. - attr_accessor :status - - attr_accessor :_links - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'status' => :'status', - :'_links' => :'_links' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'status' => :'String', - :'_links' => :'InlineResponse201EmbeddedCaptureLinks' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'_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 && - status == o.status && - _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 - [status, _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_client/models/inline_response_201__embedded_capture__links.rb b/lib/cyberSource_client/models/inline_response_201__embedded_capture__links.rb deleted file mode 100644 index 5fabe590..00000000 --- a/lib/cyberSource_client/models/inline_response_201__embedded_capture__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 InlineResponse201EmbeddedCaptureLinks - 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_client/models/inline_response_400_5.rb b/lib/cyberSource_client/models/inline_response_400_5.rb deleted file mode 100644 index f189c016..00000000 --- a/lib/cyberSource_client/models/inline_response_400_5.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 InlineResponse4005 - # 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_client/models/inline_response_400_6.rb b/lib/cyberSource_client/models/inline_response_400_6.rb deleted file mode 100644 index f0b55dd0..00000000 --- a/lib/cyberSource_client/models/inline_response_400_6.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 InlineResponse4006 - 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' => :'InstrumentidentifiersDetails' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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_client/models/instrumentidentifiers__links.rb b/lib/cyberSource_client/models/instrumentidentifiers__links.rb deleted file mode 100644 index 23d9ef5e..00000000 --- a/lib/cyberSource_client/models/instrumentidentifiers__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 InstrumentidentifiersLinks - attr_accessor :_self - - attr_accessor :ancestor - - attr_accessor :successor - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_self' => :'self', - :'ancestor' => :'ancestor', - :'successor' => :'successor' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_self' => :'InstrumentidentifiersLinksSelf', - :'ancestor' => :'InstrumentidentifiersLinksSelf', - :'successor' => :'InstrumentidentifiersLinksSelf' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'ancestor') - self.ancestor = attributes[:'ancestor'] - end - - if attributes.has_key?(:'successor') - self.successor = attributes[:'successor'] - end - end - - # Show invalid properties 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 && - ancestor == o.ancestor && - successor == o.successor - end - - # @see the `==` method - # @param [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, ancestor, successor].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/instrumentidentifiers__links_self.rb b/lib/cyberSource_client/models/instrumentidentifiers__links_self.rb deleted file mode 100644 index 84d04a54..00000000 --- a/lib/cyberSource_client/models/instrumentidentifiers__links_self.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 InstrumentidentifiersLinksSelf - 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_client/models/instrumentidentifiers_authorization_options_merchant_initiated_transaction.rb b/lib/cyberSource_client/models/instrumentidentifiers_authorization_options_merchant_initiated_transaction.rb deleted file mode 100644 index be287c22..00000000 --- a/lib/cyberSource_client/models/instrumentidentifiers_authorization_options_merchant_initiated_transaction.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 InstrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction - # Previous Consumer Initiated Transaction Id. - attr_accessor :previous_transaction_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'previous_transaction_id' => :'previousTransactionId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'previous_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?(:'previousTransactionId') - self.previous_transaction_id = attributes[:'previousTransactionId'] - end - end - - # Show invalid properties 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 && - previous_transaction_id == o.previous_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 - [previous_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_client/models/instrumentidentifiers_bank_account.rb b/lib/cyberSource_client/models/instrumentidentifiers_bank_account.rb deleted file mode 100644 index b8b77619..00000000 --- a/lib/cyberSource_client/models/instrumentidentifiers_bank_account.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 InstrumentidentifiersBankAccount - # Bank account number. - attr_accessor :number - - # Routing number. - attr_accessor :routing_number - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'number' => :'number', - :'routing_number' => :'routingNumber' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'number' => :'String', - :'routing_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?(:'number') - self.number = attributes[:'number'] - end - - if attributes.has_key?(:'routingNumber') - self.routing_number = attributes[:'routingNumber'] - end - end - - # Show invalid properties 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 && - routing_number == o.routing_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 - [number, routing_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_client/models/instrumentidentifiers_card.rb b/lib/cyberSource_client/models/instrumentidentifiers_card.rb deleted file mode 100644 index ab40cc9b..00000000 --- a/lib/cyberSource_client/models/instrumentidentifiers_card.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 InstrumentidentifiersCard - # Credit card number (PAN). - attr_accessor :number - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'number' => :'number' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'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?(:'number') - self.number = attributes[:'number'] - end - end - - # Show invalid properties 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 - end - - # @see the `==` method - # @param [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].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/instrumentidentifiers_details.rb b/lib/cyberSource_client/models/instrumentidentifiers_details.rb deleted file mode 100644 index 100d9c35..00000000 --- a/lib/cyberSource_client/models/instrumentidentifiers_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 InstrumentidentifiersDetails - # The name of the field that threw the error. - attr_accessor :name - - # The location of the field that threw the error. - attr_accessor :location - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'name' => :'name', - :'location' => :'location' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'name' => :'String', - :'location' => :'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?(:'location') - self.location = attributes[:'location'] - end - end - - # Show invalid properties 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 && - location == o.location - end - - # @see the `==` method - # @param [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, location].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/instrumentidentifiers_metadata.rb b/lib/cyberSource_client/models/instrumentidentifiers_metadata.rb deleted file mode 100644 index e9d8ce9e..00000000 --- a/lib/cyberSource_client/models/instrumentidentifiers_metadata.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 InstrumentidentifiersMetadata - # The creator of the token. - attr_accessor :creator - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'creator' => :'creator' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'creator' => :'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?(:'creator') - self.creator = attributes[:'creator'] - end - end - - # Show invalid properties 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 && - creator == o.creator - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [creator].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/instrumentidentifiers_processing_information.rb b/lib/cyberSource_client/models/instrumentidentifiers_processing_information.rb deleted file mode 100644 index fc4320dd..00000000 --- a/lib/cyberSource_client/models/instrumentidentifiers_processing_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 InstrumentidentifiersProcessingInformation - attr_accessor :authorization_options - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'authorization_options' => :'authorizationOptions' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'authorization_options' => :'InstrumentidentifiersProcessingInformationAuthorizationOptions' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'authorizationOptions') - self.authorization_options = attributes[:'authorizationOptions'] - end - end - - # Show invalid properties 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 && - authorization_options == o.authorization_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 - [authorization_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_client/models/instrumentidentifiers_processing_information_authorization_options.rb b/lib/cyberSource_client/models/instrumentidentifiers_processing_information_authorization_options.rb deleted file mode 100644 index fd359f66..00000000 --- a/lib/cyberSource_client/models/instrumentidentifiers_processing_information_authorization_options.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 InstrumentidentifiersProcessingInformationAuthorizationOptions - attr_accessor :initiator - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'initiator' => :'initiator' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'initiator' => :'InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiator' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'initiator') - self.initiator = attributes[:'initiator'] - end - end - - # Show invalid properties 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 && - initiator == o.initiator - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [initiator].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/instrumentidentifiers_processing_information_authorization_options_initiator.rb b/lib/cyberSource_client/models/instrumentidentifiers_processing_information_authorization_options_initiator.rb deleted file mode 100644 index 2a485841..00000000 --- a/lib/cyberSource_client/models/instrumentidentifiers_processing_information_authorization_options_initiator.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 InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiator - attr_accessor :merchant_initiated_transaction - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'merchant_initiated_transaction' => :'merchantInitiatedTransaction' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'merchant_initiated_transaction' => :'InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'merchantInitiatedTransaction') - self.merchant_initiated_transaction = attributes[:'merchantInitiatedTransaction'] - end - end - - # Show invalid properties 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_initiated_transaction == o.merchant_initiated_transaction - end - - # @see the `==` method - # @param [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_initiated_transaction].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/paymentinstruments_bank_account.rb b/lib/cyberSource_client/models/paymentinstruments_bank_account.rb deleted file mode 100644 index 758952c5..00000000 --- a/lib/cyberSource_client/models/paymentinstruments_bank_account.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 PaymentinstrumentsBankAccount - # Type of Bank Account. - 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_client/models/paymentinstruments_bill_to.rb b/lib/cyberSource_client/models/paymentinstruments_bill_to.rb deleted file mode 100644 index a47b6420..00000000 --- a/lib/cyberSource_client/models/paymentinstruments_bill_to.rb +++ /dev/null @@ -1,284 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class PaymentinstrumentsBillTo - # Bill to First Name. - attr_accessor :first_name - - # Bill to Last Name. - attr_accessor :last_name - - # Bill to Company. - attr_accessor :company - - # Bill to Address Line 1. - attr_accessor :address1 - - # Bill to Address Line 2. - attr_accessor :address2 - - # Bill to City. - attr_accessor :locality - - # Bill to State. - attr_accessor :administrative_area - - # Bill to Postal Code. - attr_accessor :postal_code - - # Bill to Country. Accepts input in the ISO 3166-1 standard, stores as ISO 3166-1-Alpha-2 - attr_accessor :country - - # Valid Bill to Email. - attr_accessor :email - - # Bill to Phone Number. - attr_accessor :phone_number - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'first_name' => :'firstName', - :'last_name' => :'lastName', - :'company' => :'company', - :'address1' => :'address1', - :'address2' => :'address2', - :'locality' => :'locality', - :'administrative_area' => :'administrativeArea', - :'postal_code' => :'postalCode', - :'country' => :'country', - :'email' => :'email', - :'phone_number' => :'phoneNumber' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'first_name' => :'String', - :'last_name' => :'String', - :'company' => :'String', - :'address1' => :'String', - :'address2' => :'String', - :'locality' => :'String', - :'administrative_area' => :'String', - :'postal_code' => :'String', - :'country' => :'String', - :'email' => :'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?(:'company') - self.company = attributes[:'company'] - 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?(:'country') - self.country = attributes[:'country'] - end - - if attributes.has_key?(:'email') - self.email = attributes[:'email'] - 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 - invalid_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 && - first_name == o.first_name && - last_name == o.last_name && - company == o.company && - address1 == o.address1 && - address2 == o.address2 && - locality == o.locality && - administrative_area == o.administrative_area && - postal_code == o.postal_code && - country == o.country && - email == o.email && - 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, company, address1, address2, locality, administrative_area, postal_code, country, email, 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_client/models/paymentinstruments_buyer_information.rb b/lib/cyberSource_client/models/paymentinstruments_buyer_information.rb deleted file mode 100644 index 2fa95f76..00000000 --- a/lib/cyberSource_client/models/paymentinstruments_buyer_information.rb +++ /dev/null @@ -1,215 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class PaymentinstrumentsBuyerInformation - # Company Tax ID. - attr_accessor :company_tax_id - - # Currency. Accepts input in the ISO 4217 standard, stores as ISO 4217 Alpha - attr_accessor :currency - - # Date of birth YYYY-MM-DD. - attr_accessor :date_o_birth - - attr_accessor :personal_identification - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'company_tax_id' => :'companyTaxID', - :'currency' => :'currency', - :'date_o_birth' => :'dateOBirth', - :'personal_identification' => :'personalIdentification' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'company_tax_id' => :'String', - :'currency' => :'String', - :'date_o_birth' => :'String', - :'personal_identification' => :'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?(:'companyTaxID') - self.company_tax_id = attributes[:'companyTaxID'] - end - - if attributes.has_key?(:'currency') - self.currency = attributes[:'currency'] - end - - if attributes.has_key?(:'dateOBirth') - self.date_o_birth = attributes[:'dateOBirth'] - end - - if attributes.has_key?(:'personalIdentification') - if (value = attributes[:'personalIdentification']).is_a?(Array) - self.personal_identification = 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 && - company_tax_id == o.company_tax_id && - currency == o.currency && - date_o_birth == o.date_o_birth && - personal_identification == o.personal_identification - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [company_tax_id, currency, date_o_birth, personal_identification].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/paymentinstruments_buyer_information_issued_by.rb b/lib/cyberSource_client/models/paymentinstruments_buyer_information_issued_by.rb deleted file mode 100644 index 9a1bdaa0..00000000 --- a/lib/cyberSource_client/models/paymentinstruments_buyer_information_issued_by.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 PaymentinstrumentsBuyerInformationIssuedBy - # State or province where the identification was issued. - attr_accessor :administrative_area - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'administrative_area' => :'administrativeArea' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'administrative_area' => :'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?(:'administrativeArea') - self.administrative_area = attributes[:'administrativeArea'] - end - end - - # Show invalid properties 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 && - administrative_area == o.administrative_area - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [administrative_area].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/paymentinstruments_buyer_information_personal_identification.rb b/lib/cyberSource_client/models/paymentinstruments_buyer_information_personal_identification.rb deleted file mode 100644 index 97a18868..00000000 --- a/lib/cyberSource_client/models/paymentinstruments_buyer_information_personal_identification.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 PaymentinstrumentsBuyerInformationPersonalIdentification - # Identification Number. - attr_accessor :id - - # Type of personal identification. - attr_accessor :type - - attr_accessor :issued_by - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id', - :'type' => :'type', - :'issued_by' => :'issuedBy' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'id' => :'String', - :'type' => :'String', - :'issued_by' => :'PaymentinstrumentsBuyerInformationIssuedBy' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'type') - self.type = attributes[:'type'] - end - - if attributes.has_key?(:'issuedBy') - self.issued_by = attributes[:'issuedBy'] - end - end - - # Show invalid properties 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 && - type == o.type && - issued_by == o.issued_by - end - - # @see the `==` method - # @param [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, type, issued_by].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/paymentinstruments_card.rb b/lib/cyberSource_client/models/paymentinstruments_card.rb deleted file mode 100644 index 5fe948e7..00000000 --- a/lib/cyberSource_client/models/paymentinstruments_card.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 PaymentinstrumentsCard - # Credit card expiration month. - attr_accessor :expiration_month - - # Credit card expiration year. - attr_accessor :expiration_year - - # Credit card brand. - attr_accessor :type - - # Credit card issue number. - attr_accessor :issue_number - - # Credit card start month. - attr_accessor :start_month - - # Credit card start year. - attr_accessor :start_year - - # Card Use As Field. Supported value of \"pinless debit\" only. Only for use with Pinless Debit tokens. - attr_accessor :use_as - - 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 - { - :'expiration_month' => :'expirationMonth', - :'expiration_year' => :'expirationYear', - :'type' => :'type', - :'issue_number' => :'issueNumber', - :'start_month' => :'startMonth', - :'start_year' => :'startYear', - :'use_as' => :'useAs' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'expiration_month' => :'String', - :'expiration_year' => :'String', - :'type' => :'String', - :'issue_number' => :'String', - :'start_month' => :'String', - :'start_year' => :'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?(:'expirationMonth') - self.expiration_month = attributes[:'expirationMonth'] - end - - if attributes.has_key?(:'expirationYear') - self.expiration_year = attributes[:'expirationYear'] - end - - if attributes.has_key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.has_key?(:'issueNumber') - self.issue_number = attributes[:'issueNumber'] - 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?(:'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 - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - type_validator = EnumAttributeValidator.new('String', ['visa', 'mastercard', 'american express', 'discover', 'diners club', 'carte blanche', 'jcb', 'optima', 'twinpay credit', 'twinpay debit', 'walmart', 'enroute', 'lowes consumer', 'home depot consumer', 'mbna', 'dicks sportswear', 'casual corner', 'sears', 'jal', 'disney', 'maestro uk domestic', 'sams club consumer', 'sams club business', 'nicos', 'bill me later', 'bebe', 'restoration hardware', 'delta online', 'solo', 'visa electron', 'dankort', 'laser', 'carte bleue', 'carta si', 'pinless debit', 'encoded account', 'uatp', 'household', 'maestro international', 'ge money uk', 'korean cards', 'style', 'jcrew', 'payease china processing ewallet', 'payease china processing bank transfer', 'meijer private label', 'hipercard', 'aura', 'redecard', 'orico', 'elo', 'capital one private label', 'synchrony private label', 'china union pay']) - return false unless type_validator.valid?(@type) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] type Object to be assigned - def type=(type) - validator = EnumAttributeValidator.new('String', ['visa', 'mastercard', 'american express', 'discover', 'diners club', 'carte blanche', 'jcb', 'optima', 'twinpay credit', 'twinpay debit', 'walmart', 'enroute', 'lowes consumer', 'home depot consumer', 'mbna', 'dicks sportswear', 'casual corner', 'sears', 'jal', 'disney', 'maestro uk domestic', 'sams club consumer', 'sams club business', 'nicos', 'bill me later', 'bebe', 'restoration hardware', 'delta online', 'solo', 'visa electron', 'dankort', 'laser', 'carte bleue', 'carta si', 'pinless debit', 'encoded account', 'uatp', 'household', 'maestro international', 'ge money uk', 'korean cards', 'style', 'jcrew', 'payease china processing ewallet', 'payease china processing bank transfer', 'meijer private label', 'hipercard', 'aura', 'redecard', 'orico', 'elo', 'capital one private label', 'synchrony private label', 'china union pay']) - unless validator.valid?(type) - fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.' - 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 && - expiration_month == o.expiration_month && - expiration_year == o.expiration_year && - type == o.type && - issue_number == o.issue_number && - start_month == o.start_month && - start_year == o.start_year && - 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 - [expiration_month, expiration_year, type, issue_number, start_month, start_year, 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_client/models/paymentinstruments_instrument_identifier.rb b/lib/cyberSource_client/models/paymentinstruments_instrument_identifier.rb deleted file mode 100644 index 62636d1e..00000000 --- a/lib/cyberSource_client/models/paymentinstruments_instrument_identifier.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 PaymentinstrumentsInstrumentIdentifier - attr_accessor :_links - - # Describes type of token. For example: customer, paymentInstrument or instrumentIdentifier. - attr_accessor :object - - # Current state of the token. - attr_accessor :state - - # The id of the existing instrument identifier to be linked to the newly created payment instrument. - attr_accessor :id - - 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', - :'object' => :'object', - :'state' => :'state', - :'id' => :'id', - :'card' => :'card', - :'bank_account' => :'bankAccount', - :'processing_information' => :'processingInformation', - :'metadata' => :'metadata' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'_links' => :'InstrumentidentifiersLinks', - :'object' => :'String', - :'state' => :'String', - :'id' => :'String', - :'card' => :'InstrumentidentifiersCard', - :'bank_account' => :'InstrumentidentifiersBankAccount', - :'processing_information' => :'InstrumentidentifiersProcessingInformation', - :'metadata' => :'InstrumentidentifiersMetadata' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'state') - self.state = attributes[:'state'] - end - - if attributes.has_key?(:'id') - self.id = attributes[:'id'] - 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 && - object == o.object && - state == o.state && - id == o.id && - 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, object, state, id, 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_client/models/paymentinstruments_merchant_information.rb b/lib/cyberSource_client/models/paymentinstruments_merchant_information.rb deleted file mode 100644 index 86601529..00000000 --- a/lib/cyberSource_client/models/paymentinstruments_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 PaymentinstrumentsMerchantInformation - 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' => :'PaymentinstrumentsMerchantInformationMerchantDescriptor' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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_client/models/paymentinstruments_merchant_information_merchant_descriptor.rb b/lib/cyberSource_client/models/paymentinstruments_merchant_information_merchant_descriptor.rb deleted file mode 100644 index 26795370..00000000 --- a/lib/cyberSource_client/models/paymentinstruments_merchant_information_merchant_descriptor.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 PaymentinstrumentsMerchantInformationMerchantDescriptor - # Alternate information for your business. This API field overrides the company entry description value in your CyberSource account. - attr_accessor :alternate_name - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'alternate_name' => :'alternateName' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'alternate_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?(:'alternateName') - self.alternate_name = attributes[:'alternateName'] - end - end - - # Show invalid properties 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 && - alternate_name == o.alternate_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 - [alternate_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_client/models/paymentinstruments_processing_information.rb b/lib/cyberSource_client/models/paymentinstruments_processing_information.rb deleted file mode 100644 index b7547ea8..00000000 --- a/lib/cyberSource_client/models/paymentinstruments_processing_information.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 PaymentinstrumentsProcessingInformation - # Bill Payment Program Enabled. - attr_accessor :bill_payment_program_enabled - - attr_accessor :bank_transfer_options - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'bill_payment_program_enabled' => :'billPaymentProgramEnabled', - :'bank_transfer_options' => :'bankTransferOptions' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'bill_payment_program_enabled' => :'BOOLEAN', - :'bank_transfer_options' => :'PaymentinstrumentsProcessingInformationBankTransferOptions' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'billPaymentProgramEnabled') - self.bill_payment_program_enabled = attributes[:'billPaymentProgramEnabled'] - 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 - invalid_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_payment_program_enabled == o.bill_payment_program_enabled && - 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 - [bill_payment_program_enabled, 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_client/models/paymentinstruments_processing_information_bank_transfer_options.rb b/lib/cyberSource_client/models/paymentinstruments_processing_information_bank_transfer_options.rb deleted file mode 100644 index a09caf0a..00000000 --- a/lib/cyberSource_client/models/paymentinstruments_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 PaymentinstrumentsProcessingInformationBankTransferOptions - # Authorization method used for the transaction.(acceptable values are CCD, PPD, TEL, WEB). - 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_client/models/paymentsflexv1tokens_card_info.rb b/lib/cyberSource_client/models/paymentsflexv1tokens_card_info.rb deleted file mode 100644 index 1f0d7e67..00000000 --- a/lib/cyberSource_client/models/paymentsflexv1tokens_card_info.rb +++ /dev/null @@ -1,214 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class Paymentsflexv1tokensCardInfo - # Encrypted or plain text card number. If the encryption type of “None” was used in the Generate Key request, this value can be set to the plaintext card number/Personal Account Number (PAN). If the encryption type of RsaOaep256 was used in the Generate Key request, this value needs to be the RSA OAEP 256 encrypted card number. The card number should be encrypted on the cardholders’ device. The [WebCrypto API] (https://github.com/CyberSource/cybersource-flex-samples/blob/master/java/spring-boot/src/main/resources/public/flex.js) can be used with the JWK obtained in the Generate Key request. - attr_accessor :card_number - - # Two digit expiration month - attr_accessor :card_expiration_month - - # Four digit expiration year - attr_accessor :card_expiration_year - - # Card Type. This field is required. Refer to the CyberSource Credit Card Services documentation for supported card types. - attr_accessor :card_type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'card_number' => :'cardNumber', - :'card_expiration_month' => :'cardExpirationMonth', - :'card_expiration_year' => :'cardExpirationYear', - :'card_type' => :'cardType' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'card_number' => :'String', - :'card_expiration_month' => :'String', - :'card_expiration_year' => :'String', - :'card_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?(:'cardNumber') - self.card_number = attributes[:'cardNumber'] - end - - if attributes.has_key?(:'cardExpirationMonth') - self.card_expiration_month = attributes[:'cardExpirationMonth'] - end - - if attributes.has_key?(:'cardExpirationYear') - self.card_expiration_year = attributes[:'cardExpirationYear'] - end - - if attributes.has_key?(:'cardType') - self.card_type = attributes[:'cardType'] - end - end - - # Show invalid properties 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_number == o.card_number && - card_expiration_month == o.card_expiration_month && - card_expiration_year == o.card_expiration_year && - card_type == o.card_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 - [card_number, card_expiration_month, card_expiration_year, card_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_client/models/v2credits_point_of_sale_information.rb b/lib/cyberSource_client/models/v2credits_point_of_sale_information.rb deleted file mode 100644 index 1f253747..00000000 --- a/lib/cyberSource_client/models/v2credits_point_of_sale_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 V2creditsPointOfSaleInformation - attr_accessor :emv - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'emv' => :'emv' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'emv' => :'V2creditsPointOfSaleInformationEmv' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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 - end - - # Show invalid properties 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 && - emv == o.emv - end - - # @see the `==` method - # @param [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].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2credits_point_of_sale_information_emv.rb b/lib/cyberSource_client/models/v2credits_point_of_sale_information_emv.rb deleted file mode 100644 index b2a92509..00000000 --- a/lib/cyberSource_client/models/v2credits_point_of_sale_information_emv.rb +++ /dev/null @@ -1,221 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2creditsPointOfSaleInformationEmv - # 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 - - # Indicates whether a fallback method was used to enter credit card information into the POS terminal. When a technical problem prevents a successful exchange of information between a chip card and a chip-capable terminal: 1. Swipe the card or key the credit card information into the POS terminal. 2. Use the pos_entry_mode field to indicate whether the information was swiped or keyed. This field is supported only on **Chase Paymentech Solutions** and **GPN**. - attr_accessor :fallback - - # Reason for the EMV fallback transaction. An EMV fallback transaction occurs when an EMV transaction fails for one of these reasons: - Technical failure: the EMV terminal or EMV card cannot read and process chip data. - Empty candidate list failure: the EMV terminal does not have any applications in common with the EMV card. EMV terminals are coded to determine whether the terminal and EMV card have any applications in common. EMV terminals provide this information to you. Possible values: - **1**: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal either used information from a successful chip read or it was not a chip transaction. - **2**: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal was an EMV fallback transaction because the attempted chip read was unsuccessful. This field is supported only on **GPN**. - attr_accessor :fallback_condition - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'tags' => :'tags', - :'fallback' => :'fallback', - :'fallback_condition' => :'fallbackCondition' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'tags' => :'String', - :'fallback' => :'BOOLEAN', - :'fallback_condition' => :'Float' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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 - - if attributes.has_key?(:'fallback') - self.fallback = attributes[:'fallback'] - else - self.fallback = false - end - - if attributes.has_key?(:'fallbackCondition') - self.fallback_condition = attributes[:'fallbackCondition'] - end - end - - # Show invalid properties 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 && - fallback == o.fallback && - fallback_condition == o.fallback_condition - end - - # @see the `==` method - # @param [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, fallback, fallback_condition].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2credits_processing_information.rb b/lib/cyberSource_client/models/v2credits_processing_information.rb deleted file mode 100644 index 519b2851..00000000 --- a/lib/cyberSource_client/models/v2credits_processing_information.rb +++ /dev/null @@ -1,383 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2creditsProcessingInformation - # 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 - - # Value that identifies the processor/acquirer to use for the transaction. This value is supported only for **CyberSource through VisaNet**. - attr_accessor :processor_id - - # 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 - - # Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). - attr_accessor :reconciliation_id - - # Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. - attr_accessor :link_id - - # Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. - attr_accessor :report_group - - # Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. - attr_accessor :visa_checkout_id - - # Set this field to 3 to indicate that the request includes Level III data. - attr_accessor :purchase_level - - attr_accessor :recurring_options - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'commerce_indicator' => :'commerceIndicator', - :'processor_id' => :'processorId', - :'payment_solution' => :'paymentSolution', - :'reconciliation_id' => :'reconciliationId', - :'link_id' => :'linkId', - :'report_group' => :'reportGroup', - :'visa_checkout_id' => :'visaCheckoutId', - :'purchase_level' => :'purchaseLevel', - :'recurring_options' => :'recurringOptions' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'commerce_indicator' => :'String', - :'processor_id' => :'String', - :'payment_solution' => :'String', - :'reconciliation_id' => :'String', - :'link_id' => :'String', - :'report_group' => :'String', - :'visa_checkout_id' => :'String', - :'purchase_level' => :'String', - :'recurring_options' => :'V2paymentsidrefundsProcessingInformationRecurringOptions' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'commerceIndicator') - self.commerce_indicator = attributes[:'commerceIndicator'] - end - - if attributes.has_key?(:'processorId') - self.processor_id = attributes[:'processorId'] - end - - if attributes.has_key?(:'paymentSolution') - self.payment_solution = attributes[:'paymentSolution'] - end - - if attributes.has_key?(:'reconciliationId') - self.reconciliation_id = attributes[:'reconciliationId'] - end - - if attributes.has_key?(:'linkId') - self.link_id = attributes[:'linkId'] - end - - if attributes.has_key?(:'reportGroup') - self.report_group = attributes[:'reportGroup'] - end - - if attributes.has_key?(:'visaCheckoutId') - self.visa_checkout_id = attributes[:'visaCheckoutId'] - end - - if attributes.has_key?(:'purchaseLevel') - self.purchase_level = attributes[:'purchaseLevel'] - end - - if attributes.has_key?(:'recurringOptions') - self.recurring_options = attributes[:'recurringOptions'] - end - end - - # Show invalid properties 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 !@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 - - if !@processor_id.nil? && @processor_id.to_s.length > 3 - invalid_properties.push('invalid value for "processor_id", the character length must be smaller than or equal to 3.') - end - - 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 !@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 - - if !@link_id.nil? && @link_id.to_s.length > 26 - invalid_properties.push('invalid value for "link_id", the character length must be smaller than or equal to 26.') - end - - if !@report_group.nil? && @report_group.to_s.length > 25 - invalid_properties.push('invalid value for "report_group", the character length must be smaller than or equal to 25.') - end - - if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 - invalid_properties.push('invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.') - end - - if !@purchase_level.nil? && @purchase_level.to_s.length > 1 - invalid_properties.push('invalid value for "purchase_level", 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 !@commerce_indicator.nil? && @commerce_indicator.to_s.length > 20 - return false if !@processor_id.nil? && @processor_id.to_s.length > 3 - return false if !@payment_solution.nil? && @payment_solution.to_s.length > 12 - return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - return false if !@link_id.nil? && @link_id.to_s.length > 26 - return false if !@report_group.nil? && @report_group.to_s.length > 25 - return false if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 - return false if !@purchase_level.nil? && @purchase_level.to_s.length > 1 - true - 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 - - # Custom attribute writer method with validation - # @param [Object] processor_id Value to be assigned - def processor_id=(processor_id) - if !processor_id.nil? && processor_id.to_s.length > 3 - fail ArgumentError, 'invalid value for "processor_id", the character length must be smaller than or equal to 3.' - end - - @processor_id = processor_id - 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] 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 - - # Custom attribute writer method with validation - # @param [Object] link_id Value to be assigned - def link_id=(link_id) - if !link_id.nil? && link_id.to_s.length > 26 - fail ArgumentError, 'invalid value for "link_id", the character length must be smaller than or equal to 26.' - end - - @link_id = link_id - end - - # Custom attribute writer method with validation - # @param [Object] report_group Value to be assigned - def report_group=(report_group) - if !report_group.nil? && report_group.to_s.length > 25 - fail ArgumentError, 'invalid value for "report_group", the character length must be smaller than or equal to 25.' - end - - @report_group = report_group - end - - # Custom attribute writer method with validation - # @param [Object] visa_checkout_id Value to be assigned - def visa_checkout_id=(visa_checkout_id) - if !visa_checkout_id.nil? && visa_checkout_id.to_s.length > 48 - fail ArgumentError, 'invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.' - end - - @visa_checkout_id = visa_checkout_id - end - - # Custom attribute writer method with validation - # @param [Object] purchase_level Value to be assigned - def purchase_level=(purchase_level) - if !purchase_level.nil? && purchase_level.to_s.length > 1 - fail ArgumentError, 'invalid value for "purchase_level", the character length must be smaller than or equal to 1.' - end - - @purchase_level = purchase_level - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - commerce_indicator == o.commerce_indicator && - processor_id == o.processor_id && - payment_solution == o.payment_solution && - reconciliation_id == o.reconciliation_id && - link_id == o.link_id && - report_group == o.report_group && - visa_checkout_id == o.visa_checkout_id && - purchase_level == o.purchase_level && - recurring_options == o.recurring_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 - [commerce_indicator, processor_id, payment_solution, reconciliation_id, link_id, report_group, visa_checkout_id, purchase_level, recurring_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_client/models/v2payments_aggregator_information.rb b/lib/cyberSource_client/models/v2payments_aggregator_information.rb deleted file mode 100644 index d9edb8b4..00000000 --- a/lib/cyberSource_client/models/v2payments_aggregator_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 V2paymentsAggregatorInformation - # Value that identifies you as a payment aggregator. Get this value from the processor. For processor-specific information, see the aggregator_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 :aggregator_id - - # Your payment aggregator business name. For processor-specific information, see the aggregator_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 :name - - attr_accessor :sub_merchant - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'aggregator_id' => :'aggregatorId', - :'name' => :'name', - :'sub_merchant' => :'subMerchant' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'aggregator_id' => :'String', - :'name' => :'String', - :'sub_merchant' => :'V2paymentsAggregatorInformationSubMerchant' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'aggregatorId') - self.aggregator_id = attributes[:'aggregatorId'] - end - - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.has_key?(:'subMerchant') - self.sub_merchant = attributes[:'subMerchant'] - end - end - - # Show invalid properties 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 !@aggregator_id.nil? && @aggregator_id.to_s.length > 20 - invalid_properties.push('invalid value for "aggregator_id", the character length must be smaller than or equal to 20.') - end - - if !@name.nil? && @name.to_s.length > 37 - invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 37.') - 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 !@aggregator_id.nil? && @aggregator_id.to_s.length > 20 - return false if !@name.nil? && @name.to_s.length > 37 - true - end - - # Custom attribute writer method with validation - # @param [Object] aggregator_id Value to be assigned - def aggregator_id=(aggregator_id) - if !aggregator_id.nil? && aggregator_id.to_s.length > 20 - fail ArgumentError, 'invalid value for "aggregator_id", the character length must be smaller than or equal to 20.' - end - - @aggregator_id = aggregator_id - end - - # Custom attribute writer method with validation - # @param [Object] name Value to be assigned - def name=(name) - if !name.nil? && name.to_s.length > 37 - fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 37.' - 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 && - aggregator_id == o.aggregator_id && - name == o.name && - sub_merchant == o.sub_merchant - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [aggregator_id, name, sub_merchant].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payments_aggregator_information_sub_merchant.rb b/lib/cyberSource_client/models/v2payments_aggregator_information_sub_merchant.rb deleted file mode 100644 index 6bae4627..00000000 --- a/lib/cyberSource_client/models/v2payments_aggregator_information_sub_merchant.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 V2paymentsAggregatorInformationSubMerchant - # Unique identifier assigned by the payment card company to the sub-merchant. - attr_accessor :card_acceptor_id - - # Sub-merchant’s business name. - attr_accessor :name - - # First line of the sub-merchant’s street address. - attr_accessor :address1 - - # Sub-merchant’s city. - attr_accessor :locality - - # Sub-merchant’s state or province. Use the State, Province, and Territory Codes for the United States and Canada. - attr_accessor :administrative_area - - # Sub-merchant’s region. Example `NE` indicates that the sub-merchant is in the northeast region. - attr_accessor :region - - # Partial postal code for the sub-merchant’s address. - attr_accessor :postal_code - - # Sub-merchant’s country. Use the two-character ISO Standard Country Codes. - attr_accessor :country - - # Sub-merchant’s email address. **Maximum length for processors** - American Express Direct: 40 - CyberSource through VisaNet: 40 - FDC Compass: 40 - FDC Nashville Global: 19 - attr_accessor :email - - # Sub-merchant’s telephone number. **Maximum length for procesors** - American Express Direct: 20 - CyberSource through VisaNet: 20 - FDC Compass: 13 - FDC Nashville Global: 10 - attr_accessor :phone_number - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'card_acceptor_id' => :'cardAcceptorId', - :'name' => :'name', - :'address1' => :'address1', - :'locality' => :'locality', - :'administrative_area' => :'administrativeArea', - :'region' => :'region', - :'postal_code' => :'postalCode', - :'country' => :'country', - :'email' => :'email', - :'phone_number' => :'phoneNumber' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'card_acceptor_id' => :'String', - :'name' => :'String', - :'address1' => :'String', - :'locality' => :'String', - :'administrative_area' => :'String', - :'region' => :'String', - :'postal_code' => :'String', - :'country' => :'String', - :'email' => :'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?(:'cardAcceptorId') - self.card_acceptor_id = attributes[:'cardAcceptorId'] - end - - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.has_key?(:'address1') - self.address1 = attributes[:'address1'] - 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?(:'region') - self.region = attributes[:'region'] - end - - if attributes.has_key?(:'postalCode') - self.postal_code = attributes[:'postalCode'] - end - - if attributes.has_key?(:'country') - self.country = attributes[:'country'] - end - - if attributes.has_key?(:'email') - self.email = attributes[:'email'] - 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 !@card_acceptor_id.nil? && @card_acceptor_id.to_s.length > 15 - invalid_properties.push('invalid value for "card_acceptor_id", the character length must be smaller than or equal to 15.') - end - - if !@name.nil? && @name.to_s.length > 37 - invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 37.') - end - - if !@address1.nil? && @address1.to_s.length > 38 - invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 38.') - end - - if !@locality.nil? && @locality.to_s.length > 21 - invalid_properties.push('invalid value for "locality", the character length must be smaller than or equal to 21.') - end - - if !@administrative_area.nil? && @administrative_area.to_s.length > 3 - invalid_properties.push('invalid value for "administrative_area", the character length must be smaller than or equal to 3.') - end - - if !@region.nil? && @region.to_s.length > 3 - invalid_properties.push('invalid value for "region", the character length must be smaller than or equal to 3.') - end - - if !@postal_code.nil? && @postal_code.to_s.length > 15 - invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 15.') - end - - 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 !@email.nil? && @email.to_s.length > 40 - invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 40.') - end - - if !@phone_number.nil? && @phone_number.to_s.length > 20 - invalid_properties.push('invalid value for "phone_number", 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 !@card_acceptor_id.nil? && @card_acceptor_id.to_s.length > 15 - return false if !@name.nil? && @name.to_s.length > 37 - return false if !@address1.nil? && @address1.to_s.length > 38 - return false if !@locality.nil? && @locality.to_s.length > 21 - return false if !@administrative_area.nil? && @administrative_area.to_s.length > 3 - return false if !@region.nil? && @region.to_s.length > 3 - return false if !@postal_code.nil? && @postal_code.to_s.length > 15 - return false if !@country.nil? && @country.to_s.length > 3 - return false if !@email.nil? && @email.to_s.length > 40 - return false if !@phone_number.nil? && @phone_number.to_s.length > 20 - true - end - - # Custom attribute writer method with validation - # @param [Object] card_acceptor_id Value to be assigned - def card_acceptor_id=(card_acceptor_id) - if !card_acceptor_id.nil? && card_acceptor_id.to_s.length > 15 - fail ArgumentError, 'invalid value for "card_acceptor_id", the character length must be smaller than or equal to 15.' - end - - @card_acceptor_id = card_acceptor_id - end - - # Custom attribute writer method with validation - # @param [Object] name Value to be assigned - def name=(name) - if !name.nil? && name.to_s.length > 37 - fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 37.' - end - - @name = 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 > 38 - fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 38.' - end - - @address1 = address1 - end - - # Custom attribute writer method with validation - # @param [Object] locality Value to be assigned - def locality=(locality) - if !locality.nil? && locality.to_s.length > 21 - fail ArgumentError, 'invalid value for "locality", the character length must be smaller than or equal to 21.' - 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 > 3 - fail ArgumentError, 'invalid value for "administrative_area", the character length must be smaller than or equal to 3.' - end - - @administrative_area = administrative_area - end - - # Custom attribute writer method with validation - # @param [Object] region Value to be assigned - def region=(region) - if !region.nil? && region.to_s.length > 3 - fail ArgumentError, 'invalid value for "region", the character length must be smaller than or equal to 3.' - end - - @region = region - 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 > 15 - fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 15.' - end - - @postal_code = postal_code - 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] email Value to be assigned - def email=(email) - if !email.nil? && email.to_s.length > 40 - fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 40.' - end - - @email = email - 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 > 20 - fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 20.' - 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 && - card_acceptor_id == o.card_acceptor_id && - name == o.name && - address1 == o.address1 && - locality == o.locality && - administrative_area == o.administrative_area && - region == o.region && - postal_code == o.postal_code && - country == o.country && - email == o.email && - 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 - [card_acceptor_id, name, address1, locality, administrative_area, region, postal_code, country, email, 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_client/models/v2payments_buyer_information.rb b/lib/cyberSource_client/models/v2payments_buyer_information.rb deleted file mode 100644 index 5a9bcaab..00000000 --- a/lib/cyberSource_client/models/v2payments_buyer_information.rb +++ /dev/null @@ -1,285 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsBuyerInformation - # 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 - - # Recipient’s date of birth. **Format**: `YYYYMMDD`. This field is a pass-through, which means that CyberSource ensures that the value is eight numeric characters but otherwise does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. - attr_accessor :date_of_birth - - # Customer’s government-assigned tax identification number. For processor-specific information, see the purchaser_vat_registration_number 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 :vat_registration_number - - attr_accessor :personal_identification - - # TODO - attr_accessor :hashed_password - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'merchant_customer_id' => :'merchantCustomerId', - :'date_of_birth' => :'dateOfBirth', - :'vat_registration_number' => :'vatRegistrationNumber', - :'personal_identification' => :'personalIdentification', - :'hashed_password' => :'hashedPassword' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'merchant_customer_id' => :'String', - :'date_of_birth' => :'String', - :'vat_registration_number' => :'String', - :'personal_identification' => :'Array', - :'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?(:'dateOfBirth') - self.date_of_birth = attributes[:'dateOfBirth'] - end - - if attributes.has_key?(:'vatRegistrationNumber') - self.vat_registration_number = attributes[:'vatRegistrationNumber'] - end - - if attributes.has_key?(:'personalIdentification') - if (value = attributes[:'personalIdentification']).is_a?(Array) - self.personal_identification = value - end - 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 !@date_of_birth.nil? && @date_of_birth.to_s.length > 8 - invalid_properties.push('invalid value for "date_of_birth", the character length must be smaller than or equal to 8.') - end - - if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 20 - invalid_properties.push('invalid value for "vat_registration_number", the character length must be smaller than or equal to 20.') - 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 !@date_of_birth.nil? && @date_of_birth.to_s.length > 8 - return false if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 20 - 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] date_of_birth Value to be assigned - def date_of_birth=(date_of_birth) - if !date_of_birth.nil? && date_of_birth.to_s.length > 8 - fail ArgumentError, 'invalid value for "date_of_birth", the character length must be smaller than or equal to 8.' - end - - @date_of_birth = date_of_birth - end - - # Custom attribute writer method with validation - # @param [Object] vat_registration_number Value to be assigned - def vat_registration_number=(vat_registration_number) - if !vat_registration_number.nil? && vat_registration_number.to_s.length > 20 - fail ArgumentError, 'invalid value for "vat_registration_number", the character length must be smaller than or equal to 20.' - end - - @vat_registration_number = vat_registration_number - 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 && - date_of_birth == o.date_of_birth && - vat_registration_number == o.vat_registration_number && - personal_identification == o.personal_identification && - 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, date_of_birth, vat_registration_number, personal_identification, 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_client/models/v2payments_buyer_information_personal_identification.rb b/lib/cyberSource_client/models/v2payments_buyer_information_personal_identification.rb deleted file mode 100644 index 7be79428..00000000 --- a/lib/cyberSource_client/models/v2payments_buyer_information_personal_identification.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 V2paymentsBuyerInformationPersonalIdentification - attr_accessor :type - - # Personal Identifier for the customer based on various type. This field is supported only on the processors listed in this description. For processor-specific information, see the personal_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 :id - - # TBD - attr_accessor :issued_by - - 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', - :'id' => :'id', - :'issued_by' => :'issuedBy' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'type' => :'String', - :'id' => :'String', - :'issued_by' => :'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?(:'id') - self.id = attributes[:'id'] - end - - if attributes.has_key?(:'issuedBy') - self.issued_by = attributes[:'issuedBy'] - end - end - - # Show invalid properties 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? - type_validator = EnumAttributeValidator.new('String', ['ssn', 'driverlicense']) - return false unless type_validator.valid?(@type) - return false if !@id.nil? && @id.to_s.length > 26 - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] type Object to be assigned - def type=(type) - validator = EnumAttributeValidator.new('String', ['ssn', 'driverlicense']) - unless validator.valid?(type) - fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.' - end - @type = type - 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 && - type == o.type && - id == o.id && - issued_by == o.issued_by - end - - # @see the `==` method - # @param [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, id, issued_by].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payments_client_reference_information.rb b/lib/cyberSource_client/models/v2payments_client_reference_information.rb deleted file mode 100644 index 6d255435..00000000 --- a/lib/cyberSource_client/models/v2payments_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 V2paymentsClientReferenceInformation - # 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 - - # Identifier that you assign to the transaction. See \"Merchant-Initiated Reversals and Voids,\" page 176 - attr_accessor :transaction_id - - # Comments - attr_accessor :comments - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'transaction_id' => :'transactionId', - :'comments' => :'comments' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'code' => :'String', - :'transaction_id' => :'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?(:'transactionId') - self.transaction_id = attributes[:'transactionId'] - 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 && - transaction_id == o.transaction_id && - 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, transaction_id, 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_client/models/v2payments_consumer_authentication_information.rb b/lib/cyberSource_client/models/v2payments_consumer_authentication_information.rb deleted file mode 100644 index a6bc43f6..00000000 --- a/lib/cyberSource_client/models/v2payments_consumer_authentication_information.rb +++ /dev/null @@ -1,374 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsConsumerAuthenticationInformation - # Cardholder authentication verification value (CAVV). - attr_accessor :cavv - - # Algorithm used to generate the CAVV for Verified by Visa or the UCAF authentication data for Mastercard SecureCode. - attr_accessor :cavv_algorithm - - # Raw electronic commerce indicator (ECI). - attr_accessor :eci_raw - - # Payer authentication response status. - attr_accessor :pares_status - - # Verification response enrollment status. - attr_accessor :veres_enrolled - - # Transaction identifier. - attr_accessor :xid - - # Universal cardholder authentication field (UCAF) data. - attr_accessor :ucaf_authentication_data - - # Universal cardholder authentication field (UCAF) collection indicator. - attr_accessor :ucaf_collection_indicator - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'cavv' => :'cavv', - :'cavv_algorithm' => :'cavvAlgorithm', - :'eci_raw' => :'eciRaw', - :'pares_status' => :'paresStatus', - :'veres_enrolled' => :'veresEnrolled', - :'xid' => :'xid', - :'ucaf_authentication_data' => :'ucafAuthenticationData', - :'ucaf_collection_indicator' => :'ucafCollectionIndicator' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'cavv' => :'String', - :'cavv_algorithm' => :'String', - :'eci_raw' => :'String', - :'pares_status' => :'String', - :'veres_enrolled' => :'String', - :'xid' => :'String', - :'ucaf_authentication_data' => :'String', - :'ucaf_collection_indicator' => :'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?(:'cavv') - self.cavv = attributes[:'cavv'] - end - - if attributes.has_key?(:'cavvAlgorithm') - self.cavv_algorithm = attributes[:'cavvAlgorithm'] - end - - if attributes.has_key?(:'eciRaw') - self.eci_raw = attributes[:'eciRaw'] - end - - if attributes.has_key?(:'paresStatus') - self.pares_status = attributes[:'paresStatus'] - end - - if attributes.has_key?(:'veresEnrolled') - self.veres_enrolled = attributes[:'veresEnrolled'] - end - - if attributes.has_key?(:'xid') - self.xid = attributes[:'xid'] - end - - if attributes.has_key?(:'ucafAuthenticationData') - self.ucaf_authentication_data = attributes[:'ucafAuthenticationData'] - end - - if attributes.has_key?(:'ucafCollectionIndicator') - self.ucaf_collection_indicator = attributes[:'ucafCollectionIndicator'] - end - end - - # Show invalid properties 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 !@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 !@cavv_algorithm.nil? && @cavv_algorithm.to_s.length > 1 - invalid_properties.push('invalid value for "cavv_algorithm", the character length must be smaller than or equal to 1.') - end - - 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 !@pares_status.nil? && @pares_status.to_s.length > 1 - invalid_properties.push('invalid value for "pares_status", the character length must be smaller than or equal to 1.') - end - - if !@veres_enrolled.nil? && @veres_enrolled.to_s.length > 1 - invalid_properties.push('invalid value for "veres_enrolled", the character length must be smaller than or equal to 1.') - 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 - - if !@ucaf_authentication_data.nil? && @ucaf_authentication_data.to_s.length > 32 - invalid_properties.push('invalid value for "ucaf_authentication_data", the character length must be smaller than or equal to 32.') - end - - if !@ucaf_collection_indicator.nil? && @ucaf_collection_indicator.to_s.length > 1 - invalid_properties.push('invalid value for "ucaf_collection_indicator", 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 !@cavv.nil? && @cavv.to_s.length > 40 - return false if !@cavv_algorithm.nil? && @cavv_algorithm.to_s.length > 1 - return false if !@eci_raw.nil? && @eci_raw.to_s.length > 2 - return false if !@pares_status.nil? && @pares_status.to_s.length > 1 - return false if !@veres_enrolled.nil? && @veres_enrolled.to_s.length > 1 - return false if !@xid.nil? && @xid.to_s.length > 40 - return false if !@ucaf_authentication_data.nil? && @ucaf_authentication_data.to_s.length > 32 - return false if !@ucaf_collection_indicator.nil? && @ucaf_collection_indicator.to_s.length > 1 - true - 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] cavv_algorithm Value to be assigned - def cavv_algorithm=(cavv_algorithm) - if !cavv_algorithm.nil? && cavv_algorithm.to_s.length > 1 - fail ArgumentError, 'invalid value for "cavv_algorithm", the character length must be smaller than or equal to 1.' - end - - @cavv_algorithm = cavv_algorithm - 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] pares_status Value to be assigned - def pares_status=(pares_status) - if !pares_status.nil? && pares_status.to_s.length > 1 - fail ArgumentError, 'invalid value for "pares_status", the character length must be smaller than or equal to 1.' - end - - @pares_status = pares_status - end - - # Custom attribute writer method with validation - # @param [Object] veres_enrolled Value to be assigned - def veres_enrolled=(veres_enrolled) - if !veres_enrolled.nil? && veres_enrolled.to_s.length > 1 - fail ArgumentError, 'invalid value for "veres_enrolled", the character length must be smaller than or equal to 1.' - end - - @veres_enrolled = veres_enrolled - 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 - - # Custom attribute writer method with validation - # @param [Object] ucaf_authentication_data Value to be assigned - def ucaf_authentication_data=(ucaf_authentication_data) - if !ucaf_authentication_data.nil? && ucaf_authentication_data.to_s.length > 32 - fail ArgumentError, 'invalid value for "ucaf_authentication_data", the character length must be smaller than or equal to 32.' - end - - @ucaf_authentication_data = ucaf_authentication_data - end - - # Custom attribute writer method with validation - # @param [Object] ucaf_collection_indicator Value to be assigned - def ucaf_collection_indicator=(ucaf_collection_indicator) - if !ucaf_collection_indicator.nil? && ucaf_collection_indicator.to_s.length > 1 - fail ArgumentError, 'invalid value for "ucaf_collection_indicator", the character length must be smaller than or equal to 1.' - end - - @ucaf_collection_indicator = ucaf_collection_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 && - cavv == o.cavv && - cavv_algorithm == o.cavv_algorithm && - eci_raw == o.eci_raw && - pares_status == o.pares_status && - veres_enrolled == o.veres_enrolled && - xid == o.xid && - ucaf_authentication_data == o.ucaf_authentication_data && - ucaf_collection_indicator == o.ucaf_collection_indicator - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [cavv, cavv_algorithm, eci_raw, pares_status, veres_enrolled, xid, ucaf_authentication_data, ucaf_collection_indicator].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payments_device_information.rb b/lib/cyberSource_client/models/v2payments_device_information.rb deleted file mode 100644 index 0268427f..00000000 --- a/lib/cyberSource_client/models/v2payments_device_information.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 V2paymentsDeviceInformation - # DNS resolved hostname from above _ipAddress_. - attr_accessor :host_name - - # IP address of the customer. - attr_accessor :ip_address - - # Customer’s browser as identified from the HTTP header data. For example, Mozilla is the value that identifies the Netscape browser. - attr_accessor :user_agent - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'host_name' => :'hostName', - :'ip_address' => :'ipAddress', - :'user_agent' => :'userAgent' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'host_name' => :'String', - :'ip_address' => :'String', - :'user_agent' => :'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?(:'hostName') - self.host_name = attributes[:'hostName'] - end - - if attributes.has_key?(:'ipAddress') - self.ip_address = attributes[:'ipAddress'] - end - - if attributes.has_key?(:'userAgent') - self.user_agent = attributes[:'userAgent'] - end - end - - # Show invalid properties 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 !@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 - - 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 !@user_agent.nil? && @user_agent.to_s.length > 40 - invalid_properties.push('invalid value for "user_agent", 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 !@host_name.nil? && @host_name.to_s.length > 60 - return false if !@ip_address.nil? && @ip_address.to_s.length > 15 - return false if !@user_agent.nil? && @user_agent.to_s.length > 40 - true - 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 - - # 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] user_agent Value to be assigned - def user_agent=(user_agent) - if !user_agent.nil? && user_agent.to_s.length > 40 - fail ArgumentError, 'invalid value for "user_agent", the character length must be smaller than or equal to 40.' - end - - @user_agent = user_agent - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - host_name == o.host_name && - ip_address == o.ip_address && - user_agent == o.user_agent - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [host_name, ip_address, user_agent].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payments_merchant_defined_information.rb b/lib/cyberSource_client/models/v2payments_merchant_defined_information.rb deleted file mode 100644 index d7cd7a2b..00000000 --- a/lib/cyberSource_client/models/v2payments_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 V2paymentsMerchantDefinedInformation - # TBD - attr_accessor :key - - # TBD - 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_client/models/v2payments_merchant_information.rb b/lib/cyberSource_client/models/v2payments_merchant_information.rb deleted file mode 100644 index 6d6dd235..00000000 --- a/lib/cyberSource_client/models/v2payments_merchant_information.rb +++ /dev/null @@ -1,308 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsMerchantInformation - attr_accessor :merchant_descriptor - - # Company ID assigned to an independent sales organization. Get this value from Mastercard. For processor-specific information, see the sales_organization_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 :sales_organization_id - - # Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :category_code - - # Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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 :vat_registration_number - - # Reference number that facilitates card acceptor/corporation communication and record keeping. For processor-specific information, see the card_acceptor_ref_number 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 :card_acceptor_reference_number - - # Local date and time at your physical location. Include both the date and time in this field or leave it blank. This field is supported only for **CyberSource through VisaNet**. For processor-specific information, see the transaction_local_date_time field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) `Format: YYYYMMDDhhmmss`, where: - YYYY = year - MM = month - DD = day - hh = hour - mm = minutes - ss = seconds - attr_accessor :transaction_local_date_time - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'merchant_descriptor' => :'merchantDescriptor', - :'sales_organization_id' => :'salesOrganizationId', - :'category_code' => :'categoryCode', - :'vat_registration_number' => :'vatRegistrationNumber', - :'card_acceptor_reference_number' => :'cardAcceptorReferenceNumber', - :'transaction_local_date_time' => :'transactionLocalDateTime' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'merchant_descriptor' => :'V2paymentsMerchantInformationMerchantDescriptor', - :'sales_organization_id' => :'String', - :'category_code' => :'Integer', - :'vat_registration_number' => :'String', - :'card_acceptor_reference_number' => :'String', - :'transaction_local_date_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?(:'merchantDescriptor') - self.merchant_descriptor = attributes[:'merchantDescriptor'] - end - - if attributes.has_key?(:'salesOrganizationId') - self.sales_organization_id = attributes[:'salesOrganizationId'] - end - - if attributes.has_key?(:'categoryCode') - self.category_code = attributes[:'categoryCode'] - end - - if attributes.has_key?(:'vatRegistrationNumber') - self.vat_registration_number = attributes[:'vatRegistrationNumber'] - end - - if attributes.has_key?(:'cardAcceptorReferenceNumber') - self.card_acceptor_reference_number = attributes[:'cardAcceptorReferenceNumber'] - end - - if attributes.has_key?(:'transactionLocalDateTime') - self.transaction_local_date_time = attributes[:'transactionLocalDateTime'] - end - end - - # Show invalid properties 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 !@sales_organization_id.nil? && @sales_organization_id.to_s.length > 11 - invalid_properties.push('invalid value for "sales_organization_id", the character length must be smaller than or equal to 11.') - end - - if !@category_code.nil? && @category_code > 9999 - invalid_properties.push('invalid value for "category_code", must be smaller than or equal to 9999.') - end - - if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 - invalid_properties.push('invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.') - end - - if !@card_acceptor_reference_number.nil? && @card_acceptor_reference_number.to_s.length > 25 - invalid_properties.push('invalid value for "card_acceptor_reference_number", the character length must be smaller than or equal to 25.') - end - - if !@transaction_local_date_time.nil? && @transaction_local_date_time.to_s.length > 14 - invalid_properties.push('invalid value for "transaction_local_date_time", the character length must be smaller than or equal to 14.') - 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 !@sales_organization_id.nil? && @sales_organization_id.to_s.length > 11 - return false if !@category_code.nil? && @category_code > 9999 - return false if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 - return false if !@card_acceptor_reference_number.nil? && @card_acceptor_reference_number.to_s.length > 25 - return false if !@transaction_local_date_time.nil? && @transaction_local_date_time.to_s.length > 14 - true - end - - # Custom attribute writer method with validation - # @param [Object] sales_organization_id Value to be assigned - def sales_organization_id=(sales_organization_id) - if !sales_organization_id.nil? && sales_organization_id.to_s.length > 11 - fail ArgumentError, 'invalid value for "sales_organization_id", the character length must be smaller than or equal to 11.' - end - - @sales_organization_id = sales_organization_id - end - - # Custom attribute writer method with validation - # @param [Object] category_code Value to be assigned - def category_code=(category_code) - if !category_code.nil? && category_code > 9999 - fail ArgumentError, 'invalid value for "category_code", must be smaller than or equal to 9999.' - end - - @category_code = category_code - end - - # Custom attribute writer method with validation - # @param [Object] vat_registration_number Value to be assigned - def vat_registration_number=(vat_registration_number) - if !vat_registration_number.nil? && vat_registration_number.to_s.length > 21 - fail ArgumentError, 'invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.' - end - - @vat_registration_number = vat_registration_number - end - - # Custom attribute writer method with validation - # @param [Object] card_acceptor_reference_number Value to be assigned - def card_acceptor_reference_number=(card_acceptor_reference_number) - if !card_acceptor_reference_number.nil? && card_acceptor_reference_number.to_s.length > 25 - fail ArgumentError, 'invalid value for "card_acceptor_reference_number", the character length must be smaller than or equal to 25.' - end - - @card_acceptor_reference_number = card_acceptor_reference_number - end - - # Custom attribute writer method with validation - # @param [Object] transaction_local_date_time Value to be assigned - def transaction_local_date_time=(transaction_local_date_time) - if !transaction_local_date_time.nil? && transaction_local_date_time.to_s.length > 14 - fail ArgumentError, 'invalid value for "transaction_local_date_time", the character length must be smaller than or equal to 14.' - end - - @transaction_local_date_time = transaction_local_date_time - end - - # 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 && - sales_organization_id == o.sales_organization_id && - category_code == o.category_code && - vat_registration_number == o.vat_registration_number && - card_acceptor_reference_number == o.card_acceptor_reference_number && - transaction_local_date_time == o.transaction_local_date_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 - [merchant_descriptor, sales_organization_id, category_code, vat_registration_number, card_acceptor_reference_number, transaction_local_date_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_client/models/v2payments_merchant_information_merchant_descriptor.rb b/lib/cyberSource_client/models/v2payments_merchant_information_merchant_descriptor.rb deleted file mode 100644 index 2d8aff7c..00000000 --- a/lib/cyberSource_client/models/v2payments_merchant_information_merchant_descriptor.rb +++ /dev/null @@ -1,374 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsMerchantInformationMerchantDescriptor - # 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 - - # 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) - attr_accessor :alternate_name - - # 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) * FDCCompass (13) * Paymentech (13) - attr_accessor :contact - - # 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) - attr_accessor :address1 - - # Merchant City. 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) - attr_accessor :locality - - # 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) - attr_accessor :country - - # 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) - attr_accessor :postal_code - - # Merchant State. 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) - attr_accessor :administrative_area - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'name' => :'name', - :'alternate_name' => :'alternateName', - :'contact' => :'contact', - :'address1' => :'address1', - :'locality' => :'locality', - :'country' => :'country', - :'postal_code' => :'postalCode', - :'administrative_area' => :'administrativeArea' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'name' => :'String', - :'alternate_name' => :'String', - :'contact' => :'String', - :'address1' => :'String', - :'locality' => :'String', - :'country' => :'String', - :'postal_code' => :'String', - :'administrative_area' => :'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?(:'alternateName') - self.alternate_name = attributes[:'alternateName'] - end - - if attributes.has_key?(:'contact') - self.contact = attributes[:'contact'] - end - - if attributes.has_key?(:'address1') - self.address1 = attributes[:'address1'] - end - - if attributes.has_key?(:'locality') - self.locality = attributes[:'locality'] - end - - if attributes.has_key?(:'country') - self.country = attributes[:'country'] - end - - if attributes.has_key?(:'postalCode') - self.postal_code = attributes[:'postalCode'] - end - - if attributes.has_key?(:'administrativeArea') - self.administrative_area = attributes[:'administrativeArea'] - end - end - - # Show invalid properties 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 - - if !@alternate_name.nil? && @alternate_name.to_s.length > 13 - invalid_properties.push('invalid value for "alternate_name", the character length must be smaller than or equal to 13.') - end - - if !@contact.nil? && @contact.to_s.length > 14 - invalid_properties.push('invalid value for "contact", the character length must be smaller than or equal to 14.') - 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 !@locality.nil? && @locality.to_s.length > 13 - invalid_properties.push('invalid value for "locality", the character length must be smaller than or equal to 13.') - 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 !@postal_code.nil? && @postal_code.to_s.length > 14 - invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 14.') - end - - if !@administrative_area.nil? && @administrative_area.to_s.length > 3 - invalid_properties.push('invalid value for "administrative_area", 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 !@name.nil? && @name.to_s.length > 23 - return false if !@alternate_name.nil? && @alternate_name.to_s.length > 13 - return false if !@contact.nil? && @contact.to_s.length > 14 - return false if !@address1.nil? && @address1.to_s.length > 60 - return false if !@locality.nil? && @locality.to_s.length > 13 - return false if !@country.nil? && @country.to_s.length > 2 - return false if !@postal_code.nil? && @postal_code.to_s.length > 14 - return false if !@administrative_area.nil? && @administrative_area.to_s.length > 3 - 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 - - # Custom attribute writer method with validation - # @param [Object] alternate_name Value to be assigned - def alternate_name=(alternate_name) - if !alternate_name.nil? && alternate_name.to_s.length > 13 - fail ArgumentError, 'invalid value for "alternate_name", the character length must be smaller than or equal to 13.' - end - - @alternate_name = alternate_name - end - - # Custom attribute writer method with validation - # @param [Object] contact Value to be assigned - def contact=(contact) - if !contact.nil? && contact.to_s.length > 14 - fail ArgumentError, 'invalid value for "contact", the character length must be smaller than or equal to 14.' - end - - @contact = contact - 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] locality Value to be assigned - def locality=(locality) - if !locality.nil? && locality.to_s.length > 13 - fail ArgumentError, 'invalid value for "locality", the character length must be smaller than or equal to 13.' - end - - @locality = locality - 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] postal_code Value to be assigned - def postal_code=(postal_code) - if !postal_code.nil? && postal_code.to_s.length > 14 - fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 14.' - end - - @postal_code = postal_code - 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 > 3 - fail ArgumentError, 'invalid value for "administrative_area", the character length must be smaller than or equal to 3.' - end - - @administrative_area = administrative_area - end - - # 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 && - alternate_name == o.alternate_name && - contact == o.contact && - address1 == o.address1 && - locality == o.locality && - country == o.country && - postal_code == o.postal_code && - administrative_area == o.administrative_area - end - - # @see the `==` method - # @param [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, alternate_name, contact, address1, locality, country, postal_code, administrative_area].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payments_order_information.rb b/lib/cyberSource_client/models/v2payments_order_information.rb deleted file mode 100644 index cc799b13..00000000 --- a/lib/cyberSource_client/models/v2payments_order_information.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsOrderInformation - attr_accessor :amount_details - - attr_accessor :bill_to - - attr_accessor :ship_to - - attr_accessor :line_items - - attr_accessor :invoice_details - - attr_accessor :shipping_details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'amount_details' => :'amountDetails', - :'bill_to' => :'billTo', - :'ship_to' => :'shipTo', - :'line_items' => :'lineItems', - :'invoice_details' => :'invoiceDetails', - :'shipping_details' => :'shippingDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'amount_details' => :'V2paymentsOrderInformationAmountDetails', - :'bill_to' => :'V2paymentsOrderInformationBillTo', - :'ship_to' => :'V2paymentsOrderInformationShipTo', - :'line_items' => :'Array', - :'invoice_details' => :'V2paymentsOrderInformationInvoiceDetails', - :'shipping_details' => :'V2paymentsOrderInformationShippingDetails' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'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?(:'invoiceDetails') - self.invoice_details = attributes[:'invoiceDetails'] - 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 && - amount_details == o.amount_details && - bill_to == o.bill_to && - ship_to == o.ship_to && - line_items == o.line_items && - invoice_details == o.invoice_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 - [amount_details, bill_to, ship_to, line_items, invoice_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_client/models/v2payments_order_information_amount_details.rb b/lib/cyberSource_client/models/v2payments_order_information_amount_details.rb deleted file mode 100644 index 7e7c8e61..00000000 --- a/lib/cyberSource_client/models/v2payments_order_information_amount_details.rb +++ /dev/null @@ -1,605 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsOrderInformationAmountDetails - # 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 discount amount applied to the order. For processor-specific information, see the order_discount_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 :discount_amount - - # Total charges for any import or export duties included in the order. For processor-specific information, see the duty_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 :duty_amount - - # 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 - - # Flag that indicates whether a national tax is included in the order total. Possible values: - **0**: national tax not included - **1**: national tax included For processor-specific information, see the national_tax_indicator 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 :national_tax_included - - # Flag that indicates how the merchant manages discounts. Possible values: - **0**: no invoice level discount included - **1**: tax calculated on the postdiscount invoice total - **2**: tax calculated on the prediscount invoice total For processor-specific information, see the order_discount_management_indicator 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_applied_after_discount - - # Flag that indicates how you calculate tax. Possible values: - **0**: net prices with tax calculated at line item level - **1**: net prices with tax calculated at invoice level - **2**: gross prices with tax provided at line item level - **3**: gross prices with tax provided at invoice level - **4**: no tax applies on the invoice for the transaction For processor-specific information, see the tax_management_indicator 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_applied_level - - # For tax amounts that can be categorized as one tax type. This field contains the tax type code that corresponds to the entry in the _lineItems.taxAmount_ field. Possible values: - **056**: sales tax (U.S only) - **TX~**: all taxes (Canada only) Note ~ = space. For processor-specific information, see the total_tax_type_code 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_type_code - - # Total freight or shipping and handling charges for the order. When you include this field in your request, you must also include the **totalAmount** field. For processor-specific information, see the freight_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 :freight_amount - - # Converted amount returned by the DCC service. For processor-specific information, see the foreign_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 :foreign_amount - - # Billing currency returned by the DCC service. For processor-specific information, see the foreign_currency field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :foreign_currency - - # Exchange rate returned by the DCC service. Includes a decimal point and a maximum of 4 decimal places. For processor-specific information, see the exchange_rate field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :exchange_rate - - # Time stamp for the exchange rate. This value is returned by the DCC service. Format: `YYYYMMDD~HH:MM` where ~ denotes a space. For processor-specific information, see the exchange_rate_timestamp field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :exchange_rate_time_stamp - - attr_accessor :surcharge - - # This is a multicurrency field. It contains the transaction amount (field 4), converted to the Currency used to bill the cardholder’s account. - attr_accessor :settlement_amount - - # This is a multicurrency-only field. It contains a 3-digit numeric code that identifies the currency used by the issuer to bill the cardholder's account. - attr_accessor :settlement_currency - - attr_accessor :amex_additional_amounts - - attr_accessor :tax_details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'total_amount' => :'totalAmount', - :'currency' => :'currency', - :'discount_amount' => :'discountAmount', - :'duty_amount' => :'dutyAmount', - :'tax_amount' => :'taxAmount', - :'national_tax_included' => :'nationalTaxIncluded', - :'tax_applied_after_discount' => :'taxAppliedAfterDiscount', - :'tax_applied_level' => :'taxAppliedLevel', - :'tax_type_code' => :'taxTypeCode', - :'freight_amount' => :'freightAmount', - :'foreign_amount' => :'foreignAmount', - :'foreign_currency' => :'foreignCurrency', - :'exchange_rate' => :'exchangeRate', - :'exchange_rate_time_stamp' => :'exchangeRateTimeStamp', - :'surcharge' => :'surcharge', - :'settlement_amount' => :'settlementAmount', - :'settlement_currency' => :'settlementCurrency', - :'amex_additional_amounts' => :'amexAdditionalAmounts', - :'tax_details' => :'taxDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'total_amount' => :'String', - :'currency' => :'String', - :'discount_amount' => :'String', - :'duty_amount' => :'String', - :'tax_amount' => :'String', - :'national_tax_included' => :'String', - :'tax_applied_after_discount' => :'String', - :'tax_applied_level' => :'String', - :'tax_type_code' => :'String', - :'freight_amount' => :'String', - :'foreign_amount' => :'String', - :'foreign_currency' => :'String', - :'exchange_rate' => :'String', - :'exchange_rate_time_stamp' => :'String', - :'surcharge' => :'V2paymentsOrderInformationAmountDetailsSurcharge', - :'settlement_amount' => :'String', - :'settlement_currency' => :'String', - :'amex_additional_amounts' => :'Array', - :'tax_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?(:'totalAmount') - self.total_amount = attributes[:'totalAmount'] - end - - if attributes.has_key?(:'currency') - self.currency = attributes[:'currency'] - end - - if attributes.has_key?(:'discountAmount') - self.discount_amount = attributes[:'discountAmount'] - end - - if attributes.has_key?(:'dutyAmount') - self.duty_amount = attributes[:'dutyAmount'] - end - - if attributes.has_key?(:'taxAmount') - self.tax_amount = attributes[:'taxAmount'] - end - - if attributes.has_key?(:'nationalTaxIncluded') - self.national_tax_included = attributes[:'nationalTaxIncluded'] - end - - if attributes.has_key?(:'taxAppliedAfterDiscount') - self.tax_applied_after_discount = attributes[:'taxAppliedAfterDiscount'] - end - - if attributes.has_key?(:'taxAppliedLevel') - self.tax_applied_level = attributes[:'taxAppliedLevel'] - end - - if attributes.has_key?(:'taxTypeCode') - self.tax_type_code = attributes[:'taxTypeCode'] - end - - if attributes.has_key?(:'freightAmount') - self.freight_amount = attributes[:'freightAmount'] - end - - if attributes.has_key?(:'foreignAmount') - self.foreign_amount = attributes[:'foreignAmount'] - end - - if attributes.has_key?(:'foreignCurrency') - self.foreign_currency = attributes[:'foreignCurrency'] - end - - if attributes.has_key?(:'exchangeRate') - self.exchange_rate = attributes[:'exchangeRate'] - end - - if attributes.has_key?(:'exchangeRateTimeStamp') - self.exchange_rate_time_stamp = attributes[:'exchangeRateTimeStamp'] - end - - if attributes.has_key?(:'surcharge') - self.surcharge = attributes[:'surcharge'] - end - - if attributes.has_key?(:'settlementAmount') - self.settlement_amount = attributes[:'settlementAmount'] - end - - if attributes.has_key?(:'settlementCurrency') - self.settlement_currency = attributes[:'settlementCurrency'] - end - - if attributes.has_key?(:'amexAdditionalAmounts') - if (value = attributes[:'amexAdditionalAmounts']).is_a?(Array) - self.amex_additional_amounts = value - end - end - - if attributes.has_key?(:'taxDetails') - if (value = attributes[:'taxDetails']).is_a?(Array) - self.tax_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 - 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 !@discount_amount.nil? && @discount_amount.to_s.length > 15 - invalid_properties.push('invalid value for "discount_amount", the character length must be smaller than or equal to 15.') - end - - if !@duty_amount.nil? && @duty_amount.to_s.length > 15 - invalid_properties.push('invalid value for "duty_amount", the character length must be smaller than or equal to 15.') - 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 !@national_tax_included.nil? && @national_tax_included.to_s.length > 1 - invalid_properties.push('invalid value for "national_tax_included", the character length must be smaller than or equal to 1.') - end - - if !@tax_applied_after_discount.nil? && @tax_applied_after_discount.to_s.length > 1 - invalid_properties.push('invalid value for "tax_applied_after_discount", the character length must be smaller than or equal to 1.') - end - - if !@tax_applied_level.nil? && @tax_applied_level.to_s.length > 1 - invalid_properties.push('invalid value for "tax_applied_level", the character length must be smaller than or equal to 1.') - end - - if !@tax_type_code.nil? && @tax_type_code.to_s.length > 3 - invalid_properties.push('invalid value for "tax_type_code", the character length must be smaller than or equal to 3.') - end - - if !@freight_amount.nil? && @freight_amount.to_s.length > 13 - invalid_properties.push('invalid value for "freight_amount", the character length must be smaller than or equal to 13.') - end - - if !@foreign_amount.nil? && @foreign_amount.to_s.length > 15 - invalid_properties.push('invalid value for "foreign_amount", the character length must be smaller than or equal to 15.') - end - - if !@foreign_currency.nil? && @foreign_currency.to_s.length > 5 - invalid_properties.push('invalid value for "foreign_currency", the character length must be smaller than or equal to 5.') - end - - if !@exchange_rate.nil? && @exchange_rate.to_s.length > 13 - invalid_properties.push('invalid value for "exchange_rate", the character length must be smaller than or equal to 13.') - end - - if !@exchange_rate_time_stamp.nil? && @exchange_rate_time_stamp.to_s.length > 14 - invalid_properties.push('invalid value for "exchange_rate_time_stamp", the character length must be smaller than or equal to 14.') - end - - if !@settlement_amount.nil? && @settlement_amount.to_s.length > 12 - invalid_properties.push('invalid value for "settlement_amount", the character length must be smaller than or equal to 12.') - end - - if !@settlement_currency.nil? && @settlement_currency.to_s.length > 3 - invalid_properties.push('invalid value for "settlement_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 > 19 - return false if !@currency.nil? && @currency.to_s.length > 3 - return false if !@discount_amount.nil? && @discount_amount.to_s.length > 15 - return false if !@duty_amount.nil? && @duty_amount.to_s.length > 15 - return false if !@tax_amount.nil? && @tax_amount.to_s.length > 12 - return false if !@national_tax_included.nil? && @national_tax_included.to_s.length > 1 - return false if !@tax_applied_after_discount.nil? && @tax_applied_after_discount.to_s.length > 1 - return false if !@tax_applied_level.nil? && @tax_applied_level.to_s.length > 1 - return false if !@tax_type_code.nil? && @tax_type_code.to_s.length > 3 - return false if !@freight_amount.nil? && @freight_amount.to_s.length > 13 - return false if !@foreign_amount.nil? && @foreign_amount.to_s.length > 15 - return false if !@foreign_currency.nil? && @foreign_currency.to_s.length > 5 - return false if !@exchange_rate.nil? && @exchange_rate.to_s.length > 13 - return false if !@exchange_rate_time_stamp.nil? && @exchange_rate_time_stamp.to_s.length > 14 - return false if !@settlement_amount.nil? && @settlement_amount.to_s.length > 12 - return false if !@settlement_currency.nil? && @settlement_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 > 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] discount_amount Value to be assigned - def discount_amount=(discount_amount) - if !discount_amount.nil? && discount_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "discount_amount", the character length must be smaller than or equal to 15.' - end - - @discount_amount = discount_amount - end - - # Custom attribute writer method with validation - # @param [Object] duty_amount Value to be assigned - def duty_amount=(duty_amount) - if !duty_amount.nil? && duty_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "duty_amount", the character length must be smaller than or equal to 15.' - end - - @duty_amount = duty_amount - 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] national_tax_included Value to be assigned - def national_tax_included=(national_tax_included) - if !national_tax_included.nil? && national_tax_included.to_s.length > 1 - fail ArgumentError, 'invalid value for "national_tax_included", the character length must be smaller than or equal to 1.' - end - - @national_tax_included = national_tax_included - end - - # Custom attribute writer method with validation - # @param [Object] tax_applied_after_discount Value to be assigned - def tax_applied_after_discount=(tax_applied_after_discount) - if !tax_applied_after_discount.nil? && tax_applied_after_discount.to_s.length > 1 - fail ArgumentError, 'invalid value for "tax_applied_after_discount", the character length must be smaller than or equal to 1.' - end - - @tax_applied_after_discount = tax_applied_after_discount - end - - # Custom attribute writer method with validation - # @param [Object] tax_applied_level Value to be assigned - def tax_applied_level=(tax_applied_level) - if !tax_applied_level.nil? && tax_applied_level.to_s.length > 1 - fail ArgumentError, 'invalid value for "tax_applied_level", the character length must be smaller than or equal to 1.' - end - - @tax_applied_level = tax_applied_level - end - - # Custom attribute writer method with validation - # @param [Object] tax_type_code Value to be assigned - def tax_type_code=(tax_type_code) - if !tax_type_code.nil? && tax_type_code.to_s.length > 3 - fail ArgumentError, 'invalid value for "tax_type_code", the character length must be smaller than or equal to 3.' - end - - @tax_type_code = tax_type_code - end - - # Custom attribute writer method with validation - # @param [Object] freight_amount Value to be assigned - def freight_amount=(freight_amount) - if !freight_amount.nil? && freight_amount.to_s.length > 13 - fail ArgumentError, 'invalid value for "freight_amount", the character length must be smaller than or equal to 13.' - end - - @freight_amount = freight_amount - end - - # Custom attribute writer method with validation - # @param [Object] foreign_amount Value to be assigned - def foreign_amount=(foreign_amount) - if !foreign_amount.nil? && foreign_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "foreign_amount", the character length must be smaller than or equal to 15.' - end - - @foreign_amount = foreign_amount - end - - # Custom attribute writer method with validation - # @param [Object] foreign_currency Value to be assigned - def foreign_currency=(foreign_currency) - if !foreign_currency.nil? && foreign_currency.to_s.length > 5 - fail ArgumentError, 'invalid value for "foreign_currency", the character length must be smaller than or equal to 5.' - end - - @foreign_currency = foreign_currency - end - - # Custom attribute writer method with validation - # @param [Object] exchange_rate Value to be assigned - def exchange_rate=(exchange_rate) - if !exchange_rate.nil? && exchange_rate.to_s.length > 13 - fail ArgumentError, 'invalid value for "exchange_rate", the character length must be smaller than or equal to 13.' - end - - @exchange_rate = exchange_rate - end - - # Custom attribute writer method with validation - # @param [Object] exchange_rate_time_stamp Value to be assigned - def exchange_rate_time_stamp=(exchange_rate_time_stamp) - if !exchange_rate_time_stamp.nil? && exchange_rate_time_stamp.to_s.length > 14 - fail ArgumentError, 'invalid value for "exchange_rate_time_stamp", the character length must be smaller than or equal to 14.' - end - - @exchange_rate_time_stamp = exchange_rate_time_stamp - end - - # Custom attribute writer method with validation - # @param [Object] settlement_amount Value to be assigned - def settlement_amount=(settlement_amount) - if !settlement_amount.nil? && settlement_amount.to_s.length > 12 - fail ArgumentError, 'invalid value for "settlement_amount", the character length must be smaller than or equal to 12.' - end - - @settlement_amount = settlement_amount - end - - # Custom attribute writer method with validation - # @param [Object] settlement_currency Value to be assigned - def settlement_currency=(settlement_currency) - if !settlement_currency.nil? && settlement_currency.to_s.length > 3 - fail ArgumentError, 'invalid value for "settlement_currency", the character length must be smaller than or equal to 3.' - end - - @settlement_currency = settlement_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 && - discount_amount == o.discount_amount && - duty_amount == o.duty_amount && - tax_amount == o.tax_amount && - national_tax_included == o.national_tax_included && - tax_applied_after_discount == o.tax_applied_after_discount && - tax_applied_level == o.tax_applied_level && - tax_type_code == o.tax_type_code && - freight_amount == o.freight_amount && - foreign_amount == o.foreign_amount && - foreign_currency == o.foreign_currency && - exchange_rate == o.exchange_rate && - exchange_rate_time_stamp == o.exchange_rate_time_stamp && - surcharge == o.surcharge && - settlement_amount == o.settlement_amount && - settlement_currency == o.settlement_currency && - amex_additional_amounts == o.amex_additional_amounts && - tax_details == o.tax_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 - [total_amount, currency, discount_amount, duty_amount, tax_amount, national_tax_included, tax_applied_after_discount, tax_applied_level, tax_type_code, freight_amount, foreign_amount, foreign_currency, exchange_rate, exchange_rate_time_stamp, surcharge, settlement_amount, settlement_currency, amex_additional_amounts, tax_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_client/models/v2payments_order_information_amount_details_amex_additional_amounts.rb b/lib/cyberSource_client/models/v2payments_order_information_amount_details_amex_additional_amounts.rb deleted file mode 100644 index 2665bb73..00000000 --- a/lib/cyberSource_client/models/v2payments_order_information_amount_details_amex_additional_amounts.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 V2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts - # Additional amount type. This field is supported only for **American Express Direct**. For processor-specific information, see the additional_amount_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 :code - - # Additional amount. This field is supported only for **American Express Direct**. For processor-specific information, see the additional_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 :amount - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'amount' => :'amount' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'code' => :'String', - :'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?(:'code') - self.code = attributes[:'code'] - end - - if attributes.has_key?(:'amount') - self.amount = attributes[:'amount'] - end - end - - # Show invalid properties 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 !@amount.nil? && @amount.to_s.length > 12 - invalid_properties.push('invalid value for "amount", 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 !@code.nil? && @code.to_s.length > 3 - return false if !@amount.nil? && @amount.to_s.length > 12 - 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] amount Value to be assigned - def amount=(amount) - if !amount.nil? && amount.to_s.length > 12 - fail ArgumentError, 'invalid value for "amount", the character length must be smaller than or equal to 12.' - end - - @amount = 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 && - code == o.code && - amount == o.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 - [code, 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_client/models/v2payments_order_information_amount_details_surcharge.rb b/lib/cyberSource_client/models/v2payments_order_information_amount_details_surcharge.rb deleted file mode 100644 index 61309ab0..00000000 --- a/lib/cyberSource_client/models/v2payments_order_information_amount_details_surcharge.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 V2paymentsOrderInformationAmountDetailsSurcharge - # The surcharge amount is included in the total transaction amount but is passed in a separate field to the issuer and acquirer for tracking. The issuer can provide information about the surcharge amount to the customer. - Applicable only for CTV for Payouts. - CTV (<= 08) For processor-specific information, see the surcharge_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 :amount - - # TBD - attr_accessor :description - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'amount' => :'amount', - :'description' => :'description' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'amount' => :'String', - :'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?(:'amount') - self.amount = attributes[:'amount'] - 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 - if !@amount.nil? && @amount.to_s.length > 15 - invalid_properties.push('invalid value for "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 !@amount.nil? && @amount.to_s.length > 15 - true - end - - # Custom attribute writer method with validation - # @param [Object] amount Value to be assigned - def amount=(amount) - if !amount.nil? && amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "amount", the character length must be smaller than or equal to 15.' - end - - @amount = 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 && - amount == o.amount && - 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 - [amount, 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_client/models/v2payments_order_information_amount_details_tax_details.rb b/lib/cyberSource_client/models/v2payments_order_information_amount_details_tax_details.rb deleted file mode 100644 index 4d9e23e4..00000000 --- a/lib/cyberSource_client/models/v2payments_order_information_amount_details_tax_details.rb +++ /dev/null @@ -1,328 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsOrderInformationAmountDetailsTaxDetails - # This is used to determine what type of tax related data should be inclued under _taxDetails_ object. - attr_accessor :type - - # Please see below table for related decription based on above _type_ field. | type | amount description | |-----------|--------------------| | alternate | Total amount of alternate tax for the order. | | local | Sales tax for the order. | | national | National tax for the order. | | vat | Total amount of VAT or other tax included in the order. | - attr_accessor :amount - - # Rate of VAT or other tax for the order. Example 0.040 (=4%) Valid range: 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated) - attr_accessor :rate - - # Type of tax being applied to the item. Possible values: Below values are used by **RBS WorldPay Atlanta**, **FDC Nashville Global**, **Litle** - 0000: unknown tax type - 0001: federal/national sales tax - 0002: state sales tax - 0003: city sales tax - 0004: local sales tax - 0005: municipal sales tax - 0006: other tax - 0010: value-added tax - 0011: goods and services tax - 0012: provincial sales tax - 0013: harmonized sales tax - 0014: Quebec sales tax (QST) - 0020: room tax - 0021: occupancy tax - 0022: energy tax - Blank: Tax not supported on line item. - attr_accessor :code - - # Your tax ID number to use for the alternate tax amount. Required if you set alternate tax amount to any value, including zero. You may send this field without sending alternate tax amount. - attr_accessor :tax_id - - # The tax is applied. Valid value is `true` or `false`. - attr_accessor :applied - - 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', - :'amount' => :'amount', - :'rate' => :'rate', - :'code' => :'code', - :'tax_id' => :'taxId', - :'applied' => :'applied' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'type' => :'String', - :'amount' => :'String', - :'rate' => :'String', - :'code' => :'String', - :'tax_id' => :'String', - :'applied' => :'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?(:'type') - self.type = attributes[:'type'] - end - - if attributes.has_key?(:'amount') - self.amount = attributes[:'amount'] - end - - if attributes.has_key?(:'rate') - self.rate = attributes[:'rate'] - end - - if attributes.has_key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.has_key?(:'taxId') - self.tax_id = attributes[:'taxId'] - end - - if attributes.has_key?(:'applied') - self.applied = attributes[:'applied'] - end - end - - # Show invalid properties 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 !@amount.nil? && @amount.to_s.length > 13 - invalid_properties.push('invalid value for "amount", the character length must be smaller than or equal to 13.') - end - - if !@rate.nil? && @rate.to_s.length > 6 - invalid_properties.push('invalid value for "rate", the character length must be smaller than or equal to 6.') - end - - if !@code.nil? && @code.to_s.length > 4 - invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 4.') - end - - if !@tax_id.nil? && @tax_id.to_s.length > 15 - invalid_properties.push('invalid value for "tax_id", 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? - type_validator = EnumAttributeValidator.new('String', ['alternate', 'local', 'national', 'vat']) - return false unless type_validator.valid?(@type) - return false if !@amount.nil? && @amount.to_s.length > 13 - return false if !@rate.nil? && @rate.to_s.length > 6 - return false if !@code.nil? && @code.to_s.length > 4 - return false if !@tax_id.nil? && @tax_id.to_s.length > 15 - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] type Object to be assigned - def type=(type) - validator = EnumAttributeValidator.new('String', ['alternate', 'local', 'national', 'vat']) - unless validator.valid?(type) - fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.' - end - @type = type - end - - # Custom attribute writer method with validation - # @param [Object] amount Value to be assigned - def amount=(amount) - if !amount.nil? && amount.to_s.length > 13 - fail ArgumentError, 'invalid value for "amount", the character length must be smaller than or equal to 13.' - end - - @amount = amount - end - - # Custom attribute writer method with validation - # @param [Object] rate Value to be assigned - def rate=(rate) - if !rate.nil? && rate.to_s.length > 6 - fail ArgumentError, 'invalid value for "rate", the character length must be smaller than or equal to 6.' - end - - @rate = rate - end - - # Custom attribute writer method with validation - # @param [Object] code Value to be assigned - def code=(code) - if !code.nil? && code.to_s.length > 4 - fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 4.' - end - - @code = code - end - - # Custom attribute writer method with validation - # @param [Object] tax_id Value to be assigned - def tax_id=(tax_id) - if !tax_id.nil? && tax_id.to_s.length > 15 - fail ArgumentError, 'invalid value for "tax_id", the character length must be smaller than or equal to 15.' - end - - @tax_id = tax_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 && - type == o.type && - amount == o.amount && - rate == o.rate && - code == o.code && - tax_id == o.tax_id && - applied == o.applied - end - - # @see the `==` method - # @param [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, amount, rate, code, tax_id, applied].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payments_order_information_bill_to.rb b/lib/cyberSource_client/models/v2payments_order_information_bill_to.rb deleted file mode 100644 index 0b7a0151..00000000 --- a/lib/cyberSource_client/models/v2payments_order_information_bill_to.rb +++ /dev/null @@ -1,618 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsOrderInformationBillTo - # 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 :middle_name - - # Customer’s name suffix. - attr_accessor :name_suffix - - # Title. - attr_accessor :title - - # 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 - - # 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 - - # 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 neighborhood, community, or region (a barrio in Brazil) within the city or municipality. This field is available only on **Cielo**. - attr_accessor :district - - # Building number in the street address. This field is supported only for: - Cielo transactions. - Redecard customer validation with CyberSource Latin American Processing. - attr_accessor :building_number - - # 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 - - # 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 - - # Customer's phone number type. For Payouts: This field may be sent only for FDC Compass. Possible Values - * day * home * night * work - attr_accessor :phone_type - - 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 - { - :'first_name' => :'firstName', - :'last_name' => :'lastName', - :'middle_name' => :'middleName', - :'name_suffix' => :'nameSuffix', - :'title' => :'title', - :'company' => :'company', - :'address1' => :'address1', - :'address2' => :'address2', - :'locality' => :'locality', - :'administrative_area' => :'administrativeArea', - :'postal_code' => :'postalCode', - :'country' => :'country', - :'district' => :'district', - :'building_number' => :'buildingNumber', - :'email' => :'email', - :'phone_number' => :'phoneNumber', - :'phone_type' => :'phoneType' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'first_name' => :'String', - :'last_name' => :'String', - :'middle_name' => :'String', - :'name_suffix' => :'String', - :'title' => :'String', - :'company' => :'String', - :'address1' => :'String', - :'address2' => :'String', - :'locality' => :'String', - :'administrative_area' => :'String', - :'postal_code' => :'String', - :'country' => :'String', - :'district' => :'String', - :'building_number' => :'String', - :'email' => :'String', - :'phone_number' => :'String', - :'phone_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?(:'firstName') - self.first_name = attributes[:'firstName'] - end - - if attributes.has_key?(:'lastName') - self.last_name = attributes[:'lastName'] - end - - if attributes.has_key?(:'middleName') - self.middle_name = attributes[:'middleName'] - end - - if attributes.has_key?(:'nameSuffix') - self.name_suffix = attributes[:'nameSuffix'] - end - - if attributes.has_key?(:'title') - self.title = attributes[:'title'] - end - - if attributes.has_key?(:'company') - self.company = attributes[:'company'] - 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?(:'country') - self.country = attributes[:'country'] - end - - if attributes.has_key?(:'district') - self.district = attributes[:'district'] - end - - if attributes.has_key?(:'buildingNumber') - self.building_number = attributes[:'buildingNumber'] - end - - 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?(:'phoneType') - self.phone_type = attributes[:'phoneType'] - end - end - - # Show invalid properties 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 !@middle_name.nil? && @middle_name.to_s.length > 60 - invalid_properties.push('invalid value for "middle_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 !@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 !@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 !@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 !@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 !@district.nil? && @district.to_s.length > 50 - invalid_properties.push('invalid value for "district", the character length must be smaller than or equal to 50.') - end - - if !@building_number.nil? && @building_number.to_s.length > 256 - invalid_properties.push('invalid value for "building_number", the character length must be smaller than or equal to 256.') - 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 !@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 !@middle_name.nil? && @middle_name.to_s.length > 60 - return false if !@name_suffix.nil? && @name_suffix.to_s.length > 60 - return false if !@title.nil? && @title.to_s.length > 60 - return false if !@company.nil? && @company.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 !@country.nil? && @country.to_s.length > 2 - return false if !@district.nil? && @district.to_s.length > 50 - return false if !@building_number.nil? && @building_number.to_s.length > 256 - return false if !@email.nil? && @email.to_s.length > 255 - return false if !@phone_number.nil? && @phone_number.to_s.length > 15 - phone_type_validator = EnumAttributeValidator.new('String', ['day', 'home', 'night', 'work']) - return false unless phone_type_validator.valid?(@phone_type) - 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] middle_name Value to be assigned - def middle_name=(middle_name) - if !middle_name.nil? && middle_name.to_s.length > 60 - fail ArgumentError, 'invalid value for "middle_name", the character length must be smaller than or equal to 60.' - end - - @middle_name = middle_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] 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] 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] 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] 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] district Value to be assigned - def district=(district) - if !district.nil? && district.to_s.length > 50 - fail ArgumentError, 'invalid value for "district", the character length must be smaller than or equal to 50.' - end - - @district = district - end - - # Custom attribute writer method with validation - # @param [Object] building_number Value to be assigned - def building_number=(building_number) - if !building_number.nil? && building_number.to_s.length > 256 - fail ArgumentError, 'invalid value for "building_number", the character length must be smaller than or equal to 256.' - end - - @building_number = building_number - 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] 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 - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] phone_type Object to be assigned - def phone_type=(phone_type) - validator = EnumAttributeValidator.new('String', ['day', 'home', 'night', 'work']) - unless validator.valid?(phone_type) - fail ArgumentError, 'invalid value for "phone_type", must be one of #{validator.allowable_values}.' - end - @phone_type = phone_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 && - first_name == o.first_name && - last_name == o.last_name && - middle_name == o.middle_name && - name_suffix == o.name_suffix && - title == o.title && - company == o.company && - address1 == o.address1 && - address2 == o.address2 && - locality == o.locality && - administrative_area == o.administrative_area && - postal_code == o.postal_code && - country == o.country && - district == o.district && - building_number == o.building_number && - email == o.email && - phone_number == o.phone_number && - phone_type == o.phone_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 - [first_name, last_name, middle_name, name_suffix, title, company, address1, address2, locality, administrative_area, postal_code, country, district, building_number, email, phone_number, phone_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_client/models/v2payments_order_information_invoice_details.rb b/lib/cyberSource_client/models/v2payments_order_information_invoice_details.rb deleted file mode 100644 index 0bbcb938..00000000 --- a/lib/cyberSource_client/models/v2payments_order_information_invoice_details.rb +++ /dev/null @@ -1,330 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsOrderInformationInvoiceDetails - # Value used by your customer to identify the order. This value is typically a purchase order number. CyberSource recommends that you do not populate the field with all zeros or nines. For processor-specific information, see the user_po 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 :purchase_order_number - - # Date the order was processed. `Format: YYYY-MM-DD`. For processor-specific information, see the purchaser_order_date 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 :purchase_order_date - - # The name of the individual or the company contacted for company authorized purchases. For processor-specific information, see the authorized_contact_name 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 :purchase_contact_name - - # Flag that indicates whether an order is taxable. This value must be true if the sum of all _lineItems[].taxAmount_ values > 0. If you do not include any _lineItems[].taxAmount_ values in your request, CyberSource does not include _invoiceDetails.taxable_ in the data it sends to the processor. For processor-specific information, see the tax_indicator 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 :taxable - - # VAT invoice number associated with the transaction. For processor-specific information, see the vat_invoice_ref_number 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 :vat_invoice_reference_number - - # International description code of the overall order’s goods or services or the Categorizes purchases for VAT reporting. Contact your acquirer for a list of codes. For processor-specific information, see the summary_commodity_code 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 :commodity_code - - # Identifier for the merchandise. Possible value: - 1000: Gift card This field is supported only for **American Express Direct**. - attr_accessor :merchandise_code - - attr_accessor :transaction_advice_addendum - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'purchase_order_number' => :'purchaseOrderNumber', - :'purchase_order_date' => :'purchaseOrderDate', - :'purchase_contact_name' => :'purchaseContactName', - :'taxable' => :'taxable', - :'vat_invoice_reference_number' => :'vatInvoiceReferenceNumber', - :'commodity_code' => :'commodityCode', - :'merchandise_code' => :'merchandiseCode', - :'transaction_advice_addendum' => :'transactionAdviceAddendum' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'purchase_order_number' => :'String', - :'purchase_order_date' => :'String', - :'purchase_contact_name' => :'String', - :'taxable' => :'BOOLEAN', - :'vat_invoice_reference_number' => :'String', - :'commodity_code' => :'String', - :'merchandise_code' => :'Float', - :'transaction_advice_addendum' => :'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?(:'purchaseOrderNumber') - self.purchase_order_number = attributes[:'purchaseOrderNumber'] - end - - if attributes.has_key?(:'purchaseOrderDate') - self.purchase_order_date = attributes[:'purchaseOrderDate'] - end - - if attributes.has_key?(:'purchaseContactName') - self.purchase_contact_name = attributes[:'purchaseContactName'] - end - - if attributes.has_key?(:'taxable') - self.taxable = attributes[:'taxable'] - end - - if attributes.has_key?(:'vatInvoiceReferenceNumber') - self.vat_invoice_reference_number = attributes[:'vatInvoiceReferenceNumber'] - end - - if attributes.has_key?(:'commodityCode') - self.commodity_code = attributes[:'commodityCode'] - end - - if attributes.has_key?(:'merchandiseCode') - self.merchandise_code = attributes[:'merchandiseCode'] - end - - if attributes.has_key?(:'transactionAdviceAddendum') - if (value = attributes[:'transactionAdviceAddendum']).is_a?(Array) - self.transaction_advice_addendum = 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 !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25 - invalid_properties.push('invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.') - end - - if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10 - invalid_properties.push('invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.') - end - - if !@purchase_contact_name.nil? && @purchase_contact_name.to_s.length > 36 - invalid_properties.push('invalid value for "purchase_contact_name", the character length must be smaller than or equal to 36.') - end - - if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15 - invalid_properties.push('invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.') - end - - if !@commodity_code.nil? && @commodity_code.to_s.length > 4 - invalid_properties.push('invalid value for "commodity_code", 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 !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25 - return false if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10 - return false if !@purchase_contact_name.nil? && @purchase_contact_name.to_s.length > 36 - return false if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15 - return false if !@commodity_code.nil? && @commodity_code.to_s.length > 4 - true - end - - # Custom attribute writer method with validation - # @param [Object] purchase_order_number Value to be assigned - def purchase_order_number=(purchase_order_number) - if !purchase_order_number.nil? && purchase_order_number.to_s.length > 25 - fail ArgumentError, 'invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.' - end - - @purchase_order_number = purchase_order_number - end - - # Custom attribute writer method with validation - # @param [Object] purchase_order_date Value to be assigned - def purchase_order_date=(purchase_order_date) - if !purchase_order_date.nil? && purchase_order_date.to_s.length > 10 - fail ArgumentError, 'invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.' - end - - @purchase_order_date = purchase_order_date - end - - # Custom attribute writer method with validation - # @param [Object] purchase_contact_name Value to be assigned - def purchase_contact_name=(purchase_contact_name) - if !purchase_contact_name.nil? && purchase_contact_name.to_s.length > 36 - fail ArgumentError, 'invalid value for "purchase_contact_name", the character length must be smaller than or equal to 36.' - end - - @purchase_contact_name = purchase_contact_name - end - - # Custom attribute writer method with validation - # @param [Object] vat_invoice_reference_number Value to be assigned - def vat_invoice_reference_number=(vat_invoice_reference_number) - if !vat_invoice_reference_number.nil? && vat_invoice_reference_number.to_s.length > 15 - fail ArgumentError, 'invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.' - end - - @vat_invoice_reference_number = vat_invoice_reference_number - end - - # Custom attribute writer method with validation - # @param [Object] commodity_code Value to be assigned - def commodity_code=(commodity_code) - if !commodity_code.nil? && commodity_code.to_s.length > 4 - fail ArgumentError, 'invalid value for "commodity_code", the character length must be smaller than or equal to 4.' - end - - @commodity_code = commodity_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 && - purchase_order_number == o.purchase_order_number && - purchase_order_date == o.purchase_order_date && - purchase_contact_name == o.purchase_contact_name && - taxable == o.taxable && - vat_invoice_reference_number == o.vat_invoice_reference_number && - commodity_code == o.commodity_code && - merchandise_code == o.merchandise_code && - transaction_advice_addendum == o.transaction_advice_addendum - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [purchase_order_number, purchase_order_date, purchase_contact_name, taxable, vat_invoice_reference_number, commodity_code, merchandise_code, transaction_advice_addendum].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payments_order_information_invoice_details_transaction_advice_addendum.rb b/lib/cyberSource_client/models/v2payments_order_information_invoice_details_transaction_advice_addendum.rb deleted file mode 100644 index 9d7b73a6..00000000 --- a/lib/cyberSource_client/models/v2payments_order_information_invoice_details_transaction_advice_addendum.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 V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum - # Four Transaction Advice Addendum (TAA) fields. These fields are used to display descriptive information about a transaction on the customer’s American Express card statement. When you send TAA fields, start with amexdata_taa1, then ...taa2, and so on. Skipping a TAA field causes subsequent TAA fields to be ignored. To use these fields, contact CyberSource Customer Support to have your account enabled for this feature. - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'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?(:'data') - self.data = attributes[:'data'] - end - end - - # Show invalid properties 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 !@data.nil? && @data.to_s.length > 40 - invalid_properties.push('invalid value for "data", 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 !@data.nil? && @data.to_s.length > 40 - true - end - - # Custom attribute writer method with validation - # @param [Object] data Value to be assigned - def data=(data) - if !data.nil? && data.to_s.length > 40 - fail ArgumentError, 'invalid value for "data", the character length must be smaller than or equal to 40.' - end - - @data = 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 && - data == o.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 - [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_client/models/v2payments_order_information_line_items.rb b/lib/cyberSource_client/models/v2payments_order_information_line_items.rb deleted file mode 100644 index 6cfbd0d7..00000000 --- a/lib/cyberSource_client/models/v2payments_order_information_line_items.rb +++ /dev/null @@ -1,649 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsOrderInformationLineItems - # 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 - - # 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 - - # Unit of measure, or unit of measure code, for the item. - attr_accessor :unit_of_measure - - # Total amount for the item. Normally calculated as the unit price x quantity. - attr_accessor :total_amount - - # 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 - - # Tax rate applied to the item. See \"Numbered Elements,\" page 14. Visa: Valid range is 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated). Mastercard: Valid range is 0.00001 to 0.99999 (0.001% to 99.999%). - attr_accessor :tax_rate - - # Flag to indicate how you handle discount at the line item level. - 0: no line level discount provided - 1: tax was calculated on the post-discount line item total - 2: tax was calculated on the pre-discount line item total `Note` Visa will inset 0 (zero) if an invalid value is included in this field. This field relates to the value in the _lineItems[].discountAmount_ field. - attr_accessor :tax_applied_after_discount - - # Flag to indicate whether tax is exempted or not included. - 0: tax not included - 1: tax included - 2: transaction is not subject to tax - attr_accessor :tax_status_indicator - - # Type of tax being applied to the item. Possible values: Below values are used by **RBS WorldPay Atlanta**, **FDC Nashville Global**, **Litle** - 0000: unknown tax type - 0001: federal/national sales tax - 0002: state sales tax - 0003: city sales tax - 0004: local sales tax - 0005: municipal sales tax - 0006: other tax - 0010: value-added tax - 0011: goods and services tax - 0012: provincial sales tax - 0013: harmonized sales tax - 0014: Quebec sales tax (QST) - 0020: room tax - 0021: occupancy tax - 0022: energy tax - Blank: Tax not supported on line item. - attr_accessor :tax_type_code - - # Flag that indicates whether the tax amount is included in the Line Item Total. - attr_accessor :amount_includes_tax - - # Flag to indicate whether the purchase is categorized as goods or services. Possible values: - 00: goods - 01: services - attr_accessor :type_of_supply - - # Commodity code or International description code used to classify the item. Contact your acquirer for a list of codes. - attr_accessor :commodity_code - - # Discount applied to the item. - attr_accessor :discount_amount - - # Flag that indicates whether the amount is discounted. If you do not provide a value but you set Discount Amount to a value greater than zero, then CyberSource sets this field to **true**. - attr_accessor :discount_applied - - # Rate the item is discounted. Maximum of 2 decimal places. Example 5.25 (=5.25%) - attr_accessor :discount_rate - - # Field to support an invoice number for a transaction. You must specify the number of line items that will include an invoice number. By default, the first line item will include an invoice number field. The invoice number field can be included for up to 10 line items. - attr_accessor :invoice_number - - attr_accessor :tax_details - - # TODO - 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', - :'quantity' => :'quantity', - :'unit_price' => :'unitPrice', - :'unit_of_measure' => :'unitOfMeasure', - :'total_amount' => :'totalAmount', - :'tax_amount' => :'taxAmount', - :'tax_rate' => :'taxRate', - :'tax_applied_after_discount' => :'taxAppliedAfterDiscount', - :'tax_status_indicator' => :'taxStatusIndicator', - :'tax_type_code' => :'taxTypeCode', - :'amount_includes_tax' => :'amountIncludesTax', - :'type_of_supply' => :'typeOfSupply', - :'commodity_code' => :'commodityCode', - :'discount_amount' => :'discountAmount', - :'discount_applied' => :'discountApplied', - :'discount_rate' => :'discountRate', - :'invoice_number' => :'invoiceNumber', - :'tax_details' => :'taxDetails', - :'fulfillment_type' => :'fulfillmentType' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'product_code' => :'String', - :'product_name' => :'String', - :'product_sku' => :'String', - :'quantity' => :'Float', - :'unit_price' => :'String', - :'unit_of_measure' => :'String', - :'total_amount' => :'String', - :'tax_amount' => :'String', - :'tax_rate' => :'String', - :'tax_applied_after_discount' => :'String', - :'tax_status_indicator' => :'String', - :'tax_type_code' => :'String', - :'amount_includes_tax' => :'BOOLEAN', - :'type_of_supply' => :'String', - :'commodity_code' => :'String', - :'discount_amount' => :'String', - :'discount_applied' => :'BOOLEAN', - :'discount_rate' => :'String', - :'invoice_number' => :'String', - :'tax_details' => :'Array', - :'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?(:'quantity') - self.quantity = attributes[:'quantity'] - end - - if attributes.has_key?(:'unitPrice') - self.unit_price = attributes[:'unitPrice'] - end - - if attributes.has_key?(:'unitOfMeasure') - self.unit_of_measure = attributes[:'unitOfMeasure'] - end - - if attributes.has_key?(:'totalAmount') - self.total_amount = attributes[:'totalAmount'] - end - - if attributes.has_key?(:'taxAmount') - self.tax_amount = attributes[:'taxAmount'] - end - - if attributes.has_key?(:'taxRate') - self.tax_rate = attributes[:'taxRate'] - end - - if attributes.has_key?(:'taxAppliedAfterDiscount') - self.tax_applied_after_discount = attributes[:'taxAppliedAfterDiscount'] - end - - if attributes.has_key?(:'taxStatusIndicator') - self.tax_status_indicator = attributes[:'taxStatusIndicator'] - end - - if attributes.has_key?(:'taxTypeCode') - self.tax_type_code = attributes[:'taxTypeCode'] - end - - if attributes.has_key?(:'amountIncludesTax') - self.amount_includes_tax = attributes[:'amountIncludesTax'] - end - - if attributes.has_key?(:'typeOfSupply') - self.type_of_supply = attributes[:'typeOfSupply'] - end - - if attributes.has_key?(:'commodityCode') - self.commodity_code = attributes[:'commodityCode'] - end - - if attributes.has_key?(:'discountAmount') - self.discount_amount = attributes[:'discountAmount'] - end - - if attributes.has_key?(:'discountApplied') - self.discount_applied = attributes[:'discountApplied'] - end - - if attributes.has_key?(:'discountRate') - self.discount_rate = attributes[:'discountRate'] - end - - if attributes.has_key?(:'invoiceNumber') - self.invoice_number = attributes[:'invoiceNumber'] - end - - if attributes.has_key?(:'taxDetails') - if (value = attributes[:'taxDetails']).is_a?(Array) - self.tax_details = value - end - 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 !@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 - - if !@unit_of_measure.nil? && @unit_of_measure.to_s.length > 12 - invalid_properties.push('invalid value for "unit_of_measure", the character length must be smaller than or equal to 12.') - end - - if !@total_amount.nil? && @total_amount.to_s.length > 13 - invalid_properties.push('invalid value for "total_amount", the character length must be smaller than or equal to 13.') - 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 !@tax_rate.nil? && @tax_rate.to_s.length > 7 - invalid_properties.push('invalid value for "tax_rate", the character length must be smaller than or equal to 7.') - end - - if !@tax_applied_after_discount.nil? && @tax_applied_after_discount.to_s.length > 1 - invalid_properties.push('invalid value for "tax_applied_after_discount", the character length must be smaller than or equal to 1.') - end - - if !@tax_status_indicator.nil? && @tax_status_indicator.to_s.length > 1 - invalid_properties.push('invalid value for "tax_status_indicator", the character length must be smaller than or equal to 1.') - end - - if !@tax_type_code.nil? && @tax_type_code.to_s.length > 4 - invalid_properties.push('invalid value for "tax_type_code", the character length must be smaller than or equal to 4.') - end - - if !@type_of_supply.nil? && @type_of_supply.to_s.length > 2 - invalid_properties.push('invalid value for "type_of_supply", the character length must be smaller than or equal to 2.') - end - - if !@commodity_code.nil? && @commodity_code.to_s.length > 15 - invalid_properties.push('invalid value for "commodity_code", the character length must be smaller than or equal to 15.') - end - - if !@discount_amount.nil? && @discount_amount.to_s.length > 13 - invalid_properties.push('invalid value for "discount_amount", the character length must be smaller than or equal to 13.') - end - - if !@discount_rate.nil? && @discount_rate.to_s.length > 6 - invalid_properties.push('invalid value for "discount_rate", the character length must be smaller than or equal to 6.') - end - - if !@invoice_number.nil? && @invoice_number.to_s.length > 23 - invalid_properties.push('invalid value for "invoice_number", 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 !@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 !@quantity.nil? && @quantity > 9999999999 - return false if !@quantity.nil? && @quantity < 1 - return false if !@unit_price.nil? && @unit_price.to_s.length > 15 - return false if !@unit_of_measure.nil? && @unit_of_measure.to_s.length > 12 - return false if !@total_amount.nil? && @total_amount.to_s.length > 13 - return false if !@tax_amount.nil? && @tax_amount.to_s.length > 15 - return false if !@tax_rate.nil? && @tax_rate.to_s.length > 7 - return false if !@tax_applied_after_discount.nil? && @tax_applied_after_discount.to_s.length > 1 - return false if !@tax_status_indicator.nil? && @tax_status_indicator.to_s.length > 1 - return false if !@tax_type_code.nil? && @tax_type_code.to_s.length > 4 - return false if !@type_of_supply.nil? && @type_of_supply.to_s.length > 2 - return false if !@commodity_code.nil? && @commodity_code.to_s.length > 15 - return false if !@discount_amount.nil? && @discount_amount.to_s.length > 13 - return false if !@discount_rate.nil? && @discount_rate.to_s.length > 6 - return false if !@invoice_number.nil? && @invoice_number.to_s.length > 23 - 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] 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 - - # Custom attribute writer method with validation - # @param [Object] unit_of_measure Value to be assigned - def unit_of_measure=(unit_of_measure) - if !unit_of_measure.nil? && unit_of_measure.to_s.length > 12 - fail ArgumentError, 'invalid value for "unit_of_measure", the character length must be smaller than or equal to 12.' - end - - @unit_of_measure = unit_of_measure - 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 > 13 - fail ArgumentError, 'invalid value for "total_amount", the character length must be smaller than or equal to 13.' - end - - @total_amount = total_amount - 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] tax_rate Value to be assigned - def tax_rate=(tax_rate) - if !tax_rate.nil? && tax_rate.to_s.length > 7 - fail ArgumentError, 'invalid value for "tax_rate", the character length must be smaller than or equal to 7.' - end - - @tax_rate = tax_rate - end - - # Custom attribute writer method with validation - # @param [Object] tax_applied_after_discount Value to be assigned - def tax_applied_after_discount=(tax_applied_after_discount) - if !tax_applied_after_discount.nil? && tax_applied_after_discount.to_s.length > 1 - fail ArgumentError, 'invalid value for "tax_applied_after_discount", the character length must be smaller than or equal to 1.' - end - - @tax_applied_after_discount = tax_applied_after_discount - end - - # Custom attribute writer method with validation - # @param [Object] tax_status_indicator Value to be assigned - def tax_status_indicator=(tax_status_indicator) - if !tax_status_indicator.nil? && tax_status_indicator.to_s.length > 1 - fail ArgumentError, 'invalid value for "tax_status_indicator", the character length must be smaller than or equal to 1.' - end - - @tax_status_indicator = tax_status_indicator - end - - # Custom attribute writer method with validation - # @param [Object] tax_type_code Value to be assigned - def tax_type_code=(tax_type_code) - if !tax_type_code.nil? && tax_type_code.to_s.length > 4 - fail ArgumentError, 'invalid value for "tax_type_code", the character length must be smaller than or equal to 4.' - end - - @tax_type_code = tax_type_code - end - - # Custom attribute writer method with validation - # @param [Object] type_of_supply Value to be assigned - def type_of_supply=(type_of_supply) - if !type_of_supply.nil? && type_of_supply.to_s.length > 2 - fail ArgumentError, 'invalid value for "type_of_supply", the character length must be smaller than or equal to 2.' - end - - @type_of_supply = type_of_supply - end - - # Custom attribute writer method with validation - # @param [Object] commodity_code Value to be assigned - def commodity_code=(commodity_code) - if !commodity_code.nil? && commodity_code.to_s.length > 15 - fail ArgumentError, 'invalid value for "commodity_code", the character length must be smaller than or equal to 15.' - end - - @commodity_code = commodity_code - end - - # Custom attribute writer method with validation - # @param [Object] discount_amount Value to be assigned - def discount_amount=(discount_amount) - if !discount_amount.nil? && discount_amount.to_s.length > 13 - fail ArgumentError, 'invalid value for "discount_amount", the character length must be smaller than or equal to 13.' - end - - @discount_amount = discount_amount - end - - # Custom attribute writer method with validation - # @param [Object] discount_rate Value to be assigned - def discount_rate=(discount_rate) - if !discount_rate.nil? && discount_rate.to_s.length > 6 - fail ArgumentError, 'invalid value for "discount_rate", the character length must be smaller than or equal to 6.' - end - - @discount_rate = discount_rate - end - - # Custom attribute writer method with validation - # @param [Object] invoice_number Value to be assigned - def invoice_number=(invoice_number) - if !invoice_number.nil? && invoice_number.to_s.length > 23 - fail ArgumentError, 'invalid value for "invoice_number", the character length must be smaller than or equal to 23.' - end - - @invoice_number = invoice_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 && - product_code == o.product_code && - product_name == o.product_name && - product_sku == o.product_sku && - quantity == o.quantity && - unit_price == o.unit_price && - unit_of_measure == o.unit_of_measure && - total_amount == o.total_amount && - tax_amount == o.tax_amount && - tax_rate == o.tax_rate && - tax_applied_after_discount == o.tax_applied_after_discount && - tax_status_indicator == o.tax_status_indicator && - tax_type_code == o.tax_type_code && - amount_includes_tax == o.amount_includes_tax && - type_of_supply == o.type_of_supply && - commodity_code == o.commodity_code && - discount_amount == o.discount_amount && - discount_applied == o.discount_applied && - discount_rate == o.discount_rate && - invoice_number == o.invoice_number && - tax_details == o.tax_details && - 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, quantity, unit_price, unit_of_measure, total_amount, tax_amount, tax_rate, tax_applied_after_discount, tax_status_indicator, tax_type_code, amount_includes_tax, type_of_supply, commodity_code, discount_amount, discount_applied, discount_rate, invoice_number, tax_details, 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_client/models/v2payments_order_information_ship_to.rb b/lib/cyberSource_client/models/v2payments_order_information_ship_to.rb deleted file mode 100644 index 44369850..00000000 --- a/lib/cyberSource_client/models/v2payments_order_information_ship_to.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 V2paymentsOrderInformationShipTo - # 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 - - # Country of the shipping address. Use the two character ISO Standard Country Codes. - attr_accessor :country - - # Neighborhood, community, or region within a city or municipality. - attr_accessor :district - - # Building number in the street address. For example, the building number is 187 in the following address: Rua da Quitanda 187 - attr_accessor :building_number - - # Phone number for the shipping address. - attr_accessor :phone_number - - # 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 - - # 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', - :'country' => :'country', - :'district' => :'district', - :'building_number' => :'buildingNumber', - :'phone_number' => :'phoneNumber', - :'company' => :'company' - } - 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', - :'country' => :'String', - :'district' => :'String', - :'building_number' => :'String', - :'phone_number' => :'String', - :'company' => :'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?(:'country') - self.country = attributes[:'country'] - end - - if attributes.has_key?(:'district') - self.district = attributes[:'district'] - end - - if attributes.has_key?(:'buildingNumber') - self.building_number = attributes[:'buildingNumber'] - end - - if attributes.has_key?(:'phoneNumber') - self.phone_number = attributes[:'phoneNumber'] - end - - if attributes.has_key?(:'company') - self.company = attributes[:'company'] - end - end - - # Show invalid properties 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 !@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 !@district.nil? && @district.to_s.length > 50 - invalid_properties.push('invalid value for "district", the character length must be smaller than or equal to 50.') - end - - if !@building_number.nil? && @building_number.to_s.length > 15 - invalid_properties.push('invalid value for "building_number", the character length must be smaller than or equal to 15.') - 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 - - 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 - - invalid_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 !@country.nil? && @country.to_s.length > 2 - return false if !@district.nil? && @district.to_s.length > 50 - return false if !@building_number.nil? && @building_number.to_s.length > 15 - return false if !@phone_number.nil? && @phone_number.to_s.length > 15 - return false if !@company.nil? && @company.to_s.length > 60 - 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] 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] district Value to be assigned - def district=(district) - if !district.nil? && district.to_s.length > 50 - fail ArgumentError, 'invalid value for "district", the character length must be smaller than or equal to 50.' - end - - @district = district - end - - # Custom attribute writer method with validation - # @param [Object] building_number Value to be assigned - def building_number=(building_number) - if !building_number.nil? && building_number.to_s.length > 15 - fail ArgumentError, 'invalid value for "building_number", the character length must be smaller than or equal to 15.' - end - - @building_number = building_number - 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 - - # 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 - - # 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 && - country == o.country && - district == o.district && - building_number == o.building_number && - phone_number == o.phone_number && - company == o.company - end - - # @see the `==` method - # @param [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, country, district, building_number, phone_number, company].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payments_order_information_shipping_details.rb b/lib/cyberSource_client/models/v2payments_order_information_shipping_details.rb deleted file mode 100644 index b244c7fa..00000000 --- a/lib/cyberSource_client/models/v2payments_order_information_shipping_details.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 V2paymentsOrderInformationShippingDetails - # TBD - 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 - - # Postal code for the address from which the goods are shipped, which is used to establish nexus. The default is the postal code associated with your CyberSource account. 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 This field is frequently used for Level II and Level III transactions. - attr_accessor :ship_from_postal_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'gift_wrap' => :'giftWrap', - :'shipping_method' => :'shippingMethod', - :'ship_from_postal_code' => :'shipFromPostalCode' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'gift_wrap' => :'BOOLEAN', - :'shipping_method' => :'String', - :'ship_from_postal_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?(:'giftWrap') - self.gift_wrap = attributes[:'giftWrap'] - end - - if attributes.has_key?(:'shippingMethod') - self.shipping_method = attributes[:'shippingMethod'] - end - - if attributes.has_key?(:'shipFromPostalCode') - self.ship_from_postal_code = attributes[:'shipFromPostalCode'] - end - end - - # Show invalid properties 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 - - if !@ship_from_postal_code.nil? && @ship_from_postal_code.to_s.length > 10 - invalid_properties.push('invalid value for "ship_from_postal_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 !@shipping_method.nil? && @shipping_method.to_s.length > 10 - return false if !@ship_from_postal_code.nil? && @ship_from_postal_code.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 - - # Custom attribute writer method with validation - # @param [Object] ship_from_postal_code Value to be assigned - def ship_from_postal_code=(ship_from_postal_code) - if !ship_from_postal_code.nil? && ship_from_postal_code.to_s.length > 10 - fail ArgumentError, 'invalid value for "ship_from_postal_code", the character length must be smaller than or equal to 10.' - end - - @ship_from_postal_code = ship_from_postal_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 && - gift_wrap == o.gift_wrap && - shipping_method == o.shipping_method && - ship_from_postal_code == o.ship_from_postal_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 - [gift_wrap, shipping_method, ship_from_postal_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_client/models/v2payments_payment_information.rb b/lib/cyberSource_client/models/v2payments_payment_information.rb deleted file mode 100644 index b2a01978..00000000 --- a/lib/cyberSource_client/models/v2payments_payment_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 V2paymentsPaymentInformation - attr_accessor :card - - attr_accessor :tokenized_card - - attr_accessor :fluid_data - - attr_accessor :customer - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'card' => :'card', - :'tokenized_card' => :'tokenizedCard', - :'fluid_data' => :'fluidData', - :'customer' => :'customer' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'card' => :'V2paymentsPaymentInformationCard', - :'tokenized_card' => :'V2paymentsPaymentInformationTokenizedCard', - :'fluid_data' => :'V2paymentsPaymentInformationFluidData', - :'customer' => :'V2paymentsPaymentInformationCustomer' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'fluidData') - self.fluid_data = attributes[:'fluidData'] - end - - if attributes.has_key?(:'customer') - self.customer = attributes[:'customer'] - end - end - - # Show invalid properties 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 && - fluid_data == o.fluid_data && - customer == o.customer - end - - # @see the `==` method - # @param [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, fluid_data, customer].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payments_payment_information_card.rb b/lib/cyberSource_client/models/v2payments_payment_information_card.rb deleted file mode 100644 index a1e49679..00000000 --- a/lib/cyberSource_client/models/v2payments_payment_information_card.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 V2paymentsPaymentInformationCard - # Customer’s credit card number. Encoded Account Numbers when processing encoded account numbers, use this field for the encoded account number. For processor-specific information, see the customer_cc_number field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :number - - # 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 - - # Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover - attr_accessor :type - - # 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 - - # Flag that specifies the type of account associated with the card. The cardholder provides this information during the payment process. This field is required in the following cases. - Debit transactions on Cielo and Comercio Latino. - Transactions with Brazilian-issued cards on CyberSource through VisaNet. - Applicable only for CTV. **Note** Combo cards in Brazil contain credit and debit functionality in a single card. Visa systems use a credit bank identification number (BIN) for this type of card. Using the BIN to determine whether a card is debit or credit can cause transactions with these cards to be processed incorrectly. CyberSource strongly recommends that you include this field for combo card transactions. Possible values include the following. - CHECKING: Checking account - CREDIT: Credit card account - SAVING: Saving account - LINE_OF_CREDIT: Line of credit - PREPAID: Prepaid card account - UNIVERSAL: Universal account - attr_accessor :source_account_type - - # Card Verification Number. - attr_accessor :security_code - - # Flag that indicates whether a CVN code was sent. Possible values: - 0 (default): CVN service not requested. CyberSource uses this default value when you do not include _securityCode_ in the request. - 1 (default): CVN service requested and supported. CyberSource uses this default value when you include _securityCode_ in the request. - 2: CVN on credit card is illegible. - 9: CVN was not imprinted on credit card. - attr_accessor :security_code_indicator - - # 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 - - # 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 - - # 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 - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'number' => :'number', - :'expiration_month' => :'expirationMonth', - :'expiration_year' => :'expirationYear', - :'type' => :'type', - :'use_as' => :'useAs', - :'source_account_type' => :'sourceAccountType', - :'security_code' => :'securityCode', - :'security_code_indicator' => :'securityCodeIndicator', - :'account_encoder_id' => :'accountEncoderId', - :'issue_number' => :'issueNumber', - :'start_month' => :'startMonth', - :'start_year' => :'startYear' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'number' => :'String', - :'expiration_month' => :'String', - :'expiration_year' => :'String', - :'type' => :'String', - :'use_as' => :'String', - :'source_account_type' => :'String', - :'security_code' => :'String', - :'security_code_indicator' => :'String', - :'account_encoder_id' => :'String', - :'issue_number' => :'String', - :'start_month' => :'String', - :'start_year' => :'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?(:'expirationMonth') - self.expiration_month = attributes[:'expirationMonth'] - end - - if attributes.has_key?(:'expirationYear') - self.expiration_year = attributes[:'expirationYear'] - end - - if attributes.has_key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.has_key?(:'useAs') - self.use_as = attributes[:'useAs'] - end - - if attributes.has_key?(:'sourceAccountType') - self.source_account_type = attributes[:'sourceAccountType'] - end - - if attributes.has_key?(:'securityCode') - self.security_code = attributes[:'securityCode'] - end - - if attributes.has_key?(:'securityCodeIndicator') - self.security_code_indicator = attributes[:'securityCodeIndicator'] - end - - if attributes.has_key?(:'accountEncoderId') - self.account_encoder_id = attributes[:'accountEncoderId'] - end - - if attributes.has_key?(:'issueNumber') - self.issue_number = attributes[:'issueNumber'] - end - - if attributes.has_key?(:'startMonth') - self.start_month = attributes[:'startMonth'] - end - - if attributes.has_key?(:'startYear') - self.start_year = attributes[:'startYear'] - end - end - - # Show invalid properties 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 !@number.nil? && @number.to_s.length > 20 - invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 20.') - 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 !@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 !@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 - - if !@source_account_type.nil? && @source_account_type.to_s.length > 2 - invalid_properties.push('invalid value for "source_account_type", the character length must be smaller than or equal to 2.') - end - - if !@security_code.nil? && @security_code.to_s.length > 4 - invalid_properties.push('invalid value for "security_code", the character length must be smaller than or equal to 4.') - end - - if !@security_code_indicator.nil? && @security_code_indicator.to_s.length > 1 - invalid_properties.push('invalid value for "security_code_indicator", the character length must be smaller than or equal to 1.') - 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 !@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 !@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 - - invalid_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 !@number.nil? && @number.to_s.length > 20 - 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 !@type.nil? && @type.to_s.length > 3 - return false if !@use_as.nil? && @use_as.to_s.length > 2 - return false if !@source_account_type.nil? && @source_account_type.to_s.length > 2 - return false if !@security_code.nil? && @security_code.to_s.length > 4 - return false if !@security_code_indicator.nil? && @security_code_indicator.to_s.length > 1 - return false if !@account_encoder_id.nil? && @account_encoder_id.to_s.length > 3 - return false if !@issue_number.nil? && @issue_number.to_s.length > 5 - return false if !@start_month.nil? && @start_month.to_s.length > 2 - return false if !@start_year.nil? && @start_year.to_s.length > 4 - true - end - - # Custom attribute writer method with validation - # @param [Object] number Value to be assigned - def number=(number) - if !number.nil? && number.to_s.length > 20 - fail ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 20.' - end - - @number = number - 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] 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] 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 - - # Custom attribute writer method with validation - # @param [Object] source_account_type Value to be assigned - def source_account_type=(source_account_type) - if !source_account_type.nil? && source_account_type.to_s.length > 2 - fail ArgumentError, 'invalid value for "source_account_type", the character length must be smaller than or equal to 2.' - end - - @source_account_type = source_account_type - end - - # Custom attribute writer method with validation - # @param [Object] security_code Value to be assigned - def security_code=(security_code) - if !security_code.nil? && security_code.to_s.length > 4 - fail ArgumentError, 'invalid value for "security_code", the character length must be smaller than or equal to 4.' - end - - @security_code = security_code - end - - # Custom attribute writer method with validation - # @param [Object] security_code_indicator Value to be assigned - def security_code_indicator=(security_code_indicator) - if !security_code_indicator.nil? && security_code_indicator.to_s.length > 1 - fail ArgumentError, 'invalid value for "security_code_indicator", the character length must be smaller than or equal to 1.' - end - - @security_code_indicator = security_code_indicator - 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] 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] 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 - - # 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 && - expiration_month == o.expiration_month && - expiration_year == o.expiration_year && - type == o.type && - use_as == o.use_as && - source_account_type == o.source_account_type && - security_code == o.security_code && - security_code_indicator == o.security_code_indicator && - account_encoder_id == o.account_encoder_id && - issue_number == o.issue_number && - start_month == o.start_month && - start_year == o.start_year - end - - # @see the `==` method - # @param [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, expiration_month, expiration_year, type, use_as, source_account_type, security_code, security_code_indicator, account_encoder_id, issue_number, start_month, start_year].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payments_payment_information_customer.rb b/lib/cyberSource_client/models/v2payments_payment_information_customer.rb deleted file mode 100644 index c542af67..00000000 --- a/lib/cyberSource_client/models/v2payments_payment_information_customer.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 V2paymentsPaymentInformationCustomer - # Unique identifier for the customer's card and billing information. - attr_accessor :customer_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'customer_id' => :'customerId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'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?(:'customerId') - self.customer_id = attributes[:'customerId'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - #anjana - # if !@customer_id.nil? && @customer_id.to_s.length > 26 - # invalid_properties.push('invalid value for "customer_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? - # anjana - # return false if !@customer_id.nil? && @customer_id.to_s.length > 26 - true - end - - # Custom attribute writer method with validation - # @param [Object] customer_id Value to be assigned - def customer_id=(customer_id) - # anjana - # if !customer_id.nil? && customer_id.to_s.length > 26 - # fail ArgumentError, 'invalid value for "customer_id", the character length must be smaller than or equal to 26.' - # end - - @customer_id = 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 && - customer_id == o.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 - [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_client/models/v2payments_payment_information_fluid_data.rb b/lib/cyberSource_client/models/v2payments_payment_information_fluid_data.rb deleted file mode 100644 index 1ccd42ee..00000000 --- a/lib/cyberSource_client/models/v2payments_payment_information_fluid_data.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 V2paymentsPaymentInformationFluidData - # TBD - attr_accessor :key - - # Format of the encrypted payment data. - attr_accessor :descriptor - - # The encrypted payment data value. If using Apple Pay or Samsung Pay, the values are: - Apple Pay: RklEPUNPTU1PTi5BUFBMRS5JTkFQUC5QQVlNRU5U - Samsung Pay: RklEPUNPTU1PTi5TQU1TVU5HLklOQVBQLlBBWU1FTlQ= - attr_accessor :value - - # Encoding method used to encrypt the payment data. Possible value: Base64 - attr_accessor :encoding - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'key' => :'key', - :'descriptor' => :'descriptor', - :'value' => :'value', - :'encoding' => :'encoding' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'key' => :'String', - :'descriptor' => :'String', - :'value' => :'String', - :'encoding' => :'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?(:'descriptor') - self.descriptor = attributes[:'descriptor'] - end - - if attributes.has_key?(:'value') - self.value = attributes[:'value'] - end - - if attributes.has_key?(:'encoding') - self.encoding = attributes[:'encoding'] - end - end - - # Show invalid properties 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 !@descriptor.nil? && @descriptor.to_s.length > 128 - invalid_properties.push('invalid value for "descriptor", the character length must be smaller than or equal to 128.') - end - - if !@value.nil? && @value.to_s.length > 3072 - invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 3072.') - end - - if !@encoding.nil? && @encoding.to_s.length > 6 - invalid_properties.push('invalid value for "encoding", the character length must be smaller than or equal to 6.') - 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 !@descriptor.nil? && @descriptor.to_s.length > 128 - return false if !@value.nil? && @value.to_s.length > 3072 - return false if !@encoding.nil? && @encoding.to_s.length > 6 - true - end - - # Custom attribute writer method with validation - # @param [Object] descriptor Value to be assigned - def descriptor=(descriptor) - if !descriptor.nil? && descriptor.to_s.length > 128 - fail ArgumentError, 'invalid value for "descriptor", the character length must be smaller than or equal to 128.' - end - - @descriptor = descriptor - end - - # Custom attribute writer method with validation - # @param [Object] value Value to be assigned - def value=(value) - if !value.nil? && value.to_s.length > 3072 - fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 3072.' - end - - @value = value - end - - # Custom attribute writer method with validation - # @param [Object] encoding Value to be assigned - def encoding=(encoding) - if !encoding.nil? && encoding.to_s.length > 6 - fail ArgumentError, 'invalid value for "encoding", the character length must be smaller than or equal to 6.' - end - - @encoding = encoding - end - - # 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 && - descriptor == o.descriptor && - value == o.value && - encoding == o.encoding - end - - # @see the `==` method - # @param [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, descriptor, value, encoding].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payments_payment_information_tokenized_card.rb b/lib/cyberSource_client/models/v2payments_payment_information_tokenized_card.rb deleted file mode 100644 index 7e884178..00000000 --- a/lib/cyberSource_client/models/v2payments_payment_information_tokenized_card.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 V2paymentsPaymentInformationTokenizedCard - # Customer’s payment network token value. - attr_accessor :number - - # 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 - - # Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover - attr_accessor :type - - # This field is used internally. - attr_accessor :cryptogram - - # 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 - - # Type of transaction that provided the token data. This value does not specify the token service provider; it specifies the entity that provided you with information about the token. Set the value for this field to 1. An application on the customer’s mobile device provided the token data. - attr_accessor :transaction_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 - - # Type of technology used in the device to store token data. Possible values: - 001: Secure Element (SE) Smart card or memory with restricted access and encryption to prevent data tampering. For storing payment credentials, a SE is tested against a set of requirements defined by the payment networks. `Note` This field is supported only for **FDC Compass**. - 002: Host Card Emulation (HCE) Emulation of a smart card by using software to create a virtual and exact representation of the card. Sensitive data is stored in a database that is hosted in the cloud. For storing payment credentials, a database must meet very stringent security requirements that exceed PCI DSS. `Note` This field is supported only for **FDC Compass**. - attr_accessor :storage_method - - # CVN. - attr_accessor :security_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'number' => :'number', - :'expiration_month' => :'expirationMonth', - :'expiration_year' => :'expirationYear', - :'type' => :'type', - :'cryptogram' => :'cryptogram', - :'requestor_id' => :'requestorId', - :'transaction_type' => :'transactionType', - :'assurance_level' => :'assuranceLevel', - :'storage_method' => :'storageMethod', - :'security_code' => :'securityCode' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'number' => :'String', - :'expiration_month' => :'String', - :'expiration_year' => :'String', - :'type' => :'String', - :'cryptogram' => :'String', - :'requestor_id' => :'String', - :'transaction_type' => :'String', - :'assurance_level' => :'String', - :'storage_method' => :'String', - :'security_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?(:'number') - self.number = attributes[:'number'] - 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?(:'type') - self.type = attributes[:'type'] - end - - if attributes.has_key?(:'cryptogram') - self.cryptogram = attributes[:'cryptogram'] - end - - if attributes.has_key?(:'requestorId') - self.requestor_id = attributes[:'requestorId'] - end - - if attributes.has_key?(:'transactionType') - self.transaction_type = attributes[:'transactionType'] - end - - if attributes.has_key?(:'assuranceLevel') - self.assurance_level = attributes[:'assuranceLevel'] - end - - if attributes.has_key?(:'storageMethod') - self.storage_method = attributes[:'storageMethod'] - end - - if attributes.has_key?(:'securityCode') - self.security_code = attributes[:'securityCode'] - end - end - - # Show invalid properties 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 !@number.nil? && @number.to_s.length > 20 - invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 20.') - 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 !@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 !@cryptogram.nil? && @cryptogram.to_s.length > 40 - invalid_properties.push('invalid value for "cryptogram", the character length must be smaller than or equal to 40.') - 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 - - if !@transaction_type.nil? && @transaction_type.to_s.length > 1 - invalid_properties.push('invalid value for "transaction_type", the character length must be smaller than or equal to 1.') - 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 !@storage_method.nil? && @storage_method.to_s.length > 3 - invalid_properties.push('invalid value for "storage_method", the character length must be smaller than or equal to 3.') - end - - if !@security_code.nil? && @security_code.to_s.length > 4 - invalid_properties.push('invalid value for "security_code", 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 !@number.nil? && @number.to_s.length > 20 - 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 !@type.nil? && @type.to_s.length > 3 - return false if !@cryptogram.nil? && @cryptogram.to_s.length > 40 - return false if !@requestor_id.nil? && @requestor_id.to_s.length > 11 - return false if !@transaction_type.nil? && @transaction_type.to_s.length > 1 - return false if !@assurance_level.nil? && @assurance_level.to_s.length > 2 - return false if !@storage_method.nil? && @storage_method.to_s.length > 3 - return false if !@security_code.nil? && @security_code.to_s.length > 4 - true - end - - # Custom attribute writer method with validation - # @param [Object] number Value to be assigned - def number=(number) - if !number.nil? && number.to_s.length > 20 - fail ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 20.' - end - - @number = number - 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] 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] cryptogram Value to be assigned - def cryptogram=(cryptogram) - if !cryptogram.nil? && cryptogram.to_s.length > 40 - fail ArgumentError, 'invalid value for "cryptogram", the character length must be smaller than or equal to 40.' - end - - @cryptogram = cryptogram - 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 - - # Custom attribute writer method with validation - # @param [Object] transaction_type Value to be assigned - def transaction_type=(transaction_type) - if !transaction_type.nil? && transaction_type.to_s.length > 1 - fail ArgumentError, 'invalid value for "transaction_type", the character length must be smaller than or equal to 1.' - end - - @transaction_type = transaction_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] storage_method Value to be assigned - def storage_method=(storage_method) - if !storage_method.nil? && storage_method.to_s.length > 3 - fail ArgumentError, 'invalid value for "storage_method", the character length must be smaller than or equal to 3.' - end - - @storage_method = storage_method - end - - # Custom attribute writer method with validation - # @param [Object] security_code Value to be assigned - def security_code=(security_code) - if !security_code.nil? && security_code.to_s.length > 4 - fail ArgumentError, 'invalid value for "security_code", the character length must be smaller than or equal to 4.' - end - - @security_code = security_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 && - number == o.number && - expiration_month == o.expiration_month && - expiration_year == o.expiration_year && - type == o.type && - cryptogram == o.cryptogram && - requestor_id == o.requestor_id && - transaction_type == o.transaction_type && - assurance_level == o.assurance_level && - storage_method == o.storage_method && - security_code == o.security_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 - [number, expiration_month, expiration_year, type, cryptogram, requestor_id, transaction_type, assurance_level, storage_method, security_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_client/models/v2payments_point_of_sale_information.rb b/lib/cyberSource_client/models/v2payments_point_of_sale_information.rb deleted file mode 100644 index 76421131..00000000 --- a/lib/cyberSource_client/models/v2payments_point_of_sale_information.rb +++ /dev/null @@ -1,440 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsPointOfSaleInformation - # 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 - - # TBD - attr_accessor :terminal_serial_number - - # Identifier for an alternate terminal at your retail location. You define the value for this field. This field is supported only for MasterCard transactions on FDC Nashville Global. Use the _terminalID_ field to identify the main terminal at your retail location. If your retail location has multiple terminals, use this _alternateTerminalID_ field to identify the terminal used for the transaction. This field is a pass-through, which means that CyberSource does not check the value or modify the value in any way before sending it to the processor. - attr_accessor :lane_number - - # Indicates whether the card is present at the time of the transaction. Possible values: - **true**: Card is present. - **false**: Card is not present. - attr_accessor :card_present - - # Type of cardholder-activated terminal. Possible values: - 1: Automated dispensing machine - 2: Self-service terminal - 3: Limited amount terminal - 4: In-flight commerce (IFC) terminal - 5: Radio frequency device - 6: Mobile acceptance terminal - 7: Electronic cash register - 8: E-commerce device at your location - 9: Terminal or cash register that uses a dialup connection to connect to the transaction processing network * Applicable only for CTV for Payouts. - attr_accessor :cat_level - - # 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 - - # A one-digit code that identifies the capability of terminal to capture PINs. This code does not necessarily mean that a PIN was entered or is included in this message. For Payouts: This field is applicable for CtV. - attr_accessor :pin_entry_capability - - # Operating environment. Possible values: - 0: No terminal used or unknown environment. - 1: On merchant premises, attended. - 2: On merchant premises, unattended, or cardholder terminal. Examples: oil, kiosks, self-checkout, home computer, mobile telephone, personal digital assistant (PDA). Cardholder terminal is supported only for MasterCard transactions on **CyberSource through VisaNet**. - 3: Off merchant premises, attended. Examples: portable POS devices at trade shows, at service calls, or in taxis. - 4: Off merchant premises, unattended, or cardholder terminal. Examples: vending machines, home computer, mobile telephone, PDA. Cardholder terminal is supported only for MasterCard transactions on **CyberSource through VisaNet**. - 5: On premises of cardholder, unattended. - 9: Unknown delivery mode. - S: Electronic delivery of product. Examples: music, software, or eTickets that are downloaded over the internet. - T: Physical delivery of product. Examples: music or software that is delivered by mail or by a courier. This field is supported only for **American Express Direct** and **CyberSource through VisaNet**. **CyberSource through VisaNet** For MasterCard transactions, the only valid values are 2 and 4. - attr_accessor :operating_environment - - 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 - - # Card’s track 1 and 2 data. For all processors except FDMS Nashville, this value consists of one of the following: - Track 1 data - Track 2 data - Data for both tracks 1 and 2 For FDMS Nashville, this value consists of one of the following: - Track 1 data - Data for both tracks 1 and 2 Example: %B4111111111111111^SMITH/JOHN ^1612101976110000868000000?;4111111111111111=16121019761186800000? - attr_accessor :track_data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'terminal_id' => :'terminalId', - :'terminal_serial_number' => :'terminalSerialNumber', - :'lane_number' => :'laneNumber', - :'card_present' => :'cardPresent', - :'cat_level' => :'catLevel', - :'entry_mode' => :'entryMode', - :'terminal_capability' => :'terminalCapability', - :'pin_entry_capability' => :'pinEntryCapability', - :'operating_environment' => :'operatingEnvironment', - :'emv' => :'emv', - :'amex_capn_data' => :'amexCapnData', - :'track_data' => :'trackData' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'terminal_id' => :'String', - :'terminal_serial_number' => :'String', - :'lane_number' => :'String', - :'card_present' => :'BOOLEAN', - :'cat_level' => :'Integer', - :'entry_mode' => :'String', - :'terminal_capability' => :'Integer', - :'pin_entry_capability' => :'Integer', - :'operating_environment' => :'String', - :'emv' => :'V2paymentsPointOfSaleInformationEmv', - :'amex_capn_data' => :'String', - :'track_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?(:'terminalId') - self.terminal_id = attributes[:'terminalId'] - end - - if attributes.has_key?(:'terminalSerialNumber') - self.terminal_serial_number = attributes[:'terminalSerialNumber'] - end - - if attributes.has_key?(:'laneNumber') - self.lane_number = attributes[:'laneNumber'] - end - - if attributes.has_key?(:'cardPresent') - self.card_present = attributes[:'cardPresent'] - end - - if attributes.has_key?(:'catLevel') - self.cat_level = attributes[:'catLevel'] - end - - if attributes.has_key?(:'entryMode') - self.entry_mode = attributes[:'entryMode'] - end - - if attributes.has_key?(:'terminalCapability') - self.terminal_capability = attributes[:'terminalCapability'] - end - - if attributes.has_key?(:'pinEntryCapability') - self.pin_entry_capability = attributes[:'pinEntryCapability'] - end - - if attributes.has_key?(:'operatingEnvironment') - self.operating_environment = attributes[:'operatingEnvironment'] - end - - if attributes.has_key?(:'emv') - self.emv = attributes[:'emv'] - end - - if attributes.has_key?(:'amexCapnData') - self.amex_capn_data = attributes[:'amexCapnData'] - end - - if attributes.has_key?(:'trackData') - self.track_data = attributes[:'trackData'] - end - end - - # Show invalid properties 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 - - if !@lane_number.nil? && @lane_number.to_s.length > 8 - invalid_properties.push('invalid value for "lane_number", the character length must be smaller than or equal to 8.') - end - - if !@cat_level.nil? && @cat_level > 9 - invalid_properties.push('invalid value for "cat_level", must be smaller than or equal to 9.') - end - - if !@cat_level.nil? && @cat_level < 1 - invalid_properties.push('invalid value for "cat_level", must be greater than or equal to 1.') - end - - 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 - - if !@pin_entry_capability.nil? && @pin_entry_capability > 1 - invalid_properties.push('invalid value for "pin_entry_capability", must be smaller than or equal to 1.') - end - - if !@pin_entry_capability.nil? && @pin_entry_capability < 1 - invalid_properties.push('invalid value for "pin_entry_capability", must be greater than or equal to 1.') - end - - if !@operating_environment.nil? && @operating_environment.to_s.length > 1 - invalid_properties.push('invalid value for "operating_environment", the character length must be smaller than or equal to 1.') - end - - 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 !@terminal_id.nil? && @terminal_id.to_s.length > 8 - return false if !@lane_number.nil? && @lane_number.to_s.length > 8 - return false if !@cat_level.nil? && @cat_level > 9 - return false if !@cat_level.nil? && @cat_level < 1 - 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 - return false if !@pin_entry_capability.nil? && @pin_entry_capability > 1 - return false if !@pin_entry_capability.nil? && @pin_entry_capability < 1 - return false if !@operating_environment.nil? && @operating_environment.to_s.length > 1 - return false if !@amex_capn_data.nil? && @amex_capn_data.to_s.length > 12 - 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 - - # Custom attribute writer method with validation - # @param [Object] lane_number Value to be assigned - def lane_number=(lane_number) - if !lane_number.nil? && lane_number.to_s.length > 8 - fail ArgumentError, 'invalid value for "lane_number", the character length must be smaller than or equal to 8.' - end - - @lane_number = lane_number - end - - # Custom attribute writer method with validation - # @param [Object] cat_level Value to be assigned - def cat_level=(cat_level) - if !cat_level.nil? && cat_level > 9 - fail ArgumentError, 'invalid value for "cat_level", must be smaller than or equal to 9.' - end - - if !cat_level.nil? && cat_level < 1 - fail ArgumentError, 'invalid value for "cat_level", must be greater than or equal to 1.' - end - - @cat_level = cat_level - 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 - - # Custom attribute writer method with validation - # @param [Object] pin_entry_capability Value to be assigned - def pin_entry_capability=(pin_entry_capability) - if !pin_entry_capability.nil? && pin_entry_capability > 1 - fail ArgumentError, 'invalid value for "pin_entry_capability", must be smaller than or equal to 1.' - end - - if !pin_entry_capability.nil? && pin_entry_capability < 1 - fail ArgumentError, 'invalid value for "pin_entry_capability", must be greater than or equal to 1.' - end - - @pin_entry_capability = pin_entry_capability - end - - # Custom attribute writer method with validation - # @param [Object] operating_environment Value to be assigned - def operating_environment=(operating_environment) - if !operating_environment.nil? && operating_environment.to_s.length > 1 - fail ArgumentError, 'invalid value for "operating_environment", the character length must be smaller than or equal to 1.' - end - - @operating_environment = operating_environment - 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 && - terminal_id == o.terminal_id && - terminal_serial_number == o.terminal_serial_number && - lane_number == o.lane_number && - card_present == o.card_present && - cat_level == o.cat_level && - entry_mode == o.entry_mode && - terminal_capability == o.terminal_capability && - pin_entry_capability == o.pin_entry_capability && - operating_environment == o.operating_environment && - emv == o.emv && - amex_capn_data == o.amex_capn_data && - track_data == o.track_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 - [terminal_id, terminal_serial_number, lane_number, card_present, cat_level, entry_mode, terminal_capability, pin_entry_capability, operating_environment, emv, amex_capn_data, track_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_client/models/v2payments_point_of_sale_information_emv.rb b/lib/cyberSource_client/models/v2payments_point_of_sale_information_emv.rb deleted file mode 100644 index dcfd25c4..00000000 --- a/lib/cyberSource_client/models/v2payments_point_of_sale_information_emv.rb +++ /dev/null @@ -1,256 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsPointOfSaleInformationEmv - # 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 - - # Method that was used to verify the cardholder's identity. Possible values: - **0**: No verification - **1**: Signature This field is supported only on **American Express Direct**. - attr_accessor :cardholder_verification_method - - # Number assigned to a specific card when two or more cards are associated with the same primary account number. This value enables issuers to distinguish among multiple cards that are linked to the same account. This value can also act as a tracking tool when reissuing cards. When this value is available, it is provided by the chip reader. When the chip reader does not provide this value, do not include this field in your request. - attr_accessor :card_sequence_number - - # Indicates whether a fallback method was used to enter credit card information into the POS terminal. When a technical problem prevents a successful exchange of information between a chip card and a chip-capable terminal: 1. Swipe the card or key the credit card information into the POS terminal. 2. Use the pos_entry_mode field to indicate whether the information was swiped or keyed. This field is supported only on **Chase Paymentech Solutions** and **GPN**. - attr_accessor :fallback - - # Reason for the EMV fallback transaction. An EMV fallback transaction occurs when an EMV transaction fails for one of these reasons: - Technical failure: the EMV terminal or EMV card cannot read and process chip data. - Empty candidate list failure: the EMV terminal does not have any applications in common with the EMV card. EMV terminals are coded to determine whether the terminal and EMV card have any applications in common. EMV terminals provide this information to you. Possible values: - **1**: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal either used information from a successful chip read or it was not a chip transaction. - **2**: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal was an EMV fallback transaction because the attempted chip read was unsuccessful. This field is supported only on **GPN**. - attr_accessor :fallback_condition - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'tags' => :'tags', - :'cardholder_verification_method' => :'cardholderVerificationMethod', - :'card_sequence_number' => :'cardSequenceNumber', - :'fallback' => :'fallback', - :'fallback_condition' => :'fallbackCondition' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'tags' => :'String', - :'cardholder_verification_method' => :'Float', - :'card_sequence_number' => :'String', - :'fallback' => :'BOOLEAN', - :'fallback_condition' => :'Float' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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 - - if attributes.has_key?(:'cardholderVerificationMethod') - self.cardholder_verification_method = attributes[:'cardholderVerificationMethod'] - end - - if attributes.has_key?(:'cardSequenceNumber') - self.card_sequence_number = attributes[:'cardSequenceNumber'] - end - - if attributes.has_key?(:'fallback') - self.fallback = attributes[:'fallback'] - else - self.fallback = false - end - - if attributes.has_key?(:'fallbackCondition') - self.fallback_condition = attributes[:'fallbackCondition'] - end - end - - # Show invalid properties 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 - - if !@card_sequence_number.nil? && @card_sequence_number.to_s.length > 3 - invalid_properties.push('invalid value for "card_sequence_number", 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 !@tags.nil? && @tags.to_s.length > 1998 - return false if !@card_sequence_number.nil? && @card_sequence_number.to_s.length > 3 - 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 - - # Custom attribute writer method with validation - # @param [Object] card_sequence_number Value to be assigned - def card_sequence_number=(card_sequence_number) - if !card_sequence_number.nil? && card_sequence_number.to_s.length > 3 - fail ArgumentError, 'invalid value for "card_sequence_number", the character length must be smaller than or equal to 3.' - end - - @card_sequence_number = card_sequence_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 && - tags == o.tags && - cardholder_verification_method == o.cardholder_verification_method && - card_sequence_number == o.card_sequence_number && - fallback == o.fallback && - fallback_condition == o.fallback_condition - end - - # @see the `==` method - # @param [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, cardholder_verification_method, card_sequence_number, fallback, fallback_condition].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payments_processing_information.rb b/lib/cyberSource_client/models/v2payments_processing_information.rb deleted file mode 100644 index 7ac629d7..00000000 --- a/lib/cyberSource_client/models/v2payments_processing_information.rb +++ /dev/null @@ -1,432 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsProcessingInformation - # Flag that specifies whether to also include capture service in the submitted request or not. - attr_accessor :capture - - # Value that identifies the processor/acquirer to use for the transaction. This value is supported only for **CyberSource through VisaNet**. - attr_accessor :processor_id - - # TBD - attr_accessor :business_application_id - - # 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 - - # 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 - - # Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). - attr_accessor :reconciliation_id - - # Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. - attr_accessor :link_id - - # Set this field to 3 to indicate that the request includes Level III data. - attr_accessor :purchase_level - - # Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. - attr_accessor :report_group - - # Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. - attr_accessor :visa_checkout_id - - attr_accessor :issuer - - attr_accessor :authorization_options - - attr_accessor :capture_options - - attr_accessor :recurring_options - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'capture' => :'capture', - :'processor_id' => :'processorId', - :'business_application_id' => :'businessApplicationId', - :'commerce_indicator' => :'commerceIndicator', - :'payment_solution' => :'paymentSolution', - :'reconciliation_id' => :'reconciliationId', - :'link_id' => :'linkId', - :'purchase_level' => :'purchaseLevel', - :'report_group' => :'reportGroup', - :'visa_checkout_id' => :'visaCheckoutId', - :'issuer' => :'issuer', - :'authorization_options' => :'authorizationOptions', - :'capture_options' => :'captureOptions', - :'recurring_options' => :'recurringOptions' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'capture' => :'BOOLEAN', - :'processor_id' => :'String', - :'business_application_id' => :'String', - :'commerce_indicator' => :'String', - :'payment_solution' => :'String', - :'reconciliation_id' => :'String', - :'link_id' => :'String', - :'purchase_level' => :'String', - :'report_group' => :'String', - :'visa_checkout_id' => :'String', - :'issuer' => :'V2paymentsProcessingInformationIssuer', - :'authorization_options' => :'V2paymentsProcessingInformationAuthorizationOptions', - :'capture_options' => :'V2paymentsProcessingInformationCaptureOptions', - :'recurring_options' => :'V2paymentsProcessingInformationRecurringOptions' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'capture') - self.capture = attributes[:'capture'] - else - self.capture = false - end - - if attributes.has_key?(:'processorId') - self.processor_id = attributes[:'processorId'] - end - - if attributes.has_key?(:'businessApplicationId') - self.business_application_id = attributes[:'businessApplicationId'] - end - - if attributes.has_key?(:'commerceIndicator') - self.commerce_indicator = attributes[:'commerceIndicator'] - end - - if attributes.has_key?(:'paymentSolution') - self.payment_solution = attributes[:'paymentSolution'] - end - - if attributes.has_key?(:'reconciliationId') - self.reconciliation_id = attributes[:'reconciliationId'] - end - - if attributes.has_key?(:'linkId') - self.link_id = attributes[:'linkId'] - end - - if attributes.has_key?(:'purchaseLevel') - self.purchase_level = attributes[:'purchaseLevel'] - end - - if attributes.has_key?(:'reportGroup') - self.report_group = attributes[:'reportGroup'] - end - - if attributes.has_key?(:'visaCheckoutId') - self.visa_checkout_id = attributes[:'visaCheckoutId'] - end - - if attributes.has_key?(:'issuer') - self.issuer = attributes[:'issuer'] - end - - if attributes.has_key?(:'authorizationOptions') - self.authorization_options = attributes[:'authorizationOptions'] - end - - if attributes.has_key?(:'captureOptions') - self.capture_options = attributes[:'captureOptions'] - end - - if attributes.has_key?(:'recurringOptions') - self.recurring_options = attributes[:'recurringOptions'] - end - end - - # Show invalid properties 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 !@processor_id.nil? && @processor_id.to_s.length > 3 - invalid_properties.push('invalid value for "processor_id", the character length must be smaller than or equal to 3.') - 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 - - 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 !@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 - - if !@link_id.nil? && @link_id.to_s.length > 26 - invalid_properties.push('invalid value for "link_id", the character length must be smaller than or equal to 26.') - end - - if !@purchase_level.nil? && @purchase_level.to_s.length > 1 - invalid_properties.push('invalid value for "purchase_level", the character length must be smaller than or equal to 1.') - end - - if !@report_group.nil? && @report_group.to_s.length > 25 - invalid_properties.push('invalid value for "report_group", the character length must be smaller than or equal to 25.') - end - - if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 - invalid_properties.push('invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.') - 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 !@processor_id.nil? && @processor_id.to_s.length > 3 - return false if !@commerce_indicator.nil? && @commerce_indicator.to_s.length > 20 - return false if !@payment_solution.nil? && @payment_solution.to_s.length > 12 - return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - return false if !@link_id.nil? && @link_id.to_s.length > 26 - return false if !@purchase_level.nil? && @purchase_level.to_s.length > 1 - return false if !@report_group.nil? && @report_group.to_s.length > 25 - return false if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 - true - end - - # Custom attribute writer method with validation - # @param [Object] processor_id Value to be assigned - def processor_id=(processor_id) - if !processor_id.nil? && processor_id.to_s.length > 3 - fail ArgumentError, 'invalid value for "processor_id", the character length must be smaller than or equal to 3.' - end - - @processor_id = processor_id - 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 - - # 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] 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 - - # Custom attribute writer method with validation - # @param [Object] link_id Value to be assigned - def link_id=(link_id) - if !link_id.nil? && link_id.to_s.length > 26 - fail ArgumentError, 'invalid value for "link_id", the character length must be smaller than or equal to 26.' - end - - @link_id = link_id - end - - # Custom attribute writer method with validation - # @param [Object] purchase_level Value to be assigned - def purchase_level=(purchase_level) - if !purchase_level.nil? && purchase_level.to_s.length > 1 - fail ArgumentError, 'invalid value for "purchase_level", the character length must be smaller than or equal to 1.' - end - - @purchase_level = purchase_level - end - - # Custom attribute writer method with validation - # @param [Object] report_group Value to be assigned - def report_group=(report_group) - if !report_group.nil? && report_group.to_s.length > 25 - fail ArgumentError, 'invalid value for "report_group", the character length must be smaller than or equal to 25.' - end - - @report_group = report_group - end - - # Custom attribute writer method with validation - # @param [Object] visa_checkout_id Value to be assigned - def visa_checkout_id=(visa_checkout_id) - if !visa_checkout_id.nil? && visa_checkout_id.to_s.length > 48 - fail ArgumentError, 'invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.' - end - - @visa_checkout_id = visa_checkout_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 && - capture == o.capture && - processor_id == o.processor_id && - business_application_id == o.business_application_id && - commerce_indicator == o.commerce_indicator && - payment_solution == o.payment_solution && - reconciliation_id == o.reconciliation_id && - link_id == o.link_id && - purchase_level == o.purchase_level && - report_group == o.report_group && - visa_checkout_id == o.visa_checkout_id && - issuer == o.issuer && - authorization_options == o.authorization_options && - capture_options == o.capture_options && - recurring_options == o.recurring_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 - [capture, processor_id, business_application_id, commerce_indicator, payment_solution, reconciliation_id, link_id, purchase_level, report_group, visa_checkout_id, issuer, authorization_options, capture_options, recurring_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_client/models/v2payments_processing_information_authorization_options.rb b/lib/cyberSource_client/models/v2payments_processing_information_authorization_options.rb deleted file mode 100644 index b2d4d4ae..00000000 --- a/lib/cyberSource_client/models/v2payments_processing_information_authorization_options.rb +++ /dev/null @@ -1,361 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsProcessingInformationAuthorizationOptions - # 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 - - # Authorization code. **Forced Capture** Use this field to send the authorization code you received from a payment that you authorized outside the CyberSource system. **Verbal Authorization** Use this field in CAPTURE API to send the verbally received authorization code. For processor-specific information, see the auth_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :verbal_auth_code - - # Transaction ID (TID). - attr_accessor :verbal_auth_transaction_id - - # Flag that specifies the purpose of the authorization. Possible values: - **0**: Preauthorization - **1**: Final authorization For processor-specific information, see the auth_indicator field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :auth_indicator - - # Flag that indicates whether the transaction is enabled for partial authorization or not. When your request includes this field, this value overrides the information in your CyberSource account. For processor-specific information, see the auth_partial_auth_indicator field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :partial_auth_indicator - - # Flag that indicates whether to return balance information. - attr_accessor :balance_inquiry - - # Flag that indicates whether to allow the capture service to run even when the payment receives an AVS decline. - attr_accessor :ignore_avs_result - - # An array of AVS flags that cause the reply flag to be returned. `Important` To receive declines for the AVS code N, include the value N in the array. - attr_accessor :decline_avs_flags - - # Flag that indicates whether to allow the capture service to run even when the payment receives a CVN decline. - attr_accessor :ignore_cv_result - - attr_accessor :initiator - - 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 - { - :'auth_type' => :'authType', - :'verbal_auth_code' => :'verbalAuthCode', - :'verbal_auth_transaction_id' => :'verbalAuthTransactionId', - :'auth_indicator' => :'authIndicator', - :'partial_auth_indicator' => :'partialAuthIndicator', - :'balance_inquiry' => :'balanceInquiry', - :'ignore_avs_result' => :'ignoreAvsResult', - :'decline_avs_flags' => :'declineAvsFlags', - :'ignore_cv_result' => :'ignoreCvResult', - :'initiator' => :'initiator' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'auth_type' => :'String', - :'verbal_auth_code' => :'String', - :'verbal_auth_transaction_id' => :'String', - :'auth_indicator' => :'String', - :'partial_auth_indicator' => :'BOOLEAN', - :'balance_inquiry' => :'BOOLEAN', - :'ignore_avs_result' => :'BOOLEAN', - :'decline_avs_flags' => :'Array', - :'ignore_cv_result' => :'BOOLEAN', - :'initiator' => :'V2paymentsProcessingInformationAuthorizationOptionsInitiator' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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 - - if attributes.has_key?(:'verbalAuthCode') - self.verbal_auth_code = attributes[:'verbalAuthCode'] - end - - if attributes.has_key?(:'verbalAuthTransactionId') - self.verbal_auth_transaction_id = attributes[:'verbalAuthTransactionId'] - end - - if attributes.has_key?(:'authIndicator') - self.auth_indicator = attributes[:'authIndicator'] - end - - if attributes.has_key?(:'partialAuthIndicator') - self.partial_auth_indicator = attributes[:'partialAuthIndicator'] - end - - if attributes.has_key?(:'balanceInquiry') - self.balance_inquiry = attributes[:'balanceInquiry'] - end - - if attributes.has_key?(:'ignoreAvsResult') - self.ignore_avs_result = attributes[:'ignoreAvsResult'] - else - self.ignore_avs_result = false - end - - if attributes.has_key?(:'declineAvsFlags') - if (value = attributes[:'declineAvsFlags']).is_a?(Array) - self.decline_avs_flags = value - end - end - - if attributes.has_key?(:'ignoreCvResult') - self.ignore_cv_result = attributes[:'ignoreCvResult'] - else - self.ignore_cv_result = false - end - - if attributes.has_key?(:'initiator') - self.initiator = attributes[:'initiator'] - end - end - - # Show invalid properties 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 - - if !@verbal_auth_code.nil? && @verbal_auth_code.to_s.length > 7 - invalid_properties.push('invalid value for "verbal_auth_code", the character length must be smaller than or equal to 7.') - end - - if !@verbal_auth_transaction_id.nil? && @verbal_auth_transaction_id.to_s.length > 15 - invalid_properties.push('invalid value for "verbal_auth_transaction_id", the character length must be smaller than or equal to 15.') - end - - if !@auth_indicator.nil? && @auth_indicator.to_s.length > 1 - invalid_properties.push('invalid value for "auth_indicator", 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 !@auth_type.nil? && @auth_type.to_s.length > 15 - return false if !@verbal_auth_code.nil? && @verbal_auth_code.to_s.length > 7 - return false if !@verbal_auth_transaction_id.nil? && @verbal_auth_transaction_id.to_s.length > 15 - return false if !@auth_indicator.nil? && @auth_indicator.to_s.length > 1 - 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 - - # Custom attribute writer method with validation - # @param [Object] verbal_auth_code Value to be assigned - def verbal_auth_code=(verbal_auth_code) - if !verbal_auth_code.nil? && verbal_auth_code.to_s.length > 7 - fail ArgumentError, 'invalid value for "verbal_auth_code", the character length must be smaller than or equal to 7.' - end - - @verbal_auth_code = verbal_auth_code - end - - # Custom attribute writer method with validation - # @param [Object] verbal_auth_transaction_id Value to be assigned - def verbal_auth_transaction_id=(verbal_auth_transaction_id) - if !verbal_auth_transaction_id.nil? && verbal_auth_transaction_id.to_s.length > 15 - fail ArgumentError, 'invalid value for "verbal_auth_transaction_id", the character length must be smaller than or equal to 15.' - end - - @verbal_auth_transaction_id = verbal_auth_transaction_id - end - - # Custom attribute writer method with validation - # @param [Object] auth_indicator Value to be assigned - def auth_indicator=(auth_indicator) - if !auth_indicator.nil? && auth_indicator.to_s.length > 1 - fail ArgumentError, 'invalid value for "auth_indicator", the character length must be smaller than or equal to 1.' - end - - @auth_indicator = auth_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 && - auth_type == o.auth_type && - verbal_auth_code == o.verbal_auth_code && - verbal_auth_transaction_id == o.verbal_auth_transaction_id && - auth_indicator == o.auth_indicator && - partial_auth_indicator == o.partial_auth_indicator && - balance_inquiry == o.balance_inquiry && - ignore_avs_result == o.ignore_avs_result && - decline_avs_flags == o.decline_avs_flags && - ignore_cv_result == o.ignore_cv_result && - initiator == o.initiator - end - - # @see the `==` method - # @param [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, verbal_auth_code, verbal_auth_transaction_id, auth_indicator, partial_auth_indicator, balance_inquiry, ignore_avs_result, decline_avs_flags, ignore_cv_result, initiator].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payments_processing_information_authorization_options_initiator.rb b/lib/cyberSource_client/models/v2payments_processing_information_authorization_options_initiator.rb deleted file mode 100644 index 0623f96c..00000000 --- a/lib/cyberSource_client/models/v2payments_processing_information_authorization_options_initiator.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 - class V2paymentsProcessingInformationAuthorizationOptionsInitiator - # This field indicates whether the transaction is a merchant-initiated transaction or customer-initiated transaction. - attr_accessor :type - - # Flag that indicates whether merchant is intend to use this transaction to store payment credential for follow-up merchant-initiated transactions or not. - attr_accessor :credential_stored_on_file - - # Flag that indicates whether merchant is intend to use this transaction to store payment credential for follow-up merchant-initiated transactions or not. - attr_accessor :stored_credential_used - - attr_accessor :merchant_initiated_transaction - - 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', - :'credential_stored_on_file' => :'credentialStoredOnFile', - :'stored_credential_used' => :'storedCredentialUsed', - :'merchant_initiated_transaction' => :'merchantInitiatedTransaction' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'type' => :'String', - :'credential_stored_on_file' => :'BOOLEAN', - :'stored_credential_used' => :'BOOLEAN', - :'merchant_initiated_transaction' => :'V2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'credentialStoredOnFile') - self.credential_stored_on_file = attributes[:'credentialStoredOnFile'] - end - - if attributes.has_key?(:'storedCredentialUsed') - self.stored_credential_used = attributes[:'storedCredentialUsed'] - end - - if attributes.has_key?(:'merchantInitiatedTransaction') - self.merchant_initiated_transaction = attributes[:'merchantInitiatedTransaction'] - end - end - - # Show invalid properties 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? - type_validator = EnumAttributeValidator.new('String', ['customer', 'merchant']) - return false unless type_validator.valid?(@type) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] type Object to be assigned - def type=(type) - validator = EnumAttributeValidator.new('String', ['customer', 'merchant']) - unless validator.valid?(type) - fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.' - 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 && - type == o.type && - credential_stored_on_file == o.credential_stored_on_file && - stored_credential_used == o.stored_credential_used && - merchant_initiated_transaction == o.merchant_initiated_transaction - end - - # @see the `==` method - # @param [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, credential_stored_on_file, stored_credential_used, merchant_initiated_transaction].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payments_processing_information_authorization_options_merchant_initiated_transaction.rb b/lib/cyberSource_client/models/v2payments_processing_information_authorization_options_merchant_initiated_transaction.rb deleted file mode 100644 index 6e9d97e6..00000000 --- a/lib/cyberSource_client/models/v2payments_processing_information_authorization_options_merchant_initiated_transaction.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 V2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction - # Reason for the merchant-initiated transaction. Possible values: - **1**: Resubmission - **2**: Delayed charge - **3**: Reauthorization for split shipment - **4**: No show - **5**: Account top up This field is not required for installment payments or recurring payments or when _reAuth.first_ is true. It is required for all other merchant-initiated transactions. This field is supported only for Visa transactions on CyberSource through VisaNet. - attr_accessor :reason - - # Transaction identifier that was returned in the payment response field _processorInformation.transactionID_ in the reply message for either the original merchant initiated payment in the series or the previous merchant-initiated payment in the series.

If the current payment request includes a token instead of an account number, the following time limits apply for the value of this field: For a **resubmission**, the transaction ID must be less than 14 days old. For a **delayed charge** or **reauthorization**, the transaction ID must be less than 30 days old. The value for this field does not correspond to any data in the TC 33 capture file. This field is supported only for Visa transactions on CyberSource through VisaNet. - attr_accessor :previous_transaction_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'reason' => :'reason', - :'previous_transaction_id' => :'previousTransactionId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'reason' => :'String', - :'previous_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?(:'reason') - self.reason = attributes[:'reason'] - end - - if attributes.has_key?(:'previousTransactionId') - self.previous_transaction_id = attributes[:'previousTransactionId'] - end - end - - # Show invalid properties 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 !@reason.nil? && @reason.to_s.length > 1 - invalid_properties.push('invalid value for "reason", the character length must be smaller than or equal to 1.') - end - - if !@previous_transaction_id.nil? && @previous_transaction_id.to_s.length > 15 - invalid_properties.push('invalid value for "previous_transaction_id", 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 !@reason.nil? && @reason.to_s.length > 1 - return false if !@previous_transaction_id.nil? && @previous_transaction_id.to_s.length > 15 - true - end - - # Custom attribute writer method with validation - # @param [Object] reason Value to be assigned - def reason=(reason) - if !reason.nil? && reason.to_s.length > 1 - fail ArgumentError, 'invalid value for "reason", the character length must be smaller than or equal to 1.' - end - - @reason = reason - end - - # Custom attribute writer method with validation - # @param [Object] previous_transaction_id Value to be assigned - def previous_transaction_id=(previous_transaction_id) - if !previous_transaction_id.nil? && previous_transaction_id.to_s.length > 15 - fail ArgumentError, 'invalid value for "previous_transaction_id", the character length must be smaller than or equal to 15.' - end - - @previous_transaction_id = previous_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 && - reason == o.reason && - previous_transaction_id == o.previous_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 - [reason, previous_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_client/models/v2payments_processing_information_capture_options.rb b/lib/cyberSource_client/models/v2payments_processing_information_capture_options.rb deleted file mode 100644 index 5860ac27..00000000 --- a/lib/cyberSource_client/models/v2payments_processing_information_capture_options.rb +++ /dev/null @@ -1,267 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsProcessingInformationCaptureOptions - # Capture number when requesting multiple partial captures for one payment. Used along with _totalCaptureCount_ to track which capture is being processed. For example, the second of five captures would be passed to CyberSource as: - _captureSequenceNumber_ = 2, and - _totalCaptureCount_ = 5 - attr_accessor :capture_sequence_number - - # Total number of captures when requesting multiple partial captures for one payment. Used along with _captureSequenceNumber_ which capture is being processed. For example, the second of five captures would be passed to CyberSource as: - _captureSequenceNumber_ = 2, and - _totalCaptureCount_ = 5 - attr_accessor :total_capture_count - - # Date on which you want the capture to occur. This field is supported only for **CyberSource through VisaNet**. `Format: MMDD` - attr_accessor :date_to_capture - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'capture_sequence_number' => :'captureSequenceNumber', - :'total_capture_count' => :'totalCaptureCount', - :'date_to_capture' => :'dateToCapture' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'capture_sequence_number' => :'Float', - :'total_capture_count' => :'Float', - :'date_to_capture' => :'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?(:'captureSequenceNumber') - self.capture_sequence_number = attributes[:'captureSequenceNumber'] - end - - if attributes.has_key?(:'totalCaptureCount') - self.total_capture_count = attributes[:'totalCaptureCount'] - end - - if attributes.has_key?(:'dateToCapture') - self.date_to_capture = attributes[:'dateToCapture'] - end - end - - # Show invalid properties 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 !@capture_sequence_number.nil? && @capture_sequence_number > 99 - invalid_properties.push('invalid value for "capture_sequence_number", must be smaller than or equal to 99.') - end - - if !@capture_sequence_number.nil? && @capture_sequence_number < 1 - invalid_properties.push('invalid value for "capture_sequence_number", must be greater than or equal to 1.') - end - - if !@total_capture_count.nil? && @total_capture_count > 99 - invalid_properties.push('invalid value for "total_capture_count", must be smaller than or equal to 99.') - end - - if !@total_capture_count.nil? && @total_capture_count < 1 - invalid_properties.push('invalid value for "total_capture_count", must be greater than or equal to 1.') - end - - if !@date_to_capture.nil? && @date_to_capture.to_s.length > 4 - invalid_properties.push('invalid value for "date_to_capture", 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 !@capture_sequence_number.nil? && @capture_sequence_number > 99 - return false if !@capture_sequence_number.nil? && @capture_sequence_number < 1 - return false if !@total_capture_count.nil? && @total_capture_count > 99 - return false if !@total_capture_count.nil? && @total_capture_count < 1 - return false if !@date_to_capture.nil? && @date_to_capture.to_s.length > 4 - true - end - - # Custom attribute writer method with validation - # @param [Object] capture_sequence_number Value to be assigned - def capture_sequence_number=(capture_sequence_number) - if !capture_sequence_number.nil? && capture_sequence_number > 99 - fail ArgumentError, 'invalid value for "capture_sequence_number", must be smaller than or equal to 99.' - end - - if !capture_sequence_number.nil? && capture_sequence_number < 1 - fail ArgumentError, 'invalid value for "capture_sequence_number", must be greater than or equal to 1.' - end - - @capture_sequence_number = capture_sequence_number - end - - # Custom attribute writer method with validation - # @param [Object] total_capture_count Value to be assigned - def total_capture_count=(total_capture_count) - if !total_capture_count.nil? && total_capture_count > 99 - fail ArgumentError, 'invalid value for "total_capture_count", must be smaller than or equal to 99.' - end - - if !total_capture_count.nil? && total_capture_count < 1 - fail ArgumentError, 'invalid value for "total_capture_count", must be greater than or equal to 1.' - end - - @total_capture_count = total_capture_count - end - - # Custom attribute writer method with validation - # @param [Object] date_to_capture Value to be assigned - def date_to_capture=(date_to_capture) - if !date_to_capture.nil? && date_to_capture.to_s.length > 4 - fail ArgumentError, 'invalid value for "date_to_capture", the character length must be smaller than or equal to 4.' - end - - @date_to_capture = date_to_capture - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - capture_sequence_number == o.capture_sequence_number && - total_capture_count == o.total_capture_count && - date_to_capture == o.date_to_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 - [capture_sequence_number, total_capture_count, date_to_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_client/models/v2payments_processing_information_issuer.rb b/lib/cyberSource_client/models/v2payments_processing_information_issuer.rb deleted file mode 100644 index 2678008c..00000000 --- a/lib/cyberSource_client/models/v2payments_processing_information_issuer.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 V2paymentsProcessingInformationIssuer - # 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 - { - :'discretionary_data' => :'discretionaryData' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'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?(:'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 !@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 !@discretionary_data.nil? && @discretionary_data.to_s.length > 255 - true - 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 && - 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 - [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_client/models/v2payments_processing_information_recurring_options.rb b/lib/cyberSource_client/models/v2payments_processing_information_recurring_options.rb deleted file mode 100644 index 6af8a3ca..00000000 --- a/lib/cyberSource_client/models/v2payments_processing_information_recurring_options.rb +++ /dev/null @@ -1,198 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsProcessingInformationRecurringOptions - # Flag that indicates whether this is a payment towards an existing contractual loan. - attr_accessor :loan_payment - - # Flag that indicates whether this transaction is the first in a series of recurring payments. This field is supported only for **Atos**, **FDC Nashville Global**, and **OmniPay Direct**. - attr_accessor :first_recurring_payment - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'loan_payment' => :'loanPayment', - :'first_recurring_payment' => :'firstRecurringPayment' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'loan_payment' => :'BOOLEAN', - :'first_recurring_payment' => :'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?(:'loanPayment') - self.loan_payment = attributes[:'loanPayment'] - else - self.loan_payment = false - end - - if attributes.has_key?(:'firstRecurringPayment') - self.first_recurring_payment = attributes[:'firstRecurringPayment'] - else - self.first_recurring_payment = false - end - end - - # Show invalid properties 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 && - loan_payment == o.loan_payment && - first_recurring_payment == o.first_recurring_payment - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [loan_payment, first_recurring_payment].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payments_recipient_information.rb b/lib/cyberSource_client/models/v2payments_recipient_information.rb deleted file mode 100644 index 0e7b79f5..00000000 --- a/lib/cyberSource_client/models/v2payments_recipient_information.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 V2paymentsRecipientInformation - # Identifier for the recipient’s account. Use the first six digits and last four digits of the recipient’s account number. This field is a pass-through, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. - attr_accessor :account_id - - # Recipient’s last name. This field is a passthrough, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. - attr_accessor :last_name - - # Partial postal code for the recipient’s address. For example, if the postal code is **NN5 7SG**, the value for this field should be the first part of the postal code: **NN5**. This field is a pass-through, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. - attr_accessor :postal_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'account_id' => :'accountId', - :'last_name' => :'lastName', - :'postal_code' => :'postalCode' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'account_id' => :'String', - :'last_name' => :'String', - :'postal_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?(:'accountId') - self.account_id = attributes[:'accountId'] - end - - if attributes.has_key?(:'lastName') - self.last_name = attributes[:'lastName'] - end - - if attributes.has_key?(:'postalCode') - self.postal_code = attributes[:'postalCode'] - end - end - - # Show invalid properties 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_id.nil? && @account_id.to_s.length > 10 - invalid_properties.push('invalid value for "account_id", the character length must be smaller than or equal to 10.') - end - - if !@last_name.nil? && @last_name.to_s.length > 6 - invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 6.') - end - - if !@postal_code.nil? && @postal_code.to_s.length > 6 - invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 6.') - 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_id.nil? && @account_id.to_s.length > 10 - return false if !@last_name.nil? && @last_name.to_s.length > 6 - return false if !@postal_code.nil? && @postal_code.to_s.length > 6 - true - end - - # Custom attribute writer method with validation - # @param [Object] account_id Value to be assigned - def account_id=(account_id) - if !account_id.nil? && account_id.to_s.length > 10 - fail ArgumentError, 'invalid value for "account_id", the character length must be smaller than or equal to 10.' - end - - @account_id = account_id - 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 > 6 - fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 6.' - end - - @last_name = last_name - 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 > 6 - fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 6.' - end - - @postal_code = postal_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 && - account_id == o.account_id && - last_name == o.last_name && - postal_code == o.postal_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 - [account_id, last_name, postal_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_client/models/v2paymentsidcaptures_aggregator_information.rb b/lib/cyberSource_client/models/v2paymentsidcaptures_aggregator_information.rb deleted file mode 100644 index 6c210de4..00000000 --- a/lib/cyberSource_client/models/v2paymentsidcaptures_aggregator_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 V2paymentsidcapturesAggregatorInformation - # Value that identifies you as a payment aggregator. Get this value from the processor. For processor-specific information, see the aggregator_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 :aggregator_id - - # Your payment aggregator business name. For processor-specific information, see the aggregator_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 :name - - attr_accessor :sub_merchant - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'aggregator_id' => :'aggregatorId', - :'name' => :'name', - :'sub_merchant' => :'subMerchant' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'aggregator_id' => :'String', - :'name' => :'String', - :'sub_merchant' => :'V2paymentsidcapturesAggregatorInformationSubMerchant' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'aggregatorId') - self.aggregator_id = attributes[:'aggregatorId'] - end - - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.has_key?(:'subMerchant') - self.sub_merchant = attributes[:'subMerchant'] - end - end - - # Show invalid properties 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 !@aggregator_id.nil? && @aggregator_id.to_s.length > 20 - invalid_properties.push('invalid value for "aggregator_id", the character length must be smaller than or equal to 20.') - end - - if !@name.nil? && @name.to_s.length > 37 - invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 37.') - 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 !@aggregator_id.nil? && @aggregator_id.to_s.length > 20 - return false if !@name.nil? && @name.to_s.length > 37 - true - end - - # Custom attribute writer method with validation - # @param [Object] aggregator_id Value to be assigned - def aggregator_id=(aggregator_id) - if !aggregator_id.nil? && aggregator_id.to_s.length > 20 - fail ArgumentError, 'invalid value for "aggregator_id", the character length must be smaller than or equal to 20.' - end - - @aggregator_id = aggregator_id - end - - # Custom attribute writer method with validation - # @param [Object] name Value to be assigned - def name=(name) - if !name.nil? && name.to_s.length > 37 - fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 37.' - 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 && - aggregator_id == o.aggregator_id && - name == o.name && - sub_merchant == o.sub_merchant - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [aggregator_id, name, sub_merchant].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2paymentsidcaptures_aggregator_information_sub_merchant.rb b/lib/cyberSource_client/models/v2paymentsidcaptures_aggregator_information_sub_merchant.rb deleted file mode 100644 index 89baf4e0..00000000 --- a/lib/cyberSource_client/models/v2paymentsidcaptures_aggregator_information_sub_merchant.rb +++ /dev/null @@ -1,374 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsidcapturesAggregatorInformationSubMerchant - # Sub-merchant’s business name. - attr_accessor :name - - # First line of the sub-merchant’s street address. - attr_accessor :address1 - - # Sub-merchant’s city. - attr_accessor :locality - - # Sub-merchant’s state or province. Use the State, Province, and Territory Codes for the United States and Canada. - attr_accessor :administrative_area - - # Partial postal code for the sub-merchant’s address. - attr_accessor :postal_code - - # Sub-merchant’s country. Use the two-character ISO Standard Country Codes. - attr_accessor :country - - # Sub-merchant’s email address. **Maximum length for processors** - American Express Direct: 40 - CyberSource through VisaNet: 40 - FDC Compass: 40 - FDC Nashville Global: 19 - attr_accessor :email - - # Sub-merchant’s telephone number. **Maximum length for procesors** - American Express Direct: 20 - CyberSource through VisaNet: 20 - FDC Compass: 13 - FDC Nashville Global: 10 - attr_accessor :phone_number - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'name' => :'name', - :'address1' => :'address1', - :'locality' => :'locality', - :'administrative_area' => :'administrativeArea', - :'postal_code' => :'postalCode', - :'country' => :'country', - :'email' => :'email', - :'phone_number' => :'phoneNumber' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'name' => :'String', - :'address1' => :'String', - :'locality' => :'String', - :'administrative_area' => :'String', - :'postal_code' => :'String', - :'country' => :'String', - :'email' => :'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?(:'name') - self.name = attributes[:'name'] - end - - if attributes.has_key?(:'address1') - self.address1 = attributes[:'address1'] - 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?(:'country') - self.country = attributes[:'country'] - end - - if attributes.has_key?(:'email') - self.email = attributes[:'email'] - 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 !@name.nil? && @name.to_s.length > 37 - invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 37.') - end - - if !@address1.nil? && @address1.to_s.length > 38 - invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 38.') - end - - if !@locality.nil? && @locality.to_s.length > 21 - invalid_properties.push('invalid value for "locality", the character length must be smaller than or equal to 21.') - end - - if !@administrative_area.nil? && @administrative_area.to_s.length > 3 - invalid_properties.push('invalid value for "administrative_area", the character length must be smaller than or equal to 3.') - end - - if !@postal_code.nil? && @postal_code.to_s.length > 15 - invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 15.') - end - - 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 !@email.nil? && @email.to_s.length > 40 - invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 40.') - end - - if !@phone_number.nil? && @phone_number.to_s.length > 20 - invalid_properties.push('invalid value for "phone_number", 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 !@name.nil? && @name.to_s.length > 37 - return false if !@address1.nil? && @address1.to_s.length > 38 - return false if !@locality.nil? && @locality.to_s.length > 21 - return false if !@administrative_area.nil? && @administrative_area.to_s.length > 3 - return false if !@postal_code.nil? && @postal_code.to_s.length > 15 - return false if !@country.nil? && @country.to_s.length > 3 - return false if !@email.nil? && @email.to_s.length > 40 - return false if !@phone_number.nil? && @phone_number.to_s.length > 20 - 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 > 37 - fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 37.' - end - - @name = 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 > 38 - fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 38.' - end - - @address1 = address1 - end - - # Custom attribute writer method with validation - # @param [Object] locality Value to be assigned - def locality=(locality) - if !locality.nil? && locality.to_s.length > 21 - fail ArgumentError, 'invalid value for "locality", the character length must be smaller than or equal to 21.' - 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 > 3 - fail ArgumentError, 'invalid value for "administrative_area", the character length must be smaller than or equal to 3.' - 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 > 15 - fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 15.' - end - - @postal_code = postal_code - 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] email Value to be assigned - def email=(email) - if !email.nil? && email.to_s.length > 40 - fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 40.' - end - - @email = email - 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 > 20 - fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 20.' - 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 && - name == o.name && - address1 == o.address1 && - locality == o.locality && - administrative_area == o.administrative_area && - postal_code == o.postal_code && - country == o.country && - email == o.email && - 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 - [name, address1, locality, administrative_area, postal_code, country, email, 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_client/models/v2paymentsidcaptures_buyer_information.rb b/lib/cyberSource_client/models/v2paymentsidcaptures_buyer_information.rb deleted file mode 100644 index 8b6c880f..00000000 --- a/lib/cyberSource_client/models/v2paymentsidcaptures_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 V2paymentsidcapturesBuyerInformation - # 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 - - # Customer’s government-assigned tax identification number. For processor-specific information, see the purchaser_vat_registration_number 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 :vat_registration_number - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'merchant_customer_id' => :'merchantCustomerId', - :'vat_registration_number' => :'vatRegistrationNumber' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'merchant_customer_id' => :'String', - :'vat_registration_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?(:'merchantCustomerId') - self.merchant_customer_id = attributes[:'merchantCustomerId'] - end - - if attributes.has_key?(:'vatRegistrationNumber') - self.vat_registration_number = attributes[:'vatRegistrationNumber'] - end - end - - # Show invalid properties 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 !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 20 - invalid_properties.push('invalid value for "vat_registration_number", 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 !@merchant_customer_id.nil? && @merchant_customer_id.to_s.length > 100 - return false if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 20 - 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] vat_registration_number Value to be assigned - def vat_registration_number=(vat_registration_number) - if !vat_registration_number.nil? && vat_registration_number.to_s.length > 20 - fail ArgumentError, 'invalid value for "vat_registration_number", the character length must be smaller than or equal to 20.' - end - - @vat_registration_number = vat_registration_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 && - merchant_customer_id == o.merchant_customer_id && - vat_registration_number == o.vat_registration_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 - [merchant_customer_id, vat_registration_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_client/models/v2paymentsidcaptures_merchant_information.rb b/lib/cyberSource_client/models/v2paymentsidcaptures_merchant_information.rb deleted file mode 100644 index 290a9f43..00000000 --- a/lib/cyberSource_client/models/v2paymentsidcaptures_merchant_information.rb +++ /dev/null @@ -1,258 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsidcapturesMerchantInformation - attr_accessor :merchant_descriptor - - # Reference number that facilitates card acceptor/corporation communication and record keeping. For processor-specific information, see the card_acceptor_ref_number 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 :card_acceptor_reference_number - - # Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :category_code - - # Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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 :vat_registration_number - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'merchant_descriptor' => :'merchantDescriptor', - :'card_acceptor_reference_number' => :'cardAcceptorReferenceNumber', - :'category_code' => :'categoryCode', - :'vat_registration_number' => :'vatRegistrationNumber' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'merchant_descriptor' => :'V2paymentsMerchantInformationMerchantDescriptor', - :'card_acceptor_reference_number' => :'String', - :'category_code' => :'Integer', - :'vat_registration_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?(:'merchantDescriptor') - self.merchant_descriptor = attributes[:'merchantDescriptor'] - end - - if attributes.has_key?(:'cardAcceptorReferenceNumber') - self.card_acceptor_reference_number = attributes[:'cardAcceptorReferenceNumber'] - end - - if attributes.has_key?(:'categoryCode') - self.category_code = attributes[:'categoryCode'] - end - - if attributes.has_key?(:'vatRegistrationNumber') - self.vat_registration_number = attributes[:'vatRegistrationNumber'] - end - end - - # Show invalid properties 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 !@card_acceptor_reference_number.nil? && @card_acceptor_reference_number.to_s.length > 25 - invalid_properties.push('invalid value for "card_acceptor_reference_number", the character length must be smaller than or equal to 25.') - end - - if !@category_code.nil? && @category_code > 9999 - invalid_properties.push('invalid value for "category_code", must be smaller than or equal to 9999.') - end - - if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 - invalid_properties.push('invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.') - 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 !@card_acceptor_reference_number.nil? && @card_acceptor_reference_number.to_s.length > 25 - return false if !@category_code.nil? && @category_code > 9999 - return false if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 - true - end - - # Custom attribute writer method with validation - # @param [Object] card_acceptor_reference_number Value to be assigned - def card_acceptor_reference_number=(card_acceptor_reference_number) - if !card_acceptor_reference_number.nil? && card_acceptor_reference_number.to_s.length > 25 - fail ArgumentError, 'invalid value for "card_acceptor_reference_number", the character length must be smaller than or equal to 25.' - end - - @card_acceptor_reference_number = card_acceptor_reference_number - end - - # Custom attribute writer method with validation - # @param [Object] category_code Value to be assigned - def category_code=(category_code) - if !category_code.nil? && category_code > 9999 - fail ArgumentError, 'invalid value for "category_code", must be smaller than or equal to 9999.' - end - - @category_code = category_code - end - - # Custom attribute writer method with validation - # @param [Object] vat_registration_number Value to be assigned - def vat_registration_number=(vat_registration_number) - if !vat_registration_number.nil? && vat_registration_number.to_s.length > 21 - fail ArgumentError, 'invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.' - end - - @vat_registration_number = vat_registration_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 && - merchant_descriptor == o.merchant_descriptor && - card_acceptor_reference_number == o.card_acceptor_reference_number && - category_code == o.category_code && - vat_registration_number == o.vat_registration_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 - [merchant_descriptor, card_acceptor_reference_number, category_code, vat_registration_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_client/models/v2paymentsidcaptures_order_information.rb b/lib/cyberSource_client/models/v2paymentsidcaptures_order_information.rb deleted file mode 100644 index 05cd4139..00000000 --- a/lib/cyberSource_client/models/v2paymentsidcaptures_order_information.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsidcapturesOrderInformation - attr_accessor :amount_details - - attr_accessor :bill_to - - attr_accessor :ship_to - - attr_accessor :line_items - - attr_accessor :invoice_details - - attr_accessor :shipping_details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'amount_details' => :'amountDetails', - :'bill_to' => :'billTo', - :'ship_to' => :'shipTo', - :'line_items' => :'lineItems', - :'invoice_details' => :'invoiceDetails', - :'shipping_details' => :'shippingDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'amount_details' => :'V2paymentsidcapturesOrderInformationAmountDetails', - :'bill_to' => :'V2paymentsidcapturesOrderInformationBillTo', - :'ship_to' => :'V2paymentsidcapturesOrderInformationShipTo', - :'line_items' => :'Array', - :'invoice_details' => :'V2paymentsidcapturesOrderInformationInvoiceDetails', - :'shipping_details' => :'V2paymentsidcapturesOrderInformationShippingDetails' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'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?(:'invoiceDetails') - self.invoice_details = attributes[:'invoiceDetails'] - 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 && - amount_details == o.amount_details && - bill_to == o.bill_to && - ship_to == o.ship_to && - line_items == o.line_items && - invoice_details == o.invoice_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 - [amount_details, bill_to, ship_to, line_items, invoice_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_client/models/v2paymentsidcaptures_order_information_amount_details.rb b/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_amount_details.rb deleted file mode 100644 index 4bf2dd71..00000000 --- a/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_amount_details.rb +++ /dev/null @@ -1,546 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsidcapturesOrderInformationAmountDetails - # 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 discount amount applied to the order. For processor-specific information, see the order_discount_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 :discount_amount - - # Total charges for any import or export duties included in the order. For processor-specific information, see the duty_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 :duty_amount - - # 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 - - # Flag that indicates whether a national tax is included in the order total. Possible values: - **0**: national tax not included - **1**: national tax included For processor-specific information, see the national_tax_indicator 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 :national_tax_included - - # Flag that indicates how the merchant manages discounts. Possible values: - **0**: no invoice level discount included - **1**: tax calculated on the postdiscount invoice total - **2**: tax calculated on the prediscount invoice total For processor-specific information, see the order_discount_management_indicator 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_applied_after_discount - - # Flag that indicates how you calculate tax. Possible values: - **0**: net prices with tax calculated at line item level - **1**: net prices with tax calculated at invoice level - **2**: gross prices with tax provided at line item level - **3**: gross prices with tax provided at invoice level - **4**: no tax applies on the invoice for the transaction For processor-specific information, see the tax_management_indicator 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_applied_level - - # For tax amounts that can be categorized as one tax type. This field contains the tax type code that corresponds to the entry in the _lineItems.taxAmount_ field. Possible values: - **056**: sales tax (U.S only) - **TX~**: all taxes (Canada only) Note ~ = space. For processor-specific information, see the total_tax_type_code 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_type_code - - # Total freight or shipping and handling charges for the order. When you include this field in your request, you must also include the **totalAmount** field. For processor-specific information, see the freight_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 :freight_amount - - # Converted amount returned by the DCC service. For processor-specific information, see the foreign_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 :foreign_amount - - # Billing currency returned by the DCC service. For processor-specific information, see the foreign_currency field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :foreign_currency - - # Exchange rate returned by the DCC service. Includes a decimal point and a maximum of 4 decimal places. For processor-specific information, see the exchange_rate field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :exchange_rate - - # Time stamp for the exchange rate. This value is returned by the DCC service. Format: `YYYYMMDD~HH:MM` where ~ denotes a space. For processor-specific information, see the exchange_rate_timestamp field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :exchange_rate_time_stamp - - attr_accessor :amex_additional_amounts - - attr_accessor :tax_details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'total_amount' => :'totalAmount', - :'currency' => :'currency', - :'discount_amount' => :'discountAmount', - :'duty_amount' => :'dutyAmount', - :'tax_amount' => :'taxAmount', - :'national_tax_included' => :'nationalTaxIncluded', - :'tax_applied_after_discount' => :'taxAppliedAfterDiscount', - :'tax_applied_level' => :'taxAppliedLevel', - :'tax_type_code' => :'taxTypeCode', - :'freight_amount' => :'freightAmount', - :'foreign_amount' => :'foreignAmount', - :'foreign_currency' => :'foreignCurrency', - :'exchange_rate' => :'exchangeRate', - :'exchange_rate_time_stamp' => :'exchangeRateTimeStamp', - :'amex_additional_amounts' => :'amexAdditionalAmounts', - :'tax_details' => :'taxDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'total_amount' => :'String', - :'currency' => :'String', - :'discount_amount' => :'String', - :'duty_amount' => :'String', - :'tax_amount' => :'String', - :'national_tax_included' => :'String', - :'tax_applied_after_discount' => :'String', - :'tax_applied_level' => :'String', - :'tax_type_code' => :'String', - :'freight_amount' => :'String', - :'foreign_amount' => :'String', - :'foreign_currency' => :'String', - :'exchange_rate' => :'String', - :'exchange_rate_time_stamp' => :'String', - :'amex_additional_amounts' => :'Array', - :'tax_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?(:'totalAmount') - self.total_amount = attributes[:'totalAmount'] - end - - if attributes.has_key?(:'currency') - self.currency = attributes[:'currency'] - end - - if attributes.has_key?(:'discountAmount') - self.discount_amount = attributes[:'discountAmount'] - end - - if attributes.has_key?(:'dutyAmount') - self.duty_amount = attributes[:'dutyAmount'] - end - - if attributes.has_key?(:'taxAmount') - self.tax_amount = attributes[:'taxAmount'] - end - - if attributes.has_key?(:'nationalTaxIncluded') - self.national_tax_included = attributes[:'nationalTaxIncluded'] - end - - if attributes.has_key?(:'taxAppliedAfterDiscount') - self.tax_applied_after_discount = attributes[:'taxAppliedAfterDiscount'] - end - - if attributes.has_key?(:'taxAppliedLevel') - self.tax_applied_level = attributes[:'taxAppliedLevel'] - end - - if attributes.has_key?(:'taxTypeCode') - self.tax_type_code = attributes[:'taxTypeCode'] - end - - if attributes.has_key?(:'freightAmount') - self.freight_amount = attributes[:'freightAmount'] - end - - if attributes.has_key?(:'foreignAmount') - self.foreign_amount = attributes[:'foreignAmount'] - end - - if attributes.has_key?(:'foreignCurrency') - self.foreign_currency = attributes[:'foreignCurrency'] - end - - if attributes.has_key?(:'exchangeRate') - self.exchange_rate = attributes[:'exchangeRate'] - end - - if attributes.has_key?(:'exchangeRateTimeStamp') - self.exchange_rate_time_stamp = attributes[:'exchangeRateTimeStamp'] - end - - if attributes.has_key?(:'amexAdditionalAmounts') - if (value = attributes[:'amexAdditionalAmounts']).is_a?(Array) - self.amex_additional_amounts = value - end - end - - if attributes.has_key?(:'taxDetails') - if (value = attributes[:'taxDetails']).is_a?(Array) - self.tax_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 - 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 !@discount_amount.nil? && @discount_amount.to_s.length > 15 - invalid_properties.push('invalid value for "discount_amount", the character length must be smaller than or equal to 15.') - end - - if !@duty_amount.nil? && @duty_amount.to_s.length > 15 - invalid_properties.push('invalid value for "duty_amount", the character length must be smaller than or equal to 15.') - 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 !@national_tax_included.nil? && @national_tax_included.to_s.length > 1 - invalid_properties.push('invalid value for "national_tax_included", the character length must be smaller than or equal to 1.') - end - - if !@tax_applied_after_discount.nil? && @tax_applied_after_discount.to_s.length > 1 - invalid_properties.push('invalid value for "tax_applied_after_discount", the character length must be smaller than or equal to 1.') - end - - if !@tax_applied_level.nil? && @tax_applied_level.to_s.length > 1 - invalid_properties.push('invalid value for "tax_applied_level", the character length must be smaller than or equal to 1.') - end - - if !@tax_type_code.nil? && @tax_type_code.to_s.length > 3 - invalid_properties.push('invalid value for "tax_type_code", the character length must be smaller than or equal to 3.') - end - - if !@freight_amount.nil? && @freight_amount.to_s.length > 13 - invalid_properties.push('invalid value for "freight_amount", the character length must be smaller than or equal to 13.') - end - - if !@foreign_amount.nil? && @foreign_amount.to_s.length > 15 - invalid_properties.push('invalid value for "foreign_amount", the character length must be smaller than or equal to 15.') - end - - if !@foreign_currency.nil? && @foreign_currency.to_s.length > 5 - invalid_properties.push('invalid value for "foreign_currency", the character length must be smaller than or equal to 5.') - end - - if !@exchange_rate.nil? && @exchange_rate.to_s.length > 13 - invalid_properties.push('invalid value for "exchange_rate", the character length must be smaller than or equal to 13.') - end - - if !@exchange_rate_time_stamp.nil? && @exchange_rate_time_stamp.to_s.length > 14 - invalid_properties.push('invalid value for "exchange_rate_time_stamp", the character length must be smaller than or equal to 14.') - 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 !@discount_amount.nil? && @discount_amount.to_s.length > 15 - return false if !@duty_amount.nil? && @duty_amount.to_s.length > 15 - return false if !@tax_amount.nil? && @tax_amount.to_s.length > 12 - return false if !@national_tax_included.nil? && @national_tax_included.to_s.length > 1 - return false if !@tax_applied_after_discount.nil? && @tax_applied_after_discount.to_s.length > 1 - return false if !@tax_applied_level.nil? && @tax_applied_level.to_s.length > 1 - return false if !@tax_type_code.nil? && @tax_type_code.to_s.length > 3 - return false if !@freight_amount.nil? && @freight_amount.to_s.length > 13 - return false if !@foreign_amount.nil? && @foreign_amount.to_s.length > 15 - return false if !@foreign_currency.nil? && @foreign_currency.to_s.length > 5 - return false if !@exchange_rate.nil? && @exchange_rate.to_s.length > 13 - return false if !@exchange_rate_time_stamp.nil? && @exchange_rate_time_stamp.to_s.length > 14 - 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] discount_amount Value to be assigned - def discount_amount=(discount_amount) - if !discount_amount.nil? && discount_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "discount_amount", the character length must be smaller than or equal to 15.' - end - - @discount_amount = discount_amount - end - - # Custom attribute writer method with validation - # @param [Object] duty_amount Value to be assigned - def duty_amount=(duty_amount) - if !duty_amount.nil? && duty_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "duty_amount", the character length must be smaller than or equal to 15.' - end - - @duty_amount = duty_amount - 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] national_tax_included Value to be assigned - def national_tax_included=(national_tax_included) - if !national_tax_included.nil? && national_tax_included.to_s.length > 1 - fail ArgumentError, 'invalid value for "national_tax_included", the character length must be smaller than or equal to 1.' - end - - @national_tax_included = national_tax_included - end - - # Custom attribute writer method with validation - # @param [Object] tax_applied_after_discount Value to be assigned - def tax_applied_after_discount=(tax_applied_after_discount) - if !tax_applied_after_discount.nil? && tax_applied_after_discount.to_s.length > 1 - fail ArgumentError, 'invalid value for "tax_applied_after_discount", the character length must be smaller than or equal to 1.' - end - - @tax_applied_after_discount = tax_applied_after_discount - end - - # Custom attribute writer method with validation - # @param [Object] tax_applied_level Value to be assigned - def tax_applied_level=(tax_applied_level) - if !tax_applied_level.nil? && tax_applied_level.to_s.length > 1 - fail ArgumentError, 'invalid value for "tax_applied_level", the character length must be smaller than or equal to 1.' - end - - @tax_applied_level = tax_applied_level - end - - # Custom attribute writer method with validation - # @param [Object] tax_type_code Value to be assigned - def tax_type_code=(tax_type_code) - if !tax_type_code.nil? && tax_type_code.to_s.length > 3 - fail ArgumentError, 'invalid value for "tax_type_code", the character length must be smaller than or equal to 3.' - end - - @tax_type_code = tax_type_code - end - - # Custom attribute writer method with validation - # @param [Object] freight_amount Value to be assigned - def freight_amount=(freight_amount) - if !freight_amount.nil? && freight_amount.to_s.length > 13 - fail ArgumentError, 'invalid value for "freight_amount", the character length must be smaller than or equal to 13.' - end - - @freight_amount = freight_amount - end - - # Custom attribute writer method with validation - # @param [Object] foreign_amount Value to be assigned - def foreign_amount=(foreign_amount) - if !foreign_amount.nil? && foreign_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "foreign_amount", the character length must be smaller than or equal to 15.' - end - - @foreign_amount = foreign_amount - end - - # Custom attribute writer method with validation - # @param [Object] foreign_currency Value to be assigned - def foreign_currency=(foreign_currency) - if !foreign_currency.nil? && foreign_currency.to_s.length > 5 - fail ArgumentError, 'invalid value for "foreign_currency", the character length must be smaller than or equal to 5.' - end - - @foreign_currency = foreign_currency - end - - # Custom attribute writer method with validation - # @param [Object] exchange_rate Value to be assigned - def exchange_rate=(exchange_rate) - if !exchange_rate.nil? && exchange_rate.to_s.length > 13 - fail ArgumentError, 'invalid value for "exchange_rate", the character length must be smaller than or equal to 13.' - end - - @exchange_rate = exchange_rate - end - - # Custom attribute writer method with validation - # @param [Object] exchange_rate_time_stamp Value to be assigned - def exchange_rate_time_stamp=(exchange_rate_time_stamp) - if !exchange_rate_time_stamp.nil? && exchange_rate_time_stamp.to_s.length > 14 - fail ArgumentError, 'invalid value for "exchange_rate_time_stamp", the character length must be smaller than or equal to 14.' - end - - @exchange_rate_time_stamp = exchange_rate_time_stamp - end - - # 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 && - discount_amount == o.discount_amount && - duty_amount == o.duty_amount && - tax_amount == o.tax_amount && - national_tax_included == o.national_tax_included && - tax_applied_after_discount == o.tax_applied_after_discount && - tax_applied_level == o.tax_applied_level && - tax_type_code == o.tax_type_code && - freight_amount == o.freight_amount && - foreign_amount == o.foreign_amount && - foreign_currency == o.foreign_currency && - exchange_rate == o.exchange_rate && - exchange_rate_time_stamp == o.exchange_rate_time_stamp && - amex_additional_amounts == o.amex_additional_amounts && - tax_details == o.tax_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 - [total_amount, currency, discount_amount, duty_amount, tax_amount, national_tax_included, tax_applied_after_discount, tax_applied_level, tax_type_code, freight_amount, foreign_amount, foreign_currency, exchange_rate, exchange_rate_time_stamp, amex_additional_amounts, tax_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_client/models/v2paymentsidcaptures_order_information_bill_to.rb b/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_bill_to.rb deleted file mode 100644 index ca33a6f1..00000000 --- a/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_bill_to.rb +++ /dev/null @@ -1,449 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsidcapturesOrderInformationBillTo - # 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 - - # 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 - - # 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 - - # 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 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 - - # 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', - :'company' => :'company', - :'address1' => :'address1', - :'address2' => :'address2', - :'locality' => :'locality', - :'administrative_area' => :'administrativeArea', - :'postal_code' => :'postalCode', - :'country' => :'country', - :'email' => :'email', - :'phone_number' => :'phoneNumber' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'first_name' => :'String', - :'last_name' => :'String', - :'company' => :'String', - :'address1' => :'String', - :'address2' => :'String', - :'locality' => :'String', - :'administrative_area' => :'String', - :'postal_code' => :'String', - :'country' => :'String', - :'email' => :'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?(:'company') - self.company = attributes[:'company'] - 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?(:'country') - self.country = attributes[:'country'] - end - - if attributes.has_key?(:'email') - self.email = attributes[:'email'] - 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 !@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 !@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 !@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 !@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 !@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 !@company.nil? && @company.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 !@country.nil? && @country.to_s.length > 2 - return false if !@email.nil? && @email.to_s.length > 255 - 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] 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] 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] 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] 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] 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 && - company == o.company && - address1 == o.address1 && - address2 == o.address2 && - locality == o.locality && - administrative_area == o.administrative_area && - postal_code == o.postal_code && - country == o.country && - email == o.email && - 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, company, address1, address2, locality, administrative_area, postal_code, country, email, 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_client/models/v2paymentsidcaptures_order_information_invoice_details.rb b/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_invoice_details.rb deleted file mode 100644 index 2e7042b7..00000000 --- a/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_invoice_details.rb +++ /dev/null @@ -1,320 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsidcapturesOrderInformationInvoiceDetails - # Value used by your customer to identify the order. This value is typically a purchase order number. CyberSource recommends that you do not populate the field with all zeros or nines. For processor-specific information, see the user_po 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 :purchase_order_number - - # Date the order was processed. `Format: YYYY-MM-DD`. For processor-specific information, see the purchaser_order_date 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 :purchase_order_date - - # The name of the individual or the company contacted for company authorized purchases. For processor-specific information, see the authorized_contact_name 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 :purchase_contact_name - - # Flag that indicates whether an order is taxable. This value must be true if the sum of all _lineItems[].taxAmount_ values > 0. If you do not include any _lineItems[].taxAmount_ values in your request, CyberSource does not include _invoiceDetails.taxable_ in the data it sends to the processor. For processor-specific information, see the tax_indicator 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 :taxable - - # VAT invoice number associated with the transaction. For processor-specific information, see the vat_invoice_ref_number 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 :vat_invoice_reference_number - - # International description code of the overall order’s goods or services or the Categorizes purchases for VAT reporting. Contact your acquirer for a list of codes. For processor-specific information, see the summary_commodity_code 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 :commodity_code - - attr_accessor :transaction_advice_addendum - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'purchase_order_number' => :'purchaseOrderNumber', - :'purchase_order_date' => :'purchaseOrderDate', - :'purchase_contact_name' => :'purchaseContactName', - :'taxable' => :'taxable', - :'vat_invoice_reference_number' => :'vatInvoiceReferenceNumber', - :'commodity_code' => :'commodityCode', - :'transaction_advice_addendum' => :'transactionAdviceAddendum' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'purchase_order_number' => :'String', - :'purchase_order_date' => :'String', - :'purchase_contact_name' => :'String', - :'taxable' => :'BOOLEAN', - :'vat_invoice_reference_number' => :'String', - :'commodity_code' => :'String', - :'transaction_advice_addendum' => :'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?(:'purchaseOrderNumber') - self.purchase_order_number = attributes[:'purchaseOrderNumber'] - end - - if attributes.has_key?(:'purchaseOrderDate') - self.purchase_order_date = attributes[:'purchaseOrderDate'] - end - - if attributes.has_key?(:'purchaseContactName') - self.purchase_contact_name = attributes[:'purchaseContactName'] - end - - if attributes.has_key?(:'taxable') - self.taxable = attributes[:'taxable'] - end - - if attributes.has_key?(:'vatInvoiceReferenceNumber') - self.vat_invoice_reference_number = attributes[:'vatInvoiceReferenceNumber'] - end - - if attributes.has_key?(:'commodityCode') - self.commodity_code = attributes[:'commodityCode'] - end - - if attributes.has_key?(:'transactionAdviceAddendum') - if (value = attributes[:'transactionAdviceAddendum']).is_a?(Array) - self.transaction_advice_addendum = 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 !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25 - invalid_properties.push('invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.') - end - - if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10 - invalid_properties.push('invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.') - end - - if !@purchase_contact_name.nil? && @purchase_contact_name.to_s.length > 36 - invalid_properties.push('invalid value for "purchase_contact_name", the character length must be smaller than or equal to 36.') - end - - if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15 - invalid_properties.push('invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.') - end - - if !@commodity_code.nil? && @commodity_code.to_s.length > 4 - invalid_properties.push('invalid value for "commodity_code", 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 !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25 - return false if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10 - return false if !@purchase_contact_name.nil? && @purchase_contact_name.to_s.length > 36 - return false if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15 - return false if !@commodity_code.nil? && @commodity_code.to_s.length > 4 - true - end - - # Custom attribute writer method with validation - # @param [Object] purchase_order_number Value to be assigned - def purchase_order_number=(purchase_order_number) - if !purchase_order_number.nil? && purchase_order_number.to_s.length > 25 - fail ArgumentError, 'invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.' - end - - @purchase_order_number = purchase_order_number - end - - # Custom attribute writer method with validation - # @param [Object] purchase_order_date Value to be assigned - def purchase_order_date=(purchase_order_date) - if !purchase_order_date.nil? && purchase_order_date.to_s.length > 10 - fail ArgumentError, 'invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.' - end - - @purchase_order_date = purchase_order_date - end - - # Custom attribute writer method with validation - # @param [Object] purchase_contact_name Value to be assigned - def purchase_contact_name=(purchase_contact_name) - if !purchase_contact_name.nil? && purchase_contact_name.to_s.length > 36 - fail ArgumentError, 'invalid value for "purchase_contact_name", the character length must be smaller than or equal to 36.' - end - - @purchase_contact_name = purchase_contact_name - end - - # Custom attribute writer method with validation - # @param [Object] vat_invoice_reference_number Value to be assigned - def vat_invoice_reference_number=(vat_invoice_reference_number) - if !vat_invoice_reference_number.nil? && vat_invoice_reference_number.to_s.length > 15 - fail ArgumentError, 'invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.' - end - - @vat_invoice_reference_number = vat_invoice_reference_number - end - - # Custom attribute writer method with validation - # @param [Object] commodity_code Value to be assigned - def commodity_code=(commodity_code) - if !commodity_code.nil? && commodity_code.to_s.length > 4 - fail ArgumentError, 'invalid value for "commodity_code", the character length must be smaller than or equal to 4.' - end - - @commodity_code = commodity_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 && - purchase_order_number == o.purchase_order_number && - purchase_order_date == o.purchase_order_date && - purchase_contact_name == o.purchase_contact_name && - taxable == o.taxable && - vat_invoice_reference_number == o.vat_invoice_reference_number && - commodity_code == o.commodity_code && - transaction_advice_addendum == o.transaction_advice_addendum - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [purchase_order_number, purchase_order_date, purchase_contact_name, taxable, vat_invoice_reference_number, commodity_code, transaction_advice_addendum].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_ship_to.rb b/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_ship_to.rb deleted file mode 100644 index 70209027..00000000 --- a/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_ship_to.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 V2paymentsidcapturesOrderInformationShipTo - # State or province of the shipping address. Use the State, Province, and Territory Codes for the United States and Canada. - attr_accessor :administrative_area - - # Country of the shipping address. Use the two character ISO Standard Country Codes. - attr_accessor :country - - # 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 - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'administrative_area' => :'administrativeArea', - :'country' => :'country', - :'postal_code' => :'postalCode' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'administrative_area' => :'String', - :'country' => :'String', - :'postal_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?(:'administrativeArea') - self.administrative_area = attributes[:'administrativeArea'] - end - - if attributes.has_key?(:'country') - self.country = attributes[:'country'] - end - - if attributes.has_key?(:'postalCode') - self.postal_code = attributes[:'postalCode'] - end - end - - # Show invalid properties 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 !@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 !@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 !@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 - - invalid_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 !@administrative_area.nil? && @administrative_area.to_s.length > 2 - return false if !@country.nil? && @country.to_s.length > 2 - return false if !@postal_code.nil? && @postal_code.to_s.length > 10 - true - 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] 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] 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 - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - administrative_area == o.administrative_area && - country == o.country && - postal_code == o.postal_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 - [administrative_area, country, postal_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_client/models/v2paymentsidcaptures_order_information_shipping_details.rb b/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_shipping_details.rb deleted file mode 100644 index 58507393..00000000 --- a/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_shipping_details.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 V2paymentsidcapturesOrderInformationShippingDetails - # Postal code for the address from which the goods are shipped, which is used to establish nexus. The default is the postal code associated with your CyberSource account. 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 This field is frequently used for Level II and Level III transactions. - attr_accessor :ship_from_postal_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'ship_from_postal_code' => :'shipFromPostalCode' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'ship_from_postal_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?(:'shipFromPostalCode') - self.ship_from_postal_code = attributes[:'shipFromPostalCode'] - end - end - - # Show invalid properties 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 !@ship_from_postal_code.nil? && @ship_from_postal_code.to_s.length > 10 - invalid_properties.push('invalid value for "ship_from_postal_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 !@ship_from_postal_code.nil? && @ship_from_postal_code.to_s.length > 10 - true - end - - # Custom attribute writer method with validation - # @param [Object] ship_from_postal_code Value to be assigned - def ship_from_postal_code=(ship_from_postal_code) - if !ship_from_postal_code.nil? && ship_from_postal_code.to_s.length > 10 - fail ArgumentError, 'invalid value for "ship_from_postal_code", the character length must be smaller than or equal to 10.' - end - - @ship_from_postal_code = ship_from_postal_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 && - ship_from_postal_code == o.ship_from_postal_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 - [ship_from_postal_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_client/models/v2paymentsidcaptures_payment_information.rb b/lib/cyberSource_client/models/v2paymentsidcaptures_payment_information.rb deleted file mode 100644 index 8c97534c..00000000 --- a/lib/cyberSource_client/models/v2paymentsidcaptures_payment_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 V2paymentsidcapturesPaymentInformation - attr_accessor :customer - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'customer' => :'customer' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'customer' => :'V2paymentsPaymentInformationCustomer' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'customer') - self.customer = attributes[:'customer'] - end - end - - # Show invalid properties 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 && - customer == o.customer - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [customer].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2paymentsidcaptures_point_of_sale_information.rb b/lib/cyberSource_client/models/v2paymentsidcaptures_point_of_sale_information.rb deleted file mode 100644 index 79fc7c68..00000000 --- a/lib/cyberSource_client/models/v2paymentsidcaptures_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 V2paymentsidcapturesPointOfSaleInformation - 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' => :'V2paymentsidcapturesPointOfSaleInformationEmv', - :'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_client/models/v2paymentsidcaptures_point_of_sale_information_emv.rb b/lib/cyberSource_client/models/v2paymentsidcaptures_point_of_sale_information_emv.rb deleted file mode 100644 index 7d4ec665..00000000 --- a/lib/cyberSource_client/models/v2paymentsidcaptures_point_of_sale_information_emv.rb +++ /dev/null @@ -1,211 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsidcapturesPointOfSaleInformationEmv - # 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 - - # Indicates whether a fallback method was used to enter credit card information into the POS terminal. When a technical problem prevents a successful exchange of information between a chip card and a chip-capable terminal: 1. Swipe the card or key the credit card information into the POS terminal. 2. Use the pos_entry_mode field to indicate whether the information was swiped or keyed. This field is supported only on **Chase Paymentech Solutions** and **GPN**. - attr_accessor :fallback - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'tags' => :'tags', - :'fallback' => :'fallback' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'tags' => :'String', - :'fallback' => :'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?(:'tags') - self.tags = attributes[:'tags'] - end - - if attributes.has_key?(:'fallback') - self.fallback = attributes[:'fallback'] - else - self.fallback = false - end - end - - # Show invalid properties 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 && - fallback == o.fallback - end - - # @see the `==` method - # @param [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, fallback].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2paymentsidcaptures_processing_information.rb b/lib/cyberSource_client/models/v2paymentsidcaptures_processing_information.rb deleted file mode 100644 index cd3fae84..00000000 --- a/lib/cyberSource_client/models/v2paymentsidcaptures_processing_information.rb +++ /dev/null @@ -1,351 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsidcapturesProcessingInformation - # 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 - - # Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). - attr_accessor :reconciliation_id - - # Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. - attr_accessor :link_id - - # Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. - attr_accessor :report_group - - # Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. - attr_accessor :visa_checkout_id - - # Set this field to 3 to indicate that the request includes Level III data. - attr_accessor :purchase_level - - attr_accessor :issuer - - attr_accessor :authorization_options - - attr_accessor :capture_options - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'payment_solution' => :'paymentSolution', - :'reconciliation_id' => :'reconciliationId', - :'link_id' => :'linkId', - :'report_group' => :'reportGroup', - :'visa_checkout_id' => :'visaCheckoutId', - :'purchase_level' => :'purchaseLevel', - :'issuer' => :'issuer', - :'authorization_options' => :'authorizationOptions', - :'capture_options' => :'captureOptions' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'payment_solution' => :'String', - :'reconciliation_id' => :'String', - :'link_id' => :'String', - :'report_group' => :'String', - :'visa_checkout_id' => :'String', - :'purchase_level' => :'String', - :'issuer' => :'V2paymentsProcessingInformationIssuer', - :'authorization_options' => :'V2paymentsidcapturesProcessingInformationAuthorizationOptions', - :'capture_options' => :'V2paymentsidcapturesProcessingInformationCaptureOptions' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'reconciliationId') - self.reconciliation_id = attributes[:'reconciliationId'] - end - - if attributes.has_key?(:'linkId') - self.link_id = attributes[:'linkId'] - end - - if attributes.has_key?(:'reportGroup') - self.report_group = attributes[:'reportGroup'] - end - - if attributes.has_key?(:'visaCheckoutId') - self.visa_checkout_id = attributes[:'visaCheckoutId'] - end - - if attributes.has_key?(:'purchaseLevel') - self.purchase_level = attributes[:'purchaseLevel'] - end - - if attributes.has_key?(:'issuer') - self.issuer = attributes[:'issuer'] - end - - if attributes.has_key?(:'authorizationOptions') - self.authorization_options = attributes[:'authorizationOptions'] - end - - if attributes.has_key?(:'captureOptions') - self.capture_options = attributes[:'captureOptions'] - end - end - - # Show invalid properties 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 !@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 - - if !@link_id.nil? && @link_id.to_s.length > 26 - invalid_properties.push('invalid value for "link_id", the character length must be smaller than or equal to 26.') - end - - if !@report_group.nil? && @report_group.to_s.length > 25 - invalid_properties.push('invalid value for "report_group", the character length must be smaller than or equal to 25.') - end - - if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 - invalid_properties.push('invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.') - end - - if !@purchase_level.nil? && @purchase_level.to_s.length > 1 - invalid_properties.push('invalid value for "purchase_level", 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 !@payment_solution.nil? && @payment_solution.to_s.length > 12 - return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - return false if !@link_id.nil? && @link_id.to_s.length > 26 - return false if !@report_group.nil? && @report_group.to_s.length > 25 - return false if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 - return false if !@purchase_level.nil? && @purchase_level.to_s.length > 1 - 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] 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 - - # Custom attribute writer method with validation - # @param [Object] link_id Value to be assigned - def link_id=(link_id) - if !link_id.nil? && link_id.to_s.length > 26 - fail ArgumentError, 'invalid value for "link_id", the character length must be smaller than or equal to 26.' - end - - @link_id = link_id - end - - # Custom attribute writer method with validation - # @param [Object] report_group Value to be assigned - def report_group=(report_group) - if !report_group.nil? && report_group.to_s.length > 25 - fail ArgumentError, 'invalid value for "report_group", the character length must be smaller than or equal to 25.' - end - - @report_group = report_group - end - - # Custom attribute writer method with validation - # @param [Object] visa_checkout_id Value to be assigned - def visa_checkout_id=(visa_checkout_id) - if !visa_checkout_id.nil? && visa_checkout_id.to_s.length > 48 - fail ArgumentError, 'invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.' - end - - @visa_checkout_id = visa_checkout_id - end - - # Custom attribute writer method with validation - # @param [Object] purchase_level Value to be assigned - def purchase_level=(purchase_level) - if !purchase_level.nil? && purchase_level.to_s.length > 1 - fail ArgumentError, 'invalid value for "purchase_level", the character length must be smaller than or equal to 1.' - end - - @purchase_level = purchase_level - end - - # 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 && - reconciliation_id == o.reconciliation_id && - link_id == o.link_id && - report_group == o.report_group && - visa_checkout_id == o.visa_checkout_id && - purchase_level == o.purchase_level && - issuer == o.issuer && - authorization_options == o.authorization_options && - capture_options == o.capture_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, reconciliation_id, link_id, report_group, visa_checkout_id, purchase_level, issuer, authorization_options, capture_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_client/models/v2paymentsidcaptures_processing_information_authorization_options.rb b/lib/cyberSource_client/models/v2paymentsidcaptures_processing_information_authorization_options.rb deleted file mode 100644 index f7cf6ffd..00000000 --- a/lib/cyberSource_client/models/v2paymentsidcaptures_processing_information_authorization_options.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 V2paymentsidcapturesProcessingInformationAuthorizationOptions - # 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 - - # Authorization code. **Forced Capture** Use this field to send the authorization code you received from a payment that you authorized outside the CyberSource system. **Verbal Authorization** Use this field in CAPTURE API to send the verbally received authorization code. For processor-specific information, see the auth_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :verbal_auth_code - - # Transaction ID (TID). - attr_accessor :verbal_auth_transaction_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'auth_type' => :'authType', - :'verbal_auth_code' => :'verbalAuthCode', - :'verbal_auth_transaction_id' => :'verbalAuthTransactionId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'auth_type' => :'String', - :'verbal_auth_code' => :'String', - :'verbal_auth_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?(:'authType') - self.auth_type = attributes[:'authType'] - end - - if attributes.has_key?(:'verbalAuthCode') - self.verbal_auth_code = attributes[:'verbalAuthCode'] - end - - if attributes.has_key?(:'verbalAuthTransactionId') - self.verbal_auth_transaction_id = attributes[:'verbalAuthTransactionId'] - end - end - - # Show invalid properties 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 - - if !@verbal_auth_code.nil? && @verbal_auth_code.to_s.length > 7 - invalid_properties.push('invalid value for "verbal_auth_code", the character length must be smaller than or equal to 7.') - end - - if !@verbal_auth_transaction_id.nil? && @verbal_auth_transaction_id.to_s.length > 15 - invalid_properties.push('invalid value for "verbal_auth_transaction_id", 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 - return false if !@verbal_auth_code.nil? && @verbal_auth_code.to_s.length > 7 - return false if !@verbal_auth_transaction_id.nil? && @verbal_auth_transaction_id.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 - - # Custom attribute writer method with validation - # @param [Object] verbal_auth_code Value to be assigned - def verbal_auth_code=(verbal_auth_code) - if !verbal_auth_code.nil? && verbal_auth_code.to_s.length > 7 - fail ArgumentError, 'invalid value for "verbal_auth_code", the character length must be smaller than or equal to 7.' - end - - @verbal_auth_code = verbal_auth_code - end - - # Custom attribute writer method with validation - # @param [Object] verbal_auth_transaction_id Value to be assigned - def verbal_auth_transaction_id=(verbal_auth_transaction_id) - if !verbal_auth_transaction_id.nil? && verbal_auth_transaction_id.to_s.length > 15 - fail ArgumentError, 'invalid value for "verbal_auth_transaction_id", the character length must be smaller than or equal to 15.' - end - - @verbal_auth_transaction_id = verbal_auth_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 && - auth_type == o.auth_type && - verbal_auth_code == o.verbal_auth_code && - verbal_auth_transaction_id == o.verbal_auth_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 - [auth_type, verbal_auth_code, verbal_auth_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_client/models/v2paymentsidcaptures_processing_information_capture_options.rb b/lib/cyberSource_client/models/v2paymentsidcaptures_processing_information_capture_options.rb deleted file mode 100644 index bb436e26..00000000 --- a/lib/cyberSource_client/models/v2paymentsidcaptures_processing_information_capture_options.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 V2paymentsidcapturesProcessingInformationCaptureOptions - # Capture number when requesting multiple partial captures for one payment. Used along with _totalCaptureCount_ to track which capture is being processed. For example, the second of five captures would be passed to CyberSource as: - _captureSequenceNumber_ = 2, and - _totalCaptureCount_ = 5 - attr_accessor :capture_sequence_number - - # Total number of captures when requesting multiple partial captures for one payment. Used along with _captureSequenceNumber_ which capture is being processed. For example, the second of five captures would be passed to CyberSource as: - _captureSequenceNumber_ = 2, and - _totalCaptureCount_ = 5 - attr_accessor :total_capture_count - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'capture_sequence_number' => :'captureSequenceNumber', - :'total_capture_count' => :'totalCaptureCount' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'capture_sequence_number' => :'Float', - :'total_capture_count' => :'Float' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'captureSequenceNumber') - self.capture_sequence_number = attributes[:'captureSequenceNumber'] - end - - if attributes.has_key?(:'totalCaptureCount') - self.total_capture_count = attributes[:'totalCaptureCount'] - end - end - - # Show invalid properties 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 !@capture_sequence_number.nil? && @capture_sequence_number > 99 - invalid_properties.push('invalid value for "capture_sequence_number", must be smaller than or equal to 99.') - end - - if !@capture_sequence_number.nil? && @capture_sequence_number < 1 - invalid_properties.push('invalid value for "capture_sequence_number", must be greater than or equal to 1.') - end - - if !@total_capture_count.nil? && @total_capture_count > 99 - invalid_properties.push('invalid value for "total_capture_count", must be smaller than or equal to 99.') - end - - if !@total_capture_count.nil? && @total_capture_count < 1 - invalid_properties.push('invalid value for "total_capture_count", 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 !@capture_sequence_number.nil? && @capture_sequence_number > 99 - return false if !@capture_sequence_number.nil? && @capture_sequence_number < 1 - return false if !@total_capture_count.nil? && @total_capture_count > 99 - return false if !@total_capture_count.nil? && @total_capture_count < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] capture_sequence_number Value to be assigned - def capture_sequence_number=(capture_sequence_number) - if !capture_sequence_number.nil? && capture_sequence_number > 99 - fail ArgumentError, 'invalid value for "capture_sequence_number", must be smaller than or equal to 99.' - end - - if !capture_sequence_number.nil? && capture_sequence_number < 1 - fail ArgumentError, 'invalid value for "capture_sequence_number", must be greater than or equal to 1.' - end - - @capture_sequence_number = capture_sequence_number - end - - # Custom attribute writer method with validation - # @param [Object] total_capture_count Value to be assigned - def total_capture_count=(total_capture_count) - if !total_capture_count.nil? && total_capture_count > 99 - fail ArgumentError, 'invalid value for "total_capture_count", must be smaller than or equal to 99.' - end - - if !total_capture_count.nil? && total_capture_count < 1 - fail ArgumentError, 'invalid value for "total_capture_count", must be greater than or equal to 1.' - end - - @total_capture_count = total_capture_count - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - capture_sequence_number == o.capture_sequence_number && - total_capture_count == o.total_capture_count - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [capture_sequence_number, total_capture_count].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2paymentsidrefunds_merchant_information.rb b/lib/cyberSource_client/models/v2paymentsidrefunds_merchant_information.rb deleted file mode 100644 index ef47d9a5..00000000 --- a/lib/cyberSource_client/models/v2paymentsidrefunds_merchant_information.rb +++ /dev/null @@ -1,258 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsidrefundsMerchantInformation - attr_accessor :merchant_descriptor - - # Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :category_code - - # Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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 :vat_registration_number - - # Reference number that facilitates card acceptor/corporation communication and record keeping. For processor-specific information, see the card_acceptor_ref_number 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 :card_acceptor_reference_number - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'merchant_descriptor' => :'merchantDescriptor', - :'category_code' => :'categoryCode', - :'vat_registration_number' => :'vatRegistrationNumber', - :'card_acceptor_reference_number' => :'cardAcceptorReferenceNumber' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'merchant_descriptor' => :'V2paymentsMerchantInformationMerchantDescriptor', - :'category_code' => :'Integer', - :'vat_registration_number' => :'String', - :'card_acceptor_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?(:'merchantDescriptor') - self.merchant_descriptor = attributes[:'merchantDescriptor'] - end - - if attributes.has_key?(:'categoryCode') - self.category_code = attributes[:'categoryCode'] - end - - if attributes.has_key?(:'vatRegistrationNumber') - self.vat_registration_number = attributes[:'vatRegistrationNumber'] - end - - if attributes.has_key?(:'cardAcceptorReferenceNumber') - self.card_acceptor_reference_number = attributes[:'cardAcceptorReferenceNumber'] - end - end - - # Show invalid properties 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 !@category_code.nil? && @category_code > 9999 - invalid_properties.push('invalid value for "category_code", must be smaller than or equal to 9999.') - end - - if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 - invalid_properties.push('invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.') - end - - if !@card_acceptor_reference_number.nil? && @card_acceptor_reference_number.to_s.length > 25 - invalid_properties.push('invalid value for "card_acceptor_reference_number", the character length must be smaller than or equal to 25.') - 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 !@category_code.nil? && @category_code > 9999 - return false if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 - return false if !@card_acceptor_reference_number.nil? && @card_acceptor_reference_number.to_s.length > 25 - true - end - - # Custom attribute writer method with validation - # @param [Object] category_code Value to be assigned - def category_code=(category_code) - if !category_code.nil? && category_code > 9999 - fail ArgumentError, 'invalid value for "category_code", must be smaller than or equal to 9999.' - end - - @category_code = category_code - end - - # Custom attribute writer method with validation - # @param [Object] vat_registration_number Value to be assigned - def vat_registration_number=(vat_registration_number) - if !vat_registration_number.nil? && vat_registration_number.to_s.length > 21 - fail ArgumentError, 'invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.' - end - - @vat_registration_number = vat_registration_number - end - - # Custom attribute writer method with validation - # @param [Object] card_acceptor_reference_number Value to be assigned - def card_acceptor_reference_number=(card_acceptor_reference_number) - if !card_acceptor_reference_number.nil? && card_acceptor_reference_number.to_s.length > 25 - fail ArgumentError, 'invalid value for "card_acceptor_reference_number", the character length must be smaller than or equal to 25.' - end - - @card_acceptor_reference_number = card_acceptor_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 && - merchant_descriptor == o.merchant_descriptor && - category_code == o.category_code && - vat_registration_number == o.vat_registration_number && - card_acceptor_reference_number == o.card_acceptor_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 - [merchant_descriptor, category_code, vat_registration_number, card_acceptor_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_client/models/v2paymentsidrefunds_order_information.rb b/lib/cyberSource_client/models/v2paymentsidrefunds_order_information.rb deleted file mode 100644 index 865778e4..00000000 --- a/lib/cyberSource_client/models/v2paymentsidrefunds_order_information.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsidrefundsOrderInformation - attr_accessor :amount_details - - attr_accessor :bill_to - - attr_accessor :ship_to - - attr_accessor :line_items - - attr_accessor :invoice_details - - attr_accessor :shipping_details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'amount_details' => :'amountDetails', - :'bill_to' => :'billTo', - :'ship_to' => :'shipTo', - :'line_items' => :'lineItems', - :'invoice_details' => :'invoiceDetails', - :'shipping_details' => :'shippingDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'amount_details' => :'V2paymentsidcapturesOrderInformationAmountDetails', - :'bill_to' => :'V2paymentsidcapturesOrderInformationBillTo', - :'ship_to' => :'V2paymentsidcapturesOrderInformationShipTo', - :'line_items' => :'Array', - :'invoice_details' => :'V2paymentsidcapturesOrderInformationInvoiceDetails', - :'shipping_details' => :'V2paymentsidcapturesOrderInformationShippingDetails' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'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?(:'invoiceDetails') - self.invoice_details = attributes[:'invoiceDetails'] - 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 && - amount_details == o.amount_details && - bill_to == o.bill_to && - ship_to == o.ship_to && - line_items == o.line_items && - invoice_details == o.invoice_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 - [amount_details, bill_to, ship_to, line_items, invoice_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_client/models/v2paymentsidrefunds_order_information_line_items.rb b/lib/cyberSource_client/models/v2paymentsidrefunds_order_information_line_items.rb deleted file mode 100644 index 06adbf48..00000000 --- a/lib/cyberSource_client/models/v2paymentsidrefunds_order_information_line_items.rb +++ /dev/null @@ -1,639 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsidrefundsOrderInformationLineItems - # 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 - - # 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 - - # Unit of measure, or unit of measure code, for the item. - attr_accessor :unit_of_measure - - # Total amount for the item. Normally calculated as the unit price x quantity. - attr_accessor :total_amount - - # 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 - - # Tax rate applied to the item. See \"Numbered Elements,\" page 14. Visa: Valid range is 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated). Mastercard: Valid range is 0.00001 to 0.99999 (0.001% to 99.999%). - attr_accessor :tax_rate - - # Flag to indicate how you handle discount at the line item level. - 0: no line level discount provided - 1: tax was calculated on the post-discount line item total - 2: tax was calculated on the pre-discount line item total `Note` Visa will inset 0 (zero) if an invalid value is included in this field. This field relates to the value in the _lineItems[].discountAmount_ field. - attr_accessor :tax_applied_after_discount - - # Flag to indicate whether tax is exempted or not included. - 0: tax not included - 1: tax included - 2: transaction is not subject to tax - attr_accessor :tax_status_indicator - - # Type of tax being applied to the item. Possible values: Below values are used by **RBS WorldPay Atlanta**, **FDC Nashville Global**, **Litle** - 0000: unknown tax type - 0001: federal/national sales tax - 0002: state sales tax - 0003: city sales tax - 0004: local sales tax - 0005: municipal sales tax - 0006: other tax - 0010: value-added tax - 0011: goods and services tax - 0012: provincial sales tax - 0013: harmonized sales tax - 0014: Quebec sales tax (QST) - 0020: room tax - 0021: occupancy tax - 0022: energy tax - Blank: Tax not supported on line item. - attr_accessor :tax_type_code - - # Flag that indicates whether the tax amount is included in the Line Item Total. - attr_accessor :amount_includes_tax - - # Flag to indicate whether the purchase is categorized as goods or services. Possible values: - 00: goods - 01: services - attr_accessor :type_of_supply - - # Commodity code or International description code used to classify the item. Contact your acquirer for a list of codes. - attr_accessor :commodity_code - - # Discount applied to the item. - attr_accessor :discount_amount - - # Flag that indicates whether the amount is discounted. If you do not provide a value but you set Discount Amount to a value greater than zero, then CyberSource sets this field to **true**. - attr_accessor :discount_applied - - # Rate the item is discounted. Maximum of 2 decimal places. Example 5.25 (=5.25%) - attr_accessor :discount_rate - - # Field to support an invoice number for a transaction. You must specify the number of line items that will include an invoice number. By default, the first line item will include an invoice number field. The invoice number field can be included for up to 10 line items. - attr_accessor :invoice_number - - attr_accessor :tax_details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'product_code' => :'productCode', - :'product_name' => :'productName', - :'product_sku' => :'productSku', - :'quantity' => :'quantity', - :'unit_price' => :'unitPrice', - :'unit_of_measure' => :'unitOfMeasure', - :'total_amount' => :'totalAmount', - :'tax_amount' => :'taxAmount', - :'tax_rate' => :'taxRate', - :'tax_applied_after_discount' => :'taxAppliedAfterDiscount', - :'tax_status_indicator' => :'taxStatusIndicator', - :'tax_type_code' => :'taxTypeCode', - :'amount_includes_tax' => :'amountIncludesTax', - :'type_of_supply' => :'typeOfSupply', - :'commodity_code' => :'commodityCode', - :'discount_amount' => :'discountAmount', - :'discount_applied' => :'discountApplied', - :'discount_rate' => :'discountRate', - :'invoice_number' => :'invoiceNumber', - :'tax_details' => :'taxDetails' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'product_code' => :'String', - :'product_name' => :'String', - :'product_sku' => :'String', - :'quantity' => :'Float', - :'unit_price' => :'String', - :'unit_of_measure' => :'String', - :'total_amount' => :'String', - :'tax_amount' => :'String', - :'tax_rate' => :'String', - :'tax_applied_after_discount' => :'String', - :'tax_status_indicator' => :'String', - :'tax_type_code' => :'String', - :'amount_includes_tax' => :'BOOLEAN', - :'type_of_supply' => :'String', - :'commodity_code' => :'String', - :'discount_amount' => :'String', - :'discount_applied' => :'BOOLEAN', - :'discount_rate' => :'String', - :'invoice_number' => :'String', - :'tax_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?(:'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?(:'quantity') - self.quantity = attributes[:'quantity'] - end - - if attributes.has_key?(:'unitPrice') - self.unit_price = attributes[:'unitPrice'] - end - - if attributes.has_key?(:'unitOfMeasure') - self.unit_of_measure = attributes[:'unitOfMeasure'] - end - - if attributes.has_key?(:'totalAmount') - self.total_amount = attributes[:'totalAmount'] - end - - if attributes.has_key?(:'taxAmount') - self.tax_amount = attributes[:'taxAmount'] - end - - if attributes.has_key?(:'taxRate') - self.tax_rate = attributes[:'taxRate'] - end - - if attributes.has_key?(:'taxAppliedAfterDiscount') - self.tax_applied_after_discount = attributes[:'taxAppliedAfterDiscount'] - end - - if attributes.has_key?(:'taxStatusIndicator') - self.tax_status_indicator = attributes[:'taxStatusIndicator'] - end - - if attributes.has_key?(:'taxTypeCode') - self.tax_type_code = attributes[:'taxTypeCode'] - end - - if attributes.has_key?(:'amountIncludesTax') - self.amount_includes_tax = attributes[:'amountIncludesTax'] - end - - if attributes.has_key?(:'typeOfSupply') - self.type_of_supply = attributes[:'typeOfSupply'] - end - - if attributes.has_key?(:'commodityCode') - self.commodity_code = attributes[:'commodityCode'] - end - - if attributes.has_key?(:'discountAmount') - self.discount_amount = attributes[:'discountAmount'] - end - - if attributes.has_key?(:'discountApplied') - self.discount_applied = attributes[:'discountApplied'] - end - - if attributes.has_key?(:'discountRate') - self.discount_rate = attributes[:'discountRate'] - end - - if attributes.has_key?(:'invoiceNumber') - self.invoice_number = attributes[:'invoiceNumber'] - end - - if attributes.has_key?(:'taxDetails') - if (value = attributes[:'taxDetails']).is_a?(Array) - self.tax_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 - 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 !@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 - - if !@unit_of_measure.nil? && @unit_of_measure.to_s.length > 12 - invalid_properties.push('invalid value for "unit_of_measure", the character length must be smaller than or equal to 12.') - end - - if !@total_amount.nil? && @total_amount.to_s.length > 13 - invalid_properties.push('invalid value for "total_amount", the character length must be smaller than or equal to 13.') - 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 !@tax_rate.nil? && @tax_rate.to_s.length > 7 - invalid_properties.push('invalid value for "tax_rate", the character length must be smaller than or equal to 7.') - end - - if !@tax_applied_after_discount.nil? && @tax_applied_after_discount.to_s.length > 1 - invalid_properties.push('invalid value for "tax_applied_after_discount", the character length must be smaller than or equal to 1.') - end - - if !@tax_status_indicator.nil? && @tax_status_indicator.to_s.length > 1 - invalid_properties.push('invalid value for "tax_status_indicator", the character length must be smaller than or equal to 1.') - end - - if !@tax_type_code.nil? && @tax_type_code.to_s.length > 4 - invalid_properties.push('invalid value for "tax_type_code", the character length must be smaller than or equal to 4.') - end - - if !@type_of_supply.nil? && @type_of_supply.to_s.length > 2 - invalid_properties.push('invalid value for "type_of_supply", the character length must be smaller than or equal to 2.') - end - - if !@commodity_code.nil? && @commodity_code.to_s.length > 15 - invalid_properties.push('invalid value for "commodity_code", the character length must be smaller than or equal to 15.') - end - - if !@discount_amount.nil? && @discount_amount.to_s.length > 13 - invalid_properties.push('invalid value for "discount_amount", the character length must be smaller than or equal to 13.') - end - - if !@discount_rate.nil? && @discount_rate.to_s.length > 6 - invalid_properties.push('invalid value for "discount_rate", the character length must be smaller than or equal to 6.') - end - - if !@invoice_number.nil? && @invoice_number.to_s.length > 23 - invalid_properties.push('invalid value for "invoice_number", 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 !@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 !@quantity.nil? && @quantity > 9999999999 - return false if !@quantity.nil? && @quantity < 1 - return false if !@unit_price.nil? && @unit_price.to_s.length > 15 - return false if !@unit_of_measure.nil? && @unit_of_measure.to_s.length > 12 - return false if !@total_amount.nil? && @total_amount.to_s.length > 13 - return false if !@tax_amount.nil? && @tax_amount.to_s.length > 15 - return false if !@tax_rate.nil? && @tax_rate.to_s.length > 7 - return false if !@tax_applied_after_discount.nil? && @tax_applied_after_discount.to_s.length > 1 - return false if !@tax_status_indicator.nil? && @tax_status_indicator.to_s.length > 1 - return false if !@tax_type_code.nil? && @tax_type_code.to_s.length > 4 - return false if !@type_of_supply.nil? && @type_of_supply.to_s.length > 2 - return false if !@commodity_code.nil? && @commodity_code.to_s.length > 15 - return false if !@discount_amount.nil? && @discount_amount.to_s.length > 13 - return false if !@discount_rate.nil? && @discount_rate.to_s.length > 6 - return false if !@invoice_number.nil? && @invoice_number.to_s.length > 23 - 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] 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 - - # Custom attribute writer method with validation - # @param [Object] unit_of_measure Value to be assigned - def unit_of_measure=(unit_of_measure) - if !unit_of_measure.nil? && unit_of_measure.to_s.length > 12 - fail ArgumentError, 'invalid value for "unit_of_measure", the character length must be smaller than or equal to 12.' - end - - @unit_of_measure = unit_of_measure - 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 > 13 - fail ArgumentError, 'invalid value for "total_amount", the character length must be smaller than or equal to 13.' - end - - @total_amount = total_amount - 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] tax_rate Value to be assigned - def tax_rate=(tax_rate) - if !tax_rate.nil? && tax_rate.to_s.length > 7 - fail ArgumentError, 'invalid value for "tax_rate", the character length must be smaller than or equal to 7.' - end - - @tax_rate = tax_rate - end - - # Custom attribute writer method with validation - # @param [Object] tax_applied_after_discount Value to be assigned - def tax_applied_after_discount=(tax_applied_after_discount) - if !tax_applied_after_discount.nil? && tax_applied_after_discount.to_s.length > 1 - fail ArgumentError, 'invalid value for "tax_applied_after_discount", the character length must be smaller than or equal to 1.' - end - - @tax_applied_after_discount = tax_applied_after_discount - end - - # Custom attribute writer method with validation - # @param [Object] tax_status_indicator Value to be assigned - def tax_status_indicator=(tax_status_indicator) - if !tax_status_indicator.nil? && tax_status_indicator.to_s.length > 1 - fail ArgumentError, 'invalid value for "tax_status_indicator", the character length must be smaller than or equal to 1.' - end - - @tax_status_indicator = tax_status_indicator - end - - # Custom attribute writer method with validation - # @param [Object] tax_type_code Value to be assigned - def tax_type_code=(tax_type_code) - if !tax_type_code.nil? && tax_type_code.to_s.length > 4 - fail ArgumentError, 'invalid value for "tax_type_code", the character length must be smaller than or equal to 4.' - end - - @tax_type_code = tax_type_code - end - - # Custom attribute writer method with validation - # @param [Object] type_of_supply Value to be assigned - def type_of_supply=(type_of_supply) - if !type_of_supply.nil? && type_of_supply.to_s.length > 2 - fail ArgumentError, 'invalid value for "type_of_supply", the character length must be smaller than or equal to 2.' - end - - @type_of_supply = type_of_supply - end - - # Custom attribute writer method with validation - # @param [Object] commodity_code Value to be assigned - def commodity_code=(commodity_code) - if !commodity_code.nil? && commodity_code.to_s.length > 15 - fail ArgumentError, 'invalid value for "commodity_code", the character length must be smaller than or equal to 15.' - end - - @commodity_code = commodity_code - end - - # Custom attribute writer method with validation - # @param [Object] discount_amount Value to be assigned - def discount_amount=(discount_amount) - if !discount_amount.nil? && discount_amount.to_s.length > 13 - fail ArgumentError, 'invalid value for "discount_amount", the character length must be smaller than or equal to 13.' - end - - @discount_amount = discount_amount - end - - # Custom attribute writer method with validation - # @param [Object] discount_rate Value to be assigned - def discount_rate=(discount_rate) - if !discount_rate.nil? && discount_rate.to_s.length > 6 - fail ArgumentError, 'invalid value for "discount_rate", the character length must be smaller than or equal to 6.' - end - - @discount_rate = discount_rate - end - - # Custom attribute writer method with validation - # @param [Object] invoice_number Value to be assigned - def invoice_number=(invoice_number) - if !invoice_number.nil? && invoice_number.to_s.length > 23 - fail ArgumentError, 'invalid value for "invoice_number", the character length must be smaller than or equal to 23.' - end - - @invoice_number = invoice_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 && - product_code == o.product_code && - product_name == o.product_name && - product_sku == o.product_sku && - quantity == o.quantity && - unit_price == o.unit_price && - unit_of_measure == o.unit_of_measure && - total_amount == o.total_amount && - tax_amount == o.tax_amount && - tax_rate == o.tax_rate && - tax_applied_after_discount == o.tax_applied_after_discount && - tax_status_indicator == o.tax_status_indicator && - tax_type_code == o.tax_type_code && - amount_includes_tax == o.amount_includes_tax && - type_of_supply == o.type_of_supply && - commodity_code == o.commodity_code && - discount_amount == o.discount_amount && - discount_applied == o.discount_applied && - discount_rate == o.discount_rate && - invoice_number == o.invoice_number && - tax_details == o.tax_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 - [product_code, product_name, product_sku, quantity, unit_price, unit_of_measure, total_amount, tax_amount, tax_rate, tax_applied_after_discount, tax_status_indicator, tax_type_code, amount_includes_tax, type_of_supply, commodity_code, discount_amount, discount_applied, discount_rate, invoice_number, tax_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_client/models/v2paymentsidrefunds_payment_information.rb b/lib/cyberSource_client/models/v2paymentsidrefunds_payment_information.rb deleted file mode 100644 index b29efdbf..00000000 --- a/lib/cyberSource_client/models/v2paymentsidrefunds_payment_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 V2paymentsidrefundsPaymentInformation - attr_accessor :card - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'card' => :'card' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'card' => :'V2paymentsidrefundsPaymentInformationCard' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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 - end - - # Show invalid properties 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 - end - - # @see the `==` method - # @param [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].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2paymentsidrefunds_payment_information_card.rb b/lib/cyberSource_client/models/v2paymentsidrefunds_payment_information_card.rb deleted file mode 100644 index 03aa6ab9..00000000 --- a/lib/cyberSource_client/models/v2paymentsidrefunds_payment_information_card.rb +++ /dev/null @@ -1,374 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsidrefundsPaymentInformationCard - # Customer’s credit card number. Encoded Account Numbers when processing encoded account numbers, use this field for the encoded account number. For processor-specific information, see the customer_cc_number field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :number - - # 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 - - # 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 - - # 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 - - # 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 - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'number' => :'number', - :'expiration_month' => :'expirationMonth', - :'expiration_year' => :'expirationYear', - :'type' => :'type', - :'account_encoder_id' => :'accountEncoderId', - :'issue_number' => :'issueNumber', - :'start_month' => :'startMonth', - :'start_year' => :'startYear' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'number' => :'String', - :'expiration_month' => :'String', - :'expiration_year' => :'String', - :'type' => :'String', - :'account_encoder_id' => :'String', - :'issue_number' => :'String', - :'start_month' => :'String', - :'start_year' => :'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?(:'expirationMonth') - self.expiration_month = attributes[:'expirationMonth'] - end - - if attributes.has_key?(:'expirationYear') - self.expiration_year = attributes[:'expirationYear'] - 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?(:'issueNumber') - self.issue_number = attributes[:'issueNumber'] - end - - if attributes.has_key?(:'startMonth') - self.start_month = attributes[:'startMonth'] - end - - if attributes.has_key?(:'startYear') - self.start_year = attributes[:'startYear'] - end - end - - # Show invalid properties 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 !@number.nil? && @number.to_s.length > 20 - invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 20.') - 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 !@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 !@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 !@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 - - invalid_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 !@number.nil? && @number.to_s.length > 20 - 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 !@type.nil? && @type.to_s.length > 3 - return false if !@account_encoder_id.nil? && @account_encoder_id.to_s.length > 3 - return false if !@issue_number.nil? && @issue_number.to_s.length > 5 - return false if !@start_month.nil? && @start_month.to_s.length > 2 - return false if !@start_year.nil? && @start_year.to_s.length > 4 - true - end - - # Custom attribute writer method with validation - # @param [Object] number Value to be assigned - def number=(number) - if !number.nil? && number.to_s.length > 20 - fail ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 20.' - end - - @number = number - 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] 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] 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] 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 - - # 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 && - expiration_month == o.expiration_month && - expiration_year == o.expiration_year && - type == o.type && - account_encoder_id == o.account_encoder_id && - issue_number == o.issue_number && - start_month == o.start_month && - start_year == o.start_year - end - - # @see the `==` method - # @param [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, expiration_month, expiration_year, type, account_encoder_id, issue_number, start_month, start_year].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2paymentsidrefunds_point_of_sale_information.rb b/lib/cyberSource_client/models/v2paymentsidrefunds_point_of_sale_information.rb deleted file mode 100644 index 708efe99..00000000 --- a/lib/cyberSource_client/models/v2paymentsidrefunds_point_of_sale_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 V2paymentsidrefundsPointOfSaleInformation - attr_accessor :emv - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'emv' => :'emv' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'emv' => :'V2paymentsidcapturesPointOfSaleInformationEmv' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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 - end - - # Show invalid properties 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 && - emv == o.emv - end - - # @see the `==` method - # @param [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].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2paymentsidrefunds_processing_information.rb b/lib/cyberSource_client/models/v2paymentsidrefunds_processing_information.rb deleted file mode 100644 index d32fa0eb..00000000 --- a/lib/cyberSource_client/models/v2paymentsidrefunds_processing_information.rb +++ /dev/null @@ -1,333 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsidrefundsProcessingInformation - # 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 - - # Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). - attr_accessor :reconciliation_id - - # Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. - attr_accessor :link_id - - # Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. - attr_accessor :report_group - - # Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. - attr_accessor :visa_checkout_id - - # Set this field to 3 to indicate that the request includes Level III data. - attr_accessor :purchase_level - - attr_accessor :recurring_options - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'payment_solution' => :'paymentSolution', - :'reconciliation_id' => :'reconciliationId', - :'link_id' => :'linkId', - :'report_group' => :'reportGroup', - :'visa_checkout_id' => :'visaCheckoutId', - :'purchase_level' => :'purchaseLevel', - :'recurring_options' => :'recurringOptions' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'payment_solution' => :'String', - :'reconciliation_id' => :'String', - :'link_id' => :'String', - :'report_group' => :'String', - :'visa_checkout_id' => :'String', - :'purchase_level' => :'String', - :'recurring_options' => :'V2paymentsidrefundsProcessingInformationRecurringOptions' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'reconciliationId') - self.reconciliation_id = attributes[:'reconciliationId'] - end - - if attributes.has_key?(:'linkId') - self.link_id = attributes[:'linkId'] - end - - if attributes.has_key?(:'reportGroup') - self.report_group = attributes[:'reportGroup'] - end - - if attributes.has_key?(:'visaCheckoutId') - self.visa_checkout_id = attributes[:'visaCheckoutId'] - end - - if attributes.has_key?(:'purchaseLevel') - self.purchase_level = attributes[:'purchaseLevel'] - end - - if attributes.has_key?(:'recurringOptions') - self.recurring_options = attributes[:'recurringOptions'] - end - end - - # Show invalid properties 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 !@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 - - if !@link_id.nil? && @link_id.to_s.length > 26 - invalid_properties.push('invalid value for "link_id", the character length must be smaller than or equal to 26.') - end - - if !@report_group.nil? && @report_group.to_s.length > 25 - invalid_properties.push('invalid value for "report_group", the character length must be smaller than or equal to 25.') - end - - if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 - invalid_properties.push('invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.') - end - - if !@purchase_level.nil? && @purchase_level.to_s.length > 1 - invalid_properties.push('invalid value for "purchase_level", 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 !@payment_solution.nil? && @payment_solution.to_s.length > 12 - return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - return false if !@link_id.nil? && @link_id.to_s.length > 26 - return false if !@report_group.nil? && @report_group.to_s.length > 25 - return false if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 - return false if !@purchase_level.nil? && @purchase_level.to_s.length > 1 - 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] 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 - - # Custom attribute writer method with validation - # @param [Object] link_id Value to be assigned - def link_id=(link_id) - if !link_id.nil? && link_id.to_s.length > 26 - fail ArgumentError, 'invalid value for "link_id", the character length must be smaller than or equal to 26.' - end - - @link_id = link_id - end - - # Custom attribute writer method with validation - # @param [Object] report_group Value to be assigned - def report_group=(report_group) - if !report_group.nil? && report_group.to_s.length > 25 - fail ArgumentError, 'invalid value for "report_group", the character length must be smaller than or equal to 25.' - end - - @report_group = report_group - end - - # Custom attribute writer method with validation - # @param [Object] visa_checkout_id Value to be assigned - def visa_checkout_id=(visa_checkout_id) - if !visa_checkout_id.nil? && visa_checkout_id.to_s.length > 48 - fail ArgumentError, 'invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.' - end - - @visa_checkout_id = visa_checkout_id - end - - # Custom attribute writer method with validation - # @param [Object] purchase_level Value to be assigned - def purchase_level=(purchase_level) - if !purchase_level.nil? && purchase_level.to_s.length > 1 - fail ArgumentError, 'invalid value for "purchase_level", the character length must be smaller than or equal to 1.' - end - - @purchase_level = purchase_level - end - - # 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 && - reconciliation_id == o.reconciliation_id && - link_id == o.link_id && - report_group == o.report_group && - visa_checkout_id == o.visa_checkout_id && - purchase_level == o.purchase_level && - recurring_options == o.recurring_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, reconciliation_id, link_id, report_group, visa_checkout_id, purchase_level, recurring_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_client/models/v2paymentsidrefunds_processing_information_recurring_options.rb b/lib/cyberSource_client/models/v2paymentsidrefunds_processing_information_recurring_options.rb deleted file mode 100644 index 702b6fe5..00000000 --- a/lib/cyberSource_client/models/v2paymentsidrefunds_processing_information_recurring_options.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 V2paymentsidrefundsProcessingInformationRecurringOptions - # Flag that indicates whether this is a payment towards an existing contractual loan. - attr_accessor :loan_payment - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'loan_payment' => :'loanPayment' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'loan_payment' => :'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?(:'loanPayment') - self.loan_payment = attributes[:'loanPayment'] - else - self.loan_payment = false - end - end - - # Show invalid properties 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 && - loan_payment == o.loan_payment - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [loan_payment].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2paymentsidreversals_client_reference_information.rb b/lib/cyberSource_client/models/v2paymentsidreversals_client_reference_information.rb deleted file mode 100644 index 447e8c6a..00000000 --- a/lib/cyberSource_client/models/v2paymentsidreversals_client_reference_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 V2paymentsidreversalsClientReferenceInformation - # 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 - - # Comments - attr_accessor :comments - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'comments' => :'comments' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'code' => :'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?(:'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 && - 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, 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_client/models/v2paymentsidreversals_order_information.rb b/lib/cyberSource_client/models/v2paymentsidreversals_order_information.rb deleted file mode 100644 index 184957bf..00000000 --- a/lib/cyberSource_client/models/v2paymentsidreversals_order_information.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 V2paymentsidreversalsOrderInformation - attr_accessor :line_items - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'line_items' => :'lineItems' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'line_items' => :'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?(:'lineItems') - if (value = attributes[:'lineItems']).is_a?(Array) - self.line_items = 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 && - line_items == o.line_items - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [line_items].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2paymentsidreversals_order_information_line_items.rb b/lib/cyberSource_client/models/v2paymentsidreversals_order_information_line_items.rb deleted file mode 100644 index 38d9b52c..00000000 --- a/lib/cyberSource_client/models/v2paymentsidreversals_order_information_line_items.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 V2paymentsidreversalsOrderInformationLineItems - # 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 - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'quantity' => :'quantity', - :'unit_price' => :'unitPrice' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'quantity' => :'Float', - :'unit_price' => :'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?(:'quantity') - self.quantity = attributes[:'quantity'] - end - - if attributes.has_key?(:'unitPrice') - self.unit_price = attributes[:'unitPrice'] - end - end - - # Show invalid properties 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 !@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 !@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] 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 && - quantity == o.quantity && - unit_price == o.unit_price - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [quantity, unit_price].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2paymentsidreversals_point_of_sale_information.rb b/lib/cyberSource_client/models/v2paymentsidreversals_point_of_sale_information.rb deleted file mode 100644 index 753d5f66..00000000 --- a/lib/cyberSource_client/models/v2paymentsidreversals_point_of_sale_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 V2paymentsidreversalsPointOfSaleInformation - attr_accessor :emv - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'emv' => :'emv' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'emv' => :'InlineResponse201PointOfSaleInformationEmv' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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 - end - - # Show invalid properties 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 && - emv == o.emv - end - - # @see the `==` method - # @param [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].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2paymentsidreversals_processing_information.rb b/lib/cyberSource_client/models/v2paymentsidreversals_processing_information.rb deleted file mode 100644 index 3c44d09e..00000000 --- a/lib/cyberSource_client/models/v2paymentsidreversals_processing_information.rb +++ /dev/null @@ -1,308 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsidreversalsProcessingInformation - # 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 - - # Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). - attr_accessor :reconciliation_id - - # Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. - attr_accessor :link_id - - # Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. - attr_accessor :report_group - - # Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. - attr_accessor :visa_checkout_id - - attr_accessor :issuer - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'payment_solution' => :'paymentSolution', - :'reconciliation_id' => :'reconciliationId', - :'link_id' => :'linkId', - :'report_group' => :'reportGroup', - :'visa_checkout_id' => :'visaCheckoutId', - :'issuer' => :'issuer' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'payment_solution' => :'String', - :'reconciliation_id' => :'String', - :'link_id' => :'String', - :'report_group' => :'String', - :'visa_checkout_id' => :'String', - :'issuer' => :'V2paymentsProcessingInformationIssuer' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'reconciliationId') - self.reconciliation_id = attributes[:'reconciliationId'] - end - - if attributes.has_key?(:'linkId') - self.link_id = attributes[:'linkId'] - end - - if attributes.has_key?(:'reportGroup') - self.report_group = attributes[:'reportGroup'] - end - - if attributes.has_key?(:'visaCheckoutId') - self.visa_checkout_id = attributes[:'visaCheckoutId'] - end - - if attributes.has_key?(:'issuer') - self.issuer = attributes[:'issuer'] - end - end - - # Show invalid properties 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 !@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 - - if !@link_id.nil? && @link_id.to_s.length > 26 - invalid_properties.push('invalid value for "link_id", the character length must be smaller than or equal to 26.') - end - - if !@report_group.nil? && @report_group.to_s.length > 25 - invalid_properties.push('invalid value for "report_group", the character length must be smaller than or equal to 25.') - end - - if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 - invalid_properties.push('invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.') - 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 !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - return false if !@link_id.nil? && @link_id.to_s.length > 26 - return false if !@report_group.nil? && @report_group.to_s.length > 25 - return false if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 - 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] 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 - - # Custom attribute writer method with validation - # @param [Object] link_id Value to be assigned - def link_id=(link_id) - if !link_id.nil? && link_id.to_s.length > 26 - fail ArgumentError, 'invalid value for "link_id", the character length must be smaller than or equal to 26.' - end - - @link_id = link_id - end - - # Custom attribute writer method with validation - # @param [Object] report_group Value to be assigned - def report_group=(report_group) - if !report_group.nil? && report_group.to_s.length > 25 - fail ArgumentError, 'invalid value for "report_group", the character length must be smaller than or equal to 25.' - end - - @report_group = report_group - end - - # Custom attribute writer method with validation - # @param [Object] visa_checkout_id Value to be assigned - def visa_checkout_id=(visa_checkout_id) - if !visa_checkout_id.nil? && visa_checkout_id.to_s.length > 48 - fail ArgumentError, 'invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.' - end - - @visa_checkout_id = visa_checkout_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 && - payment_solution == o.payment_solution && - reconciliation_id == o.reconciliation_id && - link_id == o.link_id && - report_group == o.report_group && - visa_checkout_id == o.visa_checkout_id && - issuer == o.issuer - end - - # @see the `==` method - # @param [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, reconciliation_id, link_id, report_group, visa_checkout_id, issuer].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2paymentsidreversals_reversal_information.rb b/lib/cyberSource_client/models/v2paymentsidreversals_reversal_information.rb deleted file mode 100644 index dedafa0e..00000000 --- a/lib/cyberSource_client/models/v2paymentsidreversals_reversal_information.rb +++ /dev/null @@ -1,211 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2paymentsidreversalsReversalInformation - attr_accessor :amount_details - - # Reason for the authorization reversal. Possible value: - 34: Suspected fraud CyberSource ignores this field for processors that do not support this value. - attr_accessor :reason - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'amount_details' => :'amountDetails', - :'reason' => :'reason' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'amount_details' => :'V2paymentsidreversalsReversalInformationAmountDetails', - :'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?(:'amountDetails') - self.amount_details = attributes[:'amountDetails'] - 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 - #anjana - # 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 - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - # anjana - # return false if !@reason.nil? && @reason.to_s.length > 3 - true - end - - # Custom attribute writer method with validation - # @param [Object] reason Value to be assigned - def reason=(reason) - # anjana - # 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 - - @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 && - amount_details == o.amount_details && - 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 - [amount_details, 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_client/models/v2paymentsidreversals_reversal_information_amount_details.rb b/lib/cyberSource_client/models/v2paymentsidreversals_reversal_information_amount_details.rb deleted file mode 100644 index 184ab9eb..00000000 --- a/lib/cyberSource_client/models/v2paymentsidreversals_reversal_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 V2paymentsidreversalsReversalInformationAmountDetails - # 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 - - # 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 > 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 - - invalid_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 - 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 - - # 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_client/models/v2payouts_merchant_information.rb b/lib/cyberSource_client/models/v2payouts_merchant_information.rb deleted file mode 100644 index 6cc09cbb..00000000 --- a/lib/cyberSource_client/models/v2payouts_merchant_information.rb +++ /dev/null @@ -1,258 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2payoutsMerchantInformation - # Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :category_code - - # Time that the transaction was submitted in local time. The time is in hhmmss format. - attr_accessor :submit_local_date_time - - # Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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 :vat_registration_number - - attr_accessor :merchant_descriptor - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'category_code' => :'categoryCode', - :'submit_local_date_time' => :'submitLocalDateTime', - :'vat_registration_number' => :'vatRegistrationNumber', - :'merchant_descriptor' => :'merchantDescriptor' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'category_code' => :'Integer', - :'submit_local_date_time' => :'String', - :'vat_registration_number' => :'String', - :'merchant_descriptor' => :'V2payoutsMerchantInformationMerchantDescriptor' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'categoryCode') - self.category_code = attributes[:'categoryCode'] - end - - if attributes.has_key?(:'submitLocalDateTime') - self.submit_local_date_time = attributes[:'submitLocalDateTime'] - end - - if attributes.has_key?(:'vatRegistrationNumber') - self.vat_registration_number = attributes[:'vatRegistrationNumber'] - end - - 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 - if !@category_code.nil? && @category_code > 9999 - invalid_properties.push('invalid value for "category_code", must be smaller than or equal to 9999.') - end - - if !@submit_local_date_time.nil? && @submit_local_date_time.to_s.length > 6 - invalid_properties.push('invalid value for "submit_local_date_time", the character length must be smaller than or equal to 6.') - end - - if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 - invalid_properties.push('invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.') - 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 !@category_code.nil? && @category_code > 9999 - return false if !@submit_local_date_time.nil? && @submit_local_date_time.to_s.length > 6 - return false if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 - true - end - - # Custom attribute writer method with validation - # @param [Object] category_code Value to be assigned - def category_code=(category_code) - if !category_code.nil? && category_code > 9999 - fail ArgumentError, 'invalid value for "category_code", must be smaller than or equal to 9999.' - end - - @category_code = category_code - end - - # Custom attribute writer method with validation - # @param [Object] submit_local_date_time Value to be assigned - def submit_local_date_time=(submit_local_date_time) - if !submit_local_date_time.nil? && submit_local_date_time.to_s.length > 6 - fail ArgumentError, 'invalid value for "submit_local_date_time", the character length must be smaller than or equal to 6.' - end - - @submit_local_date_time = submit_local_date_time - end - - # Custom attribute writer method with validation - # @param [Object] vat_registration_number Value to be assigned - def vat_registration_number=(vat_registration_number) - if !vat_registration_number.nil? && vat_registration_number.to_s.length > 21 - fail ArgumentError, 'invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.' - end - - @vat_registration_number = vat_registration_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 && - category_code == o.category_code && - submit_local_date_time == o.submit_local_date_time && - vat_registration_number == o.vat_registration_number && - 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 - [category_code, submit_local_date_time, vat_registration_number, 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_client/models/v2payouts_merchant_information_merchant_descriptor.rb b/lib/cyberSource_client/models/v2payouts_merchant_information_merchant_descriptor.rb deleted file mode 100644 index 8af02d15..00000000 --- a/lib/cyberSource_client/models/v2payouts_merchant_information_merchant_descriptor.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 V2payoutsMerchantInformationMerchantDescriptor - # 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 - - # Merchant City. 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) - attr_accessor :locality - - # 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) - attr_accessor :country - - # Merchant State. 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) - attr_accessor :administrative_area - - # 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) - attr_accessor :postal_code - - # 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) * FDCCompass (13) * Paymentech (13) - attr_accessor :contact - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'name' => :'name', - :'locality' => :'locality', - :'country' => :'country', - :'administrative_area' => :'administrativeArea', - :'postal_code' => :'postalCode', - :'contact' => :'contact' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'name' => :'String', - :'locality' => :'String', - :'country' => :'String', - :'administrative_area' => :'String', - :'postal_code' => :'String', - :'contact' => :'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?(:'locality') - self.locality = attributes[:'locality'] - end - - if attributes.has_key?(:'country') - self.country = attributes[:'country'] - 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?(:'contact') - self.contact = attributes[:'contact'] - end - end - - # Show invalid properties 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 - - if !@locality.nil? && @locality.to_s.length > 13 - invalid_properties.push('invalid value for "locality", the character length must be smaller than or equal to 13.') - 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 !@administrative_area.nil? && @administrative_area.to_s.length > 3 - invalid_properties.push('invalid value for "administrative_area", the character length must be smaller than or equal to 3.') - end - - if !@postal_code.nil? && @postal_code.to_s.length > 14 - invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 14.') - end - - if !@contact.nil? && @contact.to_s.length > 14 - invalid_properties.push('invalid value for "contact", the character length must be smaller than or equal to 14.') - 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 - return false if !@locality.nil? && @locality.to_s.length > 13 - return false if !@country.nil? && @country.to_s.length > 2 - return false if !@administrative_area.nil? && @administrative_area.to_s.length > 3 - return false if !@postal_code.nil? && @postal_code.to_s.length > 14 - return false if !@contact.nil? && @contact.to_s.length > 14 - 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 - - # Custom attribute writer method with validation - # @param [Object] locality Value to be assigned - def locality=(locality) - if !locality.nil? && locality.to_s.length > 13 - fail ArgumentError, 'invalid value for "locality", the character length must be smaller than or equal to 13.' - end - - @locality = locality - 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] administrative_area Value to be assigned - def administrative_area=(administrative_area) - if !administrative_area.nil? && administrative_area.to_s.length > 3 - fail ArgumentError, 'invalid value for "administrative_area", the character length must be smaller than or equal to 3.' - 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 > 14 - fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 14.' - end - - @postal_code = postal_code - end - - # Custom attribute writer method with validation - # @param [Object] contact Value to be assigned - def contact=(contact) - if !contact.nil? && contact.to_s.length > 14 - fail ArgumentError, 'invalid value for "contact", the character length must be smaller than or equal to 14.' - end - - @contact = contact - end - - # 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 && - locality == o.locality && - country == o.country && - administrative_area == o.administrative_area && - postal_code == o.postal_code && - contact == o.contact - end - - # @see the `==` method - # @param [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, locality, country, administrative_area, postal_code, contact].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payouts_order_information.rb b/lib/cyberSource_client/models/v2payouts_order_information.rb deleted file mode 100644 index ba98596e..00000000 --- a/lib/cyberSource_client/models/v2payouts_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 V2payoutsOrderInformation - attr_accessor :amount_details - - attr_accessor :bill_to - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'amount_details' => :'amountDetails', - :'bill_to' => :'billTo' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'amount_details' => :'V2payoutsOrderInformationAmountDetails', - :'bill_to' => :'V2payoutsOrderInformationBillTo' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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?(:'billTo') - self.bill_to = attributes[:'billTo'] - end - end - - # Show invalid properties 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 && - bill_to == o.bill_to - end - - # @see the `==` method - # @param [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, bill_to].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payouts_order_information_amount_details.rb b/lib/cyberSource_client/models/v2payouts_order_information_amount_details.rb deleted file mode 100644 index a0a9e6c4..00000000 --- a/lib/cyberSource_client/models/v2payouts_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 V2payoutsOrderInformationAmountDetails - # 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 - - # The surcharge amount is included in the total transaction amount but is passed in a separate field to the issuer and acquirer for tracking. The issuer can provide information about the surcharge amount to the customer. * Applicable only for CTV for Payouts. * CTV (<= 08) For processor-specific information, see the surcharge_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 :surcharge_amount - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'total_amount' => :'totalAmount', - :'currency' => :'currency', - :'surcharge_amount' => :'surchargeAmount' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'total_amount' => :'String', - :'currency' => :'String', - :'surcharge_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?(:'surchargeAmount') - self.surcharge_amount = attributes[:'surchargeAmount'] - end - end - - # Show invalid properties 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 !@surcharge_amount.nil? && @surcharge_amount.to_s.length > 15 - invalid_properties.push('invalid value for "surcharge_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 !@surcharge_amount.nil? && @surcharge_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] surcharge_amount Value to be assigned - def surcharge_amount=(surcharge_amount) - if !surcharge_amount.nil? && surcharge_amount.to_s.length > 15 - fail ArgumentError, 'invalid value for "surcharge_amount", the character length must be smaller than or equal to 15.' - end - - @surcharge_amount = surcharge_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 && - surcharge_amount == o.surcharge_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, surcharge_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_client/models/v2payouts_order_information_bill_to.rb b/lib/cyberSource_client/models/v2payouts_order_information_bill_to.rb deleted file mode 100644 index 39e42df5..00000000 --- a/lib/cyberSource_client/models/v2payouts_order_information_bill_to.rb +++ /dev/null @@ -1,443 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2payoutsOrderInformationBillTo - # 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 - - # 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 - - # 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 - - # 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 - - # 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 - - # Customer's phone number type. For Payouts: This field may be sent only for FDC Compass. Possible Values - * day * home * night * work - attr_accessor :phone_type - - 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 - { - :'first_name' => :'firstName', - :'last_name' => :'lastName', - :'address1' => :'address1', - :'address2' => :'address2', - :'country' => :'country', - :'locality' => :'locality', - :'administrative_area' => :'administrativeArea', - :'postal_code' => :'postalCode', - :'phone_number' => :'phoneNumber', - :'phone_type' => :'phoneType' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'first_name' => :'String', - :'last_name' => :'String', - :'address1' => :'String', - :'address2' => :'String', - :'country' => :'String', - :'locality' => :'String', - :'administrative_area' => :'String', - :'postal_code' => :'String', - :'phone_number' => :'String', - :'phone_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?(:'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?(:'country') - self.country = attributes[:'country'] - 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?(:'phoneNumber') - self.phone_number = attributes[:'phoneNumber'] - end - - if attributes.has_key?(:'phoneType') - self.phone_type = attributes[:'phoneType'] - end - end - - # Show invalid properties 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 !@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 !@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 !@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 !@country.nil? && @country.to_s.length > 2 - 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 !@phone_number.nil? && @phone_number.to_s.length > 15 - phone_type_validator = EnumAttributeValidator.new('String', ['day', 'home', 'night', 'work']) - return false unless phone_type_validator.valid?(@phone_type) - 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] 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] 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] 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 - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] phone_type Object to be assigned - def phone_type=(phone_type) - validator = EnumAttributeValidator.new('String', ['day', 'home', 'night', 'work']) - unless validator.valid?(phone_type) - fail ArgumentError, 'invalid value for "phone_type", must be one of #{validator.allowable_values}.' - end - @phone_type = phone_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 && - first_name == o.first_name && - last_name == o.last_name && - address1 == o.address1 && - address2 == o.address2 && - country == o.country && - locality == o.locality && - administrative_area == o.administrative_area && - postal_code == o.postal_code && - phone_number == o.phone_number && - phone_type == o.phone_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 - [first_name, last_name, address1, address2, country, locality, administrative_area, postal_code, phone_number, phone_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_client/models/v2payouts_payment_information.rb b/lib/cyberSource_client/models/v2payouts_payment_information.rb deleted file mode 100644 index f70369e4..00000000 --- a/lib/cyberSource_client/models/v2payouts_payment_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 V2payoutsPaymentInformation - attr_accessor :card - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'card' => :'card' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'card' => :'V2payoutsPaymentInformationCard' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # 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 - end - - # Show invalid properties 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 - end - - # @see the `==` method - # @param [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].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payouts_payment_information_card.rb b/lib/cyberSource_client/models/v2payouts_payment_information_card.rb deleted file mode 100644 index cf0bb7ba..00000000 --- a/lib/cyberSource_client/models/v2payouts_payment_information_card.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 V2payoutsPaymentInformationCard - # Type of card to authorize. * 001 Visa * 002 Mastercard * 003 Amex * 004 Discover - attr_accessor :type - - # Customer’s credit card number. Encoded Account Numbers when processing encoded account numbers, use this field for the encoded account number. For processor-specific information, see the customer_cc_number field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) - attr_accessor :number - - # 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 - - # Flag that specifies the type of account associated with the card. The cardholder provides this information during the payment process. This field is required in the following cases. * Debit transactions on Cielo and Comercio Latino. * Transactions with Brazilian-issued cards on CyberSource through VisaNet. * Applicable only for CTV. Note Combo cards in Brazil contain credit and debit functionality in a single card. Visa systems use a credit bank identification number (BIN) for this type of card. Using the BIN to determine whether a card is debit or credit can cause transactions with these cards to be processed incorrectly. CyberSource strongly recommends that you include this field for combo card transactions. Possible values include the following. * CH: Checking account * CR: Credit card account * SA: Savings account * UA: Universal Account For combo card transactions with Mastercard in Brazil on CyberSource through VisaNet, the **cardUsage** field is also supported. - attr_accessor :source_account_type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'type' => :'type', - :'number' => :'number', - :'expiration_month' => :'expirationMonth', - :'expiration_year' => :'expirationYear', - :'source_account_type' => :'sourceAccountType' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'type' => :'String', - :'number' => :'String', - :'expiration_month' => :'String', - :'expiration_year' => :'String', - :'source_account_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 - - if attributes.has_key?(:'number') - self.number = attributes[:'number'] - 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?(:'sourceAccountType') - self.source_account_type = attributes[:'sourceAccountType'] - end - end - - # Show invalid properties 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 !@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 !@number.nil? && @number.to_s.length > 20 - invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 20.') - 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 !@source_account_type.nil? && @source_account_type.to_s.length > 2 - invalid_properties.push('invalid value for "source_account_type", 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 !@type.nil? && @type.to_s.length > 3 - return false if !@number.nil? && @number.to_s.length > 20 - 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 !@source_account_type.nil? && @source_account_type.to_s.length > 2 - true - 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] number Value to be assigned - def number=(number) - if !number.nil? && number.to_s.length > 20 - fail ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 20.' - end - - @number = number - 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] source_account_type Value to be assigned - def source_account_type=(source_account_type) - if !source_account_type.nil? && source_account_type.to_s.length > 2 - fail ArgumentError, 'invalid value for "source_account_type", the character length must be smaller than or equal to 2.' - end - - @source_account_type = source_account_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 && - type == o.type && - number == o.number && - expiration_month == o.expiration_month && - expiration_year == o.expiration_year && - source_account_type == o.source_account_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, number, expiration_month, expiration_year, source_account_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_client/models/v2payouts_processing_information.rb b/lib/cyberSource_client/models/v2payouts_processing_information.rb deleted file mode 100644 index 4375693d..00000000 --- a/lib/cyberSource_client/models/v2payouts_processing_information.rb +++ /dev/null @@ -1,283 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2payoutsProcessingInformation - # Payouts transaction type. Applicable Processors: FDC Compass, Paymentech, CtV Possible values: **Credit Card Bill Payment** - **CP**: credit card bill payment **Funds Disbursement** - **FD**: funds disbursement - **GD**: government disbursement - **MD**: merchant disbursement **Money Transfer** - **AA**: account to account. Sender and receiver are same person. - **PP**: person to person. Sender and receiver are different. **Prepaid Load** - **TU**: top up - attr_accessor :business_application_id - - # This field is optionally used by Push Payments Gateway participants (merchants and acquirers) to get the attributes for specified networks only. The networks specified in this field must be a subset of the information provided during program enrollment. Refer to Sharing Group Code/Network Routing Order. Note: Supported only in US for domestic transactions involving Push Payments Gateway Service. VisaNet checks to determine if there are issuer routing preferences for any of the networks specified by the network routing order. If an issuer preference exists for one of the specified debit networks, VisaNet makes a routing selection based on the issuer’s preference. If an issuer preference exists for more than one of the specified debit networks, or if no issuer preference exists, VisaNet makes a selection based on the acquirer’s routing priorities. See https://developer.visa.com/request_response_codes#network_id_and_sharing_group_code , under section 'Network ID and Sharing Group Code' on the left panel for available values - attr_accessor :network_routing_order - - # Type of transaction. Possible value for Fast Payments transactions: - internet - attr_accessor :commerce_indicator - - # Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). - attr_accessor :reconciliation_id - - attr_accessor :payouts_options - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'business_application_id' => :'businessApplicationId', - :'network_routing_order' => :'networkRoutingOrder', - :'commerce_indicator' => :'commerceIndicator', - :'reconciliation_id' => :'reconciliationId', - :'payouts_options' => :'payoutsOptions' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'business_application_id' => :'String', - :'network_routing_order' => :'String', - :'commerce_indicator' => :'String', - :'reconciliation_id' => :'String', - :'payouts_options' => :'V2payoutsProcessingInformationPayoutsOptions' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'businessApplicationId') - self.business_application_id = attributes[:'businessApplicationId'] - end - - if attributes.has_key?(:'networkRoutingOrder') - self.network_routing_order = attributes[:'networkRoutingOrder'] - end - - if attributes.has_key?(:'commerceIndicator') - self.commerce_indicator = attributes[:'commerceIndicator'] - end - - if attributes.has_key?(:'reconciliationId') - self.reconciliation_id = attributes[:'reconciliationId'] - end - - if attributes.has_key?(:'payoutsOptions') - self.payouts_options = attributes[:'payoutsOptions'] - end - end - - # Show invalid properties 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 !@business_application_id.nil? && @business_application_id.to_s.length > 2 - invalid_properties.push('invalid value for "business_application_id", the character length must be smaller than or equal to 2.') - end - - if !@network_routing_order.nil? && @network_routing_order.to_s.length > 30 - invalid_properties.push('invalid value for "network_routing_order", the character length must be smaller than or equal to 30.') - end - - if !@commerce_indicator.nil? && @commerce_indicator.to_s.length > 13 - invalid_properties.push('invalid value for "commerce_indicator", the character length must be smaller than or equal to 13.') - 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 !@business_application_id.nil? && @business_application_id.to_s.length > 2 - return false if !@network_routing_order.nil? && @network_routing_order.to_s.length > 30 - return false if !@commerce_indicator.nil? && @commerce_indicator.to_s.length > 13 - return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 - true - end - - # Custom attribute writer method with validation - # @param [Object] business_application_id Value to be assigned - def business_application_id=(business_application_id) - if !business_application_id.nil? && business_application_id.to_s.length > 2 - fail ArgumentError, 'invalid value for "business_application_id", the character length must be smaller than or equal to 2.' - end - - @business_application_id = business_application_id - end - - # Custom attribute writer method with validation - # @param [Object] network_routing_order Value to be assigned - def network_routing_order=(network_routing_order) - if !network_routing_order.nil? && network_routing_order.to_s.length > 30 - fail ArgumentError, 'invalid value for "network_routing_order", the character length must be smaller than or equal to 30.' - end - - @network_routing_order = network_routing_order - 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 > 13 - fail ArgumentError, 'invalid value for "commerce_indicator", the character length must be smaller than or equal to 13.' - end - - @commerce_indicator = commerce_indicator - 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 && - business_application_id == o.business_application_id && - network_routing_order == o.network_routing_order && - commerce_indicator == o.commerce_indicator && - reconciliation_id == o.reconciliation_id && - payouts_options == o.payouts_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 - [business_application_id, network_routing_order, commerce_indicator, reconciliation_id, payouts_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_client/models/v2payouts_processing_information_payouts_options.rb b/lib/cyberSource_client/models/v2payouts_processing_information_payouts_options.rb deleted file mode 100644 index c38339c4..00000000 --- a/lib/cyberSource_client/models/v2payouts_processing_information_payouts_options.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 V2payoutsProcessingInformationPayoutsOptions - # This field identifies the card acceptor for defining the point of service terminal in both local and interchange environments. An acquirer-assigned code identifying the card acceptor for the transaction. Depending on the acquirer and merchant billing and reporting requirements, the code can represent a merchant, a specific merchant location, or a specific merchant location terminal. Acquiring Institution Identification Code uniquely identifies the merchant. The value from the original is required in any subsequent messages, including reversals, chargebacks, and representments. * Applicable only for CTV for Payouts. - attr_accessor :acquirer_merchant_id - - # This code identifies the financial institution acting as the acquirer of this customer transaction. The acquirer is the member or system user that signed the merchant or ADM or dispensed cash. This number is usually Visa-assigned. * Applicable only for CTV for Payouts. - attr_accessor :acquirer_bin - - # This field contains a number that is used with other data elements as a key to identify and track all messages related to a given cardholder transaction; that is, to a given transaction set. * Applicable only for CTV for Payouts. - attr_accessor :retrieval_reference_number - - # Visa-generated transaction identifier (TID) that is unique for each original authorization and financial request. * Applicable only for CTV for Payouts. - attr_accessor :account_funding_reference_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'acquirer_merchant_id' => :'acquirerMerchantId', - :'acquirer_bin' => :'acquirerBin', - :'retrieval_reference_number' => :'retrievalReferenceNumber', - :'account_funding_reference_id' => :'accountFundingReferenceId' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'acquirer_merchant_id' => :'String', - :'acquirer_bin' => :'String', - :'retrieval_reference_number' => :'String', - :'account_funding_reference_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?(:'acquirerMerchantId') - self.acquirer_merchant_id = attributes[:'acquirerMerchantId'] - end - - if attributes.has_key?(:'acquirerBin') - self.acquirer_bin = attributes[:'acquirerBin'] - end - - if attributes.has_key?(:'retrievalReferenceNumber') - self.retrieval_reference_number = attributes[:'retrievalReferenceNumber'] - end - - if attributes.has_key?(:'accountFundingReferenceId') - self.account_funding_reference_id = attributes[:'accountFundingReferenceId'] - end - end - - # Show invalid properties 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 !@acquirer_merchant_id.nil? && @acquirer_merchant_id.to_s.length > 15 - invalid_properties.push('invalid value for "acquirer_merchant_id", the character length must be smaller than or equal to 15.') - end - - if !@acquirer_bin.nil? && @acquirer_bin.to_s.length > 11 - invalid_properties.push('invalid value for "acquirer_bin", the character length must be smaller than or equal to 11.') - end - - if !@retrieval_reference_number.nil? && @retrieval_reference_number.to_s.length > 12 - invalid_properties.push('invalid value for "retrieval_reference_number", the character length must be smaller than or equal to 12.') - end - - if !@account_funding_reference_id.nil? && @account_funding_reference_id.to_s.length > 15 - invalid_properties.push('invalid value for "account_funding_reference_id", 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 !@acquirer_merchant_id.nil? && @acquirer_merchant_id.to_s.length > 15 - return false if !@acquirer_bin.nil? && @acquirer_bin.to_s.length > 11 - return false if !@retrieval_reference_number.nil? && @retrieval_reference_number.to_s.length > 12 - return false if !@account_funding_reference_id.nil? && @account_funding_reference_id.to_s.length > 15 - true - end - - # Custom attribute writer method with validation - # @param [Object] acquirer_merchant_id Value to be assigned - def acquirer_merchant_id=(acquirer_merchant_id) - if !acquirer_merchant_id.nil? && acquirer_merchant_id.to_s.length > 15 - fail ArgumentError, 'invalid value for "acquirer_merchant_id", the character length must be smaller than or equal to 15.' - end - - @acquirer_merchant_id = acquirer_merchant_id - end - - # Custom attribute writer method with validation - # @param [Object] acquirer_bin Value to be assigned - def acquirer_bin=(acquirer_bin) - if !acquirer_bin.nil? && acquirer_bin.to_s.length > 11 - fail ArgumentError, 'invalid value for "acquirer_bin", the character length must be smaller than or equal to 11.' - end - - @acquirer_bin = acquirer_bin - end - - # Custom attribute writer method with validation - # @param [Object] retrieval_reference_number Value to be assigned - def retrieval_reference_number=(retrieval_reference_number) - if !retrieval_reference_number.nil? && retrieval_reference_number.to_s.length > 12 - fail ArgumentError, 'invalid value for "retrieval_reference_number", the character length must be smaller than or equal to 12.' - end - - @retrieval_reference_number = retrieval_reference_number - end - - # Custom attribute writer method with validation - # @param [Object] account_funding_reference_id Value to be assigned - def account_funding_reference_id=(account_funding_reference_id) - if !account_funding_reference_id.nil? && account_funding_reference_id.to_s.length > 15 - fail ArgumentError, 'invalid value for "account_funding_reference_id", the character length must be smaller than or equal to 15.' - end - - @account_funding_reference_id = account_funding_reference_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 && - acquirer_merchant_id == o.acquirer_merchant_id && - acquirer_bin == o.acquirer_bin && - retrieval_reference_number == o.retrieval_reference_number && - account_funding_reference_id == o.account_funding_reference_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 - [acquirer_merchant_id, acquirer_bin, retrieval_reference_number, account_funding_reference_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_client/models/v2payouts_recipient_information.rb b/lib/cyberSource_client/models/v2payouts_recipient_information.rb deleted file mode 100644 index 00428164..00000000 --- a/lib/cyberSource_client/models/v2payouts_recipient_information.rb +++ /dev/null @@ -1,433 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2payoutsRecipientInformation - # First name of recipient. characters. * CTV (14) * Paymentech (30) - attr_accessor :first_name - - # Middle Initial of recipient. Required only for FDCCompass. - attr_accessor :middle_initial - - # Last name of recipient. characters. * CTV (14) * Paymentech (30) - attr_accessor :last_name - - # Recipient address information. Required only for FDCCompass. - attr_accessor :address1 - - # Recipient city. Required only for FDCCompass. - attr_accessor :locality - - # Recipient State. Required only for FDCCompass. - attr_accessor :administrative_area - - # Recipient country code. Required only for FDCCompass. - attr_accessor :country - - # Recipient postal code. Required only for FDCCompass. - attr_accessor :postal_code - - # Recipient phone number. Required only for FDCCompass. - attr_accessor :phone_number - - # Recipient date of birth in YYYYMMDD format. Required only for FDCCompass. - attr_accessor :date_of_birth - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'first_name' => :'firstName', - :'middle_initial' => :'middleInitial', - :'last_name' => :'lastName', - :'address1' => :'address1', - :'locality' => :'locality', - :'administrative_area' => :'administrativeArea', - :'country' => :'country', - :'postal_code' => :'postalCode', - :'phone_number' => :'phoneNumber', - :'date_of_birth' => :'dateOfBirth' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'first_name' => :'String', - :'middle_initial' => :'String', - :'last_name' => :'String', - :'address1' => :'String', - :'locality' => :'String', - :'administrative_area' => :'String', - :'country' => :'String', - :'postal_code' => :'String', - :'phone_number' => :'String', - :'date_of_birth' => :'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?(:'middleInitial') - self.middle_initial = attributes[:'middleInitial'] - 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?(:'locality') - self.locality = attributes[:'locality'] - end - - if attributes.has_key?(:'administrativeArea') - self.administrative_area = attributes[:'administrativeArea'] - end - - if attributes.has_key?(:'country') - self.country = attributes[:'country'] - end - - if attributes.has_key?(:'postalCode') - self.postal_code = attributes[:'postalCode'] - end - - if attributes.has_key?(:'phoneNumber') - self.phone_number = attributes[:'phoneNumber'] - end - - if attributes.has_key?(:'dateOfBirth') - self.date_of_birth = attributes[:'dateOfBirth'] - end - end - - # Show invalid properties 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 > 35 - invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 35.') - end - - if !@middle_initial.nil? && @middle_initial.to_s.length > 1 - invalid_properties.push('invalid value for "middle_initial", the character length must be smaller than or equal to 1.') - end - - if !@last_name.nil? && @last_name.to_s.length > 35 - invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 35.') - end - - if !@address1.nil? && @address1.to_s.length > 50 - invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 50.') - end - - if !@locality.nil? && @locality.to_s.length > 25 - invalid_properties.push('invalid value for "locality", the character length must be smaller than or equal to 25.') - end - - if !@administrative_area.nil? && @administrative_area.to_s.length > 3 - invalid_properties.push('invalid value for "administrative_area", the character length must be smaller than or equal to 3.') - 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 !@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 !@phone_number.nil? && @phone_number.to_s.length > 20 - invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 20.') - end - - if !@date_of_birth.nil? && @date_of_birth.to_s.length > 8 - invalid_properties.push('invalid value for "date_of_birth", the character length must be smaller than or equal to 8.') - end - - if !@date_of_birth.nil? && @date_of_birth.to_s.length < 8 - invalid_properties.push('invalid value for "date_of_birth", the character length must be great 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 !@first_name.nil? && @first_name.to_s.length > 35 - return false if !@middle_initial.nil? && @middle_initial.to_s.length > 1 - return false if !@last_name.nil? && @last_name.to_s.length > 35 - return false if !@address1.nil? && @address1.to_s.length > 50 - return false if !@locality.nil? && @locality.to_s.length > 25 - return false if !@administrative_area.nil? && @administrative_area.to_s.length > 3 - return false if !@country.nil? && @country.to_s.length > 2 - return false if !@postal_code.nil? && @postal_code.to_s.length > 10 - return false if !@phone_number.nil? && @phone_number.to_s.length > 20 - return false if !@date_of_birth.nil? && @date_of_birth.to_s.length > 8 - return false if !@date_of_birth.nil? && @date_of_birth.to_s.length < 8 - 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 > 35 - fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 35.' - end - - @first_name = first_name - end - - # Custom attribute writer method with validation - # @param [Object] middle_initial Value to be assigned - def middle_initial=(middle_initial) - if !middle_initial.nil? && middle_initial.to_s.length > 1 - fail ArgumentError, 'invalid value for "middle_initial", the character length must be smaller than or equal to 1.' - end - - @middle_initial = middle_initial - 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 > 35 - fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 35.' - 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 > 50 - fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 50.' - end - - @address1 = address1 - end - - # Custom attribute writer method with validation - # @param [Object] locality Value to be assigned - def locality=(locality) - if !locality.nil? && locality.to_s.length > 25 - fail ArgumentError, 'invalid value for "locality", the character length must be smaller than or equal to 25.' - 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 > 3 - fail ArgumentError, 'invalid value for "administrative_area", the character length must be smaller than or equal to 3.' - end - - @administrative_area = administrative_area - 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] 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] phone_number Value to be assigned - def phone_number=(phone_number) - if !phone_number.nil? && phone_number.to_s.length > 20 - fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 20.' - end - - @phone_number = phone_number - end - - # Custom attribute writer method with validation - # @param [Object] date_of_birth Value to be assigned - def date_of_birth=(date_of_birth) - if !date_of_birth.nil? && date_of_birth.to_s.length > 8 - fail ArgumentError, 'invalid value for "date_of_birth", the character length must be smaller than or equal to 8.' - end - - if !date_of_birth.nil? && date_of_birth.to_s.length < 8 - fail ArgumentError, 'invalid value for "date_of_birth", the character length must be great than or equal to 8.' - end - - @date_of_birth = date_of_birth - end - - # 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 && - middle_initial == o.middle_initial && - last_name == o.last_name && - address1 == o.address1 && - locality == o.locality && - administrative_area == o.administrative_area && - country == o.country && - postal_code == o.postal_code && - phone_number == o.phone_number && - date_of_birth == o.date_of_birth - end - - # @see the `==` method - # @param [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, middle_initial, last_name, address1, locality, administrative_area, country, postal_code, phone_number, date_of_birth].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = CyberSource.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/lib/cyberSource_client/models/v2payouts_sender_information.rb b/lib/cyberSource_client/models/v2payouts_sender_information.rb deleted file mode 100644 index d5769839..00000000 --- a/lib/cyberSource_client/models/v2payouts_sender_information.rb +++ /dev/null @@ -1,517 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'date' - -module CyberSource - class V2payoutsSenderInformation - # Reference number generated by you that uniquely identifies the sender. - attr_accessor :reference_number - - attr_accessor :account - - # First name of sender (Optional). * CTV (14) * Paymentech (30) - attr_accessor :first_name - - # Recipient middle initial (Optional). - attr_accessor :middle_initial - - # Recipient last name (Optional). * CTV (14) * Paymentech (30) - attr_accessor :last_name - - # Name of sender. **Funds Disbursement** This value is the name of the originator sending the funds disbursement. * CTV, Paymentech (30) - attr_accessor :name - - # Street address of sender. **Funds Disbursement** This value is the address of the originator sending the funds disbursement. - attr_accessor :address1 - - # City of sender. **Funds Disbursement** This value is the city of the originator sending the funds disbursement. - attr_accessor :locality - - # Sender’s state. Use the State, Province, and Territory Codes for the United States and Canada. - attr_accessor :administrative_area - - # Country of sender. Use the ISO Standard Country Codes. * CTV (3) - attr_accessor :country_code - - # Sender’s postal code. Required only for FDCCompass. - attr_accessor :postal_code - - # Sender’s phone number. Required only for FDCCompass. - attr_accessor :phone_number - - # Sender’s date of birth in YYYYMMDD format. Required only for FDCCompass. - attr_accessor :date_of_birth - - # Customer's government-assigned tax identification number. - attr_accessor :vat_registration_number - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'reference_number' => :'referenceNumber', - :'account' => :'account', - :'first_name' => :'firstName', - :'middle_initial' => :'middleInitial', - :'last_name' => :'lastName', - :'name' => :'name', - :'address1' => :'address1', - :'locality' => :'locality', - :'administrative_area' => :'administrativeArea', - :'country_code' => :'countryCode', - :'postal_code' => :'postalCode', - :'phone_number' => :'phoneNumber', - :'date_of_birth' => :'dateOfBirth', - :'vat_registration_number' => :'vatRegistrationNumber' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'reference_number' => :'String', - :'account' => :'V2payoutsSenderInformationAccount', - :'first_name' => :'String', - :'middle_initial' => :'String', - :'last_name' => :'String', - :'name' => :'String', - :'address1' => :'String', - :'locality' => :'String', - :'administrative_area' => :'String', - :'country_code' => :'String', - :'postal_code' => :'String', - :'phone_number' => :'String', - :'date_of_birth' => :'String', - :'vat_registration_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 - - if attributes.has_key?(:'account') - self.account = attributes[:'account'] - end - - if attributes.has_key?(:'firstName') - self.first_name = attributes[:'firstName'] - end - - if attributes.has_key?(:'middleInitial') - self.middle_initial = attributes[:'middleInitial'] - end - - if attributes.has_key?(:'lastName') - self.last_name = attributes[:'lastName'] - end - - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.has_key?(:'address1') - self.address1 = attributes[:'address1'] - 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?(:'countryCode') - self.country_code = attributes[:'countryCode'] - end - - if attributes.has_key?(:'postalCode') - self.postal_code = attributes[:'postalCode'] - end - - if attributes.has_key?(:'phoneNumber') - self.phone_number = attributes[:'phoneNumber'] - end - - if attributes.has_key?(:'dateOfBirth') - self.date_of_birth = attributes[:'dateOfBirth'] - end - - if attributes.has_key?(:'vatRegistrationNumber') - self.vat_registration_number = attributes[:'vatRegistrationNumber'] - end - end - - # Show invalid properties 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 - - if !@first_name.nil? && @first_name.to_s.length > 35 - invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 35.') - end - - if !@middle_initial.nil? && @middle_initial.to_s.length > 1 - invalid_properties.push('invalid value for "middle_initial", the character length must be smaller than or equal to 1.') - end - - if !@last_name.nil? && @last_name.to_s.length > 35 - invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 35.') - end - - if !@name.nil? && @name.to_s.length > 24 - invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 24.') - end - - if !@address1.nil? && @address1.to_s.length > 50 - invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 50.') - end - - if !@locality.nil? && @locality.to_s.length > 25 - invalid_properties.push('invalid value for "locality", the character length must be smaller than or equal to 25.') - 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 !@country_code.nil? && @country_code.to_s.length > 2 - invalid_properties.push('invalid value for "country_code", 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 !@phone_number.nil? && @phone_number.to_s.length > 20 - invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 20.') - end - - if !@date_of_birth.nil? && @date_of_birth.to_s.length > 8 - invalid_properties.push('invalid value for "date_of_birth", the character length must be smaller than or equal to 8.') - end - - if !@date_of_birth.nil? && @date_of_birth.to_s.length < 8 - invalid_properties.push('invalid value for "date_of_birth", the character length must be great than or equal to 8.') - end - - if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 13 - invalid_properties.push('invalid value for "vat_registration_number", the character length must be smaller than or equal to 13.') - 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 - return false if !@first_name.nil? && @first_name.to_s.length > 35 - return false if !@middle_initial.nil? && @middle_initial.to_s.length > 1 - return false if !@last_name.nil? && @last_name.to_s.length > 35 - return false if !@name.nil? && @name.to_s.length > 24 - return false if !@address1.nil? && @address1.to_s.length > 50 - return false if !@locality.nil? && @locality.to_s.length > 25 - return false if !@administrative_area.nil? && @administrative_area.to_s.length > 2 - return false if !@country_code.nil? && @country_code.to_s.length > 2 - return false if !@postal_code.nil? && @postal_code.to_s.length > 10 - return false if !@phone_number.nil? && @phone_number.to_s.length > 20 - return false if !@date_of_birth.nil? && @date_of_birth.to_s.length > 8 - return false if !@date_of_birth.nil? && @date_of_birth.to_s.length < 8 - return false if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 13 - 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 - - # 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 > 35 - fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 35.' - end - - @first_name = first_name - end - - # Custom attribute writer method with validation - # @param [Object] middle_initial Value to be assigned - def middle_initial=(middle_initial) - if !middle_initial.nil? && middle_initial.to_s.length > 1 - fail ArgumentError, 'invalid value for "middle_initial", the character length must be smaller than or equal to 1.' - end - - @middle_initial = middle_initial - 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 > 35 - fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 35.' - end - - @last_name = last_name - end - - # Custom attribute writer method with validation - # @param [Object] name Value to be assigned - def name=(name) - if !name.nil? && name.to_s.length > 24 - fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 24.' - end - - @name = 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 > 50 - fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 50.' - end - - @address1 = address1 - end - - # Custom attribute writer method with validation - # @param [Object] locality Value to be assigned - def locality=(locality) - if !locality.nil? && locality.to_s.length > 25 - fail ArgumentError, 'invalid value for "locality", the character length must be smaller than or equal to 25.' - 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] country_code Value to be assigned - def country_code=(country_code) - if !country_code.nil? && country_code.to_s.length > 2 - fail ArgumentError, 'invalid value for "country_code", the character length must be smaller than or equal to 2.' - end - - @country_code = country_code - 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] phone_number Value to be assigned - def phone_number=(phone_number) - if !phone_number.nil? && phone_number.to_s.length > 20 - fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 20.' - end - - @phone_number = phone_number - end - - # Custom attribute writer method with validation - # @param [Object] date_of_birth Value to be assigned - def date_of_birth=(date_of_birth) - if !date_of_birth.nil? && date_of_birth.to_s.length > 8 - fail ArgumentError, 'invalid value for "date_of_birth", the character length must be smaller than or equal to 8.' - end - - if !date_of_birth.nil? && date_of_birth.to_s.length < 8 - fail ArgumentError, 'invalid value for "date_of_birth", the character length must be great than or equal to 8.' - end - - @date_of_birth = date_of_birth - end - - # Custom attribute writer method with validation - # @param [Object] vat_registration_number Value to be assigned - def vat_registration_number=(vat_registration_number) - if !vat_registration_number.nil? && vat_registration_number.to_s.length > 13 - fail ArgumentError, 'invalid value for "vat_registration_number", the character length must be smaller than or equal to 13.' - end - - @vat_registration_number = vat_registration_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 && - account == o.account && - first_name == o.first_name && - middle_initial == o.middle_initial && - last_name == o.last_name && - name == o.name && - address1 == o.address1 && - locality == o.locality && - administrative_area == o.administrative_area && - country_code == o.country_code && - postal_code == o.postal_code && - phone_number == o.phone_number && - date_of_birth == o.date_of_birth && - vat_registration_number == o.vat_registration_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, account, first_name, middle_initial, last_name, name, address1, locality, administrative_area, country_code, postal_code, phone_number, date_of_birth, vat_registration_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_client/models/v2payouts_sender_information_account.rb b/lib/cyberSource_client/models/v2payouts_sender_information_account.rb deleted file mode 100644 index 63e79d7b..00000000 --- a/lib/cyberSource_client/models/v2payouts_sender_information_account.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 V2payoutsSenderInformationAccount - # Source of funds. Possible values: Paymentech, CTV, FDC Compass: - 01: Credit card - 02: Debit card - 03: Prepaid card Paymentech, CTV - - 04: Cash - 05: Debit or deposit account that is not linked to a Visa card. Includes checking accounts, savings accounts, and proprietary debit or ATM cards. - 06: Credit account that is not linked to a Visa card. Includes credit cards and proprietary lines of credit. FDCCompass - - 04: Deposit Account **Funds Disbursement** This value is most likely 05 to identify that the originator used a deposit account to fund the disbursement. **Credit Card Bill Payment** This value must be 02, 03, 04, or 05. - attr_accessor :funds_source - - # The account number of the entity funding the transaction. It is the sender’s account number. It can be a debit/credit card account number or bank account number. **Funds disbursements** This field is optional. **All other transactions** This field is required when the sender funds the transaction with a financial instrument, for example debit card. Length: * FDCCompass (<= 19) * Paymentech (<= 16) - attr_accessor :number - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'funds_source' => :'fundsSource', - :'number' => :'number' - } - end - - # Attribute type mapping. - def self.swagger_types - { - :'funds_source' => :'String', - :'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?(:'fundsSource') - self.funds_source = attributes[:'fundsSource'] - end - - if attributes.has_key?(:'number') - self.number = attributes[:'number'] - end - end - - # Show invalid properties 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 !@funds_source.nil? && @funds_source.to_s.length > 2 - invalid_properties.push('invalid value for "funds_source", the character length must be smaller than or equal to 2.') - end - - if !@funds_source.nil? && @funds_source.to_s.length < 2 - invalid_properties.push('invalid value for "funds_source", the character length must be great than or equal to 2.') - end - - if !@number.nil? && @number.to_s.length > 34 - invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 34.') - 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 !@funds_source.nil? && @funds_source.to_s.length > 2 - return false if !@funds_source.nil? && @funds_source.to_s.length < 2 - return false if !@number.nil? && @number.to_s.length > 34 - true - end - - # Custom attribute writer method with validation - # @param [Object] funds_source Value to be assigned - def funds_source=(funds_source) - if !funds_source.nil? && funds_source.to_s.length > 2 - fail ArgumentError, 'invalid value for "funds_source", the character length must be smaller than or equal to 2.' - end - - if !funds_source.nil? && funds_source.to_s.length < 2 - fail ArgumentError, 'invalid value for "funds_source", the character length must be great than or equal to 2.' - end - - @funds_source = funds_source - end - - # Custom attribute writer method with validation - # @param [Object] number Value to be assigned - def number=(number) - if !number.nil? && number.to_s.length > 34 - fail ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 34.' - end - - @number = 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 && - funds_source == o.funds_source && - number == o.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 - [funds_source, 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.rb b/lib/cybersource_rest_client.rb new file mode 100644 index 00000000..a2fac215 --- /dev/null +++ b/lib/cybersource_rest_client.rb @@ -0,0 +1,369 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +# Common files +require 'cybersource_rest_client/api_client' +require 'cybersource_rest_client/api_error' +require 'cybersource_rest_client/version' +require 'cybersource_rest_client/configuration' + +# Models +require 'cybersource_rest_client/models/auth_reversal_request' +require 'cybersource_rest_client/models/body' +require 'cybersource_rest_client/models/body_1' +require 'cybersource_rest_client/models/body_2' +require 'cybersource_rest_client/models/body_3' +require 'cybersource_rest_client/models/capture_payment_request' +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/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' +require 'cybersource_rest_client/models/inline_response_default_response_status' +require 'cybersource_rest_client/models/inline_response_default_response_status_details' +require 'cybersource_rest_client/models/json_web_key' +require 'cybersource_rest_client/models/key_parameters' +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/ptsv2credits_point_of_sale_information' +require 'cybersource_rest_client/models/ptsv2credits_point_of_sale_information_emv' +require 'cybersource_rest_client/models/ptsv2credits_processing_information' +require 'cybersource_rest_client/models/ptsv2payments_aggregator_information' +require 'cybersource_rest_client/models/ptsv2payments_aggregator_information_sub_merchant' +require 'cybersource_rest_client/models/ptsv2payments_buyer_information' +require 'cybersource_rest_client/models/ptsv2payments_buyer_information_personal_identification' +require 'cybersource_rest_client/models/ptsv2payments_client_reference_information' +require 'cybersource_rest_client/models/ptsv2payments_consumer_authentication_information' +require 'cybersource_rest_client/models/ptsv2payments_device_information' +require 'cybersource_rest_client/models/ptsv2payments_merchant_defined_information' +require 'cybersource_rest_client/models/ptsv2payments_merchant_information' +require 'cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor' +require 'cybersource_rest_client/models/ptsv2payments_order_information' +require 'cybersource_rest_client/models/ptsv2payments_order_information_amount_details' +require 'cybersource_rest_client/models/ptsv2payments_order_information_amount_details_amex_additional_amounts' +require 'cybersource_rest_client/models/ptsv2payments_order_information_amount_details_surcharge' +require 'cybersource_rest_client/models/ptsv2payments_order_information_amount_details_tax_details' +require 'cybersource_rest_client/models/ptsv2payments_order_information_bill_to' +require 'cybersource_rest_client/models/ptsv2payments_order_information_invoice_details' +require 'cybersource_rest_client/models/ptsv2payments_order_information_invoice_details_transaction_advice_addendum' +require 'cybersource_rest_client/models/ptsv2payments_order_information_line_items' +require 'cybersource_rest_client/models/ptsv2payments_order_information_ship_to' +require 'cybersource_rest_client/models/ptsv2payments_order_information_shipping_details' +require 'cybersource_rest_client/models/ptsv2payments_payment_information' +require 'cybersource_rest_client/models/ptsv2payments_payment_information_card' +require 'cybersource_rest_client/models/ptsv2payments_payment_information_customer' +require 'cybersource_rest_client/models/ptsv2payments_payment_information_fluid_data' +require 'cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card' +require 'cybersource_rest_client/models/ptsv2payments_point_of_sale_information' +require 'cybersource_rest_client/models/ptsv2payments_point_of_sale_information_emv' +require 'cybersource_rest_client/models/ptsv2payments_processing_information' +require 'cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options' +require 'cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options_initiator' +require 'cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options_merchant_initiated_transaction' +require 'cybersource_rest_client/models/ptsv2payments_processing_information_capture_options' +require 'cybersource_rest_client/models/ptsv2payments_processing_information_issuer' +require 'cybersource_rest_client/models/ptsv2payments_processing_information_recurring_options' +require 'cybersource_rest_client/models/ptsv2payments_recipient_information' +require 'cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information' +require 'cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant' +require 'cybersource_rest_client/models/ptsv2paymentsidcaptures_buyer_information' +require 'cybersource_rest_client/models/ptsv2paymentsidcaptures_merchant_information' +require 'cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information' +require 'cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_amount_details' +require 'cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_bill_to' +require 'cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_invoice_details' +require 'cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_ship_to' +require 'cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_shipping_details' +require 'cybersource_rest_client/models/ptsv2paymentsidcaptures_payment_information' +require 'cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information' +require 'cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information_emv' +require 'cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information' +require 'cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information_authorization_options' +require 'cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information_capture_options' +require 'cybersource_rest_client/models/ptsv2paymentsidrefunds_merchant_information' +require 'cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information' +require 'cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information_line_items' +require 'cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information' +require 'cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card' +require 'cybersource_rest_client/models/ptsv2paymentsidrefunds_point_of_sale_information' +require 'cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information' +require 'cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information_recurring_options' +require 'cybersource_rest_client/models/ptsv2paymentsidreversals_client_reference_information' +require 'cybersource_rest_client/models/ptsv2paymentsidreversals_order_information' +require 'cybersource_rest_client/models/ptsv2paymentsidreversals_order_information_line_items' +require 'cybersource_rest_client/models/ptsv2paymentsidreversals_point_of_sale_information' +require 'cybersource_rest_client/models/ptsv2paymentsidreversals_processing_information' +require 'cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_information' +require 'cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_information_amount_details' +require 'cybersource_rest_client/models/ptsv2payouts_merchant_information' +require 'cybersource_rest_client/models/ptsv2payouts_merchant_information_merchant_descriptor' +require 'cybersource_rest_client/models/ptsv2payouts_order_information' +require 'cybersource_rest_client/models/ptsv2payouts_order_information_amount_details' +require 'cybersource_rest_client/models/ptsv2payouts_order_information_amount_details_surcharge' +require 'cybersource_rest_client/models/ptsv2payouts_order_information_bill_to' +require 'cybersource_rest_client/models/ptsv2payouts_payment_information' +require 'cybersource_rest_client/models/ptsv2payouts_payment_information_card' +require 'cybersource_rest_client/models/ptsv2payouts_processing_information' +require 'cybersource_rest_client/models/ptsv2payouts_processing_information_payouts_options' +require 'cybersource_rest_client/models/ptsv2payouts_recipient_information' +require 'cybersource_rest_client/models/ptsv2payouts_sender_information' +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/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/tmsv1instrumentidentifiers_bank_account' +require 'cybersource_rest_client/models/tmsv1instrumentidentifiers_card' +require 'cybersource_rest_client/models/tmsv1instrumentidentifiers_details' +require 'cybersource_rest_client/models/tmsv1instrumentidentifiers__links' +require 'cybersource_rest_client/models/tmsv1instrumentidentifiers__links_self' +require 'cybersource_rest_client/models/tmsv1instrumentidentifiers_metadata' +require 'cybersource_rest_client/models/tmsv1instrumentidentifiers_processing_information' +require 'cybersource_rest_client/models/tmsv1instrumentidentifiers_processing_information_authorization_options' +require 'cybersource_rest_client/models/tmsv1instrumentidentifiers_processing_information_authorization_options_initiator' +require 'cybersource_rest_client/models/tmsv1instrumentidentifiers_authorization_options_merchant_initiated_transaction' +require 'cybersource_rest_client/models/tmsv1paymentinstruments_bank_account' +require 'cybersource_rest_client/models/tmsv1paymentinstruments_bill_to' +require 'cybersource_rest_client/models/tmsv1paymentinstruments_buyer_information' +require 'cybersource_rest_client/models/tmsv1paymentinstruments_buyer_information_issued_by' +require 'cybersource_rest_client/models/tmsv1paymentinstruments_buyer_information_personal_identification' +require 'cybersource_rest_client/models/tmsv1paymentinstruments_card' +require 'cybersource_rest_client/models/tmsv1paymentinstruments_instrument_identifier' +require 'cybersource_rest_client/models/tmsv1paymentinstruments_merchant_information' +require 'cybersource_rest_client/models/tmsv1paymentinstruments_merchant_information_merchant_descriptor' +require 'cybersource_rest_client/models/tmsv1paymentinstruments_processing_information' +require 'cybersource_rest_client/models/tmsv1paymentinstruments_processing_information_bank_transfer_options' +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/void_capture_request' +require 'cybersource_rest_client/models/void_credit_request' +require 'cybersource_rest_client/models/void_payment_request' +require 'cybersource_rest_client/models/void_refund_request' + +# APIs +require 'cybersource_rest_client/api/capture_api' +require 'cybersource_rest_client/api/credit_api' +require 'cybersource_rest_client/api/flex_token_api' +require 'cybersource_rest_client/api/instrument_identifier_api' +require 'cybersource_rest_client/api/instrument_identifiers_api' +require 'cybersource_rest_client/api/key_generation_api' +require 'cybersource_rest_client/api/notification_of_changes_api' +require 'cybersource_rest_client/api/payment_instruments_api' +require 'cybersource_rest_client/api/payments_api' +require 'cybersource_rest_client/api/process_a_payout_api' +require 'cybersource_rest_client/api/purchase_and_refund_details_api' +require 'cybersource_rest_client/api/refund_api' +require 'cybersource_rest_client/api/report_definitions_api' +require 'cybersource_rest_client/api/report_downloads_api' +require 'cybersource_rest_client/api/report_subscriptions_api' +require 'cybersource_rest_client/api/reports_api' +require 'cybersource_rest_client/api/reversal_api' +require 'cybersource_rest_client/api/search_transactions_api' +require 'cybersource_rest_client/api/secure_file_share_api' +require 'cybersource_rest_client/api/transaction_batch_api' +require 'cybersource_rest_client/api/transaction_batches_api' +require 'cybersource_rest_client/api/transaction_details_api' +require 'cybersource_rest_client/api/user_management_api' +require 'cybersource_rest_client/api/void_api' + +module CyberSource + class << self + # Customize default settings for the SDK using block. + # CyberSource.configure do |config| + # config.username = "xxx" + # config.password = "xxx" + # end + # If no block given, return the default Configuration object. + def configure + if block_given? + yield(Configuration.default) + else + Configuration.default + end + end + end +end diff --git a/lib/cybersource_rest_client/api/capture_api.rb b/lib/cybersource_rest_client/api/capture_api.rb new file mode 100644 index 00000000..3858ddde --- /dev/null +++ b/lib/cybersource_rest_client/api/capture_api.rb @@ -0,0 +1,84 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class CaptureApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Capture a Payment + # Include the payment ID in the POST request to capture the payment amount. + # @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] + 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 + end + + # Capture a Payment + # Include the payment ID in the POST request to capture the payment amount. + # @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 + 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 ...' + end + # verify the required parameter 'capture_payment_request' is set + if @api_client.config.client_side_validation && capture_payment_request.nil? + fail ArgumentError, "Missing the required parameter 'capture_payment_request' when calling CaptureApi.capture_payment" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling CaptureApi.capture_payment" + end + # resource path + local_var_path = 'pts/v2/payments/{id}/captures'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(capture_payment_request) + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2012') + 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 + return data, status_code, headers + end + end +end diff --git a/lib/cybersource_rest_client/api/credit_api.rb b/lib/cybersource_rest_client/api/credit_api.rb new file mode 100644 index 00000000..72b1405d --- /dev/null +++ b/lib/cybersource_rest_client/api/credit_api.rb @@ -0,0 +1,78 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class CreditApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Process a Credit + # 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] + 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 + end + + # Process a Credit + # 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 + 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 ...' + end + # verify the required parameter 'create_credit_request' is set + if @api_client.config.client_side_validation && create_credit_request.nil? + fail ArgumentError, "Missing the required parameter 'create_credit_request' when calling CreditApi.create_credit" + end + # resource path + local_var_path = 'pts/v2/credits/' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(create_credit_request) + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2014') + 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 + return data, status_code, headers + end + end +end diff --git a/lib/cybersource_rest_client/api/flex_token_api.rb b/lib/cybersource_rest_client/api/flex_token_api.rb new file mode 100644 index 00000000..acf478c2 --- /dev/null +++ b/lib/cybersource_rest_client/api/flex_token_api.rb @@ -0,0 +1,74 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class FlexTokenApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Flex Tokenize card + # 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] + def tokenize(opts = {}) + data, _status_code, _headers = tokenize_with_http_info(opts) + return data, _status_code, _headers + end + + # Flex Tokenize card + # 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 + def tokenize_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FlexTokenApi.tokenize ...' + end + # resource path + local_var_path = 'flex/v1/tokens/' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(opts[:'tokenize_request']) + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2001') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FlexTokenApi#tokenize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/cybersource_rest_client/api/instrument_identifier_api.rb b/lib/cybersource_rest_client/api/instrument_identifier_api.rb new file mode 100644 index 00000000..5a6e4cf8 --- /dev/null +++ b/lib/cybersource_rest_client/api/instrument_identifier_api.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 'uri' + +module CyberSource + class InstrumentIdentifierApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Delete an Instrument Identifier + # @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 [nil] + def tms_v1_instrumentidentifiers_token_id_delete(profile_id, token_id, opts = {}) + data, _status_code, _headers = tms_v1_instrumentidentifiers_token_id_delete_with_http_info(profile_id, token_id, opts) + return data, _status_code, _headers + end + + # Delete an Instrument Identifier + # @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<(nil, Fixnum, Hash)>] nil, response status code and response headers + def tms_v1_instrumentidentifiers_token_id_delete_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_delete ...' + end + # verify the required parameter 'profile_id' is set + if @api_client.config.client_side_validation && profile_id.nil? + fail ArgumentError, "Missing the required parameter 'profile_id' when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_delete" + end + # if @api_client.config.client_side_validation && profile_id > 36 + # fail ArgumentError, 'invalid value for "profile_id" when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_delete, must be smaller than or equal to 36.' + # end + + # if @api_client.config.client_side_validation && profile_id < 36 + # 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 + # 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 + + # if @api_client.config.client_side_validation && token_id < 16 + # fail ArgumentError, 'invalid value for "token_id" when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_delete, must be greater than or equal to 16.' + # end + + # resource path + local_var_path = 'tms/v1/instrumentidentifiers/{tokenId}'.sub('{' + 'tokenId' + '}', token_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) + header_params[:'profile-id'] = profile_id + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: InstrumentIdentifierApi#tms_v1_instrumentidentifiers_token_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Retrieve an Instrument Identifier + # @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] + 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 + end + + # Retrieve an Instrument Identifier + # @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 + 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 ...' + end + # verify the required parameter 'profile_id' is set + if @api_client.config.client_side_validation && profile_id.nil? + fail ArgumentError, "Missing the required parameter 'profile_id' when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_get" + end + # if @api_client.config.client_side_validation && profile_id > 36 + # fail ArgumentError, 'invalid value for "profile_id" when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_get, must be smaller than or equal to 36.' + # end + + # if @api_client.config.client_side_validation && profile_id < 36 + # 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 + 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 + # 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_get, must be smaller than or equal to 32.' + # end + + # if @api_client.config.client_side_validation && token_id < 16 + # fail ArgumentError, 'invalid value for "token_id" when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_get, must be greater than or equal to 16.' + # end + + # resource path + local_var_path = 'tms/v1/instrumentidentifiers/{tokenId}'.sub('{' + 'tokenId' + '}', token_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) + header_params[:'profile-id'] = profile_id + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse20010') + 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 + return data, status_code, headers + end + # Update a Instrument Identifier + # @param profile_id The id of a profile containing user specific TMS configuration. + # @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] + 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 + end + + # Update a Instrument Identifier + # @param profile_id The id of a profile containing user specific TMS configuration. + # @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 + 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 ...' + end + # verify the required parameter 'profile_id' is set + if @api_client.config.client_side_validation && profile_id.nil? + fail ArgumentError, "Missing the required parameter 'profile_id' when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_patch" + end + # if @api_client.config.client_side_validation && profile_id > 36 + # fail ArgumentError, 'invalid value for "profile_id" when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_patch, must be smaller than or equal to 36.' + # end + + # if @api_client.config.client_side_validation && profile_id < 36 + # 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 + 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 + # 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_patch, must be smaller than or equal to 32.' + # end + + # if @api_client.config.client_side_validation && token_id < 16 + # fail ArgumentError, 'invalid value for "token_id" when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_patch, must be greater than or equal to 16.' + # end + + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling InstrumentIdentifierApi.tms_v1_instrumentidentifiers_token_id_patch" + end + # resource path + local_var_path = 'tms/v1/instrumentidentifiers/{tokenId}'.sub('{' + 'tokenId' + '}', token_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) + header_params[:'profile-id'] = profile_id + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = [] + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse20010') + 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 + return data, status_code, headers + end + end +end diff --git a/lib/cybersource_rest_client/api/instrument_identifiers_api.rb b/lib/cybersource_rest_client/api/instrument_identifiers_api.rb new file mode 100644 index 00000000..b13e3131 --- /dev/null +++ b/lib/cybersource_rest_client/api/instrument_identifiers_api.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 'uri' + +module CyberSource + class InstrumentIdentifiersApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Create an Instrument Identifier + # @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] + 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 + end + + # Create an Instrument Identifier + # @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 + 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 ...' + end + # verify the required parameter 'profile_id' is set + if @api_client.config.client_side_validation && profile_id.nil? + fail ArgumentError, "Missing the required parameter 'profile_id' when calling InstrumentIdentifiersApi.tms_v1_instrumentidentifiers_post" + end + # if @api_client.config.client_side_validation && profile_id > 36 + # fail ArgumentError, 'invalid value for "profile_id" when calling InstrumentIdentifiersApi.tms_v1_instrumentidentifiers_post, must be smaller than or equal to 36.' + # end + + # if @api_client.config.client_side_validation && profile_id < 36 + # fail ArgumentError, 'invalid value for "profile_id" when calling InstrumentIdentifiersApi.tms_v1_instrumentidentifiers_post, must be greater than or equal to 36.' + # end + + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling InstrumentIdentifiersApi.tms_v1_instrumentidentifiers_post" + end + # resource path + local_var_path = 'tms/v1/instrumentidentifiers' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) + header_params[:'profile-id'] = profile_id + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse20010') + 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 + return data, status_code, headers + end + end +end diff --git a/lib/cyberSource_client/api/key_generation_api.rb b/lib/cybersource_rest_client/api/key_generation_api.rb similarity index 78% rename from lib/cyberSource_client/api/key_generation_api.rb rename to lib/cybersource_rest_client/api/key_generation_api.rb index 8ad7a42f..f5702829 100644 --- a/lib/cyberSource_client/api/key_generation_api.rb +++ b/lib/cybersource_rest_client/api/key_generation_api.rb @@ -16,34 +16,31 @@ module CyberSource class KeyGenerationApi attr_accessor :api_client - def initialize(api_client = ApiClient.default) + def initialize(api_client = ApiClient.default, config) @api_client = api_client + @api_client.set_configuration(config) end # Generate Key # 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 generate_public_key_request # @param [Hash] opts the optional parameters + # @option opts [GeneratePublicKeyRequest] :generate_public_key_request # @return [InlineResponse200] - def generate_public_key(generate_public_key_request, opts = {}) - data, _status_code, _headers = generate_public_key_with_http_info(generate_public_key_request, opts) + def generate_public_key(opts = {}) + data, _status_code, _headers = generate_public_key_with_http_info(opts) return data, _status_code, _headers end # Generate Key # 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 generate_public_key_request # @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 - def generate_public_key_with_http_info(generate_public_key_request, opts = {}) + def generate_public_key_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: KeyGenerationApi.generate_public_key ...' end - # verify the required parameter 'generate_public_key_request' is set - if @api_client.config.client_side_validation && generate_public_key_request.nil? - fail ArgumentError, "Missing the required parameter 'generate_public_key_request' when calling KeyGenerationApi.generate_public_key" - end # resource path - local_var_path = 'flex/v1/keys' + local_var_path = 'flex/v1/keys/' # query parameters query_params = {} @@ -52,12 +49,14 @@ def generate_public_key_with_http_info(generate_public_key_request, opts = {}) header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(generate_public_key_request) + post_body = @api_client.object_to_http_body(opts[:'generate_public_key_request']) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, diff --git a/lib/cybersource_rest_client/api/notification_of_changes_api.rb b/lib/cybersource_rest_client/api/notification_of_changes_api.rb new file mode 100644 index 00000000..62f9be0f --- /dev/null +++ b/lib/cybersource_rest_client/api/notification_of_changes_api.rb @@ -0,0 +1,86 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class NotificationOfChangesApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Get Notification Of Changes + # Notification of Change Report + # @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] + 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 + end + + # Get Notification Of Changes + # Notification of Change Report + # @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 + 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 ...' + end + # verify the required parameter 'start_time' is set + if @api_client.config.client_side_validation && start_time.nil? + fail ArgumentError, "Missing the required parameter 'start_time' when calling NotificationOfChangesApi.get_notification_of_change_report" + end + # verify the required parameter 'end_time' is set + if @api_client.config.client_side_validation && end_time.nil? + fail ArgumentError, "Missing the required parameter 'end_time' when calling NotificationOfChangesApi.get_notification_of_change_report" + end + # resource path + local_var_path = 'reporting/v3/notification-of-changes' + + # query parameters + query_params = {} + query_params[:'startTime'] = start_time + query_params[:'endTime'] = end_time + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2003') + 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 + return data, status_code, headers + end + end +end diff --git a/lib/cybersource_rest_client/api/payment_instruments_api.rb b/lib/cybersource_rest_client/api/payment_instruments_api.rb new file mode 100644 index 00000000..8cecec31 --- /dev/null +++ b/lib/cybersource_rest_client/api/payment_instruments_api.rb @@ -0,0 +1,414 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class PaymentInstrumentsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Retrieve all Payment Instruments associated with an Instrument Identifier + # @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 + # @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] + 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 + end + + # Retrieve all Payment Instruments associated with an Instrument Identifier + # @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 + # @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 + 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 ...' + end + # verify the required parameter 'profile_id' is set + if @api_client.config.client_side_validation && profile_id.nil? + fail ArgumentError, "Missing the required parameter 'profile_id' when calling PaymentInstrumentsApi.tms_v1_instrumentidentifiers_token_id_paymentinstruments_get" + end + # if @api_client.config.client_side_validation && profile_id > 36 + # fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentsApi.tms_v1_instrumentidentifiers_token_id_paymentinstruments_get, must be smaller than or equal to 36.' + # end + + # if @api_client.config.client_side_validation && profile_id < 36 + # 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 + # 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 + + # if @api_client.config.client_side_validation && token_id < 16 + # fail ArgumentError, 'invalid value for "token_id" when calling PaymentInstrumentsApi.tms_v1_instrumentidentifiers_token_id_paymentinstruments_get, must be greater than or equal to 16.' + # end + + if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 + fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling PaymentInstrumentsApi.tms_v1_instrumentidentifiers_token_id_paymentinstruments_get, must be greater than or equal to 0.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PaymentInstrumentsApi.tms_v1_instrumentidentifiers_token_id_paymentinstruments_get, must be smaller than or equal to 100.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PaymentInstrumentsApi.tms_v1_instrumentidentifiers_token_id_paymentinstruments_get, must be greater than or equal to 1.' + end + + # resource path + local_var_path = 'tms/v1/instrumentidentifiers/{tokenId}/paymentinstruments'.sub('{' + 'tokenId' + '}', token_id.to_s) + + # query parameters + query_params = {} + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) + header_params[:'profile-id'] = profile_id + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse20011') + 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 + return data, status_code, headers + end + # Create a Payment Instrument + # @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] + 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 + end + + # Create a Payment Instrument + # @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 + 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 ...' + end + # verify the required parameter 'profile_id' is set + if @api_client.config.client_side_validation && profile_id.nil? + fail ArgumentError, "Missing the required parameter 'profile_id' when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_post" + end + # if @api_client.config.client_side_validation && profile_id > 36 + # fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_post, must be smaller than or equal to 36.' + # end + + # if @api_client.config.client_side_validation && profile_id < 36 + # fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_post, must be greater than or equal to 36.' + # end + + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_post" + end + # resource path + local_var_path = 'tms/v1/paymentinstruments' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) + header_params[:'profile-id'] = profile_id + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2016') + 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 + return data, status_code, headers + end + # Delete a Payment Instrument + # @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 [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 + end + + # Delete a Payment Instrument + # @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<(nil, Fixnum, Hash)>] nil, response status code and response headers + def tms_v1_paymentinstruments_token_id_delete_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_delete ...' + end + # verify the required parameter 'profile_id' is set + if @api_client.config.client_side_validation && profile_id.nil? + fail ArgumentError, "Missing the required parameter 'profile_id' when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_delete" + end + # if @api_client.config.client_side_validation && profile_id > 36 + # fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_delete, must be smaller than or equal to 36.' + # end + + # if @api_client.config.client_side_validation && profile_id < 36 + # fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_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 PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_delete" + end + # if @api_client.config.client_side_validation && token_id > 32 + # fail ArgumentError, 'invalid value for "token_id" when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_delete, must be smaller than or equal to 32.' + # end + + # if @api_client.config.client_side_validation && token_id < 16 + # fail ArgumentError, 'invalid value for "token_id" when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_delete, must be greater than or equal to 16.' + # end + + # resource path + local_var_path = 'tms/v1/paymentinstruments/{tokenId}'.sub('{' + 'tokenId' + '}', token_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) + header_params[:'profile-id'] = profile_id + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PaymentInstrumentsApi#tms_v1_paymentinstruments_token_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Retrieve a Payment Instrument + # @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] + 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 + end + + # Retrieve a Payment Instrument + # @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 + 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 ...' + end + # verify the required parameter 'profile_id' is set + if @api_client.config.client_side_validation && profile_id.nil? + fail ArgumentError, "Missing the required parameter 'profile_id' when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_get" + end + # if @api_client.config.client_side_validation && profile_id > 36 + # fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_get, must be smaller than or equal to 36.' + # end + + # if @api_client.config.client_side_validation && profile_id < 36 + # fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_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_paymentinstruments_token_id_get" + end + # if @api_client.config.client_side_validation && token_id > 32 + # fail ArgumentError, 'invalid value for "token_id" when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_get, must be smaller than or equal to 32.' + # end + + # if @api_client.config.client_side_validation && token_id < 16 + # fail ArgumentError, 'invalid value for "token_id" when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_get, must be greater than or equal to 16.' + # end + + # resource path + local_var_path = 'tms/v1/paymentinstruments/{tokenId}'.sub('{' + 'tokenId' + '}', token_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) + header_params[:'profile-id'] = profile_id + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2016') + 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 + return data, status_code, headers + end + # Update a Payment Instrument + # @param profile_id The id of a profile containing user specific TMS configuration. + # @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] + 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 + end + + # Update a Payment Instrument + # @param profile_id The id of a profile containing user specific TMS configuration. + # @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 + 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 ...' + end + # verify the required parameter 'profile_id' is set + if @api_client.config.client_side_validation && profile_id.nil? + fail ArgumentError, "Missing the required parameter 'profile_id' when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_patch" + end + # if @api_client.config.client_side_validation && profile_id > 36 + # fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_patch, must be smaller than or equal to 36.' + # end + + # if @api_client.config.client_side_validation && profile_id < 36 + # fail ArgumentError, 'invalid value for "profile_id" when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_patch, 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_paymentinstruments_token_id_patch" + end + # if @api_client.config.client_side_validation && token_id > 32 + # fail ArgumentError, 'invalid value for "token_id" when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_patch, must be smaller than or equal to 32.' + # end + + # if @api_client.config.client_side_validation && token_id < 16 + # fail ArgumentError, 'invalid value for "token_id" when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_patch, must be greater than or equal to 16.' + # end + + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling PaymentInstrumentsApi.tms_v1_paymentinstruments_token_id_patch" + end + # resource path + local_var_path = 'tms/v1/paymentinstruments/{tokenId}'.sub('{' + 'tokenId' + '}', token_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) + header_params[:'profile-id'] = profile_id + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + auth_names = [] + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2016') + 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 + return data, status_code, headers + end + end +end diff --git a/lib/cybersource_rest_client/api/payments_api.rb b/lib/cybersource_rest_client/api/payments_api.rb new file mode 100644 index 00000000..11fe2a84 --- /dev/null +++ b/lib/cybersource_rest_client/api/payments_api.rb @@ -0,0 +1,78 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class PaymentsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + 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] + 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 + end + + # Process a Payment + # 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 + 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 ...' + end + # verify the required parameter 'create_payment_request' is set + if @api_client.config.client_side_validation && create_payment_request.nil? + fail ArgumentError, "Missing the required parameter 'create_payment_request' when calling PaymentsApi.create_payment" + end + # resource path + local_var_path = 'pts/v2/payments/' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(create_payment_request) + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse201') + 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 + return data, status_code, headers + end + end +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 new file mode 100644 index 00000000..0094d630 --- /dev/null +++ b/lib/cybersource_rest_client/api/process_a_payout_api.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 'uri' + +module CyberSource + class ProcessAPayoutApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Process a Payout + # Send funds from a selected funding source to a designated credit/debit card account or a prepaid card using an Original Credit Transaction (OCT). + # @param oct_create_payment_request + # @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 + end + + # Process a Payout + # Send funds from a selected funding source to a designated credit/debit card account or a prepaid card using an Original Credit Transaction (OCT). + # @param oct_create_payment_request + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def oct_create_payment_with_http_info(oct_create_payment_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ProcessAPayoutApi.oct_create_payment ...' + end + # verify the required parameter 'oct_create_payment_request' is set + if @api_client.config.client_side_validation && oct_create_payment_request.nil? + fail ArgumentError, "Missing the required parameter 'oct_create_payment_request' when calling ProcessAPayoutApi.oct_create_payment" + end + # resource path + local_var_path = 'pts/v2/payouts/' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(oct_create_payment_request) + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ProcessAPayoutApi#oct_create_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end 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 new file mode 100644 index 00000000..518b624b --- /dev/null +++ b/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb @@ -0,0 +1,129 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class PurchaseAndRefundDetailsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Get Purchase and Refund details + # Purchase And Refund Details Description + # @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 + # @option opts [String] :organization_id Valid Cybersource Organization Id + # @option opts [String] :payment_subtype Payment Subtypes. - **ALL**: All Payment Subtypes - **VI** : Visa - **MC** : Master Card - **AX** : American Express - **DI** : Discover - **DP** : Pinless Debit (default to ALL) + # @option opts [String] :view_by View results by Request Date or Submission Date. - **requestDate** : Request Date - **submissionDate**: Submission Date (default to requestDate) + # @option opts [String] :group_name Valid CyberSource Group Name.User can define groups using CBAPI and Group Management Module in EBC2. Groups are collection of organizationIds + # @option opts [Integer] :offset Offset of the Purchase and Refund Results. + # @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 + end + + # Get Purchase and Refund details + # Purchase And Refund Details Description + # @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 + # @option opts [String] :organization_id Valid Cybersource Organization Id + # @option opts [String] :payment_subtype Payment Subtypes. - **ALL**: All Payment Subtypes - **VI** : Visa - **MC** : Master Card - **AX** : American Express - **DI** : Discover - **DP** : Pinless Debit + # @option opts [String] :view_by View results by Request Date or Submission Date. - **requestDate** : Request Date - **submissionDate**: Submission Date + # @option opts [String] :group_name Valid CyberSource Group Name.User can define groups using CBAPI and Group Management Module in EBC2. Groups are collection of organizationIds + # @option opts [Integer] :offset Offset of the Purchase and Refund Results. + # @option opts [Integer] :limit Results count per page. Range(1-2000) + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def get_purchase_and_refund_details_with_http_info(start_time, end_time, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PurchaseAndRefundDetailsApi.get_purchase_and_refund_details ...' + end + # verify the required parameter 'start_time' is set + if @api_client.config.client_side_validation && start_time.nil? + fail ArgumentError, "Missing the required parameter 'start_time' when calling PurchaseAndRefundDetailsApi.get_purchase_and_refund_details" + end + # verify the required parameter 'end_time' is set + if @api_client.config.client_side_validation && end_time.nil? + fail ArgumentError, "Missing the required parameter 'end_time' when calling PurchaseAndRefundDetailsApi.get_purchase_and_refund_details" + end + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'].to_s.length > 32 + fail ArgumentError, 'invalid value for "opts[:"organization_id"]" when calling PurchaseAndRefundDetailsApi.get_purchase_and_refund_details, the character length must be smaller than or equal to 32.' + end + + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"organization_id"]" when calling PurchaseAndRefundDetailsApi.get_purchase_and_refund_details, the character length must be great than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'] !~ Regexp.new(/[a-zA-Z0-9-_]+/) + fail ArgumentError, "invalid value for 'opts[:\"organization_id\"]' when calling PurchaseAndRefundDetailsApi.get_purchase_and_refund_details, must conform to the pattern /[a-zA-Z0-9-_]+/." + end + + if @api_client.config.client_side_validation && opts[:'payment_subtype'] && !['ALL', 'VI', 'MC', 'AX', 'DI', 'DP'].include?(opts[:'payment_subtype']) + fail ArgumentError, 'invalid value for "payment_subtype", must be one of ALL, VI, MC, AX, DI, DP' + end + if @api_client.config.client_side_validation && opts[:'view_by'] && !['requestDate', 'submissionDate'].include?(opts[:'view_by']) + fail ArgumentError, 'invalid value for "view_by", must be one of requestDate, submissionDate' + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 2000 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PurchaseAndRefundDetailsApi.get_purchase_and_refund_details, must be smaller than or equal to 2000.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PurchaseAndRefundDetailsApi.get_purchase_and_refund_details, must be greater than or equal to 1.' + end + + # resource path + local_var_path = 'reporting/v3/purchase-refund-details' + + # query parameters + query_params = {} + query_params[:'startTime'] = start_time + query_params[:'endTime'] = end_time + query_params[:'organizationId'] = opts[:'organization_id'] if !opts[:'organization_id'].nil? + query_params[:'paymentSubtype'] = opts[:'payment_subtype'] if !opts[:'payment_subtype'].nil? + query_params[:'viewBy'] = opts[:'view_by'] if !opts[:'view_by'].nil? + query_params[:'groupName'] = opts[:'group_name'] if !opts[:'group_name'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PurchaseAndRefundDetailsApi#get_purchase_and_refund_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/cybersource_rest_client/api/refund_api.rb b/lib/cybersource_rest_client/api/refund_api.rb new file mode 100644 index 00000000..dd7342cf --- /dev/null +++ b/lib/cybersource_rest_client/api/refund_api.rb @@ -0,0 +1,144 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class RefundApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Refund a Capture + # Include the capture ID in the POST request to refund the captured amount. + # @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] + 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 + end + + # Refund a Capture + # Include the capture ID in the POST request to refund the captured amount. + # @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 + 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 ...' + end + # verify the required parameter 'refund_capture_request' is set + if @api_client.config.client_side_validation && refund_capture_request.nil? + fail ArgumentError, "Missing the required parameter 'refund_capture_request' when calling RefundApi.refund_capture" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling RefundApi.refund_capture" + end + # resource path + local_var_path = 'pts/v2/captures/{id}/refunds'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(refund_capture_request) + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2013') + 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 + return data, status_code, headers + end + # Refund a Payment + # Include the payment ID in the POST request to refund the payment amount. + # @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] + 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 + end + + # Refund a Payment + # Include the payment ID in the POST request to refund the payment amount. + # @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 + 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 ...' + end + # verify the required parameter 'refund_payment_request' is set + if @api_client.config.client_side_validation && refund_payment_request.nil? + fail ArgumentError, "Missing the required parameter 'refund_payment_request' when calling RefundApi.refund_payment" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling RefundApi.refund_payment" + end + # resource path + local_var_path = 'pts/v2/payments/{id}/refunds'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(refund_payment_request) + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2013') + 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 + return data, status_code, headers + end + end +end diff --git a/lib/cybersource_rest_client/api/report_definitions_api.rb b/lib/cybersource_rest_client/api/report_definitions_api.rb new file mode 100644 index 00000000..efc99b58 --- /dev/null +++ b/lib/cybersource_rest_client/api/report_definitions_api.rb @@ -0,0 +1,156 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class ReportDefinitionsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Get a single report definition information + # The report definition name must be used as path parameter exclusive of each other + # @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] + 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 + end + + # Get a single report definition information + # The report definition name must be used as path parameter exclusive of each other + # @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 + 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 ...' + end + # verify the required parameter 'report_definition_name' is set + if @api_client.config.client_side_validation && report_definition_name.nil? + fail ArgumentError, "Missing the required parameter 'report_definition_name' when calling ReportDefinitionsApi.get_resource_info_by_report_definition" + end + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'].to_s.length > 32 + fail ArgumentError, 'invalid value for "opts[:"organization_id"]" when calling ReportDefinitionsApi.get_resource_info_by_report_definition, the character length must be smaller than or equal to 32.' + end + + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"organization_id"]" when calling ReportDefinitionsApi.get_resource_info_by_report_definition, the character length must be great than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'] !~ Regexp.new(/[a-zA-Z0-9-_]+/) + fail ArgumentError, "invalid value for 'opts[:\"organization_id\"]' when calling ReportDefinitionsApi.get_resource_info_by_report_definition, must conform to the pattern /[a-zA-Z0-9-_]+/." + end + + # resource path + local_var_path = 'reporting/v3/report-definitions/{reportDefinitionName}'.sub('{' + 'reportDefinitionName' + '}', report_definition_name.to_s) + + # query parameters + query_params = {} + query_params[:'organizationId'] = opts[:'organization_id'] if !opts[:'organization_id'].nil? + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2005') + 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 + return data, status_code, headers + end + # Get reporting resource information + # + # @param [Hash] opts the optional parameters + # @option opts [String] :organization_id Valid Cybersource Organization Id + # @return [InlineResponse2004] + def get_resource_v2_info(opts = {}) + data, _status_code, _headers = get_resource_v2_info_with_http_info(opts) + return data, _status_code, _headers + end + + # Get reporting resource information + # + # @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 + 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 ...' + end + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'].to_s.length > 32 + fail ArgumentError, 'invalid value for "opts[:"organization_id"]" when calling ReportDefinitionsApi.get_resource_v2_info, the character length must be smaller than or equal to 32.' + end + + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"organization_id"]" when calling ReportDefinitionsApi.get_resource_v2_info, the character length must be great than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'] !~ Regexp.new(/[a-zA-Z0-9-_]+/) + fail ArgumentError, "invalid value for 'opts[:\"organization_id\"]' when calling ReportDefinitionsApi.get_resource_v2_info, must conform to the pattern /[a-zA-Z0-9-_]+/." + end + + # resource path + local_var_path = 'reporting/v3/report-definitions' + + # query parameters + query_params = {} + query_params[:'organizationId'] = opts[:'organization_id'] if !opts[:'organization_id'].nil? + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2004') + 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 + return data, status_code, headers + end + end +end diff --git a/lib/cybersource_rest_client/api/report_downloads_api.rb b/lib/cybersource_rest_client/api/report_downloads_api.rb new file mode 100644 index 00000000..a7b5a96b --- /dev/null +++ b/lib/cybersource_rest_client/api/report_downloads_api.rb @@ -0,0 +1,100 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class ReportDownloadsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Download a report + # Download a report for the given report name on the specified date + # @param report_date Valid date on which to download the report 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 report_name Name of the report to download + # @param [Hash] opts the optional parameters + # @option opts [String] :organization_id Valid Cybersource Organization Id + # @return [nil] + def download_report(report_date, report_name, opts = {}) + data, _status_code, _headers = download_report_with_http_info(report_date, report_name, opts) + return data, _status_code, _headers + end + + # Download a report + # Download a report for the given report name on the specified date + # @param report_date Valid date on which to download the report 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 report_name Name of the report to download + # @param [Hash] opts the optional parameters + # @option opts [String] :organization_id Valid Cybersource Organization Id + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def download_report_with_http_info(report_date, report_name, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ReportDownloadsApi.download_report ...' + end + # verify the required parameter 'report_date' is set + if @api_client.config.client_side_validation && report_date.nil? + fail ArgumentError, "Missing the required parameter 'report_date' when calling ReportDownloadsApi.download_report" + end + # verify the required parameter 'report_name' is set + if @api_client.config.client_side_validation && report_name.nil? + fail ArgumentError, "Missing the required parameter 'report_name' when calling ReportDownloadsApi.download_report" + end + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'].to_s.length > 32 + fail ArgumentError, 'invalid value for "opts[:"organization_id"]" when calling ReportDownloadsApi.download_report, the character length must be smaller than or equal to 32.' + end + + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"organization_id"]" when calling ReportDownloadsApi.download_report, the character length must be great than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'] !~ Regexp.new(/[a-zA-Z0-9-_]+/) + fail ArgumentError, "invalid value for 'opts[:\"organization_id\"]' when calling ReportDownloadsApi.download_report, must conform to the pattern /[a-zA-Z0-9-_]+/." + end + + # resource path + local_var_path = 'reporting/v3/report-downloads' + + # query parameters + query_params = {} + query_params[:'reportDate'] = report_date + query_params[:'reportName'] = report_name + query_params[:'organizationId'] = opts[:'organization_id'] if !opts[:'organization_id'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/xml', 'test/csv']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ReportDownloadsApi#download_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/cybersource_rest_client/api/report_subscriptions_api.rb b/lib/cybersource_rest_client/api/report_subscriptions_api.rb new file mode 100644 index 00000000..5670dc63 --- /dev/null +++ b/lib/cybersource_rest_client/api/report_subscriptions_api.rb @@ -0,0 +1,262 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class ReportSubscriptionsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Create Report Subscription for a report name by organization + # + # @param report_name Name of the Report to Create + # @param request_body Report subscription request payload + # @param [Hash] opts the optional parameters + # @return [nil] + def create_subscription(request_body, opts = {}) + data, _status_code, _headers = create_subscription_with_http_info(request_body, opts) + return data, _status_code, _headers + end + + # Create Report Subscription for a report name by organization + # + # @param report_name Name of the Report to Create + # @param request_body Report subscription request payload + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def create_subscription_with_http_info(request_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ReportSubscriptionsApi.create_subscription ...' + end + # verify the required parameter 'report_name' is set + # if @api_client.config.client_side_validation && report_name.nil? + # fail ArgumentError, "Missing the required parameter 'report_name' when calling ReportSubscriptionsApi.create_subscription" + # end + # verify the required parameter 'request_body' is set + if @api_client.config.client_side_validation && request_body.nil? + fail ArgumentError, "Missing the required parameter 'request_body' when calling ReportSubscriptionsApi.create_subscription" + end + # resource path + local_var_path = 'reporting/v3/report-subscriptions' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(request_body) + auth_names = [] + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ReportSubscriptionsApi#create_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete subscription of a report name by organization + # + # @param report_name Name of the Report to Delete + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_subscription(report_name, opts = {}) + data, _status_code, _headers = delete_subscription_with_http_info(report_name, opts) + return data, _status_code, _headers + end + + # Delete subscription of a report name by organization + # + # @param report_name Name of the Report to Delete + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def delete_subscription_with_http_info(report_name, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ReportSubscriptionsApi.delete_subscription ...' + end + # verify the required parameter 'report_name' is set + if @api_client.config.client_side_validation && report_name.nil? + fail ArgumentError, "Missing the required parameter 'report_name' when calling ReportSubscriptionsApi.delete_subscription" + end + if @api_client.config.client_side_validation && report_name.to_s.length > 80 + fail ArgumentError, 'invalid value for "report_name" when calling ReportSubscriptionsApi.delete_subscription, the character length must be smaller than or equal to 80.' + end + + if @api_client.config.client_side_validation && report_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "report_name" when calling ReportSubscriptionsApi.delete_subscription, the character length must be great than or equal to 1.' + end + + if @api_client.config.client_side_validation && report_name !~ Regexp.new(/[a-zA-Z0-9-_+]+/) + fail ArgumentError, "invalid value for 'report_name' when calling ReportSubscriptionsApi.delete_subscription, must conform to the pattern /[a-zA-Z0-9-_+]+/." + end + + # resource path + local_var_path = 'reporting/v3/report-subscriptions/{reportName}'.sub('{' + 'reportName' + '}', report_name.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ReportSubscriptionsApi#delete_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Retrieve all subscriptions by organization + # + # @param [Hash] opts the optional parameters + # @return [InlineResponse2006] + def get_all_subscriptions(opts = {}) + data, _status_code, _headers = get_all_subscriptions_with_http_info(opts) + return data, _status_code, _headers + end + + # Retrieve all subscriptions by organization + # + # @param [Hash] opts the optional parameters + # @return [Array<(InlineResponse2006, Fixnum, Hash)>] InlineResponse2006 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 ...' + end + # resource path + local_var_path = 'reporting/v3/report-subscriptions' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2006') + 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 + return data, status_code, headers + end + # Retrieve subscription for a report name by organization + # + # @param report_name Name of the Report to Retrieve + # @param [Hash] opts the optional parameters + # @return [InlineResponse2006Subscriptions] + def get_subscription(report_name, opts = {}) + data, _status_code, _headers = get_subscription_with_http_info(report_name, opts) + return data, _status_code, _headers + end + + # Retrieve subscription for a report name by organization + # + # @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 + def get_subscription_with_http_info(report_name, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ReportSubscriptionsApi.get_subscription ...' + end + # verify the required parameter 'report_name' is set + if @api_client.config.client_side_validation && report_name.nil? + fail ArgumentError, "Missing the required parameter 'report_name' when calling ReportSubscriptionsApi.get_subscription" + end + if @api_client.config.client_side_validation && report_name.to_s.length > 80 + fail ArgumentError, 'invalid value for "report_name" when calling ReportSubscriptionsApi.get_subscription, the character length must be smaller than or equal to 80.' + end + + if @api_client.config.client_side_validation && report_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "report_name" when calling ReportSubscriptionsApi.get_subscription, the character length must be great than or equal to 1.' + end + + if @api_client.config.client_side_validation && report_name !~ Regexp.new(/[a-zA-Z0-9-_+]+/) + fail ArgumentError, "invalid value for 'report_name' when calling ReportSubscriptionsApi.get_subscription, must conform to the pattern /[a-zA-Z0-9-_+]+/." + end + + # resource path + local_var_path = 'reporting/v3/report-subscriptions/{reportName}'.sub('{' + 'reportName' + '}', report_name.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2006Subscriptions') + 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 + return data, status_code, headers + end + end +end diff --git a/lib/cybersource_rest_client/api/reports_api.rb b/lib/cybersource_rest_client/api/reports_api.rb new file mode 100644 index 00000000..fd324dad --- /dev/null +++ b/lib/cybersource_rest_client/api/reports_api.rb @@ -0,0 +1,257 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class ReportsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Create Adhoc Report + # Create one time report + # @param request_body Report subscription request payload + # @param [Hash] opts the optional parameters + # @return [nil] + def create_report(request_body, opts = {}) + data, _status_code, _headers = create_report_with_http_info(request_body, opts) + return data, _status_code, _headers + end + + # Create Adhoc Report + # Create one time report + # @param request_body Report subscription request payload + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def create_report_with_http_info(request_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ReportsApi.create_report ...' + end + # verify the required parameter 'request_body' is set + if @api_client.config.client_side_validation && request_body.nil? + fail ArgumentError, "Missing the required parameter 'request_body' when calling ReportsApi.create_report" + end + # resource path + local_var_path = 'reporting/v3/reports' + + # query parameters + query_params = {} + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(request_body) + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ReportsApi#create_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get Report based on reportId + # ReportId is mandatory input + # @param report_id Valid Report Id + # @param [Hash] opts the optional parameters + # @option opts [String] :organization_id Valid Cybersource Organization Id + # @return [InlineResponse2008] + 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 + end + + # Get Report based on reportId + # ReportId is mandatory input + # @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 + 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 ...' + end + # verify the required parameter 'report_id' is set + if @api_client.config.client_side_validation && report_id.nil? + fail ArgumentError, "Missing the required parameter 'report_id' when calling ReportsApi.get_report_by_report_id" + end + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'].to_s.length > 32 + fail ArgumentError, 'invalid value for "opts[:"organization_id"]" when calling ReportsApi.get_report_by_report_id, the character length must be smaller than or equal to 32.' + end + + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"organization_id"]" when calling ReportsApi.get_report_by_report_id, the character length must be great than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'] !~ Regexp.new(/[a-zA-Z0-9-_]+/) + fail ArgumentError, "invalid value for 'opts[:\"organization_id\"]' when calling ReportsApi.get_report_by_report_id, must conform to the pattern /[a-zA-Z0-9-_]+/." + end + + # resource path + local_var_path = 'reporting/v3/reports/{reportId}'.sub('{' + 'reportId' + '}', report_id.to_s) + + # query parameters + query_params = {} + query_params[:'organizationId'] = opts[:'organization_id'] if !opts[:'organization_id'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/hal+json', 'application/xml']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2008') + 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 + return data, status_code, headers + end + # Retrieve available reports + # Retrieve list of available reports + # @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 time_query_type Specify time you woud like to search + # @param [Hash] opts the optional parameters + # @option opts [String] :organization_id Valid Cybersource Organization Id + # @option opts [String] :report_mime_type Valid Report Format + # @option opts [String] :report_frequency Valid Report Frequency + # @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] + 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 + end + + # Retrieve available reports + # Retrieve list of available reports + # @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 time_query_type Specify time you woud like to search + # @param [Hash] opts the optional parameters + # @option opts [String] :organization_id Valid Cybersource Organization Id + # @option opts [String] :report_mime_type Valid Report Format + # @option opts [String] :report_frequency Valid Report Frequency + # @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 + 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 ...' + end + # verify the required parameter 'start_time' is set + if @api_client.config.client_side_validation && start_time.nil? + fail ArgumentError, "Missing the required parameter 'start_time' when calling ReportsApi.search_reports" + end + # verify the required parameter 'end_time' is set + if @api_client.config.client_side_validation && end_time.nil? + fail ArgumentError, "Missing the required parameter 'end_time' when calling ReportsApi.search_reports" + end + # verify the required parameter 'time_query_type' is set + if @api_client.config.client_side_validation && time_query_type.nil? + fail ArgumentError, "Missing the required parameter 'time_query_type' when calling ReportsApi.search_reports" + end + # verify enum value + if @api_client.config.client_side_validation && !['reportTimeFrame', 'executedTime'].include?(time_query_type) + fail ArgumentError, "invalid value for 'time_query_type', must be one of reportTimeFrame, executedTime" + end + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'].to_s.length > 32 + fail ArgumentError, 'invalid value for "opts[:"organization_id"]" when calling ReportsApi.search_reports, the character length must be smaller than or equal to 32.' + end + + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"organization_id"]" when calling ReportsApi.search_reports, the character length must be great than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'] !~ Regexp.new(/[a-zA-Z0-9-_]+/) + fail ArgumentError, "invalid value for 'opts[:\"organization_id\"]' when calling ReportsApi.search_reports, must conform to the pattern /[a-zA-Z0-9-_]+/." + end + + if @api_client.config.client_side_validation && opts[:'report_mime_type'] && !['application/xml', 'text/csv'].include?(opts[:'report_mime_type']) + fail ArgumentError, 'invalid value for "report_mime_type", must be one of application/xml, text/csv' + end + if @api_client.config.client_side_validation && opts[:'report_frequency'] && !['DAILY', 'WEEKLY', 'MONTHLY', 'ADHOC'].include?(opts[:'report_frequency']) + fail ArgumentError, 'invalid value for "report_frequency", must be one of DAILY, WEEKLY, MONTHLY, ADHOC' + end + if @api_client.config.client_side_validation && opts[:'report_status'] && !['COMPLETED', 'PENDING', 'QUEUED', 'RUNNING', 'ERROR', 'NO_DATA'].include?(opts[:'report_status']) + fail ArgumentError, 'invalid value for "report_status", must be one of COMPLETED, PENDING, QUEUED, RUNNING, ERROR, NO_DATA' + end + # resource path + local_var_path = 'reporting/v3/reports' + + # query parameters + query_params = {} + query_params[:'startTime'] = start_time + query_params[:'endTime'] = end_time + query_params[:'timeQueryType'] = time_query_type + query_params[:'organizationId'] = opts[:'organization_id'] if !opts[:'organization_id'].nil? + query_params[:'reportMimeType'] = opts[:'report_mime_type'] if !opts[:'report_mime_type'].nil? + query_params[:'reportFrequency'] = opts[:'report_frequency'] if !opts[:'report_frequency'].nil? + query_params[:'reportName'] = opts[:'report_name'] if !opts[:'report_name'].nil? + query_params[:'reportDefinitionId'] = opts[:'report_definition_id'] if !opts[:'report_definition_id'].nil? + query_params[:'reportStatus'] = opts[:'report_status'] if !opts[:'report_status'].nil? + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2007') + 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 + return data, status_code, headers + end + end +end diff --git a/lib/cybersource_rest_client/api/reversal_api.rb b/lib/cybersource_rest_client/api/reversal_api.rb new file mode 100644 index 00000000..e265d99b --- /dev/null +++ b/lib/cybersource_rest_client/api/reversal_api.rb @@ -0,0 +1,84 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class ReversalApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Process an Authorization Reversal + # Include the payment ID in the POST request to reverse the payment amount. + # @param id The payment ID returned from a previous payment request. + # @param auth_reversal_request + # @param [Hash] opts the optional parameters + # @return [InlineResponse2011] + 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 + end + + # Process an Authorization Reversal + # Include the payment ID in the POST request to reverse the payment amount. + # @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 + 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 ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling ReversalApi.auth_reversal" + end + # verify the required parameter 'auth_reversal_request' is set + if @api_client.config.client_side_validation && auth_reversal_request.nil? + fail ArgumentError, "Missing the required parameter 'auth_reversal_request' when calling ReversalApi.auth_reversal" + end + # resource path + local_var_path = 'pts/v2/payments/{id}/reversals'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(auth_reversal_request) + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2011') + 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 + return data, status_code, headers + end + end +end diff --git a/lib/cybersource_rest_client/api/search_transactions_api.rb b/lib/cybersource_rest_client/api/search_transactions_api.rb new file mode 100644 index 00000000..1bc208a4 --- /dev/null +++ b/lib/cybersource_rest_client/api/search_transactions_api.rb @@ -0,0 +1,132 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class SearchTransactionsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Create a search request + # Create a search request. + # @param create_search_request + # @param [Hash] opts the optional parameters + # @return [InlineResponse2017] + 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 + end + + # Create a search request + # 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 + 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 ...' + end + # verify the required parameter 'create_search_request' is set + if @api_client.config.client_side_validation && create_search_request.nil? + fail ArgumentError, "Missing the required parameter 'create_search_request' when calling SearchTransactionsApi.create_search" + end + # resource path + local_var_path = 'tss/v2/searches' + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept([]) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(create_search_request) + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2017') + 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 + return data, status_code, headers + end + # Get Search results + # 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] + def get_search(id, opts = {}) + data, _status_code, _headers = get_search_with_http_info(id, opts) + return data, _status_code, _headers + end + + # Get Search results + # 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 + def get_search_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SearchTransactionsApi.get_search ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling SearchTransactionsApi.get_search" + end + # resource path + local_var_path = 'tss/v2/searches/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept([]) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2017') + 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 + return data, status_code, headers + end + end +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 new file mode 100644 index 00000000..cd2e77f3 --- /dev/null +++ b/lib/cybersource_rest_client/api/secure_file_share_api.rb @@ -0,0 +1,169 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class SecureFileShareApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Download a file with file identifier + # Download a file for the given file identifier + # @param file_id Unique identifier for each file + # @param [Hash] opts the optional parameters + # @option opts [String] :organization_id Valid Cybersource Organization Id + # @return [nil] + def get_file(file_id, opts = {}) + data, _status_code, _headers = get_file_with_http_info(file_id, opts) + return data, _status_code, _headers + end + + # Download a file with file identifier + # Download a file for the given file identifier + # @param file_id Unique identifier for each file + # @param [Hash] opts the optional parameters + # @option opts [String] :organization_id Valid Cybersource Organization Id + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def get_file_with_http_info(file_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SecureFileShareApi.get_file ...' + end + # verify the required parameter 'file_id' is set + if @api_client.config.client_side_validation && file_id.nil? + fail ArgumentError, "Missing the required parameter 'file_id' when calling SecureFileShareApi.get_file" + end + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'].to_s.length > 32 + fail ArgumentError, 'invalid value for "opts[:"organization_id"]" when calling SecureFileShareApi.get_file, the character length must be smaller than or equal to 32.' + end + + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"organization_id"]" when calling SecureFileShareApi.get_file, the character length must be great than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'] !~ Regexp.new(/[a-zA-Z0-9-_]+/) + fail ArgumentError, "invalid value for 'opts[:\"organization_id\"]' when calling SecureFileShareApi.get_file, must conform to the pattern /[a-zA-Z0-9-_]+/." + end + + # resource path + local_var_path = 'sfs/v1/files/{fileId}'.sub('{' + 'fileId' + '}', file_id.to_s) + + # query parameters + query_params = {} + query_params[:'organizationId'] = opts[:'organization_id'] if !opts[:'organization_id'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/xml', 'text/csv', 'application/pdf']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/hal+json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SecureFileShareApi#get_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get list of files + # Get list of files and it's information of them available inside the report directory + # @param start_date Valid start 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 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] + 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 + end + + # Get list of files + # Get list of files and it's information of them available inside the report directory + # @param start_date Valid start 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 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 + 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 ...' + end + # verify the required parameter 'start_date' is set + if @api_client.config.client_side_validation && start_date.nil? + fail ArgumentError, "Missing the required parameter 'start_date' when calling SecureFileShareApi.get_file_details" + end + # verify the required parameter 'end_date' is set + if @api_client.config.client_side_validation && end_date.nil? + fail ArgumentError, "Missing the required parameter 'end_date' when calling SecureFileShareApi.get_file_details" + end + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'].to_s.length > 32 + fail ArgumentError, 'invalid value for "opts[:"organization_id"]" when calling SecureFileShareApi.get_file_details, the character length must be smaller than or equal to 32.' + end + + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"organization_id"]" when calling SecureFileShareApi.get_file_details, the character length must be great than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'] !~ Regexp.new(/[a-zA-Z0-9-_]+/) + fail ArgumentError, "invalid value for 'opts[:\"organization_id\"]' when calling SecureFileShareApi.get_file_details, must conform to the pattern /[a-zA-Z0-9-_]+/." + end + + # resource path + local_var_path = 'sfs/v1/file-details' + + # query parameters + query_params = {} + query_params[:'startDate'] = start_date + query_params[:'endDate'] = end_date + query_params[:'organizationId'] = opts[:'organization_id'] if !opts[:'organization_id'].nil? + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2009') + 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 + return data, status_code, headers + end + end +end diff --git a/lib/cybersource_rest_client/api/transaction_batch_api.rb b/lib/cybersource_rest_client/api/transaction_batch_api.rb new file mode 100644 index 00000000..52e56dca --- /dev/null +++ b/lib/cybersource_rest_client/api/transaction_batch_api.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 'uri' + +module CyberSource + class TransactionBatchApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Get an individual batch file Details processed through the Offline Transaction Submission Services + # Provide the search range + # @param id The batch id assigned for the template. + # @param [Hash] opts the optional parameters + # @return [nil] + def pts_v1_transaction_batches_id_get(id, opts = {}) + data, _status_code, _headers = pts_v1_transaction_batches_id_get_with_http_info(id, opts) + return data, _status_code, _headers + end + + # Get an individual batch file Details processed through the Offline Transaction Submission Services + # Provide the search range + # @param id The batch id assigned for the template. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def pts_v1_transaction_batches_id_get_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TransactionBatchApi.pts_v1_transaction_batches_id_get ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling TransactionBatchApi.pts_v1_transaction_batches_id_get" + end + # resource path + local_var_path = 'pts/v1/transaction-batches/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TransactionBatchApi#pts_v1_transaction_batches_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/cybersource_rest_client/api/transaction_batches_api.rb b/lib/cybersource_rest_client/api/transaction_batches_api.rb new file mode 100644 index 00000000..edd506b3 --- /dev/null +++ b/lib/cybersource_rest_client/api/transaction_batches_api.rb @@ -0,0 +1,86 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class TransactionBatchesApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Get a list of batch files processed through the Offline Transaction Submission Services + # Provide the search range + # @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] + 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 + end + + # Get a list of batch files processed through the Offline Transaction Submission Services + # Provide the search range + # @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 + 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 ...' + end + # verify the required parameter 'start_time' is set + if @api_client.config.client_side_validation && start_time.nil? + fail ArgumentError, "Missing the required parameter 'start_time' when calling TransactionBatchesApi.pts_v1_transaction_batches_get" + end + # verify the required parameter 'end_time' is set + if @api_client.config.client_side_validation && end_time.nil? + 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/' + + # query parameters + query_params = {} + query_params[:'startTime'] = start_time + query_params[:'endTime'] = end_time + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse2002') + 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 + return data, status_code, headers + end + end +end diff --git a/lib/cybersource_rest_client/api/transaction_details_api.rb b/lib/cybersource_rest_client/api/transaction_details_api.rb new file mode 100644 index 00000000..977cdc1f --- /dev/null +++ b/lib/cybersource_rest_client/api/transaction_details_api.rb @@ -0,0 +1,78 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class TransactionDetailsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default, config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Retrieve a Transaction + # 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] + def get_transaction(id, opts = {}) + data, _status_code, _headers = get_transaction_with_http_info(id, opts) + return data, _status_code, _headers + end + + # Retrieve a Transaction + # 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 + def get_transaction_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TransactionDetailsApi.get_transaction ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling TransactionDetailsApi.get_transaction" + end + # resource path + local_var_path = 'tss/v2/transactions/{id}'.sub('{' + 'id' + '}', id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse20012') + 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 + return data, status_code, headers + end + end +end diff --git a/lib/cybersource_rest_client/api/user_management_api.rb b/lib/cybersource_rest_client/api/user_management_api.rb new file mode 100644 index 00000000..a11494d0 --- /dev/null +++ b/lib/cybersource_rest_client/api/user_management_api.rb @@ -0,0 +1,84 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'uri' + +module CyberSource + class UserManagementApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default,config) + @api_client = api_client + @api_client.set_configuration(config) + end + # Get user based on organization Id, username, permission and role + # This endpoint is to get all the user information depending on the filter criteria passed in the query. + # @param [Hash] opts the optional parameters + # @option opts [String] :organization_id This is the orgId of the organization which the user belongs to. + # @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] + def get_users(opts = {}) + data, _status_code, _headers = get_users_with_http_info(opts) + return data, _status_code, _headers + end + + # Get user based on organization Id, username, permission and role + # This endpoint is to get all the user information depending on the filter criteria passed in the query. + # @param [Hash] opts the optional parameters + # @option opts [String] :organization_id This is the orgId of the organization which the user belongs to. + # @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 + def get_users_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: UserManagementApi.get_users ...' + end + # resource path + local_var_path = 'ums/v1/users' + + # query parameters + query_params = {} + query_params[:'organizationId'] = opts[:'organization_id'] if !opts[:'organization_id'].nil? + query_params[:'userName'] = opts[:'user_name'] if !opts[:'user_name'].nil? + query_params[:'permissionId'] = opts[:'permission_id'] if !opts[:'permission_id'].nil? + query_params[:'roleId'] = opts[:'role_id'] if !opts[:'role_id'].nil? + + # header parameters + header_params = {} + # 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']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'InlineResponse20013') + 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 + return data, status_code, headers + end + end +end diff --git a/lib/cyberSource_client/api/void_api.rb b/lib/cybersource_rest_client/api/void_api.rb similarity index 83% rename from lib/cyberSource_client/api/void_api.rb rename to lib/cybersource_rest_client/api/void_api.rb index f7048fda..5f735d1e 100644 --- a/lib/cyberSource_client/api/void_api.rb +++ b/lib/cybersource_rest_client/api/void_api.rb @@ -16,60 +16,9 @@ module CyberSource class VoidApi attr_accessor :api_client - def initialize(api_client = ApiClient.default) + def initialize(api_client = ApiClient.default, config) @api_client = api_client - end - # Retrieve A Void - # Include the void ID in the GET request to retrieve the void details. - # @param id The void ID returned from a previous void request. - # @param [Hash] opts the optional parameters - # @return [InlineResponse2015] - def get_void(id, opts = {}) - data, _status_code, _headers = get_void_with_http_info(id, opts) - return data, _status_code, _headers - end - - # Retrieve A Void - # Include the void ID in the GET request to retrieve the void details. - # @param id The void ID returned from a previous void request. - # @param [Hash] opts the optional parameters - # @return [Array<(InlineResponse2015, Fixnum, Hash)>] InlineResponse2015 data, response status code and response headers - def get_void_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: VoidApi.get_void ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling VoidApi.get_void" - end - # resource path - local_var_path = 'pts/v2/voids/{id}'.sub('{' + 'id' + '}', id.to_s) - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = [] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'InlineResponse2015') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: VoidApi#get_void\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers + @api_client.set_configuration(config) end # Void a Capture # Include the capture ID in the POST request to cancel the capture. @@ -110,6 +59,8 @@ def void_capture_with_http_info(void_capture_request, id, opts = {}) header_params = {} # 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']) # form parameters form_params = {} @@ -168,6 +119,8 @@ def void_credit_with_http_info(void_credit_request, id, opts = {}) header_params = {} # 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']) # form parameters form_params = {} @@ -226,6 +179,8 @@ def void_payment_with_http_info(void_payment_request, id, opts = {}) header_params = {} # 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']) # form parameters form_params = {} @@ -284,6 +239,8 @@ def void_refund_with_http_info(void_refund_request, id, opts = {}) header_params = {} # 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']) # form parameters form_params = {} diff --git a/lib/cyberSource_client/api_client.rb b/lib/cybersource_rest_client/api_client.rb similarity index 88% rename from lib/cyberSource_client/api_client.rb rename to lib/cybersource_rest_client/api_client.rb index 7f80b2ef..4d863349 100644 --- a/lib/cyberSource_client/api_client.rb +++ b/lib/cybersource_rest_client/api_client.rb @@ -74,7 +74,7 @@ def call_api(http_method, path, opts = {}) else data = nil end - return data, response.code, response.headers + return response.body, response.code, response.headers end # Builds the HTTP request @@ -89,10 +89,10 @@ def call_api(http_method, path, opts = {}) def build_request(http_method, path, opts = {}) url = build_request_url(path) body_params = opts[:body] || {} - headers = CallAuthenticationHeader(http_method, path, body_params, opts[:header_params]) + query_params = opts[:query_params] || {} + headers = CallAuthenticationHeader(http_method, path, body_params, opts[:header_params], query_params) http_method = http_method.to_sym.downcase header_params = @default_headers.merge(headers || {}) - query_params = opts[:query_params] || {} form_params = opts[:form_params] || {} @@ -127,46 +127,49 @@ def build_request(http_method, path, opts = {}) download_file(request) if opts[:return_type] == 'File' request end + # set merchantConfig + def set_configuration(config) + require_relative '../../AuthenticationSDK/core/Merchantconfig.rb' + $merchantconfig_obj = Merchantconfig.new(config) + end # Calling Authentication - def CallAuthenticationHeader(http_method, path, body_params, header_params) - require Dir.getwd + '/data/Configuration.rb' - require_relative '../../AuthenticationSDK/core/Merchantconfig.rb' + def CallAuthenticationHeader(http_method, path, body_params, header_params, query_params) + # require Dir.getwd + '/data/Configuration.rb' require_relative '../../AuthenticationSDK/core/Authorization.rb' require_relative '../../AuthenticationSDK/authentication/payloadDigest/Digest.rb' - # header_params = {} - request_target = @config.base_path + path + request_target = get_query_param(path, query_params) # Request Type. [Non-Editable] request_type = http_method.to_s - cybsproperty_obj = MerchantConfiguration.new.merchantConfigProp - merchantconfig_obj = Merchantconfig.new(cybsproperty_obj) - log_obj = Log.new merchantconfig_obj.logDirectory, merchantconfig_obj.logFilename, merchantconfig_obj.logSize, merchantconfig_obj.enableLog + # cybsproperty_obj = MerchantConfiguration.new.merchantConfigProp + # $merchantconfig_obj = Merchantconfig.new(cybsproperty_obj) + log_obj = Log.new $merchantconfig_obj.logDirectory, $merchantconfig_obj.logFilename, $merchantconfig_obj.logSize, $merchantconfig_obj.enableLog # Set Request Type into the merchant config object. - merchantconfig_obj.requestType = request_type + $merchantconfig_obj.requestType = request_type # Set Request Target into the merchant config object. - merchantconfig_obj.requestTarget = request_target + $merchantconfig_obj.requestTarget = request_target # Construct the URL. - url = Constants::HTTPS_URI_PREFIX + merchantconfig_obj.requestHost + merchantconfig_obj.requestTarget + url = Constants::HTTPS_URI_PREFIX + $merchantconfig_obj.requestHost + $merchantconfig_obj.requestTarget # set Request Json to Merchant config object - merchantconfig_obj.requestJsonData = body_params + $merchantconfig_obj.requestJsonData = body_params # Set URL into the merchant config object. - merchantconfig_obj.requestUrl = url + $merchantconfig_obj.requestUrl = url # Calling APISDK, Apisdk.controller. gmtDateTime = DateTime.now.httpdate - token = Authorization.new.getToken(merchantconfig_obj, gmtDateTime, log_obj) + token = Authorization.new.getToken($merchantconfig_obj, gmtDateTime, log_obj) # HTTP header 'Accept' (if needed) - if merchantconfig_obj.authenticationType.upcase == Constants::AUTH_TYPE_HTTP + if $merchantconfig_obj.authenticationType.upcase == Constants::AUTH_TYPE_HTTP # Appending headers for Get Connection - header_params['v-c-merchant-id'] = merchantconfig_obj.merchantId + header_params['v-c-merchant-id'] = $merchantconfig_obj.merchantId header_params['Date'] = gmtDateTime - header_params['Host'] = merchantconfig_obj.requestHost + header_params['Host'] = $merchantconfig_obj.requestHost header_params['Signature'] = token - if request_type == Constants::POST_REQUEST_TYPE + if request_type == Constants::POST_REQUEST_TYPE || request_type == Constants::PUT_REQUEST_TYPE || request_type == Constants::PATCH_REQUEST_TYPE digest = DigestGeneration.new.generateDigest(body_params, log_obj) digest_payload = Constants::SHA256 + digest header_params['Digest'] = digest_payload end end - if merchantconfig_obj.authenticationType.upcase == Constants::AUTH_TYPE_JWT + if $merchantconfig_obj.authenticationType.upcase == Constants::AUTH_TYPE_JWT token = "Bearer " + token header_params['Authorization'] = token end @@ -175,7 +178,14 @@ def CallAuthenticationHeader(http_method, path, body_params, header_params) end return header_params end - + def get_query_param(path, query_params) + if !query_params.empty? + request_target = @config.base_path + path + '?' + URI.encode_www_form(query_params) + else + request_target = @config.base_path + path + end + request_target + end # Check if the given MIME is a JSON MIME. # JSON MIME examples: # application/json diff --git a/lib/cyberSource_client/api_error.rb b/lib/cybersource_rest_client/api_error.rb similarity index 100% rename from lib/cyberSource_client/api_error.rb rename to lib/cybersource_rest_client/api_error.rb diff --git a/lib/cyberSource_client/configuration.rb b/lib/cybersource_rest_client/configuration.rb similarity index 99% rename from lib/cyberSource_client/configuration.rb rename to lib/cybersource_rest_client/configuration.rb index 0884994c..f5a93003 100644 --- a/lib/cyberSource_client/configuration.rb +++ b/lib/cybersource_rest_client/configuration.rb @@ -140,7 +140,7 @@ def initialize @params_encoding = nil @cert_file = nil @key_file = nil - @debugging = false + @debugging = true @inject_format = false @force_ending_format = false @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT) diff --git a/lib/cyberSource_client/models/auth_reversal_request.rb b/lib/cybersource_rest_client/models/auth_reversal_request.rb similarity index 93% rename from lib/cyberSource_client/models/auth_reversal_request.rb rename to lib/cybersource_rest_client/models/auth_reversal_request.rb index 30edd61e..101042c2 100644 --- a/lib/cyberSource_client/models/auth_reversal_request.rb +++ b/lib/cybersource_rest_client/models/auth_reversal_request.rb @@ -38,11 +38,11 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'client_reference_information' => :'V2paymentsidreversalsClientReferenceInformation', - :'reversal_information' => :'V2paymentsidreversalsReversalInformation', - :'processing_information' => :'V2paymentsidreversalsProcessingInformation', - :'order_information' => :'V2paymentsidreversalsOrderInformation', - :'point_of_sale_information' => :'V2paymentsidreversalsPointOfSaleInformation' + :'client_reference_information' => :'Ptsv2paymentsidreversalsClientReferenceInformation', + :'reversal_information' => :'Ptsv2paymentsidreversalsReversalInformation', + :'processing_information' => :'Ptsv2paymentsidreversalsProcessingInformation', + :'order_information' => :'Ptsv2paymentsidreversalsOrderInformation', + :'point_of_sale_information' => :'Ptsv2paymentsidreversalsPointOfSaleInformation' } end diff --git a/lib/cyberSource_client/models/body.rb b/lib/cybersource_rest_client/models/body.rb similarity index 96% rename from lib/cyberSource_client/models/body.rb rename to lib/cybersource_rest_client/models/body.rb index 9c81541b..71d92949 100644 --- a/lib/cyberSource_client/models/body.rb +++ b/lib/cybersource_rest_client/models/body.rb @@ -72,14 +72,14 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'_links' => :'InstrumentidentifiersLinks', + :'_links' => :'Tmsv1instrumentidentifiersLinks', :'id' => :'String', :'object' => :'String', :'state' => :'String', - :'card' => :'InstrumentidentifiersCard', - :'bank_account' => :'InstrumentidentifiersBankAccount', - :'processing_information' => :'InstrumentidentifiersProcessingInformation', - :'metadata' => :'InstrumentidentifiersMetadata' + :'card' => :'Tmsv1instrumentidentifiersCard', + :'bank_account' => :'Tmsv1instrumentidentifiersBankAccount', + :'processing_information' => :'Tmsv1instrumentidentifiersProcessingInformation', + :'metadata' => :'Tmsv1instrumentidentifiersMetadata' } end diff --git a/lib/cyberSource_client/models/body_1.rb b/lib/cybersource_rest_client/models/body_1.rb similarity index 98% rename from lib/cyberSource_client/models/body_1.rb rename to lib/cybersource_rest_client/models/body_1.rb index 4f5002fe..0cd7d602 100644 --- a/lib/cyberSource_client/models/body_1.rb +++ b/lib/cybersource_rest_client/models/body_1.rb @@ -26,7 +26,7 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'processing_information' => :'InstrumentidentifiersProcessingInformation' + :'processing_information' => :'Tmsv1instrumentidentifiersProcessingInformation' } end diff --git a/lib/cyberSource_client/models/body_2.rb b/lib/cybersource_rest_client/models/body_2.rb similarity index 93% rename from lib/cyberSource_client/models/body_2.rb rename to lib/cybersource_rest_client/models/body_2.rb index ce5ec72c..3c3b8652 100644 --- a/lib/cyberSource_client/models/body_2.rb +++ b/lib/cybersource_rest_client/models/body_2.rb @@ -84,18 +84,18 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'_links' => :'InstrumentidentifiersLinks', + :'_links' => :'Tmsv1instrumentidentifiersLinks', :'id' => :'String', :'object' => :'String', :'state' => :'String', - :'bank_account' => :'PaymentinstrumentsBankAccount', - :'card' => :'PaymentinstrumentsCard', - :'buyer_information' => :'PaymentinstrumentsBuyerInformation', - :'bill_to' => :'PaymentinstrumentsBillTo', - :'processing_information' => :'PaymentinstrumentsProcessingInformation', - :'merchant_information' => :'PaymentinstrumentsMerchantInformation', - :'meta_data' => :'InstrumentidentifiersMetadata', - :'instrument_identifier' => :'PaymentinstrumentsInstrumentIdentifier' + :'bank_account' => :'Tmsv1paymentinstrumentsBankAccount', + :'card' => :'Tmsv1paymentinstrumentsCard', + :'buyer_information' => :'Tmsv1paymentinstrumentsBuyerInformation', + :'bill_to' => :'Tmsv1paymentinstrumentsBillTo', + :'processing_information' => :'Tmsv1paymentinstrumentsProcessingInformation', + :'merchant_information' => :'Tmsv1paymentinstrumentsMerchantInformation', + :'meta_data' => :'Tmsv1instrumentidentifiersMetadata', + :'instrument_identifier' => :'Tmsv1paymentinstrumentsInstrumentIdentifier' } end diff --git a/lib/cyberSource_client/models/body_3.rb b/lib/cybersource_rest_client/models/body_3.rb similarity index 93% rename from lib/cyberSource_client/models/body_3.rb rename to lib/cybersource_rest_client/models/body_3.rb index dd5df995..f92ef1aa 100644 --- a/lib/cyberSource_client/models/body_3.rb +++ b/lib/cybersource_rest_client/models/body_3.rb @@ -84,18 +84,18 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'_links' => :'InstrumentidentifiersLinks', + :'_links' => :'Tmsv1instrumentidentifiersLinks', :'id' => :'String', :'object' => :'String', :'state' => :'String', - :'bank_account' => :'PaymentinstrumentsBankAccount', - :'card' => :'PaymentinstrumentsCard', - :'buyer_information' => :'PaymentinstrumentsBuyerInformation', - :'bill_to' => :'PaymentinstrumentsBillTo', - :'processing_information' => :'PaymentinstrumentsProcessingInformation', - :'merchant_information' => :'PaymentinstrumentsMerchantInformation', - :'meta_data' => :'InstrumentidentifiersMetadata', - :'instrument_identifier' => :'PaymentinstrumentsInstrumentIdentifier' + :'bank_account' => :'Tmsv1paymentinstrumentsBankAccount', + :'card' => :'Tmsv1paymentinstrumentsCard', + :'buyer_information' => :'Tmsv1paymentinstrumentsBuyerInformation', + :'bill_to' => :'Tmsv1paymentinstrumentsBillTo', + :'processing_information' => :'Tmsv1paymentinstrumentsProcessingInformation', + :'merchant_information' => :'Tmsv1paymentinstrumentsMerchantInformation', + :'meta_data' => :'Tmsv1instrumentidentifiersMetadata', + :'instrument_identifier' => :'Tmsv1paymentinstrumentsInstrumentIdentifier' } end diff --git a/lib/cyberSource_client/models/capture_payment_request.rb b/lib/cybersource_rest_client/models/capture_payment_request.rb similarity index 90% rename from lib/cyberSource_client/models/capture_payment_request.rb rename to lib/cybersource_rest_client/models/capture_payment_request.rb index 23093435..e249b353 100644 --- a/lib/cyberSource_client/models/capture_payment_request.rb +++ b/lib/cybersource_rest_client/models/capture_payment_request.rb @@ -32,7 +32,7 @@ class CapturePaymentRequest attr_accessor :point_of_sale_information - # TBD + # Description of this field is not available. attr_accessor :merchant_defined_information # Attribute mapping from ruby-style variable name to JSON key. @@ -54,16 +54,16 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'client_reference_information' => :'V2paymentsClientReferenceInformation', - :'processing_information' => :'V2paymentsidcapturesProcessingInformation', - :'payment_information' => :'V2paymentsidcapturesPaymentInformation', - :'order_information' => :'V2paymentsidcapturesOrderInformation', - :'buyer_information' => :'V2paymentsidcapturesBuyerInformation', - :'device_information' => :'V2paymentsDeviceInformation', - :'merchant_information' => :'V2paymentsidcapturesMerchantInformation', - :'aggregator_information' => :'V2paymentsidcapturesAggregatorInformation', - :'point_of_sale_information' => :'V2paymentsidcapturesPointOfSaleInformation', - :'merchant_defined_information' => :'Array' + :'client_reference_information' => :'Ptsv2paymentsClientReferenceInformation', + :'processing_information' => :'Ptsv2paymentsidcapturesProcessingInformation', + :'payment_information' => :'Ptsv2paymentsidcapturesPaymentInformation', + :'order_information' => :'Ptsv2paymentsidcapturesOrderInformation', + :'buyer_information' => :'Ptsv2paymentsidcapturesBuyerInformation', + :'device_information' => :'Ptsv2paymentsDeviceInformation', + :'merchant_information' => :'Ptsv2paymentsidcapturesMerchantInformation', + :'aggregator_information' => :'Ptsv2paymentsidcapturesAggregatorInformation', + :'point_of_sale_information' => :'Ptsv2paymentsidcapturesPointOfSaleInformation', + :'merchant_defined_information' => :'Array' } end diff --git a/lib/cyberSource_client/models/card_info.rb b/lib/cybersource_rest_client/models/card_info.rb similarity index 100% rename from lib/cyberSource_client/models/card_info.rb rename to lib/cybersource_rest_client/models/card_info.rb diff --git a/lib/cyberSource_client/models/create_credit_request.rb b/lib/cybersource_rest_client/models/create_credit_request.rb similarity index 90% rename from lib/cyberSource_client/models/create_credit_request.rb rename to lib/cybersource_rest_client/models/create_credit_request.rb index ccf071c5..29030b56 100644 --- a/lib/cyberSource_client/models/create_credit_request.rb +++ b/lib/cybersource_rest_client/models/create_credit_request.rb @@ -32,7 +32,7 @@ class CreateCreditRequest attr_accessor :point_of_sale_information - # TBD + # Description of this field is not available. attr_accessor :merchant_defined_information # Attribute mapping from ruby-style variable name to JSON key. @@ -54,16 +54,16 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'client_reference_information' => :'V2paymentsClientReferenceInformation', - :'processing_information' => :'V2creditsProcessingInformation', - :'payment_information' => :'V2paymentsidrefundsPaymentInformation', - :'order_information' => :'V2paymentsidrefundsOrderInformation', - :'buyer_information' => :'V2paymentsidcapturesBuyerInformation', - :'device_information' => :'V2paymentsDeviceInformation', - :'merchant_information' => :'V2paymentsidrefundsMerchantInformation', - :'aggregator_information' => :'V2paymentsidcapturesAggregatorInformation', - :'point_of_sale_information' => :'V2creditsPointOfSaleInformation', - :'merchant_defined_information' => :'Array' + :'client_reference_information' => :'Ptsv2paymentsClientReferenceInformation', + :'processing_information' => :'Ptsv2creditsProcessingInformation', + :'payment_information' => :'Ptsv2paymentsidrefundsPaymentInformation', + :'order_information' => :'Ptsv2paymentsidrefundsOrderInformation', + :'buyer_information' => :'Ptsv2paymentsidcapturesBuyerInformation', + :'device_information' => :'Ptsv2paymentsDeviceInformation', + :'merchant_information' => :'Ptsv2paymentsidrefundsMerchantInformation', + :'aggregator_information' => :'Ptsv2paymentsidcapturesAggregatorInformation', + :'point_of_sale_information' => :'Ptsv2creditsPointOfSaleInformation', + :'merchant_defined_information' => :'Array' } end diff --git a/lib/cyberSource_client/models/create_payment_request.rb b/lib/cybersource_rest_client/models/create_payment_request.rb similarity index 90% rename from lib/cyberSource_client/models/create_payment_request.rb rename to lib/cybersource_rest_client/models/create_payment_request.rb index 13633499..6fb3de6f 100644 --- a/lib/cyberSource_client/models/create_payment_request.rb +++ b/lib/cybersource_rest_client/models/create_payment_request.rb @@ -36,7 +36,7 @@ class CreatePaymentRequest attr_accessor :point_of_sale_information - # TBD + # Description of this field is not available. attr_accessor :merchant_defined_information # Attribute mapping from ruby-style variable name to JSON key. @@ -60,18 +60,18 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'client_reference_information' => :'V2paymentsClientReferenceInformation', - :'processing_information' => :'V2paymentsProcessingInformation', - :'payment_information' => :'V2paymentsPaymentInformation', - :'order_information' => :'V2paymentsOrderInformation', - :'buyer_information' => :'V2paymentsBuyerInformation', - :'recipient_information' => :'V2paymentsRecipientInformation', - :'device_information' => :'V2paymentsDeviceInformation', - :'merchant_information' => :'V2paymentsMerchantInformation', - :'aggregator_information' => :'V2paymentsAggregatorInformation', - :'consumer_authentication_information' => :'V2paymentsConsumerAuthenticationInformation', - :'point_of_sale_information' => :'V2paymentsPointOfSaleInformation', - :'merchant_defined_information' => :'Array' + :'client_reference_information' => :'Ptsv2paymentsClientReferenceInformation', + :'processing_information' => :'Ptsv2paymentsProcessingInformation', + :'payment_information' => :'Ptsv2paymentsPaymentInformation', + :'order_information' => :'Ptsv2paymentsOrderInformation', + :'buyer_information' => :'Ptsv2paymentsBuyerInformation', + :'recipient_information' => :'Ptsv2paymentsRecipientInformation', + :'device_information' => :'Ptsv2paymentsDeviceInformation', + :'merchant_information' => :'Ptsv2paymentsMerchantInformation', + :'aggregator_information' => :'Ptsv2paymentsAggregatorInformation', + :'consumer_authentication_information' => :'Ptsv2paymentsConsumerAuthenticationInformation', + :'point_of_sale_information' => :'Ptsv2paymentsPointOfSaleInformation', + :'merchant_defined_information' => :'Array' } end diff --git a/lib/cybersource_rest_client/models/create_search_request.rb b/lib/cybersource_rest_client/models/create_search_request.rb new file mode 100644 index 00000000..c5a79ef7 --- /dev/null +++ b/lib/cybersource_rest_client/models/create_search_request.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 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_client/models/der_public_key.rb b/lib/cybersource_rest_client/models/der_public_key.rb similarity index 100% rename from lib/cyberSource_client/models/der_public_key.rb rename to lib/cybersource_rest_client/models/der_public_key.rb diff --git a/lib/cyberSource_client/models/error.rb b/lib/cybersource_rest_client/models/error.rb similarity index 100% rename from lib/cyberSource_client/models/error.rb rename to lib/cybersource_rest_client/models/error.rb diff --git a/lib/cyberSource_client/models/error_links.rb b/lib/cybersource_rest_client/models/error_links.rb similarity index 100% rename from lib/cyberSource_client/models/error_links.rb rename to lib/cybersource_rest_client/models/error_links.rb diff --git a/lib/cyberSource_client/models/error_response.rb b/lib/cybersource_rest_client/models/error_response.rb similarity index 100% rename from lib/cyberSource_client/models/error_response.rb rename to lib/cybersource_rest_client/models/error_response.rb diff --git a/lib/cybersource_rest_client/models/flexv1tokens_card_info.rb b/lib/cybersource_rest_client/models/flexv1tokens_card_info.rb new file mode 100644 index 00000000..2b8014e8 --- /dev/null +++ b/lib/cybersource_rest_client/models/flexv1tokens_card_info.rb @@ -0,0 +1,214 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Flexv1tokensCardInfo + # Encrypted or plain text card number. If the encryption type of “None” was used in the Generate Key request, this value can be set to the plaintext card number/Personal Account Number (PAN). If the encryption type of RsaOaep256 was used in the Generate Key request, this value needs to be the RSA OAEP 256 encrypted card number. The card number should be encrypted on the cardholders’ device. The [WebCrypto API] (https://github.com/CyberSource/cybersource-flex-samples/blob/master/java/spring-boot/src/main/resources/public/flex.js) can be used with the JWK obtained in the Generate Key request. + attr_accessor :card_number + + # Two digit expiration month + attr_accessor :card_expiration_month + + # Four digit expiration year + attr_accessor :card_expiration_year + + # Card Type. This field is required. Refer to the CyberSource Credit Card Services documentation for supported card types. + attr_accessor :card_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'card_number' => :'cardNumber', + :'card_expiration_month' => :'cardExpirationMonth', + :'card_expiration_year' => :'cardExpirationYear', + :'card_type' => :'cardType' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'card_number' => :'String', + :'card_expiration_month' => :'String', + :'card_expiration_year' => :'String', + :'card_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?(:'cardNumber') + self.card_number = attributes[:'cardNumber'] + end + + if attributes.has_key?(:'cardExpirationMonth') + self.card_expiration_month = attributes[:'cardExpirationMonth'] + end + + if attributes.has_key?(:'cardExpirationYear') + self.card_expiration_year = attributes[:'cardExpirationYear'] + end + + if attributes.has_key?(:'cardType') + self.card_type = attributes[:'cardType'] + end + end + + # Show invalid properties 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_number == o.card_number && + card_expiration_month == o.card_expiration_month && + card_expiration_year == o.card_expiration_year && + card_type == o.card_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 + [card_number, card_expiration_month, card_expiration_year, card_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/generate_public_key_request.rb b/lib/cybersource_rest_client/models/generate_public_key_request.rb new file mode 100644 index 00000000..bb058918 --- /dev/null +++ b/lib/cybersource_rest_client/models/generate_public_key_request.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 GeneratePublicKeyRequest + # How the card number should be encrypted in the subsequent Tokenize Card request. Possible values are RsaOaep256 or None (if using this value the card number must be in plain text when included in the Tokenize Card request). The Tokenize Card request uses a secure connection (TLS 1.2+) regardless of what encryption type is specified. + attr_accessor :encryption_type + + # This should only be used if using the Microform implementation. This is the protocol, URL, and if used, port number of the page that will host the Microform. Unless using http://localhost, the protocol must be https://. For example, if serving Microform on example.com, the targetOrigin is https://example.com The value is used to restrict the frame ancestor of the Microform. If there is a mismatch between this value and the frame ancestor, the Microfrom will not load. + attr_accessor :target_origin + + # Specifies the number of card number digits to be returned un-masked from the left. For example, setting this value to 6 will return: 411111XXXXXXXXXX Default value: 6 Maximum value: 6 + attr_accessor :unmasked_left + + # Specifies the number of card number digits to be returned un-masked from the right. For example, setting this value to 4 will return: 411111XXXXXX1111 Default value: 4 Maximum value: 4 + attr_accessor :unmasked_right + + # Specifies whether or not 'dummy' address data should be specified in the create token request. If you have 'Relaxed AVS' enabled for your MID, this value can be set to False.Default value: true + attr_accessor :enable_billing_address + + # Three character ISO currency code to be associated with the token. Required for legacy integrations. Default value: USD. + attr_accessor :currency + + # Specifies whether or not an account verification authorization ($0 Authorization) is carried out on token creation. Default is false, as it is assumed a full or zero amount authorization will be carried out in a separate call from your server. + attr_accessor :enable_auto_auth + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'encryption_type' => :'encryptionType', + :'target_origin' => :'targetOrigin', + :'unmasked_left' => :'unmaskedLeft', + :'unmasked_right' => :'unmaskedRight', + :'enable_billing_address' => :'enableBillingAddress', + :'currency' => :'currency', + :'enable_auto_auth' => :'enableAutoAuth' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'encryption_type' => :'String', + :'target_origin' => :'String', + :'unmasked_left' => :'Integer', + :'unmasked_right' => :'Integer', + :'enable_billing_address' => :'BOOLEAN', + :'currency' => :'String', + :'enable_auto_auth' => :'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?(:'encryptionType') + self.encryption_type = attributes[:'encryptionType'] + end + + if attributes.has_key?(:'targetOrigin') + self.target_origin = attributes[:'targetOrigin'] + end + + if attributes.has_key?(:'unmaskedLeft') + self.unmasked_left = attributes[:'unmaskedLeft'] + end + + if attributes.has_key?(:'unmaskedRight') + self.unmasked_right = attributes[:'unmaskedRight'] + end + + if attributes.has_key?(:'enableBillingAddress') + self.enable_billing_address = attributes[:'enableBillingAddress'] + end + + if attributes.has_key?(:'currency') + self.currency = attributes[:'currency'] + end + + if attributes.has_key?(:'enableAutoAuth') + self.enable_auto_auth = attributes[:'enableAutoAuth'] + end + end + + # Show invalid properties 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 @encryption_type.nil? + invalid_properties.push('invalid value for "encryption_type", encryption_type 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 @encryption_type.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 && + encryption_type == o.encryption_type && + target_origin == o.target_origin && + unmasked_left == o.unmasked_left && + unmasked_right == o.unmasked_right && + enable_billing_address == o.enable_billing_address && + currency == o.currency && + enable_auto_auth == o.enable_auto_auth + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [encryption_type, target_origin, unmasked_left, unmasked_right, enable_billing_address, currency, enable_auto_auth].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cyberSource_client/models/inline_response_200.rb b/lib/cybersource_rest_client/models/inline_response_200.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_200.rb rename to lib/cybersource_rest_client/models/inline_response_200.rb diff --git a/lib/cyberSource_client/models/inline_response_200_1.rb b/lib/cybersource_rest_client/models/inline_response_200_1.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_200_1.rb rename to lib/cybersource_rest_client/models/inline_response_200_1.rb diff --git a/lib/cybersource_rest_client/models/inline_response_200_10.rb b/lib/cybersource_rest_client/models/inline_response_200_10.rb new file mode 100644 index 00000000..3c09c204 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_10.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 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 new file mode 100644 index 00000000..07b43a1b --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_11.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 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 new file mode 100644 index 00000000..813823fc --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_11__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 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 new file mode 100644 index 00000000..0fffbd0c --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_11__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 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 new file mode 100644 index 00000000..13e2084b --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_11__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 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 new file mode 100644 index 00000000..61b23d5d --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_11__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 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 new file mode 100644 index 00000000..a7a5c3a9 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_11__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 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 new file mode 100644 index 00000000..b630c94a --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_11__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 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 new file mode 100644 index 00000000..2e011914 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12.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 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 new file mode 100644 index 00000000..dadcc142 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..a56f0fa0 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..5d68bd5f --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..bae1979a --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..1e3c51a2 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..3a86966f --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..fb72f5ee --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..4f63a4c6 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..539468ee --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..72fdf696 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..cc12a76b --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..92acde74 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..8c55dfcb --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..7ba88c0c --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..4b6e1c87 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..1cb3007b --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..2960ca08 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..9b054f69 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..9f7fadce --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..b7c7e5ea --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..b003378e --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..37200b45 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..0725e42c --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..53849c65 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_payment_information_card.rb @@ -0,0 +1,428 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.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 new file mode 100644 index 00000000..b89e4b49 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..8487b818 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..cc7559b0 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..3e0b1e78 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..9a663928 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..0fa99e28 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..d72730aa --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..ae8af21b --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..76834e07 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..1fdb9b5f --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..d1135715 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..5387a695 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..435833c5 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..fe1024ad --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..6c2d4a05 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_12_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 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 new file mode 100644 index 00000000..ce0b44d4 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_13.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 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 new file mode 100644 index 00000000..6d4496e0 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_13_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 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 new file mode 100644 index 00000000..c1e8096a --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_13_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 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 new file mode 100644 index 00000000..507df7db --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_13_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 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 new file mode 100644 index 00000000..9bd4d52d --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_13_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 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 new file mode 100644 index 00000000..e0c12793 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_2.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 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 new file mode 100644 index 00000000..3a8f144b --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_2__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 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 new file mode 100644 index 00000000..514939e2 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_2__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 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 new file mode 100644 index 00000000..364cbe31 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_2_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 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 new file mode 100644 index 00000000..b47ab993 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_3.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 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 new file mode 100644 index 00000000..b9c14c97 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_3_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 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 new file mode 100644 index 00000000..f5575481 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_4.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 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 new file mode 100644 index 00000000..fd11967d --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_4_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 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 new file mode 100644 index 00000000..0aeb5b6c --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_5.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 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 new file mode 100644 index 00000000..0f5e7aa4 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_5_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 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 new file mode 100644 index 00000000..87e9ee20 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_6.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 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 new file mode 100644 index 00000000..0228c989 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_6_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 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 new file mode 100644 index 00000000..821ec51c --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_6_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 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 new file mode 100644 index 00000000..225ebf56 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_7.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 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 new file mode 100644 index 00000000..df5873d3 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_7_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 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 new file mode 100644 index 00000000..c4b93e74 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_8.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 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 new file mode 100644 index 00000000..f3a47532 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_9.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 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 new file mode 100644 index 00000000..8f22f294 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_9__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 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 new file mode 100644 index 00000000..41d6db7d --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_9__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 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 new file mode 100644 index 00000000..fd8c2a23 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_9__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 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 new file mode 100644 index 00000000..86334097 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_200_9_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 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_client/models/inline_response_200_der.rb b/lib/cybersource_rest_client/models/inline_response_200_der.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_200_der.rb rename to lib/cybersource_rest_client/models/inline_response_200_der.rb diff --git a/lib/cyberSource_client/models/inline_response_200_jwk.rb b/lib/cybersource_rest_client/models/inline_response_200_jwk.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_200_jwk.rb rename to lib/cybersource_rest_client/models/inline_response_200_jwk.rb diff --git a/lib/cyberSource_client/models/inline_response_201.rb b/lib/cybersource_rest_client/models/inline_response_201.rb similarity index 95% rename from lib/cyberSource_client/models/inline_response_201.rb rename to lib/cybersource_rest_client/models/inline_response_201.rb index c7dc13ec..016f2b8d 100644 --- a/lib/cyberSource_client/models/inline_response_201.rb +++ b/lib/cybersource_rest_client/models/inline_response_201.rb @@ -16,8 +16,6 @@ module CyberSource class InlineResponse201 attr_accessor :_links - attr_accessor :_embedded - # An unique identification number assigned by CyberSource to identify the submitted request. attr_accessor :id @@ -68,7 +66,6 @@ def valid?(value) def self.attribute_map { :'_links' => :'_links', - :'_embedded' => :'_embedded', :'id' => :'id', :'submit_time_utc' => :'submitTimeUtc', :'status' => :'status', @@ -86,7 +83,6 @@ def self.attribute_map def self.swagger_types { :'_links' => :'InlineResponse201Links', - :'_embedded' => :'InlineResponse201Embedded', :'id' => :'String', :'submit_time_utc' => :'String', :'status' => :'String', @@ -112,10 +108,6 @@ def initialize(attributes = {}) self._links = attributes[:'_links'] end - if attributes.has_key?(:'_embedded') - self._embedded = attributes[:'_embedded'] - end - if attributes.has_key?(:'id') self.id = attributes[:'id'] end @@ -218,7 +210,6 @@ def ==(o) return true if self.equal?(o) self.class == o.class && _links == o._links && - _embedded == o._embedded && id == o.id && submit_time_utc == o.submit_time_utc && status == o.status && @@ -240,7 +231,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [_links, _embedded, id, submit_time_utc, status, reconciliation_id, error_information, client_reference_information, processor_information, payment_information, order_information, point_of_sale_information].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 diff --git a/lib/cyberSource_client/models/inline_response_201_1.rb b/lib/cybersource_rest_client/models/inline_response_201_1.rb similarity index 98% rename from lib/cyberSource_client/models/inline_response_201_1.rb rename to lib/cybersource_rest_client/models/inline_response_201_1.rb index 2e69ec49..4e813345 100644 --- a/lib/cyberSource_client/models/inline_response_201_1.rb +++ b/lib/cybersource_rest_client/models/inline_response_201_1.rb @@ -79,7 +79,7 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'_links' => :'InlineResponse201EmbeddedCaptureLinks', + :'_links' => :'InlineResponse2011Links', :'id' => :'String', :'submit_time_utc' => :'String', :'status' => :'String', @@ -88,7 +88,7 @@ def self.swagger_types :'reversal_amount_details' => :'InlineResponse2011ReversalAmountDetails', :'processor_information' => :'InlineResponse2011ProcessorInformation', :'authorization_information' => :'InlineResponse2011AuthorizationInformation', - :'point_of_sale_information' => :'V2paymentsidreversalsPointOfSaleInformation' + :'point_of_sale_information' => :'Ptsv2paymentsidreversalsPointOfSaleInformation' } 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 new file mode 100644 index 00000000..f9a86dbe --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_1__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 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_client/models/inline_response_201_1_authorization_information.rb b/lib/cybersource_rest_client/models/inline_response_201_1_authorization_information.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_1_authorization_information.rb rename to lib/cybersource_rest_client/models/inline_response_201_1_authorization_information.rb diff --git a/lib/cyberSource_client/models/inline_response_201_1_processor_information.rb b/lib/cybersource_rest_client/models/inline_response_201_1_processor_information.rb similarity index 98% rename from lib/cyberSource_client/models/inline_response_201_1_processor_information.rb rename to lib/cybersource_rest_client/models/inline_response_201_1_processor_information.rb index 0a07d2fb..bf979339 100644 --- a/lib/cyberSource_client/models/inline_response_201_1_processor_information.rb +++ b/lib/cybersource_rest_client/models/inline_response_201_1_processor_information.rb @@ -20,7 +20,7 @@ class InlineResponse2011ProcessorInformation # 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 + # 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. diff --git a/lib/cyberSource_client/models/inline_response_201_1_reversal_amount_details.rb b/lib/cybersource_rest_client/models/inline_response_201_1_reversal_amount_details.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_1_reversal_amount_details.rb rename to lib/cybersource_rest_client/models/inline_response_201_1_reversal_amount_details.rb diff --git a/lib/cyberSource_client/models/inline_response_201_2.rb b/lib/cybersource_rest_client/models/inline_response_201_2.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_2.rb rename to lib/cybersource_rest_client/models/inline_response_201_2.rb diff --git a/lib/cyberSource_client/models/inline_response_201_2__links.rb b/lib/cybersource_rest_client/models/inline_response_201_2__links.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_2__links.rb rename to lib/cybersource_rest_client/models/inline_response_201_2__links.rb diff --git a/lib/cyberSource_client/models/inline_response_201_2_order_information.rb b/lib/cybersource_rest_client/models/inline_response_201_2_order_information.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_2_order_information.rb rename to lib/cybersource_rest_client/models/inline_response_201_2_order_information.rb diff --git a/lib/cyberSource_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 similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_2_order_information_amount_details.rb rename to lib/cybersource_rest_client/models/inline_response_201_2_order_information_amount_details.rb diff --git a/lib/cyberSource_client/models/inline_response_201_2_processor_information.rb b/lib/cybersource_rest_client/models/inline_response_201_2_processor_information.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_2_processor_information.rb rename to lib/cybersource_rest_client/models/inline_response_201_2_processor_information.rb diff --git a/lib/cyberSource_client/models/inline_response_201_3.rb b/lib/cybersource_rest_client/models/inline_response_201_3.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_3.rb rename to lib/cybersource_rest_client/models/inline_response_201_3.rb diff --git a/lib/cyberSource_client/models/inline_response_201_3__links.rb b/lib/cybersource_rest_client/models/inline_response_201_3__links.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_3__links.rb rename to lib/cybersource_rest_client/models/inline_response_201_3__links.rb diff --git a/lib/cyberSource_client/models/inline_response_201_3_order_information.rb b/lib/cybersource_rest_client/models/inline_response_201_3_order_information.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_3_order_information.rb rename to lib/cybersource_rest_client/models/inline_response_201_3_order_information.rb diff --git a/lib/cyberSource_client/models/inline_response_201_3_processor_information.rb b/lib/cybersource_rest_client/models/inline_response_201_3_processor_information.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_3_processor_information.rb rename to lib/cybersource_rest_client/models/inline_response_201_3_processor_information.rb diff --git a/lib/cyberSource_client/models/inline_response_201_3_refund_amount_details.rb b/lib/cybersource_rest_client/models/inline_response_201_3_refund_amount_details.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_3_refund_amount_details.rb rename to lib/cybersource_rest_client/models/inline_response_201_3_refund_amount_details.rb diff --git a/lib/cyberSource_client/models/inline_response_201_4.rb b/lib/cybersource_rest_client/models/inline_response_201_4.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_4.rb rename to lib/cybersource_rest_client/models/inline_response_201_4.rb diff --git a/lib/cyberSource_client/models/inline_response_201_4_credit_amount_details.rb b/lib/cybersource_rest_client/models/inline_response_201_4_credit_amount_details.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_4_credit_amount_details.rb rename to lib/cybersource_rest_client/models/inline_response_201_4_credit_amount_details.rb diff --git a/lib/cyberSource_client/models/inline_response_201_5.rb b/lib/cybersource_rest_client/models/inline_response_201_5.rb similarity index 99% rename from lib/cyberSource_client/models/inline_response_201_5.rb rename to lib/cybersource_rest_client/models/inline_response_201_5.rb index b5a12616..11f6a0ca 100644 --- a/lib/cyberSource_client/models/inline_response_201_5.rb +++ b/lib/cybersource_rest_client/models/inline_response_201_5.rb @@ -66,7 +66,7 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'_links' => :'InlineResponse201EmbeddedCaptureLinks', + :'_links' => :'InlineResponse2011Links', :'id' => :'String', :'submit_time_utc' => :'String', :'status' => :'String', diff --git a/lib/cyberSource_client/models/inline_response_201_5_void_amount_details.rb b/lib/cybersource_rest_client/models/inline_response_201_5_void_amount_details.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_5_void_amount_details.rb rename to lib/cybersource_rest_client/models/inline_response_201_5_void_amount_details.rb diff --git a/lib/cyberSource_client/models/inline_response_201_6.rb b/lib/cybersource_rest_client/models/inline_response_201_6.rb similarity index 93% rename from lib/cyberSource_client/models/inline_response_201_6.rb rename to lib/cybersource_rest_client/models/inline_response_201_6.rb index b44fdd6d..cf07e08a 100644 --- a/lib/cyberSource_client/models/inline_response_201_6.rb +++ b/lib/cybersource_rest_client/models/inline_response_201_6.rb @@ -84,18 +84,18 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'_links' => :'InstrumentidentifiersLinks', + :'_links' => :'Tmsv1instrumentidentifiersLinks', :'id' => :'String', :'object' => :'String', :'state' => :'String', - :'bank_account' => :'PaymentinstrumentsBankAccount', - :'card' => :'PaymentinstrumentsCard', - :'buyer_information' => :'PaymentinstrumentsBuyerInformation', - :'bill_to' => :'PaymentinstrumentsBillTo', - :'processing_information' => :'PaymentinstrumentsProcessingInformation', - :'merchant_information' => :'PaymentinstrumentsMerchantInformation', - :'meta_data' => :'InstrumentidentifiersMetadata', - :'instrument_identifier' => :'PaymentinstrumentsInstrumentIdentifier' + :'bank_account' => :'Tmsv1paymentinstrumentsBankAccount', + :'card' => :'Tmsv1paymentinstrumentsCard', + :'buyer_information' => :'Tmsv1paymentinstrumentsBuyerInformation', + :'bill_to' => :'Tmsv1paymentinstrumentsBillTo', + :'processing_information' => :'Tmsv1paymentinstrumentsProcessingInformation', + :'merchant_information' => :'Tmsv1paymentinstrumentsMerchantInformation', + :'meta_data' => :'Tmsv1instrumentidentifiersMetadata', + :'instrument_identifier' => :'Tmsv1paymentinstrumentsInstrumentIdentifier' } 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 new file mode 100644 index 00000000..ae7b08dd --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7.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 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 new file mode 100644 index 00000000..c821fc44 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..23b88c93 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..44e5f52d --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..b2a47679 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..ae1c849f --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..ec6195c5 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..c0132098 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..a89161be --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..582d51e2 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..c83fdb6e --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..d526b271 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..be1483ff --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..e766d9de --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..619fe569 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..4c099681 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..05c8f345 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..ae22f1cd --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..ab61c50a --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..21b18c31 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..6dbc2ee8 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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 new file mode 100644 index 00000000..a95ac0a3 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_201_7__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 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_client/models/inline_response_201__links.rb b/lib/cybersource_rest_client/models/inline_response_201__links.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201__links.rb rename to lib/cybersource_rest_client/models/inline_response_201__links.rb diff --git a/lib/cyberSource_client/models/inline_response_201__links_self.rb b/lib/cybersource_rest_client/models/inline_response_201__links_self.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201__links_self.rb rename to lib/cybersource_rest_client/models/inline_response_201__links_self.rb diff --git a/lib/cyberSource_client/models/inline_response_201_client_reference_information.rb b/lib/cybersource_rest_client/models/inline_response_201_client_reference_information.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_client_reference_information.rb rename to lib/cybersource_rest_client/models/inline_response_201_client_reference_information.rb diff --git a/lib/cyberSource_client/models/inline_response_201_error_information.rb b/lib/cybersource_rest_client/models/inline_response_201_error_information.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_error_information.rb rename to lib/cybersource_rest_client/models/inline_response_201_error_information.rb diff --git a/lib/cyberSource_client/models/inline_response_201_error_information_details.rb b/lib/cybersource_rest_client/models/inline_response_201_error_information_details.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_error_information_details.rb rename to lib/cybersource_rest_client/models/inline_response_201_error_information_details.rb diff --git a/lib/cyberSource_client/models/inline_response_201_order_information.rb b/lib/cybersource_rest_client/models/inline_response_201_order_information.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_order_information.rb rename to lib/cybersource_rest_client/models/inline_response_201_order_information.rb diff --git a/lib/cyberSource_client/models/inline_response_201_order_information_amount_details.rb b/lib/cybersource_rest_client/models/inline_response_201_order_information_amount_details.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_order_information_amount_details.rb rename to lib/cybersource_rest_client/models/inline_response_201_order_information_amount_details.rb diff --git a/lib/cyberSource_client/models/inline_response_201_order_information_invoice_details.rb b/lib/cybersource_rest_client/models/inline_response_201_order_information_invoice_details.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_order_information_invoice_details.rb rename to lib/cybersource_rest_client/models/inline_response_201_order_information_invoice_details.rb diff --git a/lib/cyberSource_client/models/inline_response_201_payment_information.rb b/lib/cybersource_rest_client/models/inline_response_201_payment_information.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_payment_information.rb rename to lib/cybersource_rest_client/models/inline_response_201_payment_information.rb diff --git a/lib/cyberSource_client/models/inline_response_201_payment_information_account_features.rb b/lib/cybersource_rest_client/models/inline_response_201_payment_information_account_features.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_payment_information_account_features.rb rename to lib/cybersource_rest_client/models/inline_response_201_payment_information_account_features.rb diff --git a/lib/cyberSource_client/models/inline_response_201_payment_information_card.rb b/lib/cybersource_rest_client/models/inline_response_201_payment_information_card.rb similarity index 96% rename from lib/cyberSource_client/models/inline_response_201_payment_information_card.rb rename to lib/cybersource_rest_client/models/inline_response_201_payment_information_card.rb index f5bcc194..b6f4da0c 100644 --- a/lib/cyberSource_client/models/inline_response_201_payment_information_card.rb +++ b/lib/cybersource_rest_client/models/inline_response_201_payment_information_card.rb @@ -14,7 +14,7 @@ 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. + # 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. diff --git a/lib/cyberSource_client/models/inline_response_201_payment_information_tokenized_card.rb b/lib/cybersource_rest_client/models/inline_response_201_payment_information_tokenized_card.rb similarity index 97% rename from lib/cyberSource_client/models/inline_response_201_payment_information_tokenized_card.rb rename to lib/cybersource_rest_client/models/inline_response_201_payment_information_tokenized_card.rb index fd98b4ea..28675afa 100644 --- a/lib/cyberSource_client/models/inline_response_201_payment_information_tokenized_card.rb +++ b/lib/cybersource_rest_client/models/inline_response_201_payment_information_tokenized_card.rb @@ -32,7 +32,7 @@ class InlineResponse201PaymentInformationTokenizedCard # 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**. + # 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. diff --git a/lib/cyberSource_client/models/inline_response_201_point_of_sale_information.rb b/lib/cybersource_rest_client/models/inline_response_201_point_of_sale_information.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_point_of_sale_information.rb rename to lib/cybersource_rest_client/models/inline_response_201_point_of_sale_information.rb diff --git a/lib/cyberSource_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 similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_point_of_sale_information_emv.rb rename to lib/cybersource_rest_client/models/inline_response_201_point_of_sale_information_emv.rb diff --git a/lib/cyberSource_client/models/inline_response_201_processor_information.rb b/lib/cybersource_rest_client/models/inline_response_201_processor_information.rb similarity index 96% rename from lib/cyberSource_client/models/inline_response_201_processor_information.rb rename to lib/cybersource_rest_client/models/inline_response_201_processor_information.rb index 7dba3fbe..0e8ae1e7 100644 --- a/lib/cyberSource_client/models/inline_response_201_processor_information.rb +++ b/lib/cybersource_rest_client/models/inline_response_201_processor_information.rb @@ -20,10 +20,10 @@ class InlineResponse201ProcessorInformation # 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 - # TBD + # Description of this field is not available. attr_accessor :network_transaction_id - # TBD + # 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. @@ -35,7 +35,7 @@ class InlineResponse201ProcessorInformation # 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 + # 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. @@ -55,13 +55,13 @@ class InlineResponse201ProcessorInformation 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. + # 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. + # 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. diff --git a/lib/cyberSource_client/models/inline_response_201_processor_information_avs.rb b/lib/cybersource_rest_client/models/inline_response_201_processor_information_avs.rb similarity index 93% rename from lib/cyberSource_client/models/inline_response_201_processor_information_avs.rb rename to lib/cybersource_rest_client/models/inline_response_201_processor_information_avs.rb index 8e728fd7..bc8753b8 100644 --- a/lib/cyberSource_client/models/inline_response_201_processor_information_avs.rb +++ b/lib/cybersource_rest_client/models/inline_response_201_processor_information_avs.rb @@ -57,9 +57,10 @@ def initialize(attributes = {}) # @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 + # 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.') @@ -71,7 +72,8 @@ 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? - return false if !@code.nil? && @code.to_s.length > 1 + # 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 @@ -79,9 +81,10 @@ def valid? # 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 + # 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 diff --git a/lib/cyberSource_client/models/inline_response_201_processor_information_card_verification.rb b/lib/cybersource_rest_client/models/inline_response_201_processor_information_card_verification.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_processor_information_card_verification.rb rename to lib/cybersource_rest_client/models/inline_response_201_processor_information_card_verification.rb diff --git a/lib/cyberSource_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 similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_processor_information_consumer_authentication_response.rb rename to lib/cybersource_rest_client/models/inline_response_201_processor_information_consumer_authentication_response.rb diff --git a/lib/cyberSource_client/models/inline_response_201_processor_information_customer.rb b/lib/cybersource_rest_client/models/inline_response_201_processor_information_customer.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_processor_information_customer.rb rename to lib/cybersource_rest_client/models/inline_response_201_processor_information_customer.rb diff --git a/lib/cyberSource_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 similarity index 97% rename from lib/cyberSource_client/models/inline_response_201_processor_information_electronic_verification_results.rb rename to lib/cybersource_rest_client/models/inline_response_201_processor_information_electronic_verification_results.rb index 6cf36f7e..7e16cc89 100644 --- a/lib/cyberSource_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 @@ -14,34 +14,34 @@ module CyberSource class InlineResponse201ProcessorInformationElectronicVerificationResults - # Mapped Electronic Verification response code for the customer’s name. + # 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 + # 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. + # 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. + # 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. + # 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. + # 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. + # 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. + # 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. + # 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. + # Raw Electronic Verification response code from the processor for the customer’s street address. attr_accessor :street_raw # TODO diff --git a/lib/cyberSource_client/models/inline_response_201_processor_information_issuer.rb b/lib/cybersource_rest_client/models/inline_response_201_processor_information_issuer.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_processor_information_issuer.rb rename to lib/cybersource_rest_client/models/inline_response_201_processor_information_issuer.rb diff --git a/lib/cyberSource_client/models/inline_response_201_processor_information_merchant_advice.rb b/lib/cybersource_rest_client/models/inline_response_201_processor_information_merchant_advice.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_201_processor_information_merchant_advice.rb rename to lib/cybersource_rest_client/models/inline_response_201_processor_information_merchant_advice.rb diff --git a/lib/cyberSource_client/models/inline_response_400.rb b/lib/cybersource_rest_client/models/inline_response_400.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_400.rb rename to lib/cybersource_rest_client/models/inline_response_400.rb diff --git a/lib/cyberSource_client/models/inline_response_400_1.rb b/lib/cybersource_rest_client/models/inline_response_400_1.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_400_1.rb rename to lib/cybersource_rest_client/models/inline_response_400_1.rb diff --git a/lib/cyberSource_client/models/inline_response_400_2.rb b/lib/cybersource_rest_client/models/inline_response_400_2.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_400_2.rb rename to lib/cybersource_rest_client/models/inline_response_400_2.rb diff --git a/lib/cyberSource_client/models/inline_response_400_3.rb b/lib/cybersource_rest_client/models/inline_response_400_3.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_400_3.rb rename to lib/cybersource_rest_client/models/inline_response_400_3.rb diff --git a/lib/cyberSource_client/models/inline_response_400_4.rb b/lib/cybersource_rest_client/models/inline_response_400_4.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_400_4.rb rename to lib/cybersource_rest_client/models/inline_response_400_4.rb diff --git a/lib/cybersource_rest_client/models/inline_response_400_5.rb b/lib/cybersource_rest_client/models/inline_response_400_5.rb new file mode 100644 index 00000000..8f363dde --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_400_5.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 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 new file mode 100644 index 00000000..9fadc660 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_400_5_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 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 new file mode 100644 index 00000000..61913292 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_400_5_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 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 new file mode 100644 index 00000000..d54140db --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_400_6.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 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 new file mode 100644 index 00000000..c31f5176 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_400_7.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 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 new file mode 100644 index 00000000..186f7b8d --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_400_7_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 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 new file mode 100644 index 00000000..b2fc80f5 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_400_8.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 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 new file mode 100644 index 00000000..0c921a79 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_400_9.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 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_client/models/inline_response_409.rb b/lib/cybersource_rest_client/models/inline_response_409.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_409.rb rename to lib/cybersource_rest_client/models/inline_response_409.rb diff --git a/lib/cyberSource_client/models/inline_response_409__links.rb b/lib/cybersource_rest_client/models/inline_response_409__links.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_409__links.rb rename to lib/cybersource_rest_client/models/inline_response_409__links.rb diff --git a/lib/cyberSource_client/models/inline_response_409__links_payment_instruments.rb b/lib/cybersource_rest_client/models/inline_response_409__links_payment_instruments.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_409__links_payment_instruments.rb rename to lib/cybersource_rest_client/models/inline_response_409__links_payment_instruments.rb diff --git a/lib/cybersource_rest_client/models/inline_response_500.rb b/lib/cybersource_rest_client/models/inline_response_500.rb new file mode 100644 index 00000000..914225f7 --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_500.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 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 new file mode 100644 index 00000000..db972f6e --- /dev/null +++ b/lib/cybersource_rest_client/models/inline_response_500_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 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_client/models/inline_response_502.rb b/lib/cybersource_rest_client/models/inline_response_502.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_502.rb rename to lib/cybersource_rest_client/models/inline_response_502.rb diff --git a/lib/cyberSource_client/models/inline_response_default.rb b/lib/cybersource_rest_client/models/inline_response_default.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_default.rb rename to lib/cybersource_rest_client/models/inline_response_default.rb diff --git a/lib/cyberSource_client/models/inline_response_default__links.rb b/lib/cybersource_rest_client/models/inline_response_default__links.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_default__links.rb rename to lib/cybersource_rest_client/models/inline_response_default__links.rb diff --git a/lib/cyberSource_client/models/inline_response_default__links_next.rb b/lib/cybersource_rest_client/models/inline_response_default__links_next.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_default__links_next.rb rename to lib/cybersource_rest_client/models/inline_response_default__links_next.rb diff --git a/lib/cyberSource_client/models/inline_response_default_response_status.rb b/lib/cybersource_rest_client/models/inline_response_default_response_status.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_default_response_status.rb rename to lib/cybersource_rest_client/models/inline_response_default_response_status.rb diff --git a/lib/cyberSource_client/models/inline_response_default_response_status_details.rb b/lib/cybersource_rest_client/models/inline_response_default_response_status_details.rb similarity index 100% rename from lib/cyberSource_client/models/inline_response_default_response_status_details.rb rename to lib/cybersource_rest_client/models/inline_response_default_response_status_details.rb diff --git a/lib/cyberSource_client/models/json_web_key.rb b/lib/cybersource_rest_client/models/json_web_key.rb similarity index 100% rename from lib/cyberSource_client/models/json_web_key.rb rename to lib/cybersource_rest_client/models/json_web_key.rb diff --git a/lib/cyberSource_client/models/key_parameters.rb b/lib/cybersource_rest_client/models/key_parameters.rb similarity index 100% rename from lib/cyberSource_client/models/key_parameters.rb rename to lib/cybersource_rest_client/models/key_parameters.rb diff --git a/lib/cyberSource_client/models/key_result.rb b/lib/cybersource_rest_client/models/key_result.rb similarity index 100% rename from lib/cyberSource_client/models/key_result.rb rename to lib/cybersource_rest_client/models/key_result.rb diff --git a/lib/cyberSource_client/models/link.rb b/lib/cybersource_rest_client/models/link.rb similarity index 100% rename from lib/cyberSource_client/models/link.rb rename to lib/cybersource_rest_client/models/link.rb diff --git a/lib/cyberSource_client/models/links.rb b/lib/cybersource_rest_client/models/links.rb similarity index 100% rename from lib/cyberSource_client/models/links.rb rename to lib/cybersource_rest_client/models/links.rb diff --git a/lib/cyberSource_client/models/oct_create_payment_request.rb b/lib/cybersource_rest_client/models/oct_create_payment_request.rb similarity index 94% rename from lib/cyberSource_client/models/oct_create_payment_request.rb rename to lib/cybersource_rest_client/models/oct_create_payment_request.rb index b3882543..dc6f820d 100644 --- a/lib/cyberSource_client/models/oct_create_payment_request.rb +++ b/lib/cybersource_rest_client/models/oct_create_payment_request.rb @@ -45,12 +45,12 @@ def self.attribute_map def self.swagger_types { :'client_reference_information' => :'InlineResponse201ClientReferenceInformation', - :'order_information' => :'V2payoutsOrderInformation', - :'merchant_information' => :'V2payoutsMerchantInformation', - :'recipient_information' => :'V2payoutsRecipientInformation', - :'sender_information' => :'V2payoutsSenderInformation', - :'processing_information' => :'V2payoutsProcessingInformation', - :'payment_information' => :'V2payoutsPaymentInformation' + :'order_information' => :'Ptsv2payoutsOrderInformation', + :'merchant_information' => :'Ptsv2payoutsMerchantInformation', + :'recipient_information' => :'Ptsv2payoutsRecipientInformation', + :'sender_information' => :'Ptsv2payoutsSenderInformation', + :'processing_information' => :'Ptsv2payoutsProcessingInformation', + :'payment_information' => :'Ptsv2payoutsPaymentInformation' } end diff --git a/lib/cybersource_rest_client/models/ptsv2credits_point_of_sale_information.rb b/lib/cybersource_rest_client/models/ptsv2credits_point_of_sale_information.rb new file mode 100644 index 00000000..2dda63aa --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2credits_point_of_sale_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 Ptsv2creditsPointOfSaleInformation + attr_accessor :emv + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'emv' => :'emv' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'emv' => :'Ptsv2creditsPointOfSaleInformationEmv' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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 + end + + # Show invalid properties 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 && + emv == o.emv + end + + # @see the `==` method + # @param [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].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2credits_point_of_sale_information_emv.rb b/lib/cybersource_rest_client/models/ptsv2credits_point_of_sale_information_emv.rb new file mode 100644 index 00000000..83daafd7 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2credits_point_of_sale_information_emv.rb @@ -0,0 +1,221 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2creditsPointOfSaleInformationEmv + # 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 + + # Indicates whether a fallback method was used to enter credit card information into the POS terminal. When a technical problem prevents a successful exchange of information between a chip card and a chip-capable terminal: 1. Swipe the card or key the credit card information into the POS terminal. 2. Use the pos_entry_mode field to indicate whether the information was swiped or keyed. This field is supported only on **Chase Paymentech Solutions** and **GPN**. + attr_accessor :fallback + + # Reason for the EMV fallback transaction. An EMV fallback transaction occurs when an EMV transaction fails for one of these reasons: - Technical failure: the EMV terminal or EMV card cannot read and process chip data. - Empty candidate list failure: the EMV terminal does not have any applications in common with the EMV card. EMV terminals are coded to determine whether the terminal and EMV card have any applications in common. EMV terminals provide this information to you. Possible values: - **1**: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal either used information from a successful chip read or it was not a chip transaction. - **2**: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal was an EMV fallback transaction because the attempted chip read was unsuccessful. This field is supported only on **GPN**. + attr_accessor :fallback_condition + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'tags' => :'tags', + :'fallback' => :'fallback', + :'fallback_condition' => :'fallbackCondition' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'tags' => :'String', + :'fallback' => :'BOOLEAN', + :'fallback_condition' => :'Float' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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 + + if attributes.has_key?(:'fallback') + self.fallback = attributes[:'fallback'] + else + self.fallback = false + end + + if attributes.has_key?(:'fallbackCondition') + self.fallback_condition = attributes[:'fallbackCondition'] + end + end + + # Show invalid properties 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 && + fallback == o.fallback && + fallback_condition == o.fallback_condition + end + + # @see the `==` method + # @param [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, fallback, fallback_condition].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2credits_processing_information.rb b/lib/cybersource_rest_client/models/ptsv2credits_processing_information.rb new file mode 100644 index 00000000..e53bf5a2 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2credits_processing_information.rb @@ -0,0 +1,383 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2creditsProcessingInformation + # 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 + + # Value that identifies the processor/acquirer to use for the transaction. This value is supported only for **CyberSource through VisaNet**. + attr_accessor :processor_id + + # 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 + + # Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). + attr_accessor :reconciliation_id + + # Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. + attr_accessor :link_id + + # Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. + attr_accessor :report_group + + # Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. + attr_accessor :visa_checkout_id + + # Set this field to 3 to indicate that the request includes Level III data. + attr_accessor :purchase_level + + attr_accessor :recurring_options + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'commerce_indicator' => :'commerceIndicator', + :'processor_id' => :'processorId', + :'payment_solution' => :'paymentSolution', + :'reconciliation_id' => :'reconciliationId', + :'link_id' => :'linkId', + :'report_group' => :'reportGroup', + :'visa_checkout_id' => :'visaCheckoutId', + :'purchase_level' => :'purchaseLevel', + :'recurring_options' => :'recurringOptions' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'commerce_indicator' => :'String', + :'processor_id' => :'String', + :'payment_solution' => :'String', + :'reconciliation_id' => :'String', + :'link_id' => :'String', + :'report_group' => :'String', + :'visa_checkout_id' => :'String', + :'purchase_level' => :'String', + :'recurring_options' => :'Ptsv2paymentsidrefundsProcessingInformationRecurringOptions' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'commerceIndicator') + self.commerce_indicator = attributes[:'commerceIndicator'] + end + + if attributes.has_key?(:'processorId') + self.processor_id = attributes[:'processorId'] + end + + if attributes.has_key?(:'paymentSolution') + self.payment_solution = attributes[:'paymentSolution'] + end + + if attributes.has_key?(:'reconciliationId') + self.reconciliation_id = attributes[:'reconciliationId'] + end + + if attributes.has_key?(:'linkId') + self.link_id = attributes[:'linkId'] + end + + if attributes.has_key?(:'reportGroup') + self.report_group = attributes[:'reportGroup'] + end + + if attributes.has_key?(:'visaCheckoutId') + self.visa_checkout_id = attributes[:'visaCheckoutId'] + end + + if attributes.has_key?(:'purchaseLevel') + self.purchase_level = attributes[:'purchaseLevel'] + end + + if attributes.has_key?(:'recurringOptions') + self.recurring_options = attributes[:'recurringOptions'] + end + end + + # Show invalid properties 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 !@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 + + if !@processor_id.nil? && @processor_id.to_s.length > 3 + invalid_properties.push('invalid value for "processor_id", the character length must be smaller than or equal to 3.') + end + + 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 !@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 + + if !@link_id.nil? && @link_id.to_s.length > 26 + invalid_properties.push('invalid value for "link_id", the character length must be smaller than or equal to 26.') + end + + if !@report_group.nil? && @report_group.to_s.length > 25 + invalid_properties.push('invalid value for "report_group", the character length must be smaller than or equal to 25.') + end + + if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 + invalid_properties.push('invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.') + end + + if !@purchase_level.nil? && @purchase_level.to_s.length > 1 + invalid_properties.push('invalid value for "purchase_level", 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 !@commerce_indicator.nil? && @commerce_indicator.to_s.length > 20 + return false if !@processor_id.nil? && @processor_id.to_s.length > 3 + return false if !@payment_solution.nil? && @payment_solution.to_s.length > 12 + return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + return false if !@link_id.nil? && @link_id.to_s.length > 26 + return false if !@report_group.nil? && @report_group.to_s.length > 25 + return false if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 + return false if !@purchase_level.nil? && @purchase_level.to_s.length > 1 + true + 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 + + # Custom attribute writer method with validation + # @param [Object] processor_id Value to be assigned + def processor_id=(processor_id) + if !processor_id.nil? && processor_id.to_s.length > 3 + fail ArgumentError, 'invalid value for "processor_id", the character length must be smaller than or equal to 3.' + end + + @processor_id = processor_id + 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] 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 + + # Custom attribute writer method with validation + # @param [Object] link_id Value to be assigned + def link_id=(link_id) + if !link_id.nil? && link_id.to_s.length > 26 + fail ArgumentError, 'invalid value for "link_id", the character length must be smaller than or equal to 26.' + end + + @link_id = link_id + end + + # Custom attribute writer method with validation + # @param [Object] report_group Value to be assigned + def report_group=(report_group) + if !report_group.nil? && report_group.to_s.length > 25 + fail ArgumentError, 'invalid value for "report_group", the character length must be smaller than or equal to 25.' + end + + @report_group = report_group + end + + # Custom attribute writer method with validation + # @param [Object] visa_checkout_id Value to be assigned + def visa_checkout_id=(visa_checkout_id) + if !visa_checkout_id.nil? && visa_checkout_id.to_s.length > 48 + fail ArgumentError, 'invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.' + end + + @visa_checkout_id = visa_checkout_id + end + + # Custom attribute writer method with validation + # @param [Object] purchase_level Value to be assigned + def purchase_level=(purchase_level) + if !purchase_level.nil? && purchase_level.to_s.length > 1 + fail ArgumentError, 'invalid value for "purchase_level", the character length must be smaller than or equal to 1.' + end + + @purchase_level = purchase_level + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + commerce_indicator == o.commerce_indicator && + processor_id == o.processor_id && + payment_solution == o.payment_solution && + reconciliation_id == o.reconciliation_id && + link_id == o.link_id && + report_group == o.report_group && + visa_checkout_id == o.visa_checkout_id && + purchase_level == o.purchase_level && + recurring_options == o.recurring_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 + [commerce_indicator, processor_id, payment_solution, reconciliation_id, link_id, report_group, visa_checkout_id, purchase_level, recurring_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/ptsv2payments_aggregator_information.rb b/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information.rb new file mode 100644 index 00000000..b38536af --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_aggregator_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 Ptsv2paymentsAggregatorInformation + # Value that identifies you as a payment aggregator. Get this value from the processor. For processor-specific information, see the aggregator_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 :aggregator_id + + # Your payment aggregator business name. For processor-specific information, see the aggregator_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 :name + + attr_accessor :sub_merchant + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'aggregator_id' => :'aggregatorId', + :'name' => :'name', + :'sub_merchant' => :'subMerchant' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'aggregator_id' => :'String', + :'name' => :'String', + :'sub_merchant' => :'Ptsv2paymentsAggregatorInformationSubMerchant' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'aggregatorId') + self.aggregator_id = attributes[:'aggregatorId'] + end + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'subMerchant') + self.sub_merchant = attributes[:'subMerchant'] + end + end + + # Show invalid properties 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 !@aggregator_id.nil? && @aggregator_id.to_s.length > 20 + invalid_properties.push('invalid value for "aggregator_id", the character length must be smaller than or equal to 20.') + end + + if !@name.nil? && @name.to_s.length > 37 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 37.') + 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 !@aggregator_id.nil? && @aggregator_id.to_s.length > 20 + return false if !@name.nil? && @name.to_s.length > 37 + true + end + + # Custom attribute writer method with validation + # @param [Object] aggregator_id Value to be assigned + def aggregator_id=(aggregator_id) + if !aggregator_id.nil? && aggregator_id.to_s.length > 20 + fail ArgumentError, 'invalid value for "aggregator_id", the character length must be smaller than or equal to 20.' + end + + @aggregator_id = aggregator_id + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if !name.nil? && name.to_s.length > 37 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 37.' + 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 && + aggregator_id == o.aggregator_id && + name == o.name && + sub_merchant == o.sub_merchant + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [aggregator_id, name, sub_merchant].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information_sub_merchant.rb b/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information_sub_merchant.rb new file mode 100644 index 00000000..c647a90d --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information_sub_merchant.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 Ptsv2paymentsAggregatorInformationSubMerchant + # Unique identifier assigned by the payment card company to the sub-merchant. + attr_accessor :card_acceptor_id + + # Sub-merchant’s business name. + attr_accessor :name + + # First line of the sub-merchant’s street address. + attr_accessor :address1 + + # Sub-merchant’s city. + attr_accessor :locality + + # Sub-merchant’s state or province. Use the State, Province, and Territory Codes for the United States and Canada. + attr_accessor :administrative_area + + # Sub-merchant’s region. Example `NE` indicates that the sub-merchant is in the northeast region. + attr_accessor :region + + # Partial postal code for the sub-merchant’s address. + attr_accessor :postal_code + + # Sub-merchant’s country. Use the two-character ISO Standard Country Codes. + attr_accessor :country + + # Sub-merchant’s email address. **Maximum length for processors** - American Express Direct: 40 - CyberSource through VisaNet: 40 - FDC Compass: 40 - FDC Nashville Global: 19 + attr_accessor :email + + # Sub-merchant’s telephone number. **Maximum length for procesors** - American Express Direct: 20 - CyberSource through VisaNet: 20 - FDC Compass: 13 - FDC Nashville Global: 10 + attr_accessor :phone_number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'card_acceptor_id' => :'cardAcceptorId', + :'name' => :'name', + :'address1' => :'address1', + :'locality' => :'locality', + :'administrative_area' => :'administrativeArea', + :'region' => :'region', + :'postal_code' => :'postalCode', + :'country' => :'country', + :'email' => :'email', + :'phone_number' => :'phoneNumber' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'card_acceptor_id' => :'String', + :'name' => :'String', + :'address1' => :'String', + :'locality' => :'String', + :'administrative_area' => :'String', + :'region' => :'String', + :'postal_code' => :'String', + :'country' => :'String', + :'email' => :'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?(:'cardAcceptorId') + self.card_acceptor_id = attributes[:'cardAcceptorId'] + end + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'address1') + self.address1 = attributes[:'address1'] + 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?(:'region') + self.region = attributes[:'region'] + end + + if attributes.has_key?(:'postalCode') + self.postal_code = attributes[:'postalCode'] + end + + if attributes.has_key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.has_key?(:'email') + self.email = attributes[:'email'] + 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 !@card_acceptor_id.nil? && @card_acceptor_id.to_s.length > 15 + invalid_properties.push('invalid value for "card_acceptor_id", the character length must be smaller than or equal to 15.') + end + + if !@name.nil? && @name.to_s.length > 37 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 37.') + end + + if !@address1.nil? && @address1.to_s.length > 38 + invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 38.') + end + + if !@locality.nil? && @locality.to_s.length > 21 + invalid_properties.push('invalid value for "locality", the character length must be smaller than or equal to 21.') + end + + if !@administrative_area.nil? && @administrative_area.to_s.length > 3 + invalid_properties.push('invalid value for "administrative_area", the character length must be smaller than or equal to 3.') + end + + if !@region.nil? && @region.to_s.length > 3 + invalid_properties.push('invalid value for "region", the character length must be smaller than or equal to 3.') + end + + if !@postal_code.nil? && @postal_code.to_s.length > 15 + invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 15.') + end + + 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 !@email.nil? && @email.to_s.length > 40 + invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 40.') + end + + if !@phone_number.nil? && @phone_number.to_s.length > 20 + invalid_properties.push('invalid value for "phone_number", 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 !@card_acceptor_id.nil? && @card_acceptor_id.to_s.length > 15 + return false if !@name.nil? && @name.to_s.length > 37 + return false if !@address1.nil? && @address1.to_s.length > 38 + return false if !@locality.nil? && @locality.to_s.length > 21 + return false if !@administrative_area.nil? && @administrative_area.to_s.length > 3 + return false if !@region.nil? && @region.to_s.length > 3 + return false if !@postal_code.nil? && @postal_code.to_s.length > 15 + return false if !@country.nil? && @country.to_s.length > 3 + return false if !@email.nil? && @email.to_s.length > 40 + return false if !@phone_number.nil? && @phone_number.to_s.length > 20 + true + end + + # Custom attribute writer method with validation + # @param [Object] card_acceptor_id Value to be assigned + def card_acceptor_id=(card_acceptor_id) + if !card_acceptor_id.nil? && card_acceptor_id.to_s.length > 15 + fail ArgumentError, 'invalid value for "card_acceptor_id", the character length must be smaller than or equal to 15.' + end + + @card_acceptor_id = card_acceptor_id + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if !name.nil? && name.to_s.length > 37 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 37.' + end + + @name = 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 > 38 + fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 38.' + end + + @address1 = address1 + end + + # Custom attribute writer method with validation + # @param [Object] locality Value to be assigned + def locality=(locality) + if !locality.nil? && locality.to_s.length > 21 + fail ArgumentError, 'invalid value for "locality", the character length must be smaller than or equal to 21.' + 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 > 3 + fail ArgumentError, 'invalid value for "administrative_area", the character length must be smaller than or equal to 3.' + end + + @administrative_area = administrative_area + end + + # Custom attribute writer method with validation + # @param [Object] region Value to be assigned + def region=(region) + if !region.nil? && region.to_s.length > 3 + fail ArgumentError, 'invalid value for "region", the character length must be smaller than or equal to 3.' + end + + @region = region + 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 > 15 + fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 15.' + end + + @postal_code = postal_code + 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] email Value to be assigned + def email=(email) + if !email.nil? && email.to_s.length > 40 + fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 40.' + end + + @email = email + 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 > 20 + fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 20.' + 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 && + card_acceptor_id == o.card_acceptor_id && + name == o.name && + address1 == o.address1 && + locality == o.locality && + administrative_area == o.administrative_area && + region == o.region && + postal_code == o.postal_code && + country == o.country && + email == o.email && + 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 + [card_acceptor_id, name, address1, locality, administrative_area, region, postal_code, country, email, 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/ptsv2payments_buyer_information.rb b/lib/cybersource_rest_client/models/ptsv2payments_buyer_information.rb new file mode 100644 index 00000000..f960b05f --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_buyer_information.rb @@ -0,0 +1,285 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsBuyerInformation + # 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 + + # Recipient’s date of birth. **Format**: `YYYYMMDD`. This field is a pass-through, which means that CyberSource ensures that the value is eight numeric characters but otherwise does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. + attr_accessor :date_of_birth + + # Customer’s government-assigned tax identification number. For processor-specific information, see the purchaser_vat_registration_number 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 :vat_registration_number + + attr_accessor :personal_identification + + # TODO + attr_accessor :hashed_password + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'merchant_customer_id' => :'merchantCustomerId', + :'date_of_birth' => :'dateOfBirth', + :'vat_registration_number' => :'vatRegistrationNumber', + :'personal_identification' => :'personalIdentification', + :'hashed_password' => :'hashedPassword' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'merchant_customer_id' => :'String', + :'date_of_birth' => :'String', + :'vat_registration_number' => :'String', + :'personal_identification' => :'Array', + :'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?(:'dateOfBirth') + self.date_of_birth = attributes[:'dateOfBirth'] + end + + if attributes.has_key?(:'vatRegistrationNumber') + self.vat_registration_number = attributes[:'vatRegistrationNumber'] + end + + if attributes.has_key?(:'personalIdentification') + if (value = attributes[:'personalIdentification']).is_a?(Array) + self.personal_identification = value + end + 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 !@date_of_birth.nil? && @date_of_birth.to_s.length > 8 + invalid_properties.push('invalid value for "date_of_birth", the character length must be smaller than or equal to 8.') + end + + if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 20 + invalid_properties.push('invalid value for "vat_registration_number", the character length must be smaller than or equal to 20.') + 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 !@date_of_birth.nil? && @date_of_birth.to_s.length > 8 + return false if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 20 + 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] date_of_birth Value to be assigned + def date_of_birth=(date_of_birth) + if !date_of_birth.nil? && date_of_birth.to_s.length > 8 + fail ArgumentError, 'invalid value for "date_of_birth", the character length must be smaller than or equal to 8.' + end + + @date_of_birth = date_of_birth + end + + # Custom attribute writer method with validation + # @param [Object] vat_registration_number Value to be assigned + def vat_registration_number=(vat_registration_number) + if !vat_registration_number.nil? && vat_registration_number.to_s.length > 20 + fail ArgumentError, 'invalid value for "vat_registration_number", the character length must be smaller than or equal to 20.' + end + + @vat_registration_number = vat_registration_number + 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 && + date_of_birth == o.date_of_birth && + vat_registration_number == o.vat_registration_number && + personal_identification == o.personal_identification && + 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, date_of_birth, vat_registration_number, personal_identification, 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/ptsv2payments_buyer_information_personal_identification.rb b/lib/cybersource_rest_client/models/ptsv2payments_buyer_information_personal_identification.rb new file mode 100644 index 00000000..24bce009 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_buyer_information_personal_identification.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 Ptsv2paymentsBuyerInformationPersonalIdentification + attr_accessor :type + + # Personal Identifier for the customer based on various type. This field is supported only on the processors listed in this description. For processor-specific information, see the personal_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 :id + + # Description of this field is not available. + attr_accessor :issued_by + + 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', + :'id' => :'id', + :'issued_by' => :'issuedBy' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'type' => :'String', + :'id' => :'String', + :'issued_by' => :'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?(:'id') + self.id = attributes[:'id'] + end + + if attributes.has_key?(:'issuedBy') + self.issued_by = attributes[:'issuedBy'] + end + end + + # Show invalid properties 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? + type_validator = EnumAttributeValidator.new('String', ['ssn', 'driverlicense']) + return false unless type_validator.valid?(@type) + return false if !@id.nil? && @id.to_s.length > 26 + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ['ssn', 'driverlicense']) + unless validator.valid?(type) + fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.' + end + @type = type + 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 && + type == o.type && + id == o.id && + issued_by == o.issued_by + end + + # @see the `==` method + # @param [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, id, issued_by].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payments_client_reference_information.rb b/lib/cybersource_rest_client/models/ptsv2payments_client_reference_information.rb new file mode 100644 index 00000000..d956f794 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_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 Ptsv2paymentsClientReferenceInformation + # 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 + + # Identifier that you assign to the transaction. See \"Merchant-Initiated Reversals and Voids,\" page 176 + attr_accessor :transaction_id + + # Comments + attr_accessor :comments + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'transaction_id' => :'transactionId', + :'comments' => :'comments' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'String', + :'transaction_id' => :'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?(:'transactionId') + self.transaction_id = attributes[:'transactionId'] + 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 && + transaction_id == o.transaction_id && + 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, transaction_id, 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/ptsv2payments_consumer_authentication_information.rb b/lib/cybersource_rest_client/models/ptsv2payments_consumer_authentication_information.rb new file mode 100644 index 00000000..c8432164 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_consumer_authentication_information.rb @@ -0,0 +1,374 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsConsumerAuthenticationInformation + # Cardholder authentication verification value (CAVV). + attr_accessor :cavv + + # Algorithm used to generate the CAVV for Verified by Visa or the UCAF authentication data for Mastercard SecureCode. + attr_accessor :cavv_algorithm + + # Raw electronic commerce indicator (ECI). + attr_accessor :eci_raw + + # Payer authentication response status. + attr_accessor :pares_status + + # Verification response enrollment status. + attr_accessor :veres_enrolled + + # Transaction identifier. + attr_accessor :xid + + # Universal cardholder authentication field (UCAF) data. + attr_accessor :ucaf_authentication_data + + # Universal cardholder authentication field (UCAF) collection indicator. + attr_accessor :ucaf_collection_indicator + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cavv' => :'cavv', + :'cavv_algorithm' => :'cavvAlgorithm', + :'eci_raw' => :'eciRaw', + :'pares_status' => :'paresStatus', + :'veres_enrolled' => :'veresEnrolled', + :'xid' => :'xid', + :'ucaf_authentication_data' => :'ucafAuthenticationData', + :'ucaf_collection_indicator' => :'ucafCollectionIndicator' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'cavv' => :'String', + :'cavv_algorithm' => :'String', + :'eci_raw' => :'String', + :'pares_status' => :'String', + :'veres_enrolled' => :'String', + :'xid' => :'String', + :'ucaf_authentication_data' => :'String', + :'ucaf_collection_indicator' => :'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?(:'cavv') + self.cavv = attributes[:'cavv'] + end + + if attributes.has_key?(:'cavvAlgorithm') + self.cavv_algorithm = attributes[:'cavvAlgorithm'] + end + + if attributes.has_key?(:'eciRaw') + self.eci_raw = attributes[:'eciRaw'] + end + + if attributes.has_key?(:'paresStatus') + self.pares_status = attributes[:'paresStatus'] + end + + if attributes.has_key?(:'veresEnrolled') + self.veres_enrolled = attributes[:'veresEnrolled'] + end + + if attributes.has_key?(:'xid') + self.xid = attributes[:'xid'] + end + + if attributes.has_key?(:'ucafAuthenticationData') + self.ucaf_authentication_data = attributes[:'ucafAuthenticationData'] + end + + if attributes.has_key?(:'ucafCollectionIndicator') + self.ucaf_collection_indicator = attributes[:'ucafCollectionIndicator'] + end + end + + # Show invalid properties 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 !@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 !@cavv_algorithm.nil? && @cavv_algorithm.to_s.length > 1 + invalid_properties.push('invalid value for "cavv_algorithm", the character length must be smaller than or equal to 1.') + end + + 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 !@pares_status.nil? && @pares_status.to_s.length > 1 + invalid_properties.push('invalid value for "pares_status", the character length must be smaller than or equal to 1.') + end + + if !@veres_enrolled.nil? && @veres_enrolled.to_s.length > 1 + invalid_properties.push('invalid value for "veres_enrolled", the character length must be smaller than or equal to 1.') + 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 + + if !@ucaf_authentication_data.nil? && @ucaf_authentication_data.to_s.length > 32 + invalid_properties.push('invalid value for "ucaf_authentication_data", the character length must be smaller than or equal to 32.') + end + + if !@ucaf_collection_indicator.nil? && @ucaf_collection_indicator.to_s.length > 1 + invalid_properties.push('invalid value for "ucaf_collection_indicator", 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 !@cavv.nil? && @cavv.to_s.length > 40 + return false if !@cavv_algorithm.nil? && @cavv_algorithm.to_s.length > 1 + return false if !@eci_raw.nil? && @eci_raw.to_s.length > 2 + return false if !@pares_status.nil? && @pares_status.to_s.length > 1 + return false if !@veres_enrolled.nil? && @veres_enrolled.to_s.length > 1 + return false if !@xid.nil? && @xid.to_s.length > 40 + return false if !@ucaf_authentication_data.nil? && @ucaf_authentication_data.to_s.length > 32 + return false if !@ucaf_collection_indicator.nil? && @ucaf_collection_indicator.to_s.length > 1 + true + 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] cavv_algorithm Value to be assigned + def cavv_algorithm=(cavv_algorithm) + if !cavv_algorithm.nil? && cavv_algorithm.to_s.length > 1 + fail ArgumentError, 'invalid value for "cavv_algorithm", the character length must be smaller than or equal to 1.' + end + + @cavv_algorithm = cavv_algorithm + 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] pares_status Value to be assigned + def pares_status=(pares_status) + if !pares_status.nil? && pares_status.to_s.length > 1 + fail ArgumentError, 'invalid value for "pares_status", the character length must be smaller than or equal to 1.' + end + + @pares_status = pares_status + end + + # Custom attribute writer method with validation + # @param [Object] veres_enrolled Value to be assigned + def veres_enrolled=(veres_enrolled) + if !veres_enrolled.nil? && veres_enrolled.to_s.length > 1 + fail ArgumentError, 'invalid value for "veres_enrolled", the character length must be smaller than or equal to 1.' + end + + @veres_enrolled = veres_enrolled + 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 + + # Custom attribute writer method with validation + # @param [Object] ucaf_authentication_data Value to be assigned + def ucaf_authentication_data=(ucaf_authentication_data) + if !ucaf_authentication_data.nil? && ucaf_authentication_data.to_s.length > 32 + fail ArgumentError, 'invalid value for "ucaf_authentication_data", the character length must be smaller than or equal to 32.' + end + + @ucaf_authentication_data = ucaf_authentication_data + end + + # Custom attribute writer method with validation + # @param [Object] ucaf_collection_indicator Value to be assigned + def ucaf_collection_indicator=(ucaf_collection_indicator) + if !ucaf_collection_indicator.nil? && ucaf_collection_indicator.to_s.length > 1 + fail ArgumentError, 'invalid value for "ucaf_collection_indicator", the character length must be smaller than or equal to 1.' + end + + @ucaf_collection_indicator = ucaf_collection_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 && + cavv == o.cavv && + cavv_algorithm == o.cavv_algorithm && + eci_raw == o.eci_raw && + pares_status == o.pares_status && + veres_enrolled == o.veres_enrolled && + xid == o.xid && + ucaf_authentication_data == o.ucaf_authentication_data && + ucaf_collection_indicator == o.ucaf_collection_indicator + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [cavv, cavv_algorithm, eci_raw, pares_status, veres_enrolled, xid, ucaf_authentication_data, ucaf_collection_indicator].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payments_device_information.rb b/lib/cybersource_rest_client/models/ptsv2payments_device_information.rb new file mode 100644 index 00000000..5893319e --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_device_information.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 Ptsv2paymentsDeviceInformation + # DNS resolved hostname from above _ipAddress_. + attr_accessor :host_name + + # IP address of the customer. + attr_accessor :ip_address + + # Customer’s browser as identified from the HTTP header data. For example, Mozilla is the value that identifies the Netscape browser. + attr_accessor :user_agent + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'host_name' => :'hostName', + :'ip_address' => :'ipAddress', + :'user_agent' => :'userAgent' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'host_name' => :'String', + :'ip_address' => :'String', + :'user_agent' => :'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?(:'hostName') + self.host_name = attributes[:'hostName'] + end + + if attributes.has_key?(:'ipAddress') + self.ip_address = attributes[:'ipAddress'] + end + + if attributes.has_key?(:'userAgent') + self.user_agent = attributes[:'userAgent'] + end + end + + # Show invalid properties 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 !@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 + + 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 !@user_agent.nil? && @user_agent.to_s.length > 40 + invalid_properties.push('invalid value for "user_agent", 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 !@host_name.nil? && @host_name.to_s.length > 60 + return false if !@ip_address.nil? && @ip_address.to_s.length > 15 + return false if !@user_agent.nil? && @user_agent.to_s.length > 40 + true + 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 + + # 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] user_agent Value to be assigned + def user_agent=(user_agent) + if !user_agent.nil? && user_agent.to_s.length > 40 + fail ArgumentError, 'invalid value for "user_agent", the character length must be smaller than or equal to 40.' + end + + @user_agent = user_agent + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + host_name == o.host_name && + ip_address == o.ip_address && + user_agent == o.user_agent + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [host_name, ip_address, user_agent].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payments_merchant_defined_information.rb b/lib/cybersource_rest_client/models/ptsv2payments_merchant_defined_information.rb new file mode 100644 index 00000000..3b182359 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_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 Ptsv2paymentsMerchantDefinedInformation + # Description of this field is not available. + attr_accessor :key + + # Description of 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/ptsv2payments_merchant_information.rb b/lib/cybersource_rest_client/models/ptsv2payments_merchant_information.rb new file mode 100644 index 00000000..09cdb7da --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_merchant_information.rb @@ -0,0 +1,308 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsMerchantInformation + attr_accessor :merchant_descriptor + + # Company ID assigned to an independent sales organization. Get this value from Mastercard. For processor-specific information, see the sales_organization_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 :sales_organization_id + + # Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :category_code + + # Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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 :vat_registration_number + + # Reference number that facilitates card acceptor/corporation communication and record keeping. For processor-specific information, see the card_acceptor_ref_number 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 :card_acceptor_reference_number + + # Local date and time at your physical location. Include both the date and time in this field or leave it blank. This field is supported only for **CyberSource through VisaNet**. For processor-specific information, see the transaction_local_date_time field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) `Format: YYYYMMDDhhmmss`, where: - YYYY = year - MM = month - DD = day - hh = hour - mm = minutes - ss = seconds + attr_accessor :transaction_local_date_time + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'merchant_descriptor' => :'merchantDescriptor', + :'sales_organization_id' => :'salesOrganizationId', + :'category_code' => :'categoryCode', + :'vat_registration_number' => :'vatRegistrationNumber', + :'card_acceptor_reference_number' => :'cardAcceptorReferenceNumber', + :'transaction_local_date_time' => :'transactionLocalDateTime' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'merchant_descriptor' => :'Ptsv2paymentsMerchantInformationMerchantDescriptor', + :'sales_organization_id' => :'String', + :'category_code' => :'Integer', + :'vat_registration_number' => :'String', + :'card_acceptor_reference_number' => :'String', + :'transaction_local_date_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?(:'merchantDescriptor') + self.merchant_descriptor = attributes[:'merchantDescriptor'] + end + + if attributes.has_key?(:'salesOrganizationId') + self.sales_organization_id = attributes[:'salesOrganizationId'] + end + + if attributes.has_key?(:'categoryCode') + self.category_code = attributes[:'categoryCode'] + end + + if attributes.has_key?(:'vatRegistrationNumber') + self.vat_registration_number = attributes[:'vatRegistrationNumber'] + end + + if attributes.has_key?(:'cardAcceptorReferenceNumber') + self.card_acceptor_reference_number = attributes[:'cardAcceptorReferenceNumber'] + end + + if attributes.has_key?(:'transactionLocalDateTime') + self.transaction_local_date_time = attributes[:'transactionLocalDateTime'] + end + end + + # Show invalid properties 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 !@sales_organization_id.nil? && @sales_organization_id.to_s.length > 11 + invalid_properties.push('invalid value for "sales_organization_id", the character length must be smaller than or equal to 11.') + end + + if !@category_code.nil? && @category_code > 9999 + invalid_properties.push('invalid value for "category_code", must be smaller than or equal to 9999.') + end + + if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 + invalid_properties.push('invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.') + end + + if !@card_acceptor_reference_number.nil? && @card_acceptor_reference_number.to_s.length > 25 + invalid_properties.push('invalid value for "card_acceptor_reference_number", the character length must be smaller than or equal to 25.') + end + + if !@transaction_local_date_time.nil? && @transaction_local_date_time.to_s.length > 14 + invalid_properties.push('invalid value for "transaction_local_date_time", the character length must be smaller than or equal to 14.') + 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 !@sales_organization_id.nil? && @sales_organization_id.to_s.length > 11 + return false if !@category_code.nil? && @category_code > 9999 + return false if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 + return false if !@card_acceptor_reference_number.nil? && @card_acceptor_reference_number.to_s.length > 25 + return false if !@transaction_local_date_time.nil? && @transaction_local_date_time.to_s.length > 14 + true + end + + # Custom attribute writer method with validation + # @param [Object] sales_organization_id Value to be assigned + def sales_organization_id=(sales_organization_id) + if !sales_organization_id.nil? && sales_organization_id.to_s.length > 11 + fail ArgumentError, 'invalid value for "sales_organization_id", the character length must be smaller than or equal to 11.' + end + + @sales_organization_id = sales_organization_id + end + + # Custom attribute writer method with validation + # @param [Object] category_code Value to be assigned + def category_code=(category_code) + if !category_code.nil? && category_code > 9999 + fail ArgumentError, 'invalid value for "category_code", must be smaller than or equal to 9999.' + end + + @category_code = category_code + end + + # Custom attribute writer method with validation + # @param [Object] vat_registration_number Value to be assigned + def vat_registration_number=(vat_registration_number) + if !vat_registration_number.nil? && vat_registration_number.to_s.length > 21 + fail ArgumentError, 'invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.' + end + + @vat_registration_number = vat_registration_number + end + + # Custom attribute writer method with validation + # @param [Object] card_acceptor_reference_number Value to be assigned + def card_acceptor_reference_number=(card_acceptor_reference_number) + if !card_acceptor_reference_number.nil? && card_acceptor_reference_number.to_s.length > 25 + fail ArgumentError, 'invalid value for "card_acceptor_reference_number", the character length must be smaller than or equal to 25.' + end + + @card_acceptor_reference_number = card_acceptor_reference_number + end + + # Custom attribute writer method with validation + # @param [Object] transaction_local_date_time Value to be assigned + def transaction_local_date_time=(transaction_local_date_time) + if !transaction_local_date_time.nil? && transaction_local_date_time.to_s.length > 14 + fail ArgumentError, 'invalid value for "transaction_local_date_time", the character length must be smaller than or equal to 14.' + end + + @transaction_local_date_time = transaction_local_date_time + end + + # 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 && + sales_organization_id == o.sales_organization_id && + category_code == o.category_code && + vat_registration_number == o.vat_registration_number && + card_acceptor_reference_number == o.card_acceptor_reference_number && + transaction_local_date_time == o.transaction_local_date_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 + [merchant_descriptor, sales_organization_id, category_code, vat_registration_number, card_acceptor_reference_number, transaction_local_date_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/ptsv2payments_merchant_information_merchant_descriptor.rb b/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb new file mode 100644 index 00000000..5c3cae41 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb @@ -0,0 +1,374 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsMerchantInformationMerchantDescriptor + # 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 + + # 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) + attr_accessor :alternate_name + + # 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) * FDCCompass (13) * Paymentech (13) + attr_accessor :contact + + # 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) + attr_accessor :address1 + + # Merchant City. 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) + attr_accessor :locality + + # 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) + attr_accessor :country + + # 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) + attr_accessor :postal_code + + # Merchant State. 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) + attr_accessor :administrative_area + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'alternate_name' => :'alternateName', + :'contact' => :'contact', + :'address1' => :'address1', + :'locality' => :'locality', + :'country' => :'country', + :'postal_code' => :'postalCode', + :'administrative_area' => :'administrativeArea' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'name' => :'String', + :'alternate_name' => :'String', + :'contact' => :'String', + :'address1' => :'String', + :'locality' => :'String', + :'country' => :'String', + :'postal_code' => :'String', + :'administrative_area' => :'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?(:'alternateName') + self.alternate_name = attributes[:'alternateName'] + end + + if attributes.has_key?(:'contact') + self.contact = attributes[:'contact'] + end + + if attributes.has_key?(:'address1') + self.address1 = attributes[:'address1'] + end + + if attributes.has_key?(:'locality') + self.locality = attributes[:'locality'] + end + + if attributes.has_key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.has_key?(:'postalCode') + self.postal_code = attributes[:'postalCode'] + end + + if attributes.has_key?(:'administrativeArea') + self.administrative_area = attributes[:'administrativeArea'] + end + end + + # Show invalid properties 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 + + if !@alternate_name.nil? && @alternate_name.to_s.length > 13 + invalid_properties.push('invalid value for "alternate_name", the character length must be smaller than or equal to 13.') + end + + if !@contact.nil? && @contact.to_s.length > 14 + invalid_properties.push('invalid value for "contact", the character length must be smaller than or equal to 14.') + 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 !@locality.nil? && @locality.to_s.length > 13 + invalid_properties.push('invalid value for "locality", the character length must be smaller than or equal to 13.') + 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 !@postal_code.nil? && @postal_code.to_s.length > 14 + invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 14.') + end + + if !@administrative_area.nil? && @administrative_area.to_s.length > 3 + invalid_properties.push('invalid value for "administrative_area", 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 !@name.nil? && @name.to_s.length > 23 + return false if !@alternate_name.nil? && @alternate_name.to_s.length > 13 + return false if !@contact.nil? && @contact.to_s.length > 14 + return false if !@address1.nil? && @address1.to_s.length > 60 + return false if !@locality.nil? && @locality.to_s.length > 13 + return false if !@country.nil? && @country.to_s.length > 2 + return false if !@postal_code.nil? && @postal_code.to_s.length > 14 + return false if !@administrative_area.nil? && @administrative_area.to_s.length > 3 + 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 + + # Custom attribute writer method with validation + # @param [Object] alternate_name Value to be assigned + def alternate_name=(alternate_name) + if !alternate_name.nil? && alternate_name.to_s.length > 13 + fail ArgumentError, 'invalid value for "alternate_name", the character length must be smaller than or equal to 13.' + end + + @alternate_name = alternate_name + end + + # Custom attribute writer method with validation + # @param [Object] contact Value to be assigned + def contact=(contact) + if !contact.nil? && contact.to_s.length > 14 + fail ArgumentError, 'invalid value for "contact", the character length must be smaller than or equal to 14.' + end + + @contact = contact + 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] locality Value to be assigned + def locality=(locality) + if !locality.nil? && locality.to_s.length > 13 + fail ArgumentError, 'invalid value for "locality", the character length must be smaller than or equal to 13.' + end + + @locality = locality + 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] postal_code Value to be assigned + def postal_code=(postal_code) + if !postal_code.nil? && postal_code.to_s.length > 14 + fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 14.' + end + + @postal_code = postal_code + 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 > 3 + fail ArgumentError, 'invalid value for "administrative_area", the character length must be smaller than or equal to 3.' + end + + @administrative_area = administrative_area + end + + # 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 && + alternate_name == o.alternate_name && + contact == o.contact && + address1 == o.address1 && + locality == o.locality && + country == o.country && + postal_code == o.postal_code && + administrative_area == o.administrative_area + end + + # @see the `==` method + # @param [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, alternate_name, contact, address1, locality, country, postal_code, administrative_area].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payments_order_information.rb b/lib/cybersource_rest_client/models/ptsv2payments_order_information.rb new file mode 100644 index 00000000..40e63a67 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_order_information.rb @@ -0,0 +1,230 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsOrderInformation + attr_accessor :amount_details + + attr_accessor :bill_to + + attr_accessor :ship_to + + attr_accessor :line_items + + attr_accessor :invoice_details + + attr_accessor :shipping_details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'amount_details' => :'amountDetails', + :'bill_to' => :'billTo', + :'ship_to' => :'shipTo', + :'line_items' => :'lineItems', + :'invoice_details' => :'invoiceDetails', + :'shipping_details' => :'shippingDetails' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'amount_details' => :'Ptsv2paymentsOrderInformationAmountDetails', + :'bill_to' => :'Ptsv2paymentsOrderInformationBillTo', + :'ship_to' => :'Ptsv2paymentsOrderInformationShipTo', + :'line_items' => :'Array', + :'invoice_details' => :'Ptsv2paymentsOrderInformationInvoiceDetails', + :'shipping_details' => :'Ptsv2paymentsOrderInformationShippingDetails' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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?(:'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?(:'invoiceDetails') + self.invoice_details = attributes[:'invoiceDetails'] + 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 && + amount_details == o.amount_details && + bill_to == o.bill_to && + ship_to == o.ship_to && + line_items == o.line_items && + invoice_details == o.invoice_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 + [amount_details, bill_to, ship_to, line_items, invoice_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/ptsv2payments_order_information_amount_details.rb b/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb new file mode 100644 index 00000000..d568aead --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb @@ -0,0 +1,605 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsOrderInformationAmountDetails + # 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 discount amount applied to the order. For processor-specific information, see the order_discount_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 :discount_amount + + # Total charges for any import or export duties included in the order. For processor-specific information, see the duty_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 :duty_amount + + # 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 + + # Flag that indicates whether a national tax is included in the order total. Possible values: - **0**: national tax not included - **1**: national tax included For processor-specific information, see the national_tax_indicator 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 :national_tax_included + + # Flag that indicates how the merchant manages discounts. Possible values: - **0**: no invoice level discount included - **1**: tax calculated on the postdiscount invoice total - **2**: tax calculated on the prediscount invoice total For processor-specific information, see the order_discount_management_indicator 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_applied_after_discount + + # Flag that indicates how you calculate tax. Possible values: - **0**: net prices with tax calculated at line item level - **1**: net prices with tax calculated at invoice level - **2**: gross prices with tax provided at line item level - **3**: gross prices with tax provided at invoice level - **4**: no tax applies on the invoice for the transaction For processor-specific information, see the tax_management_indicator 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_applied_level + + # For tax amounts that can be categorized as one tax type. This field contains the tax type code that corresponds to the entry in the _lineItems.taxAmount_ field. Possible values: - **056**: sales tax (U.S only) - **TX~**: all taxes (Canada only) Note ~ = space. For processor-specific information, see the total_tax_type_code 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_type_code + + # Total freight or shipping and handling charges for the order. When you include this field in your request, you must also include the **totalAmount** field. For processor-specific information, see the freight_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 :freight_amount + + # Converted amount returned by the DCC service. For processor-specific information, see the foreign_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 :foreign_amount + + # Billing currency returned by the DCC service. For processor-specific information, see the foreign_currency field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :foreign_currency + + # Exchange rate returned by the DCC service. Includes a decimal point and a maximum of 4 decimal places. For processor-specific information, see the exchange_rate field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :exchange_rate + + # Time stamp for the exchange rate. This value is returned by the DCC service. Format: `YYYYMMDD~HH:MM` where ~ denotes a space. For processor-specific information, see the exchange_rate_timestamp field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :exchange_rate_time_stamp + + attr_accessor :surcharge + + # This is a multicurrency field. It contains the transaction amount (field 4), converted to the Currency used to bill the cardholder’s account. + attr_accessor :settlement_amount + + # This is a multicurrency-only field. It contains a 3-digit numeric code that identifies the currency used by the issuer to bill the cardholder's account. + attr_accessor :settlement_currency + + attr_accessor :amex_additional_amounts + + attr_accessor :tax_details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'total_amount' => :'totalAmount', + :'currency' => :'currency', + :'discount_amount' => :'discountAmount', + :'duty_amount' => :'dutyAmount', + :'tax_amount' => :'taxAmount', + :'national_tax_included' => :'nationalTaxIncluded', + :'tax_applied_after_discount' => :'taxAppliedAfterDiscount', + :'tax_applied_level' => :'taxAppliedLevel', + :'tax_type_code' => :'taxTypeCode', + :'freight_amount' => :'freightAmount', + :'foreign_amount' => :'foreignAmount', + :'foreign_currency' => :'foreignCurrency', + :'exchange_rate' => :'exchangeRate', + :'exchange_rate_time_stamp' => :'exchangeRateTimeStamp', + :'surcharge' => :'surcharge', + :'settlement_amount' => :'settlementAmount', + :'settlement_currency' => :'settlementCurrency', + :'amex_additional_amounts' => :'amexAdditionalAmounts', + :'tax_details' => :'taxDetails' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'total_amount' => :'String', + :'currency' => :'String', + :'discount_amount' => :'String', + :'duty_amount' => :'String', + :'tax_amount' => :'String', + :'national_tax_included' => :'String', + :'tax_applied_after_discount' => :'String', + :'tax_applied_level' => :'String', + :'tax_type_code' => :'String', + :'freight_amount' => :'String', + :'foreign_amount' => :'String', + :'foreign_currency' => :'String', + :'exchange_rate' => :'String', + :'exchange_rate_time_stamp' => :'String', + :'surcharge' => :'Ptsv2paymentsOrderInformationAmountDetailsSurcharge', + :'settlement_amount' => :'String', + :'settlement_currency' => :'String', + :'amex_additional_amounts' => :'Array', + :'tax_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?(:'totalAmount') + self.total_amount = attributes[:'totalAmount'] + end + + if attributes.has_key?(:'currency') + self.currency = attributes[:'currency'] + end + + if attributes.has_key?(:'discountAmount') + self.discount_amount = attributes[:'discountAmount'] + end + + if attributes.has_key?(:'dutyAmount') + self.duty_amount = attributes[:'dutyAmount'] + end + + if attributes.has_key?(:'taxAmount') + self.tax_amount = attributes[:'taxAmount'] + end + + if attributes.has_key?(:'nationalTaxIncluded') + self.national_tax_included = attributes[:'nationalTaxIncluded'] + end + + if attributes.has_key?(:'taxAppliedAfterDiscount') + self.tax_applied_after_discount = attributes[:'taxAppliedAfterDiscount'] + end + + if attributes.has_key?(:'taxAppliedLevel') + self.tax_applied_level = attributes[:'taxAppliedLevel'] + end + + if attributes.has_key?(:'taxTypeCode') + self.tax_type_code = attributes[:'taxTypeCode'] + end + + if attributes.has_key?(:'freightAmount') + self.freight_amount = attributes[:'freightAmount'] + end + + if attributes.has_key?(:'foreignAmount') + self.foreign_amount = attributes[:'foreignAmount'] + end + + if attributes.has_key?(:'foreignCurrency') + self.foreign_currency = attributes[:'foreignCurrency'] + end + + if attributes.has_key?(:'exchangeRate') + self.exchange_rate = attributes[:'exchangeRate'] + end + + if attributes.has_key?(:'exchangeRateTimeStamp') + self.exchange_rate_time_stamp = attributes[:'exchangeRateTimeStamp'] + end + + if attributes.has_key?(:'surcharge') + self.surcharge = attributes[:'surcharge'] + end + + if attributes.has_key?(:'settlementAmount') + self.settlement_amount = attributes[:'settlementAmount'] + end + + if attributes.has_key?(:'settlementCurrency') + self.settlement_currency = attributes[:'settlementCurrency'] + end + + if attributes.has_key?(:'amexAdditionalAmounts') + if (value = attributes[:'amexAdditionalAmounts']).is_a?(Array) + self.amex_additional_amounts = value + end + end + + if attributes.has_key?(:'taxDetails') + if (value = attributes[:'taxDetails']).is_a?(Array) + self.tax_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 + 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 !@discount_amount.nil? && @discount_amount.to_s.length > 15 + invalid_properties.push('invalid value for "discount_amount", the character length must be smaller than or equal to 15.') + end + + if !@duty_amount.nil? && @duty_amount.to_s.length > 15 + invalid_properties.push('invalid value for "duty_amount", the character length must be smaller than or equal to 15.') + 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 !@national_tax_included.nil? && @national_tax_included.to_s.length > 1 + invalid_properties.push('invalid value for "national_tax_included", the character length must be smaller than or equal to 1.') + end + + if !@tax_applied_after_discount.nil? && @tax_applied_after_discount.to_s.length > 1 + invalid_properties.push('invalid value for "tax_applied_after_discount", the character length must be smaller than or equal to 1.') + end + + if !@tax_applied_level.nil? && @tax_applied_level.to_s.length > 1 + invalid_properties.push('invalid value for "tax_applied_level", the character length must be smaller than or equal to 1.') + end + + if !@tax_type_code.nil? && @tax_type_code.to_s.length > 3 + invalid_properties.push('invalid value for "tax_type_code", the character length must be smaller than or equal to 3.') + end + + if !@freight_amount.nil? && @freight_amount.to_s.length > 13 + invalid_properties.push('invalid value for "freight_amount", the character length must be smaller than or equal to 13.') + end + + if !@foreign_amount.nil? && @foreign_amount.to_s.length > 15 + invalid_properties.push('invalid value for "foreign_amount", the character length must be smaller than or equal to 15.') + end + + if !@foreign_currency.nil? && @foreign_currency.to_s.length > 5 + invalid_properties.push('invalid value for "foreign_currency", the character length must be smaller than or equal to 5.') + end + + if !@exchange_rate.nil? && @exchange_rate.to_s.length > 13 + invalid_properties.push('invalid value for "exchange_rate", the character length must be smaller than or equal to 13.') + end + + if !@exchange_rate_time_stamp.nil? && @exchange_rate_time_stamp.to_s.length > 14 + invalid_properties.push('invalid value for "exchange_rate_time_stamp", the character length must be smaller than or equal to 14.') + end + + if !@settlement_amount.nil? && @settlement_amount.to_s.length > 12 + invalid_properties.push('invalid value for "settlement_amount", the character length must be smaller than or equal to 12.') + end + + if !@settlement_currency.nil? && @settlement_currency.to_s.length > 3 + invalid_properties.push('invalid value for "settlement_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 > 19 + return false if !@currency.nil? && @currency.to_s.length > 3 + return false if !@discount_amount.nil? && @discount_amount.to_s.length > 15 + return false if !@duty_amount.nil? && @duty_amount.to_s.length > 15 + return false if !@tax_amount.nil? && @tax_amount.to_s.length > 12 + return false if !@national_tax_included.nil? && @national_tax_included.to_s.length > 1 + return false if !@tax_applied_after_discount.nil? && @tax_applied_after_discount.to_s.length > 1 + return false if !@tax_applied_level.nil? && @tax_applied_level.to_s.length > 1 + return false if !@tax_type_code.nil? && @tax_type_code.to_s.length > 3 + return false if !@freight_amount.nil? && @freight_amount.to_s.length > 13 + return false if !@foreign_amount.nil? && @foreign_amount.to_s.length > 15 + return false if !@foreign_currency.nil? && @foreign_currency.to_s.length > 5 + return false if !@exchange_rate.nil? && @exchange_rate.to_s.length > 13 + return false if !@exchange_rate_time_stamp.nil? && @exchange_rate_time_stamp.to_s.length > 14 + return false if !@settlement_amount.nil? && @settlement_amount.to_s.length > 12 + return false if !@settlement_currency.nil? && @settlement_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 > 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] discount_amount Value to be assigned + def discount_amount=(discount_amount) + if !discount_amount.nil? && discount_amount.to_s.length > 15 + fail ArgumentError, 'invalid value for "discount_amount", the character length must be smaller than or equal to 15.' + end + + @discount_amount = discount_amount + end + + # Custom attribute writer method with validation + # @param [Object] duty_amount Value to be assigned + def duty_amount=(duty_amount) + if !duty_amount.nil? && duty_amount.to_s.length > 15 + fail ArgumentError, 'invalid value for "duty_amount", the character length must be smaller than or equal to 15.' + end + + @duty_amount = duty_amount + 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] national_tax_included Value to be assigned + def national_tax_included=(national_tax_included) + if !national_tax_included.nil? && national_tax_included.to_s.length > 1 + fail ArgumentError, 'invalid value for "national_tax_included", the character length must be smaller than or equal to 1.' + end + + @national_tax_included = national_tax_included + end + + # Custom attribute writer method with validation + # @param [Object] tax_applied_after_discount Value to be assigned + def tax_applied_after_discount=(tax_applied_after_discount) + if !tax_applied_after_discount.nil? && tax_applied_after_discount.to_s.length > 1 + fail ArgumentError, 'invalid value for "tax_applied_after_discount", the character length must be smaller than or equal to 1.' + end + + @tax_applied_after_discount = tax_applied_after_discount + end + + # Custom attribute writer method with validation + # @param [Object] tax_applied_level Value to be assigned + def tax_applied_level=(tax_applied_level) + if !tax_applied_level.nil? && tax_applied_level.to_s.length > 1 + fail ArgumentError, 'invalid value for "tax_applied_level", the character length must be smaller than or equal to 1.' + end + + @tax_applied_level = tax_applied_level + end + + # Custom attribute writer method with validation + # @param [Object] tax_type_code Value to be assigned + def tax_type_code=(tax_type_code) + if !tax_type_code.nil? && tax_type_code.to_s.length > 3 + fail ArgumentError, 'invalid value for "tax_type_code", the character length must be smaller than or equal to 3.' + end + + @tax_type_code = tax_type_code + end + + # Custom attribute writer method with validation + # @param [Object] freight_amount Value to be assigned + def freight_amount=(freight_amount) + if !freight_amount.nil? && freight_amount.to_s.length > 13 + fail ArgumentError, 'invalid value for "freight_amount", the character length must be smaller than or equal to 13.' + end + + @freight_amount = freight_amount + end + + # Custom attribute writer method with validation + # @param [Object] foreign_amount Value to be assigned + def foreign_amount=(foreign_amount) + if !foreign_amount.nil? && foreign_amount.to_s.length > 15 + fail ArgumentError, 'invalid value for "foreign_amount", the character length must be smaller than or equal to 15.' + end + + @foreign_amount = foreign_amount + end + + # Custom attribute writer method with validation + # @param [Object] foreign_currency Value to be assigned + def foreign_currency=(foreign_currency) + if !foreign_currency.nil? && foreign_currency.to_s.length > 5 + fail ArgumentError, 'invalid value for "foreign_currency", the character length must be smaller than or equal to 5.' + end + + @foreign_currency = foreign_currency + end + + # Custom attribute writer method with validation + # @param [Object] exchange_rate Value to be assigned + def exchange_rate=(exchange_rate) + if !exchange_rate.nil? && exchange_rate.to_s.length > 13 + fail ArgumentError, 'invalid value for "exchange_rate", the character length must be smaller than or equal to 13.' + end + + @exchange_rate = exchange_rate + end + + # Custom attribute writer method with validation + # @param [Object] exchange_rate_time_stamp Value to be assigned + def exchange_rate_time_stamp=(exchange_rate_time_stamp) + if !exchange_rate_time_stamp.nil? && exchange_rate_time_stamp.to_s.length > 14 + fail ArgumentError, 'invalid value for "exchange_rate_time_stamp", the character length must be smaller than or equal to 14.' + end + + @exchange_rate_time_stamp = exchange_rate_time_stamp + end + + # Custom attribute writer method with validation + # @param [Object] settlement_amount Value to be assigned + def settlement_amount=(settlement_amount) + if !settlement_amount.nil? && settlement_amount.to_s.length > 12 + fail ArgumentError, 'invalid value for "settlement_amount", the character length must be smaller than or equal to 12.' + end + + @settlement_amount = settlement_amount + end + + # Custom attribute writer method with validation + # @param [Object] settlement_currency Value to be assigned + def settlement_currency=(settlement_currency) + if !settlement_currency.nil? && settlement_currency.to_s.length > 3 + fail ArgumentError, 'invalid value for "settlement_currency", the character length must be smaller than or equal to 3.' + end + + @settlement_currency = settlement_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 && + discount_amount == o.discount_amount && + duty_amount == o.duty_amount && + tax_amount == o.tax_amount && + national_tax_included == o.national_tax_included && + tax_applied_after_discount == o.tax_applied_after_discount && + tax_applied_level == o.tax_applied_level && + tax_type_code == o.tax_type_code && + freight_amount == o.freight_amount && + foreign_amount == o.foreign_amount && + foreign_currency == o.foreign_currency && + exchange_rate == o.exchange_rate && + exchange_rate_time_stamp == o.exchange_rate_time_stamp && + surcharge == o.surcharge && + settlement_amount == o.settlement_amount && + settlement_currency == o.settlement_currency && + amex_additional_amounts == o.amex_additional_amounts && + tax_details == o.tax_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 + [total_amount, currency, discount_amount, duty_amount, tax_amount, national_tax_included, tax_applied_after_discount, tax_applied_level, tax_type_code, freight_amount, foreign_amount, foreign_currency, exchange_rate, exchange_rate_time_stamp, surcharge, settlement_amount, settlement_currency, amex_additional_amounts, tax_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/ptsv2payments_order_information_amount_details_amex_additional_amounts.rb b/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_amex_additional_amounts.rb new file mode 100644 index 00000000..c180c3d9 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_amex_additional_amounts.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 Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts + # Additional amount type. This field is supported only for **American Express Direct**. For processor-specific information, see the additional_amount_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 :code + + # Additional amount. This field is supported only for **American Express Direct**. For processor-specific information, see the additional_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 :amount + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'amount' => :'amount' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'String', + :'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?(:'code') + self.code = attributes[:'code'] + end + + if attributes.has_key?(:'amount') + self.amount = attributes[:'amount'] + end + end + + # Show invalid properties 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 !@amount.nil? && @amount.to_s.length > 12 + invalid_properties.push('invalid value for "amount", 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 !@code.nil? && @code.to_s.length > 3 + return false if !@amount.nil? && @amount.to_s.length > 12 + 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] amount Value to be assigned + def amount=(amount) + if !amount.nil? && amount.to_s.length > 12 + fail ArgumentError, 'invalid value for "amount", the character length must be smaller than or equal to 12.' + end + + @amount = 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 && + code == o.code && + amount == o.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 + [code, 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/ptsv2payments_order_information_amount_details_surcharge.rb b/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_surcharge.rb new file mode 100644 index 00000000..d54f3524 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_surcharge.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 Ptsv2paymentsOrderInformationAmountDetailsSurcharge + # The surcharge amount is included in the total transaction amount but is passed in a separate field to the issuer and acquirer for tracking. The issuer can provide information about the surcharge amount to the customer. - Applicable only for CTV for Payouts. - CTV (<= 08) For processor-specific information, see the surcharge_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 :amount + + # Description of this field is not available. + attr_accessor :description + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'amount' => :'amount', + :'description' => :'description' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'amount' => :'String', + :'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?(:'amount') + self.amount = attributes[:'amount'] + 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 + if !@amount.nil? && @amount.to_s.length > 15 + invalid_properties.push('invalid value for "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 !@amount.nil? && @amount.to_s.length > 15 + true + end + + # Custom attribute writer method with validation + # @param [Object] amount Value to be assigned + def amount=(amount) + if !amount.nil? && amount.to_s.length > 15 + fail ArgumentError, 'invalid value for "amount", the character length must be smaller than or equal to 15.' + end + + @amount = 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 && + amount == o.amount && + 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 + [amount, 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/ptsv2payments_order_information_amount_details_tax_details.rb b/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_tax_details.rb new file mode 100644 index 00000000..1ea98818 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_tax_details.rb @@ -0,0 +1,328 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsOrderInformationAmountDetailsTaxDetails + # This is used to determine what type of tax related data should be inclued under _taxDetails_ object. + attr_accessor :type + + # Please see below table for related decription based on above _type_ field. | type | amount description | |-----------|--------------------| | alternate | Total amount of alternate tax for the order. | | local | Sales tax for the order. | | national | National tax for the order. | | vat | Total amount of VAT or other tax included in the order. | + attr_accessor :amount + + # Rate of VAT or other tax for the order. Example 0.040 (=4%) Valid range: 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated) + attr_accessor :rate + + # Type of tax being applied to the item. Possible values: Below values are used by **RBS WorldPay Atlanta**, **FDC Nashville Global**, **Litle** - 0000: unknown tax type - 0001: federal/national sales tax - 0002: state sales tax - 0003: city sales tax - 0004: local sales tax - 0005: municipal sales tax - 0006: other tax - 0010: value-added tax - 0011: goods and services tax - 0012: provincial sales tax - 0013: harmonized sales tax - 0014: Quebec sales tax (QST) - 0020: room tax - 0021: occupancy tax - 0022: energy tax - Blank: Tax not supported on line item. + attr_accessor :code + + # Your tax ID number to use for the alternate tax amount. Required if you set alternate tax amount to any value, including zero. You may send this field without sending alternate tax amount. + attr_accessor :tax_id + + # The tax is applied. Valid value is `true` or `false`. + attr_accessor :applied + + 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', + :'amount' => :'amount', + :'rate' => :'rate', + :'code' => :'code', + :'tax_id' => :'taxId', + :'applied' => :'applied' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'type' => :'String', + :'amount' => :'String', + :'rate' => :'String', + :'code' => :'String', + :'tax_id' => :'String', + :'applied' => :'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?(:'type') + self.type = attributes[:'type'] + end + + if attributes.has_key?(:'amount') + self.amount = attributes[:'amount'] + end + + if attributes.has_key?(:'rate') + self.rate = attributes[:'rate'] + end + + if attributes.has_key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.has_key?(:'taxId') + self.tax_id = attributes[:'taxId'] + end + + if attributes.has_key?(:'applied') + self.applied = attributes[:'applied'] + end + end + + # Show invalid properties 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 !@amount.nil? && @amount.to_s.length > 13 + invalid_properties.push('invalid value for "amount", the character length must be smaller than or equal to 13.') + end + + if !@rate.nil? && @rate.to_s.length > 6 + invalid_properties.push('invalid value for "rate", the character length must be smaller than or equal to 6.') + end + + if !@code.nil? && @code.to_s.length > 4 + invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 4.') + end + + if !@tax_id.nil? && @tax_id.to_s.length > 15 + invalid_properties.push('invalid value for "tax_id", 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? + type_validator = EnumAttributeValidator.new('String', ['alternate', 'local', 'national', 'vat']) + return false unless type_validator.valid?(@type) + return false if !@amount.nil? && @amount.to_s.length > 13 + return false if !@rate.nil? && @rate.to_s.length > 6 + return false if !@code.nil? && @code.to_s.length > 4 + return false if !@tax_id.nil? && @tax_id.to_s.length > 15 + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ['alternate', 'local', 'national', 'vat']) + unless validator.valid?(type) + fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.' + end + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] amount Value to be assigned + def amount=(amount) + if !amount.nil? && amount.to_s.length > 13 + fail ArgumentError, 'invalid value for "amount", the character length must be smaller than or equal to 13.' + end + + @amount = amount + end + + # Custom attribute writer method with validation + # @param [Object] rate Value to be assigned + def rate=(rate) + if !rate.nil? && rate.to_s.length > 6 + fail ArgumentError, 'invalid value for "rate", the character length must be smaller than or equal to 6.' + end + + @rate = rate + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if !code.nil? && code.to_s.length > 4 + fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 4.' + end + + @code = code + end + + # Custom attribute writer method with validation + # @param [Object] tax_id Value to be assigned + def tax_id=(tax_id) + if !tax_id.nil? && tax_id.to_s.length > 15 + fail ArgumentError, 'invalid value for "tax_id", the character length must be smaller than or equal to 15.' + end + + @tax_id = tax_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 && + type == o.type && + amount == o.amount && + rate == o.rate && + code == o.code && + tax_id == o.tax_id && + applied == o.applied + end + + # @see the `==` method + # @param [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, amount, rate, code, tax_id, applied].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to.rb b/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to.rb new file mode 100644 index 00000000..78f90792 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to.rb @@ -0,0 +1,618 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsOrderInformationBillTo + # 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 :middle_name + + # Customer’s name suffix. + attr_accessor :name_suffix + + # Title. + attr_accessor :title + + # 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 + + # 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 + + # 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 neighborhood, community, or region (a barrio in Brazil) within the city or municipality. This field is available only on **Cielo**. + attr_accessor :district + + # Building number in the street address. This field is supported only for: - Cielo transactions. - Redecard customer validation with CyberSource Latin American Processing. + attr_accessor :building_number + + # 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 + + # 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 + + # Customer's phone number type. For Payouts: This field may be sent only for FDC Compass. Possible Values - * day * home * night * work + attr_accessor :phone_type + + 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 + { + :'first_name' => :'firstName', + :'last_name' => :'lastName', + :'middle_name' => :'middleName', + :'name_suffix' => :'nameSuffix', + :'title' => :'title', + :'company' => :'company', + :'address1' => :'address1', + :'address2' => :'address2', + :'locality' => :'locality', + :'administrative_area' => :'administrativeArea', + :'postal_code' => :'postalCode', + :'country' => :'country', + :'district' => :'district', + :'building_number' => :'buildingNumber', + :'email' => :'email', + :'phone_number' => :'phoneNumber', + :'phone_type' => :'phoneType' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'first_name' => :'String', + :'last_name' => :'String', + :'middle_name' => :'String', + :'name_suffix' => :'String', + :'title' => :'String', + :'company' => :'String', + :'address1' => :'String', + :'address2' => :'String', + :'locality' => :'String', + :'administrative_area' => :'String', + :'postal_code' => :'String', + :'country' => :'String', + :'district' => :'String', + :'building_number' => :'String', + :'email' => :'String', + :'phone_number' => :'String', + :'phone_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?(:'firstName') + self.first_name = attributes[:'firstName'] + end + + if attributes.has_key?(:'lastName') + self.last_name = attributes[:'lastName'] + end + + if attributes.has_key?(:'middleName') + self.middle_name = attributes[:'middleName'] + end + + if attributes.has_key?(:'nameSuffix') + self.name_suffix = attributes[:'nameSuffix'] + end + + if attributes.has_key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.has_key?(:'company') + self.company = attributes[:'company'] + 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?(:'country') + self.country = attributes[:'country'] + end + + if attributes.has_key?(:'district') + self.district = attributes[:'district'] + end + + if attributes.has_key?(:'buildingNumber') + self.building_number = attributes[:'buildingNumber'] + end + + 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?(:'phoneType') + self.phone_type = attributes[:'phoneType'] + end + end + + # Show invalid properties 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 !@middle_name.nil? && @middle_name.to_s.length > 60 + invalid_properties.push('invalid value for "middle_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 !@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 !@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 !@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 !@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 !@district.nil? && @district.to_s.length > 50 + invalid_properties.push('invalid value for "district", the character length must be smaller than or equal to 50.') + end + + if !@building_number.nil? && @building_number.to_s.length > 256 + invalid_properties.push('invalid value for "building_number", the character length must be smaller than or equal to 256.') + 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 !@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 !@middle_name.nil? && @middle_name.to_s.length > 60 + return false if !@name_suffix.nil? && @name_suffix.to_s.length > 60 + return false if !@title.nil? && @title.to_s.length > 60 + return false if !@company.nil? && @company.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 !@country.nil? && @country.to_s.length > 2 + return false if !@district.nil? && @district.to_s.length > 50 + return false if !@building_number.nil? && @building_number.to_s.length > 256 + return false if !@email.nil? && @email.to_s.length > 255 + return false if !@phone_number.nil? && @phone_number.to_s.length > 15 + phone_type_validator = EnumAttributeValidator.new('String', ['day', 'home', 'night', 'work']) + return false unless phone_type_validator.valid?(@phone_type) + 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] middle_name Value to be assigned + def middle_name=(middle_name) + if !middle_name.nil? && middle_name.to_s.length > 60 + fail ArgumentError, 'invalid value for "middle_name", the character length must be smaller than or equal to 60.' + end + + @middle_name = middle_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] 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] 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] 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] 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] district Value to be assigned + def district=(district) + if !district.nil? && district.to_s.length > 50 + fail ArgumentError, 'invalid value for "district", the character length must be smaller than or equal to 50.' + end + + @district = district + end + + # Custom attribute writer method with validation + # @param [Object] building_number Value to be assigned + def building_number=(building_number) + if !building_number.nil? && building_number.to_s.length > 256 + fail ArgumentError, 'invalid value for "building_number", the character length must be smaller than or equal to 256.' + end + + @building_number = building_number + 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] 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 + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] phone_type Object to be assigned + def phone_type=(phone_type) + validator = EnumAttributeValidator.new('String', ['day', 'home', 'night', 'work']) + unless validator.valid?(phone_type) + fail ArgumentError, 'invalid value for "phone_type", must be one of #{validator.allowable_values}.' + end + @phone_type = phone_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 && + first_name == o.first_name && + last_name == o.last_name && + middle_name == o.middle_name && + name_suffix == o.name_suffix && + title == o.title && + company == o.company && + address1 == o.address1 && + address2 == o.address2 && + locality == o.locality && + administrative_area == o.administrative_area && + postal_code == o.postal_code && + country == o.country && + district == o.district && + building_number == o.building_number && + email == o.email && + phone_number == o.phone_number && + phone_type == o.phone_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 + [first_name, last_name, middle_name, name_suffix, title, company, address1, address2, locality, administrative_area, postal_code, country, district, building_number, email, phone_number, phone_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/ptsv2payments_order_information_invoice_details.rb b/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details.rb new file mode 100644 index 00000000..1988799e --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details.rb @@ -0,0 +1,360 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsOrderInformationInvoiceDetails + # Invoice Number. + attr_accessor :invoice_number + + # Barcode Number. + attr_accessor :barcode_number + + # Expiration Date. + attr_accessor :expiration_date + + # Value used by your customer to identify the order. This value is typically a purchase order number. CyberSource recommends that you do not populate the field with all zeros or nines. For processor-specific information, see the user_po 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 :purchase_order_number + + # Date the order was processed. `Format: YYYY-MM-DD`. For processor-specific information, see the purchaser_order_date 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 :purchase_order_date + + # The name of the individual or the company contacted for company authorized purchases. For processor-specific information, see the authorized_contact_name 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 :purchase_contact_name + + # Flag that indicates whether an order is taxable. This value must be true if the sum of all _lineItems[].taxAmount_ values > 0. If you do not include any _lineItems[].taxAmount_ values in your request, CyberSource does not include _invoiceDetails.taxable_ in the data it sends to the processor. For processor-specific information, see the tax_indicator 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 :taxable + + # VAT invoice number associated with the transaction. For processor-specific information, see the vat_invoice_ref_number 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 :vat_invoice_reference_number + + # International description code of the overall order’s goods or services or the Categorizes purchases for VAT reporting. Contact your acquirer for a list of codes. For processor-specific information, see the summary_commodity_code 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 :commodity_code + + # Identifier for the merchandise. Possible value: - 1000: Gift card This field is supported only for **American Express Direct**. + attr_accessor :merchandise_code + + attr_accessor :transaction_advice_addendum + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'invoice_number' => :'invoiceNumber', + :'barcode_number' => :'barcodeNumber', + :'expiration_date' => :'expirationDate', + :'purchase_order_number' => :'purchaseOrderNumber', + :'purchase_order_date' => :'purchaseOrderDate', + :'purchase_contact_name' => :'purchaseContactName', + :'taxable' => :'taxable', + :'vat_invoice_reference_number' => :'vatInvoiceReferenceNumber', + :'commodity_code' => :'commodityCode', + :'merchandise_code' => :'merchandiseCode', + :'transaction_advice_addendum' => :'transactionAdviceAddendum' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'invoice_number' => :'String', + :'barcode_number' => :'String', + :'expiration_date' => :'String', + :'purchase_order_number' => :'String', + :'purchase_order_date' => :'String', + :'purchase_contact_name' => :'String', + :'taxable' => :'BOOLEAN', + :'vat_invoice_reference_number' => :'String', + :'commodity_code' => :'String', + :'merchandise_code' => :'Float', + :'transaction_advice_addendum' => :'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?(:'invoiceNumber') + self.invoice_number = attributes[:'invoiceNumber'] + end + + if attributes.has_key?(:'barcodeNumber') + self.barcode_number = attributes[:'barcodeNumber'] + end + + if attributes.has_key?(:'expirationDate') + self.expiration_date = attributes[:'expirationDate'] + end + + if attributes.has_key?(:'purchaseOrderNumber') + self.purchase_order_number = attributes[:'purchaseOrderNumber'] + end + + if attributes.has_key?(:'purchaseOrderDate') + self.purchase_order_date = attributes[:'purchaseOrderDate'] + end + + if attributes.has_key?(:'purchaseContactName') + self.purchase_contact_name = attributes[:'purchaseContactName'] + end + + if attributes.has_key?(:'taxable') + self.taxable = attributes[:'taxable'] + end + + if attributes.has_key?(:'vatInvoiceReferenceNumber') + self.vat_invoice_reference_number = attributes[:'vatInvoiceReferenceNumber'] + end + + if attributes.has_key?(:'commodityCode') + self.commodity_code = attributes[:'commodityCode'] + end + + if attributes.has_key?(:'merchandiseCode') + self.merchandise_code = attributes[:'merchandiseCode'] + end + + if attributes.has_key?(:'transactionAdviceAddendum') + if (value = attributes[:'transactionAdviceAddendum']).is_a?(Array) + self.transaction_advice_addendum = 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 !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25 + invalid_properties.push('invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.') + end + + if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10 + invalid_properties.push('invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.') + end + + if !@purchase_contact_name.nil? && @purchase_contact_name.to_s.length > 36 + invalid_properties.push('invalid value for "purchase_contact_name", the character length must be smaller than or equal to 36.') + end + + if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15 + invalid_properties.push('invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.') + end + + if !@commodity_code.nil? && @commodity_code.to_s.length > 4 + invalid_properties.push('invalid value for "commodity_code", 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 !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25 + return false if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10 + return false if !@purchase_contact_name.nil? && @purchase_contact_name.to_s.length > 36 + return false if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15 + return false if !@commodity_code.nil? && @commodity_code.to_s.length > 4 + true + end + + # Custom attribute writer method with validation + # @param [Object] purchase_order_number Value to be assigned + def purchase_order_number=(purchase_order_number) + if !purchase_order_number.nil? && purchase_order_number.to_s.length > 25 + fail ArgumentError, 'invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.' + end + + @purchase_order_number = purchase_order_number + end + + # Custom attribute writer method with validation + # @param [Object] purchase_order_date Value to be assigned + def purchase_order_date=(purchase_order_date) + if !purchase_order_date.nil? && purchase_order_date.to_s.length > 10 + fail ArgumentError, 'invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.' + end + + @purchase_order_date = purchase_order_date + end + + # Custom attribute writer method with validation + # @param [Object] purchase_contact_name Value to be assigned + def purchase_contact_name=(purchase_contact_name) + if !purchase_contact_name.nil? && purchase_contact_name.to_s.length > 36 + fail ArgumentError, 'invalid value for "purchase_contact_name", the character length must be smaller than or equal to 36.' + end + + @purchase_contact_name = purchase_contact_name + end + + # Custom attribute writer method with validation + # @param [Object] vat_invoice_reference_number Value to be assigned + def vat_invoice_reference_number=(vat_invoice_reference_number) + if !vat_invoice_reference_number.nil? && vat_invoice_reference_number.to_s.length > 15 + fail ArgumentError, 'invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.' + end + + @vat_invoice_reference_number = vat_invoice_reference_number + end + + # Custom attribute writer method with validation + # @param [Object] commodity_code Value to be assigned + def commodity_code=(commodity_code) + if !commodity_code.nil? && commodity_code.to_s.length > 4 + fail ArgumentError, 'invalid value for "commodity_code", the character length must be smaller than or equal to 4.' + end + + @commodity_code = commodity_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 && + invoice_number == o.invoice_number && + barcode_number == o.barcode_number && + expiration_date == o.expiration_date && + purchase_order_number == o.purchase_order_number && + purchase_order_date == o.purchase_order_date && + purchase_contact_name == o.purchase_contact_name && + taxable == o.taxable && + vat_invoice_reference_number == o.vat_invoice_reference_number && + commodity_code == o.commodity_code && + merchandise_code == o.merchandise_code && + transaction_advice_addendum == o.transaction_advice_addendum + end + + # @see the `==` method + # @param [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_number, barcode_number, expiration_date, purchase_order_number, purchase_order_date, purchase_contact_name, taxable, vat_invoice_reference_number, commodity_code, merchandise_code, transaction_advice_addendum].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details_transaction_advice_addendum.rb b/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details_transaction_advice_addendum.rb new file mode 100644 index 00000000..8d7e7c8f --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details_transaction_advice_addendum.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 Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum + # Four Transaction Advice Addendum (TAA) fields. These fields are used to display descriptive information about a transaction on the customer’s American Express card statement. When you send TAA fields, start with amexdata_taa1, then ...taa2, and so on. Skipping a TAA field causes subsequent TAA fields to be ignored. To use these fields, contact CyberSource Customer Support to have your account enabled for this feature. + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'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?(:'data') + self.data = attributes[:'data'] + end + end + + # Show invalid properties 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 !@data.nil? && @data.to_s.length > 40 + invalid_properties.push('invalid value for "data", 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 !@data.nil? && @data.to_s.length > 40 + true + end + + # Custom attribute writer method with validation + # @param [Object] data Value to be assigned + def data=(data) + if !data.nil? && data.to_s.length > 40 + fail ArgumentError, 'invalid value for "data", the character length must be smaller than or equal to 40.' + end + + @data = 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 && + data == o.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 + [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/ptsv2payments_order_information_line_items.rb b/lib/cybersource_rest_client/models/ptsv2payments_order_information_line_items.rb new file mode 100644 index 00000000..e9dad830 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_order_information_line_items.rb @@ -0,0 +1,649 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsOrderInformationLineItems + # 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 + + # 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 + + # Unit of measure, or unit of measure code, for the item. + attr_accessor :unit_of_measure + + # Total amount for the item. Normally calculated as the unit price x quantity. + attr_accessor :total_amount + + # 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 + + # Tax rate applied to the item. See \"Numbered Elements,\" page 14. Visa: Valid range is 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated). Mastercard: Valid range is 0.00001 to 0.99999 (0.001% to 99.999%). + attr_accessor :tax_rate + + # Flag to indicate how you handle discount at the line item level. - 0: no line level discount provided - 1: tax was calculated on the post-discount line item total - 2: tax was calculated on the pre-discount line item total `Note` Visa will inset 0 (zero) if an invalid value is included in this field. This field relates to the value in the _lineItems[].discountAmount_ field. + attr_accessor :tax_applied_after_discount + + # Flag to indicate whether tax is exempted or not included. - 0: tax not included - 1: tax included - 2: transaction is not subject to tax + attr_accessor :tax_status_indicator + + # Type of tax being applied to the item. Possible values: Below values are used by **RBS WorldPay Atlanta**, **FDC Nashville Global**, **Litle** - 0000: unknown tax type - 0001: federal/national sales tax - 0002: state sales tax - 0003: city sales tax - 0004: local sales tax - 0005: municipal sales tax - 0006: other tax - 0010: value-added tax - 0011: goods and services tax - 0012: provincial sales tax - 0013: harmonized sales tax - 0014: Quebec sales tax (QST) - 0020: room tax - 0021: occupancy tax - 0022: energy tax - Blank: Tax not supported on line item. + attr_accessor :tax_type_code + + # Flag that indicates whether the tax amount is included in the Line Item Total. + attr_accessor :amount_includes_tax + + # Flag to indicate whether the purchase is categorized as goods or services. Possible values: - 00: goods - 01: services + attr_accessor :type_of_supply + + # Commodity code or International description code used to classify the item. Contact your acquirer for a list of codes. + attr_accessor :commodity_code + + # Discount applied to the item. + attr_accessor :discount_amount + + # Flag that indicates whether the amount is discounted. If you do not provide a value but you set Discount Amount to a value greater than zero, then CyberSource sets this field to **true**. + attr_accessor :discount_applied + + # Rate the item is discounted. Maximum of 2 decimal places. Example 5.25 (=5.25%) + attr_accessor :discount_rate + + # Field to support an invoice number for a transaction. You must specify the number of line items that will include an invoice number. By default, the first line item will include an invoice number field. The invoice number field can be included for up to 10 line items. + attr_accessor :invoice_number + + attr_accessor :tax_details + + # TODO + 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', + :'quantity' => :'quantity', + :'unit_price' => :'unitPrice', + :'unit_of_measure' => :'unitOfMeasure', + :'total_amount' => :'totalAmount', + :'tax_amount' => :'taxAmount', + :'tax_rate' => :'taxRate', + :'tax_applied_after_discount' => :'taxAppliedAfterDiscount', + :'tax_status_indicator' => :'taxStatusIndicator', + :'tax_type_code' => :'taxTypeCode', + :'amount_includes_tax' => :'amountIncludesTax', + :'type_of_supply' => :'typeOfSupply', + :'commodity_code' => :'commodityCode', + :'discount_amount' => :'discountAmount', + :'discount_applied' => :'discountApplied', + :'discount_rate' => :'discountRate', + :'invoice_number' => :'invoiceNumber', + :'tax_details' => :'taxDetails', + :'fulfillment_type' => :'fulfillmentType' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'product_code' => :'String', + :'product_name' => :'String', + :'product_sku' => :'String', + :'quantity' => :'Float', + :'unit_price' => :'String', + :'unit_of_measure' => :'String', + :'total_amount' => :'String', + :'tax_amount' => :'String', + :'tax_rate' => :'String', + :'tax_applied_after_discount' => :'String', + :'tax_status_indicator' => :'String', + :'tax_type_code' => :'String', + :'amount_includes_tax' => :'BOOLEAN', + :'type_of_supply' => :'String', + :'commodity_code' => :'String', + :'discount_amount' => :'String', + :'discount_applied' => :'BOOLEAN', + :'discount_rate' => :'String', + :'invoice_number' => :'String', + :'tax_details' => :'Array', + :'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?(:'quantity') + self.quantity = attributes[:'quantity'] + end + + if attributes.has_key?(:'unitPrice') + self.unit_price = attributes[:'unitPrice'] + end + + if attributes.has_key?(:'unitOfMeasure') + self.unit_of_measure = attributes[:'unitOfMeasure'] + end + + if attributes.has_key?(:'totalAmount') + self.total_amount = attributes[:'totalAmount'] + end + + if attributes.has_key?(:'taxAmount') + self.tax_amount = attributes[:'taxAmount'] + end + + if attributes.has_key?(:'taxRate') + self.tax_rate = attributes[:'taxRate'] + end + + if attributes.has_key?(:'taxAppliedAfterDiscount') + self.tax_applied_after_discount = attributes[:'taxAppliedAfterDiscount'] + end + + if attributes.has_key?(:'taxStatusIndicator') + self.tax_status_indicator = attributes[:'taxStatusIndicator'] + end + + if attributes.has_key?(:'taxTypeCode') + self.tax_type_code = attributes[:'taxTypeCode'] + end + + if attributes.has_key?(:'amountIncludesTax') + self.amount_includes_tax = attributes[:'amountIncludesTax'] + end + + if attributes.has_key?(:'typeOfSupply') + self.type_of_supply = attributes[:'typeOfSupply'] + end + + if attributes.has_key?(:'commodityCode') + self.commodity_code = attributes[:'commodityCode'] + end + + if attributes.has_key?(:'discountAmount') + self.discount_amount = attributes[:'discountAmount'] + end + + if attributes.has_key?(:'discountApplied') + self.discount_applied = attributes[:'discountApplied'] + end + + if attributes.has_key?(:'discountRate') + self.discount_rate = attributes[:'discountRate'] + end + + if attributes.has_key?(:'invoiceNumber') + self.invoice_number = attributes[:'invoiceNumber'] + end + + if attributes.has_key?(:'taxDetails') + if (value = attributes[:'taxDetails']).is_a?(Array) + self.tax_details = value + end + 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 !@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 + + if !@unit_of_measure.nil? && @unit_of_measure.to_s.length > 12 + invalid_properties.push('invalid value for "unit_of_measure", the character length must be smaller than or equal to 12.') + end + + if !@total_amount.nil? && @total_amount.to_s.length > 13 + invalid_properties.push('invalid value for "total_amount", the character length must be smaller than or equal to 13.') + 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 !@tax_rate.nil? && @tax_rate.to_s.length > 7 + invalid_properties.push('invalid value for "tax_rate", the character length must be smaller than or equal to 7.') + end + + if !@tax_applied_after_discount.nil? && @tax_applied_after_discount.to_s.length > 1 + invalid_properties.push('invalid value for "tax_applied_after_discount", the character length must be smaller than or equal to 1.') + end + + if !@tax_status_indicator.nil? && @tax_status_indicator.to_s.length > 1 + invalid_properties.push('invalid value for "tax_status_indicator", the character length must be smaller than or equal to 1.') + end + + if !@tax_type_code.nil? && @tax_type_code.to_s.length > 4 + invalid_properties.push('invalid value for "tax_type_code", the character length must be smaller than or equal to 4.') + end + + if !@type_of_supply.nil? && @type_of_supply.to_s.length > 2 + invalid_properties.push('invalid value for "type_of_supply", the character length must be smaller than or equal to 2.') + end + + if !@commodity_code.nil? && @commodity_code.to_s.length > 15 + invalid_properties.push('invalid value for "commodity_code", the character length must be smaller than or equal to 15.') + end + + if !@discount_amount.nil? && @discount_amount.to_s.length > 13 + invalid_properties.push('invalid value for "discount_amount", the character length must be smaller than or equal to 13.') + end + + if !@discount_rate.nil? && @discount_rate.to_s.length > 6 + invalid_properties.push('invalid value for "discount_rate", the character length must be smaller than or equal to 6.') + end + + if !@invoice_number.nil? && @invoice_number.to_s.length > 23 + invalid_properties.push('invalid value for "invoice_number", 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 !@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 !@quantity.nil? && @quantity > 9999999999 + return false if !@quantity.nil? && @quantity < 1 + return false if !@unit_price.nil? && @unit_price.to_s.length > 15 + return false if !@unit_of_measure.nil? && @unit_of_measure.to_s.length > 12 + return false if !@total_amount.nil? && @total_amount.to_s.length > 13 + return false if !@tax_amount.nil? && @tax_amount.to_s.length > 15 + return false if !@tax_rate.nil? && @tax_rate.to_s.length > 7 + return false if !@tax_applied_after_discount.nil? && @tax_applied_after_discount.to_s.length > 1 + return false if !@tax_status_indicator.nil? && @tax_status_indicator.to_s.length > 1 + return false if !@tax_type_code.nil? && @tax_type_code.to_s.length > 4 + return false if !@type_of_supply.nil? && @type_of_supply.to_s.length > 2 + return false if !@commodity_code.nil? && @commodity_code.to_s.length > 15 + return false if !@discount_amount.nil? && @discount_amount.to_s.length > 13 + return false if !@discount_rate.nil? && @discount_rate.to_s.length > 6 + return false if !@invoice_number.nil? && @invoice_number.to_s.length > 23 + 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] 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 + + # Custom attribute writer method with validation + # @param [Object] unit_of_measure Value to be assigned + def unit_of_measure=(unit_of_measure) + if !unit_of_measure.nil? && unit_of_measure.to_s.length > 12 + fail ArgumentError, 'invalid value for "unit_of_measure", the character length must be smaller than or equal to 12.' + end + + @unit_of_measure = unit_of_measure + 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 > 13 + fail ArgumentError, 'invalid value for "total_amount", the character length must be smaller than or equal to 13.' + end + + @total_amount = total_amount + 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] tax_rate Value to be assigned + def tax_rate=(tax_rate) + if !tax_rate.nil? && tax_rate.to_s.length > 7 + fail ArgumentError, 'invalid value for "tax_rate", the character length must be smaller than or equal to 7.' + end + + @tax_rate = tax_rate + end + + # Custom attribute writer method with validation + # @param [Object] tax_applied_after_discount Value to be assigned + def tax_applied_after_discount=(tax_applied_after_discount) + if !tax_applied_after_discount.nil? && tax_applied_after_discount.to_s.length > 1 + fail ArgumentError, 'invalid value for "tax_applied_after_discount", the character length must be smaller than or equal to 1.' + end + + @tax_applied_after_discount = tax_applied_after_discount + end + + # Custom attribute writer method with validation + # @param [Object] tax_status_indicator Value to be assigned + def tax_status_indicator=(tax_status_indicator) + if !tax_status_indicator.nil? && tax_status_indicator.to_s.length > 1 + fail ArgumentError, 'invalid value for "tax_status_indicator", the character length must be smaller than or equal to 1.' + end + + @tax_status_indicator = tax_status_indicator + end + + # Custom attribute writer method with validation + # @param [Object] tax_type_code Value to be assigned + def tax_type_code=(tax_type_code) + if !tax_type_code.nil? && tax_type_code.to_s.length > 4 + fail ArgumentError, 'invalid value for "tax_type_code", the character length must be smaller than or equal to 4.' + end + + @tax_type_code = tax_type_code + end + + # Custom attribute writer method with validation + # @param [Object] type_of_supply Value to be assigned + def type_of_supply=(type_of_supply) + if !type_of_supply.nil? && type_of_supply.to_s.length > 2 + fail ArgumentError, 'invalid value for "type_of_supply", the character length must be smaller than or equal to 2.' + end + + @type_of_supply = type_of_supply + end + + # Custom attribute writer method with validation + # @param [Object] commodity_code Value to be assigned + def commodity_code=(commodity_code) + if !commodity_code.nil? && commodity_code.to_s.length > 15 + fail ArgumentError, 'invalid value for "commodity_code", the character length must be smaller than or equal to 15.' + end + + @commodity_code = commodity_code + end + + # Custom attribute writer method with validation + # @param [Object] discount_amount Value to be assigned + def discount_amount=(discount_amount) + if !discount_amount.nil? && discount_amount.to_s.length > 13 + fail ArgumentError, 'invalid value for "discount_amount", the character length must be smaller than or equal to 13.' + end + + @discount_amount = discount_amount + end + + # Custom attribute writer method with validation + # @param [Object] discount_rate Value to be assigned + def discount_rate=(discount_rate) + if !discount_rate.nil? && discount_rate.to_s.length > 6 + fail ArgumentError, 'invalid value for "discount_rate", the character length must be smaller than or equal to 6.' + end + + @discount_rate = discount_rate + end + + # Custom attribute writer method with validation + # @param [Object] invoice_number Value to be assigned + def invoice_number=(invoice_number) + if !invoice_number.nil? && invoice_number.to_s.length > 23 + fail ArgumentError, 'invalid value for "invoice_number", the character length must be smaller than or equal to 23.' + end + + @invoice_number = invoice_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 && + product_code == o.product_code && + product_name == o.product_name && + product_sku == o.product_sku && + quantity == o.quantity && + unit_price == o.unit_price && + unit_of_measure == o.unit_of_measure && + total_amount == o.total_amount && + tax_amount == o.tax_amount && + tax_rate == o.tax_rate && + tax_applied_after_discount == o.tax_applied_after_discount && + tax_status_indicator == o.tax_status_indicator && + tax_type_code == o.tax_type_code && + amount_includes_tax == o.amount_includes_tax && + type_of_supply == o.type_of_supply && + commodity_code == o.commodity_code && + discount_amount == o.discount_amount && + discount_applied == o.discount_applied && + discount_rate == o.discount_rate && + invoice_number == o.invoice_number && + tax_details == o.tax_details && + 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, quantity, unit_price, unit_of_measure, total_amount, tax_amount, tax_rate, tax_applied_after_discount, tax_status_indicator, tax_type_code, amount_includes_tax, type_of_supply, commodity_code, discount_amount, discount_applied, discount_rate, invoice_number, tax_details, 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/ptsv2payments_order_information_ship_to.rb b/lib/cybersource_rest_client/models/ptsv2payments_order_information_ship_to.rb new file mode 100644 index 00000000..8b020987 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_order_information_ship_to.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 Ptsv2paymentsOrderInformationShipTo + # 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 + + # Country of the shipping address. Use the two character ISO Standard Country Codes. + attr_accessor :country + + # Neighborhood, community, or region within a city or municipality. + attr_accessor :district + + # Building number in the street address. For example, the building number is 187 in the following address: Rua da Quitanda 187 + attr_accessor :building_number + + # Phone number for the shipping address. + attr_accessor :phone_number + + # 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 + + # 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', + :'country' => :'country', + :'district' => :'district', + :'building_number' => :'buildingNumber', + :'phone_number' => :'phoneNumber', + :'company' => :'company' + } + 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', + :'country' => :'String', + :'district' => :'String', + :'building_number' => :'String', + :'phone_number' => :'String', + :'company' => :'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?(:'country') + self.country = attributes[:'country'] + end + + if attributes.has_key?(:'district') + self.district = attributes[:'district'] + end + + if attributes.has_key?(:'buildingNumber') + self.building_number = attributes[:'buildingNumber'] + end + + if attributes.has_key?(:'phoneNumber') + self.phone_number = attributes[:'phoneNumber'] + end + + if attributes.has_key?(:'company') + self.company = attributes[:'company'] + end + end + + # Show invalid properties 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 !@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 !@district.nil? && @district.to_s.length > 50 + invalid_properties.push('invalid value for "district", the character length must be smaller than or equal to 50.') + end + + if !@building_number.nil? && @building_number.to_s.length > 15 + invalid_properties.push('invalid value for "building_number", the character length must be smaller than or equal to 15.') + 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 + + 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 + + invalid_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 !@country.nil? && @country.to_s.length > 2 + return false if !@district.nil? && @district.to_s.length > 50 + return false if !@building_number.nil? && @building_number.to_s.length > 15 + return false if !@phone_number.nil? && @phone_number.to_s.length > 15 + return false if !@company.nil? && @company.to_s.length > 60 + 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] 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] district Value to be assigned + def district=(district) + if !district.nil? && district.to_s.length > 50 + fail ArgumentError, 'invalid value for "district", the character length must be smaller than or equal to 50.' + end + + @district = district + end + + # Custom attribute writer method with validation + # @param [Object] building_number Value to be assigned + def building_number=(building_number) + if !building_number.nil? && building_number.to_s.length > 15 + fail ArgumentError, 'invalid value for "building_number", the character length must be smaller than or equal to 15.' + end + + @building_number = building_number + 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 + + # 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 + + # 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 && + country == o.country && + district == o.district && + building_number == o.building_number && + phone_number == o.phone_number && + company == o.company + end + + # @see the `==` method + # @param [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, country, district, building_number, phone_number, company].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payments_order_information_shipping_details.rb b/lib/cybersource_rest_client/models/ptsv2payments_order_information_shipping_details.rb new file mode 100644 index 00000000..92778bcc --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_order_information_shipping_details.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 Ptsv2paymentsOrderInformationShippingDetails + # Description of 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 + + # Postal code for the address from which the goods are shipped, which is used to establish nexus. The default is the postal code associated with your CyberSource account. 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 This field is frequently used for Level II and Level III transactions. + attr_accessor :ship_from_postal_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'gift_wrap' => :'giftWrap', + :'shipping_method' => :'shippingMethod', + :'ship_from_postal_code' => :'shipFromPostalCode' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'gift_wrap' => :'BOOLEAN', + :'shipping_method' => :'String', + :'ship_from_postal_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?(:'giftWrap') + self.gift_wrap = attributes[:'giftWrap'] + end + + if attributes.has_key?(:'shippingMethod') + self.shipping_method = attributes[:'shippingMethod'] + end + + if attributes.has_key?(:'shipFromPostalCode') + self.ship_from_postal_code = attributes[:'shipFromPostalCode'] + end + end + + # Show invalid properties 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 + + if !@ship_from_postal_code.nil? && @ship_from_postal_code.to_s.length > 10 + invalid_properties.push('invalid value for "ship_from_postal_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 !@shipping_method.nil? && @shipping_method.to_s.length > 10 + return false if !@ship_from_postal_code.nil? && @ship_from_postal_code.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 + + # Custom attribute writer method with validation + # @param [Object] ship_from_postal_code Value to be assigned + def ship_from_postal_code=(ship_from_postal_code) + if !ship_from_postal_code.nil? && ship_from_postal_code.to_s.length > 10 + fail ArgumentError, 'invalid value for "ship_from_postal_code", the character length must be smaller than or equal to 10.' + end + + @ship_from_postal_code = ship_from_postal_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 && + gift_wrap == o.gift_wrap && + shipping_method == o.shipping_method && + ship_from_postal_code == o.ship_from_postal_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 + [gift_wrap, shipping_method, ship_from_postal_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/ptsv2payments_payment_information.rb b/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb new file mode 100644 index 00000000..c7e8485e --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_payment_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 Ptsv2paymentsPaymentInformation + attr_accessor :card + + attr_accessor :tokenized_card + + attr_accessor :fluid_data + + attr_accessor :customer + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'card' => :'card', + :'tokenized_card' => :'tokenizedCard', + :'fluid_data' => :'fluidData', + :'customer' => :'customer' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'card' => :'Ptsv2paymentsPaymentInformationCard', + :'tokenized_card' => :'Ptsv2paymentsPaymentInformationTokenizedCard', + :'fluid_data' => :'Ptsv2paymentsPaymentInformationFluidData', + :'customer' => :'Ptsv2paymentsPaymentInformationCustomer' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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?(:'fluidData') + self.fluid_data = attributes[:'fluidData'] + end + + if attributes.has_key?(:'customer') + self.customer = attributes[:'customer'] + end + end + + # Show invalid properties 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 && + fluid_data == o.fluid_data && + customer == o.customer + end + + # @see the `==` method + # @param [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, fluid_data, customer].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb b/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb new file mode 100644 index 00000000..506bf4bc --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.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 Ptsv2paymentsPaymentInformationCard + # Customer’s credit card number. Encoded Account Numbers when processing encoded account numbers, use this field for the encoded account number. For processor-specific information, see the customer_cc_number field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :number + + # 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 + + # Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover + attr_accessor :type + + # 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 + + # Flag that specifies the type of account associated with the card. The cardholder provides this information during the payment process. This field is required in the following cases. - Debit transactions on Cielo and Comercio Latino. - Transactions with Brazilian-issued cards on CyberSource through VisaNet. - Applicable only for CTV. **Note** Combo cards in Brazil contain credit and debit functionality in a single card. Visa systems use a credit bank identification number (BIN) for this type of card. Using the BIN to determine whether a card is debit or credit can cause transactions with these cards to be processed incorrectly. CyberSource strongly recommends that you include this field for combo card transactions. Possible values include the following. - CHECKING: Checking account - CREDIT: Credit card account - SAVING: Saving account - LINE_OF_CREDIT: Line of credit - PREPAID: Prepaid card account - UNIVERSAL: Universal account + attr_accessor :source_account_type + + # Card Verification Number. + attr_accessor :security_code + + # Flag that indicates whether a CVN code was sent. Possible values: - 0 (default): CVN service not requested. CyberSource uses this default value when you do not include _securityCode_ in the request. - 1 (default): CVN service requested and supported. CyberSource uses this default value when you include _securityCode_ in the request. - 2: CVN on credit card is illegible. - 9: CVN was not imprinted on credit card. + attr_accessor :security_code_indicator + + # 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 + + # 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 + + # 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 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number' => :'number', + :'expiration_month' => :'expirationMonth', + :'expiration_year' => :'expirationYear', + :'type' => :'type', + :'use_as' => :'useAs', + :'source_account_type' => :'sourceAccountType', + :'security_code' => :'securityCode', + :'security_code_indicator' => :'securityCodeIndicator', + :'account_encoder_id' => :'accountEncoderId', + :'issue_number' => :'issueNumber', + :'start_month' => :'startMonth', + :'start_year' => :'startYear' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'number' => :'String', + :'expiration_month' => :'String', + :'expiration_year' => :'String', + :'type' => :'String', + :'use_as' => :'String', + :'source_account_type' => :'String', + :'security_code' => :'String', + :'security_code_indicator' => :'String', + :'account_encoder_id' => :'String', + :'issue_number' => :'String', + :'start_month' => :'String', + :'start_year' => :'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?(:'expirationMonth') + self.expiration_month = attributes[:'expirationMonth'] + end + + if attributes.has_key?(:'expirationYear') + self.expiration_year = attributes[:'expirationYear'] + end + + if attributes.has_key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.has_key?(:'useAs') + self.use_as = attributes[:'useAs'] + end + + if attributes.has_key?(:'sourceAccountType') + self.source_account_type = attributes[:'sourceAccountType'] + end + + if attributes.has_key?(:'securityCode') + self.security_code = attributes[:'securityCode'] + end + + if attributes.has_key?(:'securityCodeIndicator') + self.security_code_indicator = attributes[:'securityCodeIndicator'] + end + + if attributes.has_key?(:'accountEncoderId') + self.account_encoder_id = attributes[:'accountEncoderId'] + end + + if attributes.has_key?(:'issueNumber') + self.issue_number = attributes[:'issueNumber'] + end + + if attributes.has_key?(:'startMonth') + self.start_month = attributes[:'startMonth'] + end + + if attributes.has_key?(:'startYear') + self.start_year = attributes[:'startYear'] + end + end + + # Show invalid properties 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 !@number.nil? && @number.to_s.length > 20 + invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 20.') + 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 !@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 !@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 + + if !@source_account_type.nil? && @source_account_type.to_s.length > 2 + invalid_properties.push('invalid value for "source_account_type", the character length must be smaller than or equal to 2.') + end + + if !@security_code.nil? && @security_code.to_s.length > 4 + invalid_properties.push('invalid value for "security_code", the character length must be smaller than or equal to 4.') + end + + if !@security_code_indicator.nil? && @security_code_indicator.to_s.length > 1 + invalid_properties.push('invalid value for "security_code_indicator", the character length must be smaller than or equal to 1.') + 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 !@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 !@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 + + invalid_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 !@number.nil? && @number.to_s.length > 20 + 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 !@type.nil? && @type.to_s.length > 3 + return false if !@use_as.nil? && @use_as.to_s.length > 2 + return false if !@source_account_type.nil? && @source_account_type.to_s.length > 2 + return false if !@security_code.nil? && @security_code.to_s.length > 4 + return false if !@security_code_indicator.nil? && @security_code_indicator.to_s.length > 1 + return false if !@account_encoder_id.nil? && @account_encoder_id.to_s.length > 3 + return false if !@issue_number.nil? && @issue_number.to_s.length > 5 + return false if !@start_month.nil? && @start_month.to_s.length > 2 + return false if !@start_year.nil? && @start_year.to_s.length > 4 + true + end + + # Custom attribute writer method with validation + # @param [Object] number Value to be assigned + def number=(number) + if !number.nil? && number.to_s.length > 20 + fail ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 20.' + end + + @number = number + 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] 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] 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 + + # Custom attribute writer method with validation + # @param [Object] source_account_type Value to be assigned + def source_account_type=(source_account_type) + if !source_account_type.nil? && source_account_type.to_s.length > 2 + fail ArgumentError, 'invalid value for "source_account_type", the character length must be smaller than or equal to 2.' + end + + @source_account_type = source_account_type + end + + # Custom attribute writer method with validation + # @param [Object] security_code Value to be assigned + def security_code=(security_code) + if !security_code.nil? && security_code.to_s.length > 4 + fail ArgumentError, 'invalid value for "security_code", the character length must be smaller than or equal to 4.' + end + + @security_code = security_code + end + + # Custom attribute writer method with validation + # @param [Object] security_code_indicator Value to be assigned + def security_code_indicator=(security_code_indicator) + if !security_code_indicator.nil? && security_code_indicator.to_s.length > 1 + fail ArgumentError, 'invalid value for "security_code_indicator", the character length must be smaller than or equal to 1.' + end + + @security_code_indicator = security_code_indicator + 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] 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] 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 + + # 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 && + expiration_month == o.expiration_month && + expiration_year == o.expiration_year && + type == o.type && + use_as == o.use_as && + source_account_type == o.source_account_type && + security_code == o.security_code && + security_code_indicator == o.security_code_indicator && + account_encoder_id == o.account_encoder_id && + issue_number == o.issue_number && + start_month == o.start_month && + start_year == o.start_year + end + + # @see the `==` method + # @param [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, expiration_month, expiration_year, type, use_as, source_account_type, security_code, security_code_indicator, account_encoder_id, issue_number, start_month, start_year].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payments_payment_information_customer.rb b/lib/cybersource_rest_client/models/ptsv2payments_payment_information_customer.rb new file mode 100644 index 00000000..e8059a0f --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_payment_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 Ptsv2paymentsPaymentInformationCustomer + # Unique identifier for the customer's card and billing information. + attr_accessor :customer_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'customer_id' => :'customerId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'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?(:'customerId') + self.customer_id = attributes[:'customerId'] + end + end + + # Show invalid properties 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 !@customer_id.nil? && @customer_id.to_s.length > 26 + invalid_properties.push('invalid value for "customer_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 !@customer_id.nil? && @customer_id.to_s.length > 26 + true + end + + # Custom attribute writer method with validation + # @param [Object] customer_id Value to be assigned + def customer_id=(customer_id) + if !customer_id.nil? && customer_id.to_s.length > 26 + fail ArgumentError, 'invalid value for "customer_id", the character length must be smaller than or equal to 26.' + end + + @customer_id = 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 && + customer_id == o.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 + [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/ptsv2payments_payment_information_fluid_data.rb b/lib/cybersource_rest_client/models/ptsv2payments_payment_information_fluid_data.rb new file mode 100644 index 00000000..185678f7 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_payment_information_fluid_data.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 Ptsv2paymentsPaymentInformationFluidData + # Description of this field is not available. + attr_accessor :key + + # Format of the encrypted payment data. + attr_accessor :descriptor + + # The encrypted payment data value. If using Apple Pay or Samsung Pay, the values are: - Apple Pay: RklEPUNPTU1PTi5BUFBMRS5JTkFQUC5QQVlNRU5U - Samsung Pay: RklEPUNPTU1PTi5TQU1TVU5HLklOQVBQLlBBWU1FTlQ= + attr_accessor :value + + # Encoding method used to encrypt the payment data. Possible value: Base64 + attr_accessor :encoding + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'key' => :'key', + :'descriptor' => :'descriptor', + :'value' => :'value', + :'encoding' => :'encoding' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'key' => :'String', + :'descriptor' => :'String', + :'value' => :'String', + :'encoding' => :'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?(:'descriptor') + self.descriptor = attributes[:'descriptor'] + end + + if attributes.has_key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.has_key?(:'encoding') + self.encoding = attributes[:'encoding'] + end + end + + # Show invalid properties 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 !@descriptor.nil? && @descriptor.to_s.length > 128 + invalid_properties.push('invalid value for "descriptor", the character length must be smaller than or equal to 128.') + end + + if !@value.nil? && @value.to_s.length > 3072 + invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 3072.') + end + + if !@encoding.nil? && @encoding.to_s.length > 6 + invalid_properties.push('invalid value for "encoding", the character length must be smaller than or equal to 6.') + 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 !@descriptor.nil? && @descriptor.to_s.length > 128 + return false if !@value.nil? && @value.to_s.length > 3072 + return false if !@encoding.nil? && @encoding.to_s.length > 6 + true + end + + # Custom attribute writer method with validation + # @param [Object] descriptor Value to be assigned + def descriptor=(descriptor) + if !descriptor.nil? && descriptor.to_s.length > 128 + fail ArgumentError, 'invalid value for "descriptor", the character length must be smaller than or equal to 128.' + end + + @descriptor = descriptor + end + + # Custom attribute writer method with validation + # @param [Object] value Value to be assigned + def value=(value) + if !value.nil? && value.to_s.length > 3072 + fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 3072.' + end + + @value = value + end + + # Custom attribute writer method with validation + # @param [Object] encoding Value to be assigned + def encoding=(encoding) + if !encoding.nil? && encoding.to_s.length > 6 + fail ArgumentError, 'invalid value for "encoding", the character length must be smaller than or equal to 6.' + end + + @encoding = encoding + end + + # 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 && + descriptor == o.descriptor && + value == o.value && + encoding == o.encoding + end + + # @see the `==` method + # @param [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, descriptor, value, encoding].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb b/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb new file mode 100644 index 00000000..8119c7ff --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_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 Ptsv2paymentsPaymentInformationTokenizedCard + # Customer’s payment network token value. + attr_accessor :number + + # 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 + + # Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover + attr_accessor :type + + # This field is used internally. + attr_accessor :cryptogram + + # 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 + + # Type of transaction that provided the token data. This value does not specify the token service provider; it specifies the entity that provided you with information about the token. Set the value for this field to 1. An application on the customer’s mobile device provided the token data. + attr_accessor :transaction_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 + + # Type of technology used in the device to store token data. Possible values: - 001: Secure Element (SE) Smart card or memory with restricted access and encryption to prevent data tampering. For storing payment credentials, a SE is tested against a set of requirements defined by the payment networks. `Note` This field is supported only for **FDC Compass**. - 002: Host Card Emulation (HCE) Emulation of a smart card by using software to create a virtual and exact representation of the card. Sensitive data is stored in a database that is hosted in the cloud. For storing payment credentials, a database must meet very stringent security requirements that exceed PCI DSS. `Note` This field is supported only for **FDC Compass**. + attr_accessor :storage_method + + # CVN. + attr_accessor :security_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number' => :'number', + :'expiration_month' => :'expirationMonth', + :'expiration_year' => :'expirationYear', + :'type' => :'type', + :'cryptogram' => :'cryptogram', + :'requestor_id' => :'requestorId', + :'transaction_type' => :'transactionType', + :'assurance_level' => :'assuranceLevel', + :'storage_method' => :'storageMethod', + :'security_code' => :'securityCode' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'number' => :'String', + :'expiration_month' => :'String', + :'expiration_year' => :'String', + :'type' => :'String', + :'cryptogram' => :'String', + :'requestor_id' => :'String', + :'transaction_type' => :'String', + :'assurance_level' => :'String', + :'storage_method' => :'String', + :'security_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?(:'number') + self.number = attributes[:'number'] + 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?(:'type') + self.type = attributes[:'type'] + end + + if attributes.has_key?(:'cryptogram') + self.cryptogram = attributes[:'cryptogram'] + end + + if attributes.has_key?(:'requestorId') + self.requestor_id = attributes[:'requestorId'] + end + + if attributes.has_key?(:'transactionType') + self.transaction_type = attributes[:'transactionType'] + end + + if attributes.has_key?(:'assuranceLevel') + self.assurance_level = attributes[:'assuranceLevel'] + end + + if attributes.has_key?(:'storageMethod') + self.storage_method = attributes[:'storageMethod'] + end + + if attributes.has_key?(:'securityCode') + self.security_code = attributes[:'securityCode'] + end + end + + # Show invalid properties 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 !@number.nil? && @number.to_s.length > 20 + invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 20.') + 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 !@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 !@cryptogram.nil? && @cryptogram.to_s.length > 40 + invalid_properties.push('invalid value for "cryptogram", the character length must be smaller than or equal to 40.') + 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 + + if !@transaction_type.nil? && @transaction_type.to_s.length > 1 + invalid_properties.push('invalid value for "transaction_type", the character length must be smaller than or equal to 1.') + 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 !@storage_method.nil? && @storage_method.to_s.length > 3 + invalid_properties.push('invalid value for "storage_method", the character length must be smaller than or equal to 3.') + end + + if !@security_code.nil? && @security_code.to_s.length > 4 + invalid_properties.push('invalid value for "security_code", 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 !@number.nil? && @number.to_s.length > 20 + 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 !@type.nil? && @type.to_s.length > 3 + return false if !@cryptogram.nil? && @cryptogram.to_s.length > 40 + return false if !@requestor_id.nil? && @requestor_id.to_s.length > 11 + return false if !@transaction_type.nil? && @transaction_type.to_s.length > 1 + return false if !@assurance_level.nil? && @assurance_level.to_s.length > 2 + return false if !@storage_method.nil? && @storage_method.to_s.length > 3 + return false if !@security_code.nil? && @security_code.to_s.length > 4 + true + end + + # Custom attribute writer method with validation + # @param [Object] number Value to be assigned + def number=(number) + if !number.nil? && number.to_s.length > 20 + fail ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 20.' + end + + @number = number + 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] 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] cryptogram Value to be assigned + def cryptogram=(cryptogram) + if !cryptogram.nil? && cryptogram.to_s.length > 40 + fail ArgumentError, 'invalid value for "cryptogram", the character length must be smaller than or equal to 40.' + end + + @cryptogram = cryptogram + 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 + + # Custom attribute writer method with validation + # @param [Object] transaction_type Value to be assigned + def transaction_type=(transaction_type) + if !transaction_type.nil? && transaction_type.to_s.length > 1 + fail ArgumentError, 'invalid value for "transaction_type", the character length must be smaller than or equal to 1.' + end + + @transaction_type = transaction_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] storage_method Value to be assigned + def storage_method=(storage_method) + if !storage_method.nil? && storage_method.to_s.length > 3 + fail ArgumentError, 'invalid value for "storage_method", the character length must be smaller than or equal to 3.' + end + + @storage_method = storage_method + end + + # Custom attribute writer method with validation + # @param [Object] security_code Value to be assigned + def security_code=(security_code) + if !security_code.nil? && security_code.to_s.length > 4 + fail ArgumentError, 'invalid value for "security_code", the character length must be smaller than or equal to 4.' + end + + @security_code = security_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 && + number == o.number && + expiration_month == o.expiration_month && + expiration_year == o.expiration_year && + type == o.type && + cryptogram == o.cryptogram && + requestor_id == o.requestor_id && + transaction_type == o.transaction_type && + assurance_level == o.assurance_level && + storage_method == o.storage_method && + security_code == o.security_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 + [number, expiration_month, expiration_year, type, cryptogram, requestor_id, transaction_type, assurance_level, storage_method, security_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/ptsv2payments_point_of_sale_information.rb b/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb new file mode 100644 index 00000000..2eab7b15 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb @@ -0,0 +1,440 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsPointOfSaleInformation + # 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 + + # Description of this field is not available. + attr_accessor :terminal_serial_number + + # Identifier for an alternate terminal at your retail location. You define the value for this field. This field is supported only for MasterCard transactions on FDC Nashville Global. Use the _terminalID_ field to identify the main terminal at your retail location. If your retail location has multiple terminals, use this _alternateTerminalID_ field to identify the terminal used for the transaction. This field is a pass-through, which means that CyberSource does not check the value or modify the value in any way before sending it to the processor. + attr_accessor :lane_number + + # Indicates whether the card is present at the time of the transaction. Possible values: - **true**: Card is present. - **false**: Card is not present. + attr_accessor :card_present + + # Type of cardholder-activated terminal. Possible values: - 1: Automated dispensing machine - 2: Self-service terminal - 3: Limited amount terminal - 4: In-flight commerce (IFC) terminal - 5: Radio frequency device - 6: Mobile acceptance terminal - 7: Electronic cash register - 8: E-commerce device at your location - 9: Terminal or cash register that uses a dialup connection to connect to the transaction processing network * Applicable only for CTV for Payouts. + attr_accessor :cat_level + + # 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 + + # A one-digit code that identifies the capability of terminal to capture PINs. This code does not necessarily mean that a PIN was entered or is included in this message. For Payouts: This field is applicable for CtV. + attr_accessor :pin_entry_capability + + # Operating environment. Possible values: - 0: No terminal used or unknown environment. - 1: On merchant premises, attended. - 2: On merchant premises, unattended, or cardholder terminal. Examples: oil, kiosks, self-checkout, home computer, mobile telephone, personal digital assistant (PDA). Cardholder terminal is supported only for MasterCard transactions on **CyberSource through VisaNet**. - 3: Off merchant premises, attended. Examples: portable POS devices at trade shows, at service calls, or in taxis. - 4: Off merchant premises, unattended, or cardholder terminal. Examples: vending machines, home computer, mobile telephone, PDA. Cardholder terminal is supported only for MasterCard transactions on **CyberSource through VisaNet**. - 5: On premises of cardholder, unattended. - 9: Unknown delivery mode. - S: Electronic delivery of product. Examples: music, software, or eTickets that are downloaded over the internet. - T: Physical delivery of product. Examples: music or software that is delivered by mail or by a courier. This field is supported only for **American Express Direct** and **CyberSource through VisaNet**. **CyberSource through VisaNet** For MasterCard transactions, the only valid values are 2 and 4. + attr_accessor :operating_environment + + 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 + + # Card’s track 1 and 2 data. For all processors except FDMS Nashville, this value consists of one of the following: - Track 1 data - Track 2 data - Data for both tracks 1 and 2 For FDMS Nashville, this value consists of one of the following: - Track 1 data - Data for both tracks 1 and 2 Example: %B4111111111111111^SMITH/JOHN ^1612101976110000868000000?;4111111111111111=16121019761186800000? + attr_accessor :track_data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'terminal_id' => :'terminalId', + :'terminal_serial_number' => :'terminalSerialNumber', + :'lane_number' => :'laneNumber', + :'card_present' => :'cardPresent', + :'cat_level' => :'catLevel', + :'entry_mode' => :'entryMode', + :'terminal_capability' => :'terminalCapability', + :'pin_entry_capability' => :'pinEntryCapability', + :'operating_environment' => :'operatingEnvironment', + :'emv' => :'emv', + :'amex_capn_data' => :'amexCapnData', + :'track_data' => :'trackData' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'terminal_id' => :'String', + :'terminal_serial_number' => :'String', + :'lane_number' => :'String', + :'card_present' => :'BOOLEAN', + :'cat_level' => :'Integer', + :'entry_mode' => :'String', + :'terminal_capability' => :'Integer', + :'pin_entry_capability' => :'Integer', + :'operating_environment' => :'String', + :'emv' => :'Ptsv2paymentsPointOfSaleInformationEmv', + :'amex_capn_data' => :'String', + :'track_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?(:'terminalId') + self.terminal_id = attributes[:'terminalId'] + end + + if attributes.has_key?(:'terminalSerialNumber') + self.terminal_serial_number = attributes[:'terminalSerialNumber'] + end + + if attributes.has_key?(:'laneNumber') + self.lane_number = attributes[:'laneNumber'] + end + + if attributes.has_key?(:'cardPresent') + self.card_present = attributes[:'cardPresent'] + end + + if attributes.has_key?(:'catLevel') + self.cat_level = attributes[:'catLevel'] + end + + if attributes.has_key?(:'entryMode') + self.entry_mode = attributes[:'entryMode'] + end + + if attributes.has_key?(:'terminalCapability') + self.terminal_capability = attributes[:'terminalCapability'] + end + + if attributes.has_key?(:'pinEntryCapability') + self.pin_entry_capability = attributes[:'pinEntryCapability'] + end + + if attributes.has_key?(:'operatingEnvironment') + self.operating_environment = attributes[:'operatingEnvironment'] + end + + if attributes.has_key?(:'emv') + self.emv = attributes[:'emv'] + end + + if attributes.has_key?(:'amexCapnData') + self.amex_capn_data = attributes[:'amexCapnData'] + end + + if attributes.has_key?(:'trackData') + self.track_data = attributes[:'trackData'] + end + end + + # Show invalid properties 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 + + if !@lane_number.nil? && @lane_number.to_s.length > 8 + invalid_properties.push('invalid value for "lane_number", the character length must be smaller than or equal to 8.') + end + + if !@cat_level.nil? && @cat_level > 9 + invalid_properties.push('invalid value for "cat_level", must be smaller than or equal to 9.') + end + + if !@cat_level.nil? && @cat_level < 1 + invalid_properties.push('invalid value for "cat_level", must be greater than or equal to 1.') + end + + 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 + + if !@pin_entry_capability.nil? && @pin_entry_capability > 1 + invalid_properties.push('invalid value for "pin_entry_capability", must be smaller than or equal to 1.') + end + + if !@pin_entry_capability.nil? && @pin_entry_capability < 1 + invalid_properties.push('invalid value for "pin_entry_capability", must be greater than or equal to 1.') + end + + if !@operating_environment.nil? && @operating_environment.to_s.length > 1 + invalid_properties.push('invalid value for "operating_environment", the character length must be smaller than or equal to 1.') + end + + 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 !@terminal_id.nil? && @terminal_id.to_s.length > 8 + return false if !@lane_number.nil? && @lane_number.to_s.length > 8 + return false if !@cat_level.nil? && @cat_level > 9 + return false if !@cat_level.nil? && @cat_level < 1 + 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 + return false if !@pin_entry_capability.nil? && @pin_entry_capability > 1 + return false if !@pin_entry_capability.nil? && @pin_entry_capability < 1 + return false if !@operating_environment.nil? && @operating_environment.to_s.length > 1 + return false if !@amex_capn_data.nil? && @amex_capn_data.to_s.length > 12 + 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 + + # Custom attribute writer method with validation + # @param [Object] lane_number Value to be assigned + def lane_number=(lane_number) + if !lane_number.nil? && lane_number.to_s.length > 8 + fail ArgumentError, 'invalid value for "lane_number", the character length must be smaller than or equal to 8.' + end + + @lane_number = lane_number + end + + # Custom attribute writer method with validation + # @param [Object] cat_level Value to be assigned + def cat_level=(cat_level) + if !cat_level.nil? && cat_level > 9 + fail ArgumentError, 'invalid value for "cat_level", must be smaller than or equal to 9.' + end + + if !cat_level.nil? && cat_level < 1 + fail ArgumentError, 'invalid value for "cat_level", must be greater than or equal to 1.' + end + + @cat_level = cat_level + 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 + + # Custom attribute writer method with validation + # @param [Object] pin_entry_capability Value to be assigned + def pin_entry_capability=(pin_entry_capability) + if !pin_entry_capability.nil? && pin_entry_capability > 1 + fail ArgumentError, 'invalid value for "pin_entry_capability", must be smaller than or equal to 1.' + end + + if !pin_entry_capability.nil? && pin_entry_capability < 1 + fail ArgumentError, 'invalid value for "pin_entry_capability", must be greater than or equal to 1.' + end + + @pin_entry_capability = pin_entry_capability + end + + # Custom attribute writer method with validation + # @param [Object] operating_environment Value to be assigned + def operating_environment=(operating_environment) + if !operating_environment.nil? && operating_environment.to_s.length > 1 + fail ArgumentError, 'invalid value for "operating_environment", the character length must be smaller than or equal to 1.' + end + + @operating_environment = operating_environment + 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 && + terminal_id == o.terminal_id && + terminal_serial_number == o.terminal_serial_number && + lane_number == o.lane_number && + card_present == o.card_present && + cat_level == o.cat_level && + entry_mode == o.entry_mode && + terminal_capability == o.terminal_capability && + pin_entry_capability == o.pin_entry_capability && + operating_environment == o.operating_environment && + emv == o.emv && + amex_capn_data == o.amex_capn_data && + track_data == o.track_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 + [terminal_id, terminal_serial_number, lane_number, card_present, cat_level, entry_mode, terminal_capability, pin_entry_capability, operating_environment, emv, amex_capn_data, track_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/ptsv2payments_point_of_sale_information_emv.rb b/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information_emv.rb new file mode 100644 index 00000000..72bda6c4 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information_emv.rb @@ -0,0 +1,256 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsPointOfSaleInformationEmv + # 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 + + # Method that was used to verify the cardholder's identity. Possible values: - **0**: No verification - **1**: Signature This field is supported only on **American Express Direct**. + attr_accessor :cardholder_verification_method + + # Number assigned to a specific card when two or more cards are associated with the same primary account number. This value enables issuers to distinguish among multiple cards that are linked to the same account. This value can also act as a tracking tool when reissuing cards. When this value is available, it is provided by the chip reader. When the chip reader does not provide this value, do not include this field in your request. + attr_accessor :card_sequence_number + + # Indicates whether a fallback method was used to enter credit card information into the POS terminal. When a technical problem prevents a successful exchange of information between a chip card and a chip-capable terminal: 1. Swipe the card or key the credit card information into the POS terminal. 2. Use the pos_entry_mode field to indicate whether the information was swiped or keyed. This field is supported only on **Chase Paymentech Solutions** and **GPN**. + attr_accessor :fallback + + # Reason for the EMV fallback transaction. An EMV fallback transaction occurs when an EMV transaction fails for one of these reasons: - Technical failure: the EMV terminal or EMV card cannot read and process chip data. - Empty candidate list failure: the EMV terminal does not have any applications in common with the EMV card. EMV terminals are coded to determine whether the terminal and EMV card have any applications in common. EMV terminals provide this information to you. Possible values: - **1**: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal either used information from a successful chip read or it was not a chip transaction. - **2**: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal was an EMV fallback transaction because the attempted chip read was unsuccessful. This field is supported only on **GPN**. + attr_accessor :fallback_condition + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'tags' => :'tags', + :'cardholder_verification_method' => :'cardholderVerificationMethod', + :'card_sequence_number' => :'cardSequenceNumber', + :'fallback' => :'fallback', + :'fallback_condition' => :'fallbackCondition' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'tags' => :'String', + :'cardholder_verification_method' => :'Float', + :'card_sequence_number' => :'String', + :'fallback' => :'BOOLEAN', + :'fallback_condition' => :'Float' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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 + + if attributes.has_key?(:'cardholderVerificationMethod') + self.cardholder_verification_method = attributes[:'cardholderVerificationMethod'] + end + + if attributes.has_key?(:'cardSequenceNumber') + self.card_sequence_number = attributes[:'cardSequenceNumber'] + end + + if attributes.has_key?(:'fallback') + self.fallback = attributes[:'fallback'] + else + self.fallback = false + end + + if attributes.has_key?(:'fallbackCondition') + self.fallback_condition = attributes[:'fallbackCondition'] + end + end + + # Show invalid properties 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 + + if !@card_sequence_number.nil? && @card_sequence_number.to_s.length > 3 + invalid_properties.push('invalid value for "card_sequence_number", 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 !@tags.nil? && @tags.to_s.length > 1998 + return false if !@card_sequence_number.nil? && @card_sequence_number.to_s.length > 3 + 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 + + # Custom attribute writer method with validation + # @param [Object] card_sequence_number Value to be assigned + def card_sequence_number=(card_sequence_number) + if !card_sequence_number.nil? && card_sequence_number.to_s.length > 3 + fail ArgumentError, 'invalid value for "card_sequence_number", the character length must be smaller than or equal to 3.' + end + + @card_sequence_number = card_sequence_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 && + tags == o.tags && + cardholder_verification_method == o.cardholder_verification_method && + card_sequence_number == o.card_sequence_number && + fallback == o.fallback && + fallback_condition == o.fallback_condition + end + + # @see the `==` method + # @param [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, cardholder_verification_method, card_sequence_number, fallback, fallback_condition].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb b/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb new file mode 100644 index 00000000..870bcebe --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb @@ -0,0 +1,432 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsProcessingInformation + # Flag that specifies whether to also include capture service in the submitted request or not. + attr_accessor :capture + + # Value that identifies the processor/acquirer to use for the transaction. This value is supported only for **CyberSource through VisaNet**. + attr_accessor :processor_id + + # Description of this field is not available. + attr_accessor :business_application_id + + # 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 + + # 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 + + # Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). + attr_accessor :reconciliation_id + + # Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. + attr_accessor :link_id + + # Set this field to 3 to indicate that the request includes Level III data. + attr_accessor :purchase_level + + # Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. + attr_accessor :report_group + + # Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. + attr_accessor :visa_checkout_id + + attr_accessor :issuer + + attr_accessor :authorization_options + + attr_accessor :capture_options + + attr_accessor :recurring_options + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'capture' => :'capture', + :'processor_id' => :'processorId', + :'business_application_id' => :'businessApplicationId', + :'commerce_indicator' => :'commerceIndicator', + :'payment_solution' => :'paymentSolution', + :'reconciliation_id' => :'reconciliationId', + :'link_id' => :'linkId', + :'purchase_level' => :'purchaseLevel', + :'report_group' => :'reportGroup', + :'visa_checkout_id' => :'visaCheckoutId', + :'issuer' => :'issuer', + :'authorization_options' => :'authorizationOptions', + :'capture_options' => :'captureOptions', + :'recurring_options' => :'recurringOptions' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'capture' => :'BOOLEAN', + :'processor_id' => :'String', + :'business_application_id' => :'String', + :'commerce_indicator' => :'String', + :'payment_solution' => :'String', + :'reconciliation_id' => :'String', + :'link_id' => :'String', + :'purchase_level' => :'String', + :'report_group' => :'String', + :'visa_checkout_id' => :'String', + :'issuer' => :'Ptsv2paymentsProcessingInformationIssuer', + :'authorization_options' => :'Ptsv2paymentsProcessingInformationAuthorizationOptions', + :'capture_options' => :'Ptsv2paymentsProcessingInformationCaptureOptions', + :'recurring_options' => :'Ptsv2paymentsProcessingInformationRecurringOptions' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'capture') + self.capture = attributes[:'capture'] + else + self.capture = false + end + + if attributes.has_key?(:'processorId') + self.processor_id = attributes[:'processorId'] + end + + if attributes.has_key?(:'businessApplicationId') + self.business_application_id = attributes[:'businessApplicationId'] + end + + if attributes.has_key?(:'commerceIndicator') + self.commerce_indicator = attributes[:'commerceIndicator'] + end + + if attributes.has_key?(:'paymentSolution') + self.payment_solution = attributes[:'paymentSolution'] + end + + if attributes.has_key?(:'reconciliationId') + self.reconciliation_id = attributes[:'reconciliationId'] + end + + if attributes.has_key?(:'linkId') + self.link_id = attributes[:'linkId'] + end + + if attributes.has_key?(:'purchaseLevel') + self.purchase_level = attributes[:'purchaseLevel'] + end + + if attributes.has_key?(:'reportGroup') + self.report_group = attributes[:'reportGroup'] + end + + if attributes.has_key?(:'visaCheckoutId') + self.visa_checkout_id = attributes[:'visaCheckoutId'] + end + + if attributes.has_key?(:'issuer') + self.issuer = attributes[:'issuer'] + end + + if attributes.has_key?(:'authorizationOptions') + self.authorization_options = attributes[:'authorizationOptions'] + end + + if attributes.has_key?(:'captureOptions') + self.capture_options = attributes[:'captureOptions'] + end + + if attributes.has_key?(:'recurringOptions') + self.recurring_options = attributes[:'recurringOptions'] + end + end + + # Show invalid properties 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 !@processor_id.nil? && @processor_id.to_s.length > 3 + invalid_properties.push('invalid value for "processor_id", the character length must be smaller than or equal to 3.') + 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 + + 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 !@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 + + if !@link_id.nil? && @link_id.to_s.length > 26 + invalid_properties.push('invalid value for "link_id", the character length must be smaller than or equal to 26.') + end + + if !@purchase_level.nil? && @purchase_level.to_s.length > 1 + invalid_properties.push('invalid value for "purchase_level", the character length must be smaller than or equal to 1.') + end + + if !@report_group.nil? && @report_group.to_s.length > 25 + invalid_properties.push('invalid value for "report_group", the character length must be smaller than or equal to 25.') + end + + if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 + invalid_properties.push('invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.') + 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 !@processor_id.nil? && @processor_id.to_s.length > 3 + return false if !@commerce_indicator.nil? && @commerce_indicator.to_s.length > 20 + return false if !@payment_solution.nil? && @payment_solution.to_s.length > 12 + return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + return false if !@link_id.nil? && @link_id.to_s.length > 26 + return false if !@purchase_level.nil? && @purchase_level.to_s.length > 1 + return false if !@report_group.nil? && @report_group.to_s.length > 25 + return false if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 + true + end + + # Custom attribute writer method with validation + # @param [Object] processor_id Value to be assigned + def processor_id=(processor_id) + if !processor_id.nil? && processor_id.to_s.length > 3 + fail ArgumentError, 'invalid value for "processor_id", the character length must be smaller than or equal to 3.' + end + + @processor_id = processor_id + 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 + + # 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] 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 + + # Custom attribute writer method with validation + # @param [Object] link_id Value to be assigned + def link_id=(link_id) + if !link_id.nil? && link_id.to_s.length > 26 + fail ArgumentError, 'invalid value for "link_id", the character length must be smaller than or equal to 26.' + end + + @link_id = link_id + end + + # Custom attribute writer method with validation + # @param [Object] purchase_level Value to be assigned + def purchase_level=(purchase_level) + if !purchase_level.nil? && purchase_level.to_s.length > 1 + fail ArgumentError, 'invalid value for "purchase_level", the character length must be smaller than or equal to 1.' + end + + @purchase_level = purchase_level + end + + # Custom attribute writer method with validation + # @param [Object] report_group Value to be assigned + def report_group=(report_group) + if !report_group.nil? && report_group.to_s.length > 25 + fail ArgumentError, 'invalid value for "report_group", the character length must be smaller than or equal to 25.' + end + + @report_group = report_group + end + + # Custom attribute writer method with validation + # @param [Object] visa_checkout_id Value to be assigned + def visa_checkout_id=(visa_checkout_id) + if !visa_checkout_id.nil? && visa_checkout_id.to_s.length > 48 + fail ArgumentError, 'invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.' + end + + @visa_checkout_id = visa_checkout_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 && + capture == o.capture && + processor_id == o.processor_id && + business_application_id == o.business_application_id && + commerce_indicator == o.commerce_indicator && + payment_solution == o.payment_solution && + reconciliation_id == o.reconciliation_id && + link_id == o.link_id && + purchase_level == o.purchase_level && + report_group == o.report_group && + visa_checkout_id == o.visa_checkout_id && + issuer == o.issuer && + authorization_options == o.authorization_options && + capture_options == o.capture_options && + recurring_options == o.recurring_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 + [capture, processor_id, business_application_id, commerce_indicator, payment_solution, reconciliation_id, link_id, purchase_level, report_group, visa_checkout_id, issuer, authorization_options, capture_options, recurring_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/ptsv2payments_processing_information_authorization_options.rb b/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options.rb new file mode 100644 index 00000000..12b8bc6c --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options.rb @@ -0,0 +1,361 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsProcessingInformationAuthorizationOptions + # 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 + + # Authorization code. **Forced Capture** Use this field to send the authorization code you received from a payment that you authorized outside the CyberSource system. **Verbal Authorization** Use this field in CAPTURE API to send the verbally received authorization code. For processor-specific information, see the auth_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :verbal_auth_code + + # Transaction ID (TID). + attr_accessor :verbal_auth_transaction_id + + # Flag that specifies the purpose of the authorization. Possible values: - **0**: Preauthorization - **1**: Final authorization For processor-specific information, see the auth_indicator field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :auth_indicator + + # Flag that indicates whether the transaction is enabled for partial authorization or not. When your request includes this field, this value overrides the information in your CyberSource account. For processor-specific information, see the auth_partial_auth_indicator field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :partial_auth_indicator + + # Flag that indicates whether to return balance information. + attr_accessor :balance_inquiry + + # Flag that indicates whether to allow the capture service to run even when the payment receives an AVS decline. + attr_accessor :ignore_avs_result + + # An array of AVS flags that cause the reply flag to be returned. `Important` To receive declines for the AVS code N, include the value N in the array. + attr_accessor :decline_avs_flags + + # Flag that indicates whether to allow the capture service to run even when the payment receives a CVN decline. + attr_accessor :ignore_cv_result + + attr_accessor :initiator + + 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 + { + :'auth_type' => :'authType', + :'verbal_auth_code' => :'verbalAuthCode', + :'verbal_auth_transaction_id' => :'verbalAuthTransactionId', + :'auth_indicator' => :'authIndicator', + :'partial_auth_indicator' => :'partialAuthIndicator', + :'balance_inquiry' => :'balanceInquiry', + :'ignore_avs_result' => :'ignoreAvsResult', + :'decline_avs_flags' => :'declineAvsFlags', + :'ignore_cv_result' => :'ignoreCvResult', + :'initiator' => :'initiator' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'auth_type' => :'String', + :'verbal_auth_code' => :'String', + :'verbal_auth_transaction_id' => :'String', + :'auth_indicator' => :'String', + :'partial_auth_indicator' => :'BOOLEAN', + :'balance_inquiry' => :'BOOLEAN', + :'ignore_avs_result' => :'BOOLEAN', + :'decline_avs_flags' => :'Array', + :'ignore_cv_result' => :'BOOLEAN', + :'initiator' => :'Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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 + + if attributes.has_key?(:'verbalAuthCode') + self.verbal_auth_code = attributes[:'verbalAuthCode'] + end + + if attributes.has_key?(:'verbalAuthTransactionId') + self.verbal_auth_transaction_id = attributes[:'verbalAuthTransactionId'] + end + + if attributes.has_key?(:'authIndicator') + self.auth_indicator = attributes[:'authIndicator'] + end + + if attributes.has_key?(:'partialAuthIndicator') + self.partial_auth_indicator = attributes[:'partialAuthIndicator'] + end + + if attributes.has_key?(:'balanceInquiry') + self.balance_inquiry = attributes[:'balanceInquiry'] + end + + if attributes.has_key?(:'ignoreAvsResult') + self.ignore_avs_result = attributes[:'ignoreAvsResult'] + else + self.ignore_avs_result = false + end + + if attributes.has_key?(:'declineAvsFlags') + if (value = attributes[:'declineAvsFlags']).is_a?(Array) + self.decline_avs_flags = value + end + end + + if attributes.has_key?(:'ignoreCvResult') + self.ignore_cv_result = attributes[:'ignoreCvResult'] + else + self.ignore_cv_result = false + end + + if attributes.has_key?(:'initiator') + self.initiator = attributes[:'initiator'] + end + end + + # Show invalid properties 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 + + if !@verbal_auth_code.nil? && @verbal_auth_code.to_s.length > 7 + invalid_properties.push('invalid value for "verbal_auth_code", the character length must be smaller than or equal to 7.') + end + + if !@verbal_auth_transaction_id.nil? && @verbal_auth_transaction_id.to_s.length > 15 + invalid_properties.push('invalid value for "verbal_auth_transaction_id", the character length must be smaller than or equal to 15.') + end + + if !@auth_indicator.nil? && @auth_indicator.to_s.length > 1 + invalid_properties.push('invalid value for "auth_indicator", 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 !@auth_type.nil? && @auth_type.to_s.length > 15 + return false if !@verbal_auth_code.nil? && @verbal_auth_code.to_s.length > 7 + return false if !@verbal_auth_transaction_id.nil? && @verbal_auth_transaction_id.to_s.length > 15 + return false if !@auth_indicator.nil? && @auth_indicator.to_s.length > 1 + 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 + + # Custom attribute writer method with validation + # @param [Object] verbal_auth_code Value to be assigned + def verbal_auth_code=(verbal_auth_code) + if !verbal_auth_code.nil? && verbal_auth_code.to_s.length > 7 + fail ArgumentError, 'invalid value for "verbal_auth_code", the character length must be smaller than or equal to 7.' + end + + @verbal_auth_code = verbal_auth_code + end + + # Custom attribute writer method with validation + # @param [Object] verbal_auth_transaction_id Value to be assigned + def verbal_auth_transaction_id=(verbal_auth_transaction_id) + if !verbal_auth_transaction_id.nil? && verbal_auth_transaction_id.to_s.length > 15 + fail ArgumentError, 'invalid value for "verbal_auth_transaction_id", the character length must be smaller than or equal to 15.' + end + + @verbal_auth_transaction_id = verbal_auth_transaction_id + end + + # Custom attribute writer method with validation + # @param [Object] auth_indicator Value to be assigned + def auth_indicator=(auth_indicator) + if !auth_indicator.nil? && auth_indicator.to_s.length > 1 + fail ArgumentError, 'invalid value for "auth_indicator", the character length must be smaller than or equal to 1.' + end + + @auth_indicator = auth_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 && + auth_type == o.auth_type && + verbal_auth_code == o.verbal_auth_code && + verbal_auth_transaction_id == o.verbal_auth_transaction_id && + auth_indicator == o.auth_indicator && + partial_auth_indicator == o.partial_auth_indicator && + balance_inquiry == o.balance_inquiry && + ignore_avs_result == o.ignore_avs_result && + decline_avs_flags == o.decline_avs_flags && + ignore_cv_result == o.ignore_cv_result && + initiator == o.initiator + end + + # @see the `==` method + # @param [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, verbal_auth_code, verbal_auth_transaction_id, auth_indicator, partial_auth_indicator, balance_inquiry, ignore_avs_result, decline_avs_flags, ignore_cv_result, initiator].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options_initiator.rb b/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options_initiator.rb new file mode 100644 index 00000000..15b5a202 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options_initiator.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 + class Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator + # This field indicates whether the transaction is a merchant-initiated transaction or customer-initiated transaction. + attr_accessor :type + + # Flag that indicates whether merchant is intend to use this transaction to store payment credential for follow-up merchant-initiated transactions or not. + attr_accessor :credential_stored_on_file + + # Flag that indicates whether merchant is intend to use this transaction to store payment credential for follow-up merchant-initiated transactions or not. + attr_accessor :stored_credential_used + + attr_accessor :merchant_initiated_transaction + + 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', + :'credential_stored_on_file' => :'credentialStoredOnFile', + :'stored_credential_used' => :'storedCredentialUsed', + :'merchant_initiated_transaction' => :'merchantInitiatedTransaction' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'type' => :'String', + :'credential_stored_on_file' => :'BOOLEAN', + :'stored_credential_used' => :'BOOLEAN', + :'merchant_initiated_transaction' => :'Ptsv2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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?(:'credentialStoredOnFile') + self.credential_stored_on_file = attributes[:'credentialStoredOnFile'] + end + + if attributes.has_key?(:'storedCredentialUsed') + self.stored_credential_used = attributes[:'storedCredentialUsed'] + end + + if attributes.has_key?(:'merchantInitiatedTransaction') + self.merchant_initiated_transaction = attributes[:'merchantInitiatedTransaction'] + end + end + + # Show invalid properties 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? + type_validator = EnumAttributeValidator.new('String', ['customer', 'merchant']) + return false unless type_validator.valid?(@type) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ['customer', 'merchant']) + unless validator.valid?(type) + fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.' + 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 && + type == o.type && + credential_stored_on_file == o.credential_stored_on_file && + stored_credential_used == o.stored_credential_used && + merchant_initiated_transaction == o.merchant_initiated_transaction + end + + # @see the `==` method + # @param [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, credential_stored_on_file, stored_credential_used, merchant_initiated_transaction].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options_merchant_initiated_transaction.rb b/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options_merchant_initiated_transaction.rb new file mode 100644 index 00000000..404e98fb --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options_merchant_initiated_transaction.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 Ptsv2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction + # Reason for the merchant-initiated transaction. Possible values: - **1**: Resubmission - **2**: Delayed charge - **3**: Reauthorization for split shipment - **4**: No show - **5**: Account top up This field is not required for installment payments or recurring payments or when _reAuth.first_ is true. It is required for all other merchant-initiated transactions. This field is supported only for Visa transactions on CyberSource through VisaNet. + attr_accessor :reason + + # Transaction identifier that was returned in the payment response field _processorInformation.transactionID_ in the reply message for either the original merchant initiated payment in the series or the previous merchant-initiated payment in the series.

If the current payment request includes a token instead of an account number, the following time limits apply for the value of this field: For a **resubmission**, the transaction ID must be less than 14 days old. For a **delayed charge** or **reauthorization**, the transaction ID must be less than 30 days old. The value for this field does not correspond to any data in the TC 33 capture file. This field is supported only for Visa transactions on CyberSource through VisaNet. + attr_accessor :previous_transaction_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reason' => :'reason', + :'previous_transaction_id' => :'previousTransactionId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'reason' => :'String', + :'previous_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?(:'reason') + self.reason = attributes[:'reason'] + end + + if attributes.has_key?(:'previousTransactionId') + self.previous_transaction_id = attributes[:'previousTransactionId'] + end + end + + # Show invalid properties 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 !@reason.nil? && @reason.to_s.length > 1 + invalid_properties.push('invalid value for "reason", the character length must be smaller than or equal to 1.') + end + + if !@previous_transaction_id.nil? && @previous_transaction_id.to_s.length > 15 + invalid_properties.push('invalid value for "previous_transaction_id", 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 !@reason.nil? && @reason.to_s.length > 1 + return false if !@previous_transaction_id.nil? && @previous_transaction_id.to_s.length > 15 + true + end + + # Custom attribute writer method with validation + # @param [Object] reason Value to be assigned + def reason=(reason) + if !reason.nil? && reason.to_s.length > 1 + fail ArgumentError, 'invalid value for "reason", the character length must be smaller than or equal to 1.' + end + + @reason = reason + end + + # Custom attribute writer method with validation + # @param [Object] previous_transaction_id Value to be assigned + def previous_transaction_id=(previous_transaction_id) + if !previous_transaction_id.nil? && previous_transaction_id.to_s.length > 15 + fail ArgumentError, 'invalid value for "previous_transaction_id", the character length must be smaller than or equal to 15.' + end + + @previous_transaction_id = previous_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 && + reason == o.reason && + previous_transaction_id == o.previous_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 + [reason, previous_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/ptsv2payments_processing_information_capture_options.rb b/lib/cybersource_rest_client/models/ptsv2payments_processing_information_capture_options.rb new file mode 100644 index 00000000..9974f1d3 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_processing_information_capture_options.rb @@ -0,0 +1,267 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsProcessingInformationCaptureOptions + # Capture number when requesting multiple partial captures for one payment. Used along with _totalCaptureCount_ to track which capture is being processed. For example, the second of five captures would be passed to CyberSource as: - _captureSequenceNumber_ = 2, and - _totalCaptureCount_ = 5 + attr_accessor :capture_sequence_number + + # Total number of captures when requesting multiple partial captures for one payment. Used along with _captureSequenceNumber_ which capture is being processed. For example, the second of five captures would be passed to CyberSource as: - _captureSequenceNumber_ = 2, and - _totalCaptureCount_ = 5 + attr_accessor :total_capture_count + + # Date on which you want the capture to occur. This field is supported only for **CyberSource through VisaNet**. `Format: MMDD` + attr_accessor :date_to_capture + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'capture_sequence_number' => :'captureSequenceNumber', + :'total_capture_count' => :'totalCaptureCount', + :'date_to_capture' => :'dateToCapture' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'capture_sequence_number' => :'Float', + :'total_capture_count' => :'Float', + :'date_to_capture' => :'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?(:'captureSequenceNumber') + self.capture_sequence_number = attributes[:'captureSequenceNumber'] + end + + if attributes.has_key?(:'totalCaptureCount') + self.total_capture_count = attributes[:'totalCaptureCount'] + end + + if attributes.has_key?(:'dateToCapture') + self.date_to_capture = attributes[:'dateToCapture'] + end + end + + # Show invalid properties 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 !@capture_sequence_number.nil? && @capture_sequence_number > 99 + invalid_properties.push('invalid value for "capture_sequence_number", must be smaller than or equal to 99.') + end + + if !@capture_sequence_number.nil? && @capture_sequence_number < 1 + invalid_properties.push('invalid value for "capture_sequence_number", must be greater than or equal to 1.') + end + + if !@total_capture_count.nil? && @total_capture_count > 99 + invalid_properties.push('invalid value for "total_capture_count", must be smaller than or equal to 99.') + end + + if !@total_capture_count.nil? && @total_capture_count < 1 + invalid_properties.push('invalid value for "total_capture_count", must be greater than or equal to 1.') + end + + if !@date_to_capture.nil? && @date_to_capture.to_s.length > 4 + invalid_properties.push('invalid value for "date_to_capture", 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 !@capture_sequence_number.nil? && @capture_sequence_number > 99 + return false if !@capture_sequence_number.nil? && @capture_sequence_number < 1 + return false if !@total_capture_count.nil? && @total_capture_count > 99 + return false if !@total_capture_count.nil? && @total_capture_count < 1 + return false if !@date_to_capture.nil? && @date_to_capture.to_s.length > 4 + true + end + + # Custom attribute writer method with validation + # @param [Object] capture_sequence_number Value to be assigned + def capture_sequence_number=(capture_sequence_number) + if !capture_sequence_number.nil? && capture_sequence_number > 99 + fail ArgumentError, 'invalid value for "capture_sequence_number", must be smaller than or equal to 99.' + end + + if !capture_sequence_number.nil? && capture_sequence_number < 1 + fail ArgumentError, 'invalid value for "capture_sequence_number", must be greater than or equal to 1.' + end + + @capture_sequence_number = capture_sequence_number + end + + # Custom attribute writer method with validation + # @param [Object] total_capture_count Value to be assigned + def total_capture_count=(total_capture_count) + if !total_capture_count.nil? && total_capture_count > 99 + fail ArgumentError, 'invalid value for "total_capture_count", must be smaller than or equal to 99.' + end + + if !total_capture_count.nil? && total_capture_count < 1 + fail ArgumentError, 'invalid value for "total_capture_count", must be greater than or equal to 1.' + end + + @total_capture_count = total_capture_count + end + + # Custom attribute writer method with validation + # @param [Object] date_to_capture Value to be assigned + def date_to_capture=(date_to_capture) + if !date_to_capture.nil? && date_to_capture.to_s.length > 4 + fail ArgumentError, 'invalid value for "date_to_capture", the character length must be smaller than or equal to 4.' + end + + @date_to_capture = date_to_capture + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + capture_sequence_number == o.capture_sequence_number && + total_capture_count == o.total_capture_count && + date_to_capture == o.date_to_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 + [capture_sequence_number, total_capture_count, date_to_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/ptsv2payments_processing_information_issuer.rb b/lib/cybersource_rest_client/models/ptsv2payments_processing_information_issuer.rb new file mode 100644 index 00000000..d4598133 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_processing_information_issuer.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 Ptsv2paymentsProcessingInformationIssuer + # 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 + { + :'discretionary_data' => :'discretionaryData' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'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?(:'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 !@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 !@discretionary_data.nil? && @discretionary_data.to_s.length > 255 + true + 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 && + 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 + [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/ptsv2payments_processing_information_recurring_options.rb b/lib/cybersource_rest_client/models/ptsv2payments_processing_information_recurring_options.rb new file mode 100644 index 00000000..56624b63 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_processing_information_recurring_options.rb @@ -0,0 +1,198 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsProcessingInformationRecurringOptions + # Flag that indicates whether this is a payment towards an existing contractual loan. + attr_accessor :loan_payment + + # Flag that indicates whether this transaction is the first in a series of recurring payments. This field is supported only for **Atos**, **FDC Nashville Global**, and **OmniPay Direct**. + attr_accessor :first_recurring_payment + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'loan_payment' => :'loanPayment', + :'first_recurring_payment' => :'firstRecurringPayment' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'loan_payment' => :'BOOLEAN', + :'first_recurring_payment' => :'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?(:'loanPayment') + self.loan_payment = attributes[:'loanPayment'] + else + self.loan_payment = false + end + + if attributes.has_key?(:'firstRecurringPayment') + self.first_recurring_payment = attributes[:'firstRecurringPayment'] + else + self.first_recurring_payment = false + end + end + + # Show invalid properties 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 && + loan_payment == o.loan_payment && + first_recurring_payment == o.first_recurring_payment + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [loan_payment, first_recurring_payment].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payments_recipient_information.rb b/lib/cybersource_rest_client/models/ptsv2payments_recipient_information.rb new file mode 100644 index 00000000..b88e65c6 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payments_recipient_information.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 Ptsv2paymentsRecipientInformation + # Identifier for the recipient’s account. Use the first six digits and last four digits of the recipient’s account number. This field is a pass-through, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. + attr_accessor :account_id + + # Recipient’s last name. This field is a passthrough, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. + attr_accessor :last_name + + # Partial postal code for the recipient’s address. For example, if the postal code is **NN5 7SG**, the value for this field should be the first part of the postal code: **NN5**. This field is a pass-through, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. + attr_accessor :postal_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'account_id' => :'accountId', + :'last_name' => :'lastName', + :'postal_code' => :'postalCode' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'account_id' => :'String', + :'last_name' => :'String', + :'postal_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?(:'accountId') + self.account_id = attributes[:'accountId'] + end + + if attributes.has_key?(:'lastName') + self.last_name = attributes[:'lastName'] + end + + if attributes.has_key?(:'postalCode') + self.postal_code = attributes[:'postalCode'] + end + end + + # Show invalid properties 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_id.nil? && @account_id.to_s.length > 10 + invalid_properties.push('invalid value for "account_id", the character length must be smaller than or equal to 10.') + end + + if !@last_name.nil? && @last_name.to_s.length > 6 + invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 6.') + end + + if !@postal_code.nil? && @postal_code.to_s.length > 6 + invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 6.') + 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_id.nil? && @account_id.to_s.length > 10 + return false if !@last_name.nil? && @last_name.to_s.length > 6 + return false if !@postal_code.nil? && @postal_code.to_s.length > 6 + true + end + + # Custom attribute writer method with validation + # @param [Object] account_id Value to be assigned + def account_id=(account_id) + if !account_id.nil? && account_id.to_s.length > 10 + fail ArgumentError, 'invalid value for "account_id", the character length must be smaller than or equal to 10.' + end + + @account_id = account_id + 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 > 6 + fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 6.' + end + + @last_name = last_name + 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 > 6 + fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 6.' + end + + @postal_code = postal_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 && + account_id == o.account_id && + last_name == o.last_name && + postal_code == o.postal_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 + [account_id, last_name, postal_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/ptsv2paymentsidcaptures_aggregator_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information.rb new file mode 100644 index 00000000..a97b7fcc --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_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 Ptsv2paymentsidcapturesAggregatorInformation + # Value that identifies you as a payment aggregator. Get this value from the processor. For processor-specific information, see the aggregator_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 :aggregator_id + + # Your payment aggregator business name. For processor-specific information, see the aggregator_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 :name + + attr_accessor :sub_merchant + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'aggregator_id' => :'aggregatorId', + :'name' => :'name', + :'sub_merchant' => :'subMerchant' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'aggregator_id' => :'String', + :'name' => :'String', + :'sub_merchant' => :'Ptsv2paymentsidcapturesAggregatorInformationSubMerchant' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'aggregatorId') + self.aggregator_id = attributes[:'aggregatorId'] + end + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'subMerchant') + self.sub_merchant = attributes[:'subMerchant'] + end + end + + # Show invalid properties 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 !@aggregator_id.nil? && @aggregator_id.to_s.length > 20 + invalid_properties.push('invalid value for "aggregator_id", the character length must be smaller than or equal to 20.') + end + + if !@name.nil? && @name.to_s.length > 37 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 37.') + 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 !@aggregator_id.nil? && @aggregator_id.to_s.length > 20 + return false if !@name.nil? && @name.to_s.length > 37 + true + end + + # Custom attribute writer method with validation + # @param [Object] aggregator_id Value to be assigned + def aggregator_id=(aggregator_id) + if !aggregator_id.nil? && aggregator_id.to_s.length > 20 + fail ArgumentError, 'invalid value for "aggregator_id", the character length must be smaller than or equal to 20.' + end + + @aggregator_id = aggregator_id + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if !name.nil? && name.to_s.length > 37 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 37.' + 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 && + aggregator_id == o.aggregator_id && + name == o.name && + sub_merchant == o.sub_merchant + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [aggregator_id, name, sub_merchant].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant.rb new file mode 100644 index 00000000..bd6fc64a --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant.rb @@ -0,0 +1,374 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsidcapturesAggregatorInformationSubMerchant + # Sub-merchant’s business name. + attr_accessor :name + + # First line of the sub-merchant’s street address. + attr_accessor :address1 + + # Sub-merchant’s city. + attr_accessor :locality + + # Sub-merchant’s state or province. Use the State, Province, and Territory Codes for the United States and Canada. + attr_accessor :administrative_area + + # Partial postal code for the sub-merchant’s address. + attr_accessor :postal_code + + # Sub-merchant’s country. Use the two-character ISO Standard Country Codes. + attr_accessor :country + + # Sub-merchant’s email address. **Maximum length for processors** - American Express Direct: 40 - CyberSource through VisaNet: 40 - FDC Compass: 40 - FDC Nashville Global: 19 + attr_accessor :email + + # Sub-merchant’s telephone number. **Maximum length for procesors** - American Express Direct: 20 - CyberSource through VisaNet: 20 - FDC Compass: 13 - FDC Nashville Global: 10 + attr_accessor :phone_number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'address1' => :'address1', + :'locality' => :'locality', + :'administrative_area' => :'administrativeArea', + :'postal_code' => :'postalCode', + :'country' => :'country', + :'email' => :'email', + :'phone_number' => :'phoneNumber' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'name' => :'String', + :'address1' => :'String', + :'locality' => :'String', + :'administrative_area' => :'String', + :'postal_code' => :'String', + :'country' => :'String', + :'email' => :'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?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'address1') + self.address1 = attributes[:'address1'] + 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?(:'country') + self.country = attributes[:'country'] + end + + if attributes.has_key?(:'email') + self.email = attributes[:'email'] + 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 !@name.nil? && @name.to_s.length > 37 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 37.') + end + + if !@address1.nil? && @address1.to_s.length > 38 + invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 38.') + end + + if !@locality.nil? && @locality.to_s.length > 21 + invalid_properties.push('invalid value for "locality", the character length must be smaller than or equal to 21.') + end + + if !@administrative_area.nil? && @administrative_area.to_s.length > 3 + invalid_properties.push('invalid value for "administrative_area", the character length must be smaller than or equal to 3.') + end + + if !@postal_code.nil? && @postal_code.to_s.length > 15 + invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 15.') + end + + 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 !@email.nil? && @email.to_s.length > 40 + invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 40.') + end + + if !@phone_number.nil? && @phone_number.to_s.length > 20 + invalid_properties.push('invalid value for "phone_number", 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 !@name.nil? && @name.to_s.length > 37 + return false if !@address1.nil? && @address1.to_s.length > 38 + return false if !@locality.nil? && @locality.to_s.length > 21 + return false if !@administrative_area.nil? && @administrative_area.to_s.length > 3 + return false if !@postal_code.nil? && @postal_code.to_s.length > 15 + return false if !@country.nil? && @country.to_s.length > 3 + return false if !@email.nil? && @email.to_s.length > 40 + return false if !@phone_number.nil? && @phone_number.to_s.length > 20 + 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 > 37 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 37.' + end + + @name = 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 > 38 + fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 38.' + end + + @address1 = address1 + end + + # Custom attribute writer method with validation + # @param [Object] locality Value to be assigned + def locality=(locality) + if !locality.nil? && locality.to_s.length > 21 + fail ArgumentError, 'invalid value for "locality", the character length must be smaller than or equal to 21.' + 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 > 3 + fail ArgumentError, 'invalid value for "administrative_area", the character length must be smaller than or equal to 3.' + 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 > 15 + fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 15.' + end + + @postal_code = postal_code + 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] email Value to be assigned + def email=(email) + if !email.nil? && email.to_s.length > 40 + fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 40.' + end + + @email = email + 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 > 20 + fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 20.' + 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 && + name == o.name && + address1 == o.address1 && + locality == o.locality && + administrative_area == o.administrative_area && + postal_code == o.postal_code && + country == o.country && + email == o.email && + 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 + [name, address1, locality, administrative_area, postal_code, country, email, 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/ptsv2paymentsidcaptures_buyer_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_buyer_information.rb new file mode 100644 index 00000000..2884b444 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_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 Ptsv2paymentsidcapturesBuyerInformation + # 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 + + # Customer’s government-assigned tax identification number. For processor-specific information, see the purchaser_vat_registration_number 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 :vat_registration_number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'merchant_customer_id' => :'merchantCustomerId', + :'vat_registration_number' => :'vatRegistrationNumber' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'merchant_customer_id' => :'String', + :'vat_registration_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?(:'merchantCustomerId') + self.merchant_customer_id = attributes[:'merchantCustomerId'] + end + + if attributes.has_key?(:'vatRegistrationNumber') + self.vat_registration_number = attributes[:'vatRegistrationNumber'] + end + end + + # Show invalid properties 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 !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 20 + invalid_properties.push('invalid value for "vat_registration_number", 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 !@merchant_customer_id.nil? && @merchant_customer_id.to_s.length > 100 + return false if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 20 + 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] vat_registration_number Value to be assigned + def vat_registration_number=(vat_registration_number) + if !vat_registration_number.nil? && vat_registration_number.to_s.length > 20 + fail ArgumentError, 'invalid value for "vat_registration_number", the character length must be smaller than or equal to 20.' + end + + @vat_registration_number = vat_registration_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 && + merchant_customer_id == o.merchant_customer_id && + vat_registration_number == o.vat_registration_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 + [merchant_customer_id, vat_registration_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/ptsv2paymentsidcaptures_merchant_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_merchant_information.rb new file mode 100644 index 00000000..8eddc4dd --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_merchant_information.rb @@ -0,0 +1,258 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsidcapturesMerchantInformation + attr_accessor :merchant_descriptor + + # Reference number that facilitates card acceptor/corporation communication and record keeping. For processor-specific information, see the card_acceptor_ref_number 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 :card_acceptor_reference_number + + # Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :category_code + + # Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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 :vat_registration_number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'merchant_descriptor' => :'merchantDescriptor', + :'card_acceptor_reference_number' => :'cardAcceptorReferenceNumber', + :'category_code' => :'categoryCode', + :'vat_registration_number' => :'vatRegistrationNumber' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'merchant_descriptor' => :'Ptsv2paymentsMerchantInformationMerchantDescriptor', + :'card_acceptor_reference_number' => :'String', + :'category_code' => :'Integer', + :'vat_registration_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?(:'merchantDescriptor') + self.merchant_descriptor = attributes[:'merchantDescriptor'] + end + + if attributes.has_key?(:'cardAcceptorReferenceNumber') + self.card_acceptor_reference_number = attributes[:'cardAcceptorReferenceNumber'] + end + + if attributes.has_key?(:'categoryCode') + self.category_code = attributes[:'categoryCode'] + end + + if attributes.has_key?(:'vatRegistrationNumber') + self.vat_registration_number = attributes[:'vatRegistrationNumber'] + end + end + + # Show invalid properties 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 !@card_acceptor_reference_number.nil? && @card_acceptor_reference_number.to_s.length > 25 + invalid_properties.push('invalid value for "card_acceptor_reference_number", the character length must be smaller than or equal to 25.') + end + + if !@category_code.nil? && @category_code > 9999 + invalid_properties.push('invalid value for "category_code", must be smaller than or equal to 9999.') + end + + if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 + invalid_properties.push('invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.') + 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 !@card_acceptor_reference_number.nil? && @card_acceptor_reference_number.to_s.length > 25 + return false if !@category_code.nil? && @category_code > 9999 + return false if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 + true + end + + # Custom attribute writer method with validation + # @param [Object] card_acceptor_reference_number Value to be assigned + def card_acceptor_reference_number=(card_acceptor_reference_number) + if !card_acceptor_reference_number.nil? && card_acceptor_reference_number.to_s.length > 25 + fail ArgumentError, 'invalid value for "card_acceptor_reference_number", the character length must be smaller than or equal to 25.' + end + + @card_acceptor_reference_number = card_acceptor_reference_number + end + + # Custom attribute writer method with validation + # @param [Object] category_code Value to be assigned + def category_code=(category_code) + if !category_code.nil? && category_code > 9999 + fail ArgumentError, 'invalid value for "category_code", must be smaller than or equal to 9999.' + end + + @category_code = category_code + end + + # Custom attribute writer method with validation + # @param [Object] vat_registration_number Value to be assigned + def vat_registration_number=(vat_registration_number) + if !vat_registration_number.nil? && vat_registration_number.to_s.length > 21 + fail ArgumentError, 'invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.' + end + + @vat_registration_number = vat_registration_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 && + merchant_descriptor == o.merchant_descriptor && + card_acceptor_reference_number == o.card_acceptor_reference_number && + category_code == o.category_code && + vat_registration_number == o.vat_registration_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 + [merchant_descriptor, card_acceptor_reference_number, category_code, vat_registration_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/ptsv2paymentsidcaptures_order_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information.rb new file mode 100644 index 00000000..c9bd6ec6 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information.rb @@ -0,0 +1,230 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsidcapturesOrderInformation + attr_accessor :amount_details + + attr_accessor :bill_to + + attr_accessor :ship_to + + attr_accessor :line_items + + attr_accessor :invoice_details + + attr_accessor :shipping_details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'amount_details' => :'amountDetails', + :'bill_to' => :'billTo', + :'ship_to' => :'shipTo', + :'line_items' => :'lineItems', + :'invoice_details' => :'invoiceDetails', + :'shipping_details' => :'shippingDetails' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'amount_details' => :'Ptsv2paymentsidcapturesOrderInformationAmountDetails', + :'bill_to' => :'Ptsv2paymentsidcapturesOrderInformationBillTo', + :'ship_to' => :'Ptsv2paymentsidcapturesOrderInformationShipTo', + :'line_items' => :'Array', + :'invoice_details' => :'Ptsv2paymentsidcapturesOrderInformationInvoiceDetails', + :'shipping_details' => :'Ptsv2paymentsidcapturesOrderInformationShippingDetails' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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?(:'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?(:'invoiceDetails') + self.invoice_details = attributes[:'invoiceDetails'] + 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 && + amount_details == o.amount_details && + bill_to == o.bill_to && + ship_to == o.ship_to && + line_items == o.line_items && + invoice_details == o.invoice_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 + [amount_details, bill_to, ship_to, line_items, invoice_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/ptsv2paymentsidcaptures_order_information_amount_details.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_amount_details.rb new file mode 100644 index 00000000..a6009d70 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_amount_details.rb @@ -0,0 +1,546 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsidcapturesOrderInformationAmountDetails + # 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 discount amount applied to the order. For processor-specific information, see the order_discount_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 :discount_amount + + # Total charges for any import or export duties included in the order. For processor-specific information, see the duty_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 :duty_amount + + # 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 + + # Flag that indicates whether a national tax is included in the order total. Possible values: - **0**: national tax not included - **1**: national tax included For processor-specific information, see the national_tax_indicator 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 :national_tax_included + + # Flag that indicates how the merchant manages discounts. Possible values: - **0**: no invoice level discount included - **1**: tax calculated on the postdiscount invoice total - **2**: tax calculated on the prediscount invoice total For processor-specific information, see the order_discount_management_indicator 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_applied_after_discount + + # Flag that indicates how you calculate tax. Possible values: - **0**: net prices with tax calculated at line item level - **1**: net prices with tax calculated at invoice level - **2**: gross prices with tax provided at line item level - **3**: gross prices with tax provided at invoice level - **4**: no tax applies on the invoice for the transaction For processor-specific information, see the tax_management_indicator 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_applied_level + + # For tax amounts that can be categorized as one tax type. This field contains the tax type code that corresponds to the entry in the _lineItems.taxAmount_ field. Possible values: - **056**: sales tax (U.S only) - **TX~**: all taxes (Canada only) Note ~ = space. For processor-specific information, see the total_tax_type_code 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_type_code + + # Total freight or shipping and handling charges for the order. When you include this field in your request, you must also include the **totalAmount** field. For processor-specific information, see the freight_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 :freight_amount + + # Converted amount returned by the DCC service. For processor-specific information, see the foreign_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 :foreign_amount + + # Billing currency returned by the DCC service. For processor-specific information, see the foreign_currency field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :foreign_currency + + # Exchange rate returned by the DCC service. Includes a decimal point and a maximum of 4 decimal places. For processor-specific information, see the exchange_rate field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :exchange_rate + + # Time stamp for the exchange rate. This value is returned by the DCC service. Format: `YYYYMMDD~HH:MM` where ~ denotes a space. For processor-specific information, see the exchange_rate_timestamp field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :exchange_rate_time_stamp + + attr_accessor :amex_additional_amounts + + attr_accessor :tax_details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'total_amount' => :'totalAmount', + :'currency' => :'currency', + :'discount_amount' => :'discountAmount', + :'duty_amount' => :'dutyAmount', + :'tax_amount' => :'taxAmount', + :'national_tax_included' => :'nationalTaxIncluded', + :'tax_applied_after_discount' => :'taxAppliedAfterDiscount', + :'tax_applied_level' => :'taxAppliedLevel', + :'tax_type_code' => :'taxTypeCode', + :'freight_amount' => :'freightAmount', + :'foreign_amount' => :'foreignAmount', + :'foreign_currency' => :'foreignCurrency', + :'exchange_rate' => :'exchangeRate', + :'exchange_rate_time_stamp' => :'exchangeRateTimeStamp', + :'amex_additional_amounts' => :'amexAdditionalAmounts', + :'tax_details' => :'taxDetails' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'total_amount' => :'String', + :'currency' => :'String', + :'discount_amount' => :'String', + :'duty_amount' => :'String', + :'tax_amount' => :'String', + :'national_tax_included' => :'String', + :'tax_applied_after_discount' => :'String', + :'tax_applied_level' => :'String', + :'tax_type_code' => :'String', + :'freight_amount' => :'String', + :'foreign_amount' => :'String', + :'foreign_currency' => :'String', + :'exchange_rate' => :'String', + :'exchange_rate_time_stamp' => :'String', + :'amex_additional_amounts' => :'Array', + :'tax_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?(:'totalAmount') + self.total_amount = attributes[:'totalAmount'] + end + + if attributes.has_key?(:'currency') + self.currency = attributes[:'currency'] + end + + if attributes.has_key?(:'discountAmount') + self.discount_amount = attributes[:'discountAmount'] + end + + if attributes.has_key?(:'dutyAmount') + self.duty_amount = attributes[:'dutyAmount'] + end + + if attributes.has_key?(:'taxAmount') + self.tax_amount = attributes[:'taxAmount'] + end + + if attributes.has_key?(:'nationalTaxIncluded') + self.national_tax_included = attributes[:'nationalTaxIncluded'] + end + + if attributes.has_key?(:'taxAppliedAfterDiscount') + self.tax_applied_after_discount = attributes[:'taxAppliedAfterDiscount'] + end + + if attributes.has_key?(:'taxAppliedLevel') + self.tax_applied_level = attributes[:'taxAppliedLevel'] + end + + if attributes.has_key?(:'taxTypeCode') + self.tax_type_code = attributes[:'taxTypeCode'] + end + + if attributes.has_key?(:'freightAmount') + self.freight_amount = attributes[:'freightAmount'] + end + + if attributes.has_key?(:'foreignAmount') + self.foreign_amount = attributes[:'foreignAmount'] + end + + if attributes.has_key?(:'foreignCurrency') + self.foreign_currency = attributes[:'foreignCurrency'] + end + + if attributes.has_key?(:'exchangeRate') + self.exchange_rate = attributes[:'exchangeRate'] + end + + if attributes.has_key?(:'exchangeRateTimeStamp') + self.exchange_rate_time_stamp = attributes[:'exchangeRateTimeStamp'] + end + + if attributes.has_key?(:'amexAdditionalAmounts') + if (value = attributes[:'amexAdditionalAmounts']).is_a?(Array) + self.amex_additional_amounts = value + end + end + + if attributes.has_key?(:'taxDetails') + if (value = attributes[:'taxDetails']).is_a?(Array) + self.tax_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 + 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 !@discount_amount.nil? && @discount_amount.to_s.length > 15 + invalid_properties.push('invalid value for "discount_amount", the character length must be smaller than or equal to 15.') + end + + if !@duty_amount.nil? && @duty_amount.to_s.length > 15 + invalid_properties.push('invalid value for "duty_amount", the character length must be smaller than or equal to 15.') + 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 !@national_tax_included.nil? && @national_tax_included.to_s.length > 1 + invalid_properties.push('invalid value for "national_tax_included", the character length must be smaller than or equal to 1.') + end + + if !@tax_applied_after_discount.nil? && @tax_applied_after_discount.to_s.length > 1 + invalid_properties.push('invalid value for "tax_applied_after_discount", the character length must be smaller than or equal to 1.') + end + + if !@tax_applied_level.nil? && @tax_applied_level.to_s.length > 1 + invalid_properties.push('invalid value for "tax_applied_level", the character length must be smaller than or equal to 1.') + end + + if !@tax_type_code.nil? && @tax_type_code.to_s.length > 3 + invalid_properties.push('invalid value for "tax_type_code", the character length must be smaller than or equal to 3.') + end + + if !@freight_amount.nil? && @freight_amount.to_s.length > 13 + invalid_properties.push('invalid value for "freight_amount", the character length must be smaller than or equal to 13.') + end + + if !@foreign_amount.nil? && @foreign_amount.to_s.length > 15 + invalid_properties.push('invalid value for "foreign_amount", the character length must be smaller than or equal to 15.') + end + + if !@foreign_currency.nil? && @foreign_currency.to_s.length > 5 + invalid_properties.push('invalid value for "foreign_currency", the character length must be smaller than or equal to 5.') + end + + if !@exchange_rate.nil? && @exchange_rate.to_s.length > 13 + invalid_properties.push('invalid value for "exchange_rate", the character length must be smaller than or equal to 13.') + end + + if !@exchange_rate_time_stamp.nil? && @exchange_rate_time_stamp.to_s.length > 14 + invalid_properties.push('invalid value for "exchange_rate_time_stamp", the character length must be smaller than or equal to 14.') + 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 !@discount_amount.nil? && @discount_amount.to_s.length > 15 + return false if !@duty_amount.nil? && @duty_amount.to_s.length > 15 + return false if !@tax_amount.nil? && @tax_amount.to_s.length > 12 + return false if !@national_tax_included.nil? && @national_tax_included.to_s.length > 1 + return false if !@tax_applied_after_discount.nil? && @tax_applied_after_discount.to_s.length > 1 + return false if !@tax_applied_level.nil? && @tax_applied_level.to_s.length > 1 + return false if !@tax_type_code.nil? && @tax_type_code.to_s.length > 3 + return false if !@freight_amount.nil? && @freight_amount.to_s.length > 13 + return false if !@foreign_amount.nil? && @foreign_amount.to_s.length > 15 + return false if !@foreign_currency.nil? && @foreign_currency.to_s.length > 5 + return false if !@exchange_rate.nil? && @exchange_rate.to_s.length > 13 + return false if !@exchange_rate_time_stamp.nil? && @exchange_rate_time_stamp.to_s.length > 14 + 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] discount_amount Value to be assigned + def discount_amount=(discount_amount) + if !discount_amount.nil? && discount_amount.to_s.length > 15 + fail ArgumentError, 'invalid value for "discount_amount", the character length must be smaller than or equal to 15.' + end + + @discount_amount = discount_amount + end + + # Custom attribute writer method with validation + # @param [Object] duty_amount Value to be assigned + def duty_amount=(duty_amount) + if !duty_amount.nil? && duty_amount.to_s.length > 15 + fail ArgumentError, 'invalid value for "duty_amount", the character length must be smaller than or equal to 15.' + end + + @duty_amount = duty_amount + 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] national_tax_included Value to be assigned + def national_tax_included=(national_tax_included) + if !national_tax_included.nil? && national_tax_included.to_s.length > 1 + fail ArgumentError, 'invalid value for "national_tax_included", the character length must be smaller than or equal to 1.' + end + + @national_tax_included = national_tax_included + end + + # Custom attribute writer method with validation + # @param [Object] tax_applied_after_discount Value to be assigned + def tax_applied_after_discount=(tax_applied_after_discount) + if !tax_applied_after_discount.nil? && tax_applied_after_discount.to_s.length > 1 + fail ArgumentError, 'invalid value for "tax_applied_after_discount", the character length must be smaller than or equal to 1.' + end + + @tax_applied_after_discount = tax_applied_after_discount + end + + # Custom attribute writer method with validation + # @param [Object] tax_applied_level Value to be assigned + def tax_applied_level=(tax_applied_level) + if !tax_applied_level.nil? && tax_applied_level.to_s.length > 1 + fail ArgumentError, 'invalid value for "tax_applied_level", the character length must be smaller than or equal to 1.' + end + + @tax_applied_level = tax_applied_level + end + + # Custom attribute writer method with validation + # @param [Object] tax_type_code Value to be assigned + def tax_type_code=(tax_type_code) + if !tax_type_code.nil? && tax_type_code.to_s.length > 3 + fail ArgumentError, 'invalid value for "tax_type_code", the character length must be smaller than or equal to 3.' + end + + @tax_type_code = tax_type_code + end + + # Custom attribute writer method with validation + # @param [Object] freight_amount Value to be assigned + def freight_amount=(freight_amount) + if !freight_amount.nil? && freight_amount.to_s.length > 13 + fail ArgumentError, 'invalid value for "freight_amount", the character length must be smaller than or equal to 13.' + end + + @freight_amount = freight_amount + end + + # Custom attribute writer method with validation + # @param [Object] foreign_amount Value to be assigned + def foreign_amount=(foreign_amount) + if !foreign_amount.nil? && foreign_amount.to_s.length > 15 + fail ArgumentError, 'invalid value for "foreign_amount", the character length must be smaller than or equal to 15.' + end + + @foreign_amount = foreign_amount + end + + # Custom attribute writer method with validation + # @param [Object] foreign_currency Value to be assigned + def foreign_currency=(foreign_currency) + if !foreign_currency.nil? && foreign_currency.to_s.length > 5 + fail ArgumentError, 'invalid value for "foreign_currency", the character length must be smaller than or equal to 5.' + end + + @foreign_currency = foreign_currency + end + + # Custom attribute writer method with validation + # @param [Object] exchange_rate Value to be assigned + def exchange_rate=(exchange_rate) + if !exchange_rate.nil? && exchange_rate.to_s.length > 13 + fail ArgumentError, 'invalid value for "exchange_rate", the character length must be smaller than or equal to 13.' + end + + @exchange_rate = exchange_rate + end + + # Custom attribute writer method with validation + # @param [Object] exchange_rate_time_stamp Value to be assigned + def exchange_rate_time_stamp=(exchange_rate_time_stamp) + if !exchange_rate_time_stamp.nil? && exchange_rate_time_stamp.to_s.length > 14 + fail ArgumentError, 'invalid value for "exchange_rate_time_stamp", the character length must be smaller than or equal to 14.' + end + + @exchange_rate_time_stamp = exchange_rate_time_stamp + end + + # 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 && + discount_amount == o.discount_amount && + duty_amount == o.duty_amount && + tax_amount == o.tax_amount && + national_tax_included == o.national_tax_included && + tax_applied_after_discount == o.tax_applied_after_discount && + tax_applied_level == o.tax_applied_level && + tax_type_code == o.tax_type_code && + freight_amount == o.freight_amount && + foreign_amount == o.foreign_amount && + foreign_currency == o.foreign_currency && + exchange_rate == o.exchange_rate && + exchange_rate_time_stamp == o.exchange_rate_time_stamp && + amex_additional_amounts == o.amex_additional_amounts && + tax_details == o.tax_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 + [total_amount, currency, discount_amount, duty_amount, tax_amount, national_tax_included, tax_applied_after_discount, tax_applied_level, tax_type_code, freight_amount, foreign_amount, foreign_currency, exchange_rate, exchange_rate_time_stamp, amex_additional_amounts, tax_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/ptsv2paymentsidcaptures_order_information_bill_to.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_bill_to.rb new file mode 100644 index 00000000..f15808d3 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_bill_to.rb @@ -0,0 +1,449 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsidcapturesOrderInformationBillTo + # 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 + + # 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 + + # 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 + + # 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 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 + + # 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', + :'company' => :'company', + :'address1' => :'address1', + :'address2' => :'address2', + :'locality' => :'locality', + :'administrative_area' => :'administrativeArea', + :'postal_code' => :'postalCode', + :'country' => :'country', + :'email' => :'email', + :'phone_number' => :'phoneNumber' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'first_name' => :'String', + :'last_name' => :'String', + :'company' => :'String', + :'address1' => :'String', + :'address2' => :'String', + :'locality' => :'String', + :'administrative_area' => :'String', + :'postal_code' => :'String', + :'country' => :'String', + :'email' => :'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?(:'company') + self.company = attributes[:'company'] + 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?(:'country') + self.country = attributes[:'country'] + end + + if attributes.has_key?(:'email') + self.email = attributes[:'email'] + 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 !@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 !@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 !@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 !@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 !@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 !@company.nil? && @company.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 !@country.nil? && @country.to_s.length > 2 + return false if !@email.nil? && @email.to_s.length > 255 + 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] 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] 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] 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] 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] 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 && + company == o.company && + address1 == o.address1 && + address2 == o.address2 && + locality == o.locality && + administrative_area == o.administrative_area && + postal_code == o.postal_code && + country == o.country && + email == o.email && + 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, company, address1, address2, locality, administrative_area, postal_code, country, email, 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/ptsv2paymentsidcaptures_order_information_invoice_details.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_invoice_details.rb new file mode 100644 index 00000000..7c021425 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_invoice_details.rb @@ -0,0 +1,320 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsidcapturesOrderInformationInvoiceDetails + # Value used by your customer to identify the order. This value is typically a purchase order number. CyberSource recommends that you do not populate the field with all zeros or nines. For processor-specific information, see the user_po 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 :purchase_order_number + + # Date the order was processed. `Format: YYYY-MM-DD`. For processor-specific information, see the purchaser_order_date 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 :purchase_order_date + + # The name of the individual or the company contacted for company authorized purchases. For processor-specific information, see the authorized_contact_name 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 :purchase_contact_name + + # Flag that indicates whether an order is taxable. This value must be true if the sum of all _lineItems[].taxAmount_ values > 0. If you do not include any _lineItems[].taxAmount_ values in your request, CyberSource does not include _invoiceDetails.taxable_ in the data it sends to the processor. For processor-specific information, see the tax_indicator 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 :taxable + + # VAT invoice number associated with the transaction. For processor-specific information, see the vat_invoice_ref_number 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 :vat_invoice_reference_number + + # International description code of the overall order’s goods or services or the Categorizes purchases for VAT reporting. Contact your acquirer for a list of codes. For processor-specific information, see the summary_commodity_code 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 :commodity_code + + attr_accessor :transaction_advice_addendum + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'purchase_order_number' => :'purchaseOrderNumber', + :'purchase_order_date' => :'purchaseOrderDate', + :'purchase_contact_name' => :'purchaseContactName', + :'taxable' => :'taxable', + :'vat_invoice_reference_number' => :'vatInvoiceReferenceNumber', + :'commodity_code' => :'commodityCode', + :'transaction_advice_addendum' => :'transactionAdviceAddendum' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'purchase_order_number' => :'String', + :'purchase_order_date' => :'String', + :'purchase_contact_name' => :'String', + :'taxable' => :'BOOLEAN', + :'vat_invoice_reference_number' => :'String', + :'commodity_code' => :'String', + :'transaction_advice_addendum' => :'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?(:'purchaseOrderNumber') + self.purchase_order_number = attributes[:'purchaseOrderNumber'] + end + + if attributes.has_key?(:'purchaseOrderDate') + self.purchase_order_date = attributes[:'purchaseOrderDate'] + end + + if attributes.has_key?(:'purchaseContactName') + self.purchase_contact_name = attributes[:'purchaseContactName'] + end + + if attributes.has_key?(:'taxable') + self.taxable = attributes[:'taxable'] + end + + if attributes.has_key?(:'vatInvoiceReferenceNumber') + self.vat_invoice_reference_number = attributes[:'vatInvoiceReferenceNumber'] + end + + if attributes.has_key?(:'commodityCode') + self.commodity_code = attributes[:'commodityCode'] + end + + if attributes.has_key?(:'transactionAdviceAddendum') + if (value = attributes[:'transactionAdviceAddendum']).is_a?(Array) + self.transaction_advice_addendum = 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 !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25 + invalid_properties.push('invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.') + end + + if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10 + invalid_properties.push('invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.') + end + + if !@purchase_contact_name.nil? && @purchase_contact_name.to_s.length > 36 + invalid_properties.push('invalid value for "purchase_contact_name", the character length must be smaller than or equal to 36.') + end + + if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15 + invalid_properties.push('invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.') + end + + if !@commodity_code.nil? && @commodity_code.to_s.length > 4 + invalid_properties.push('invalid value for "commodity_code", 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 !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25 + return false if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10 + return false if !@purchase_contact_name.nil? && @purchase_contact_name.to_s.length > 36 + return false if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15 + return false if !@commodity_code.nil? && @commodity_code.to_s.length > 4 + true + end + + # Custom attribute writer method with validation + # @param [Object] purchase_order_number Value to be assigned + def purchase_order_number=(purchase_order_number) + if !purchase_order_number.nil? && purchase_order_number.to_s.length > 25 + fail ArgumentError, 'invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.' + end + + @purchase_order_number = purchase_order_number + end + + # Custom attribute writer method with validation + # @param [Object] purchase_order_date Value to be assigned + def purchase_order_date=(purchase_order_date) + if !purchase_order_date.nil? && purchase_order_date.to_s.length > 10 + fail ArgumentError, 'invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.' + end + + @purchase_order_date = purchase_order_date + end + + # Custom attribute writer method with validation + # @param [Object] purchase_contact_name Value to be assigned + def purchase_contact_name=(purchase_contact_name) + if !purchase_contact_name.nil? && purchase_contact_name.to_s.length > 36 + fail ArgumentError, 'invalid value for "purchase_contact_name", the character length must be smaller than or equal to 36.' + end + + @purchase_contact_name = purchase_contact_name + end + + # Custom attribute writer method with validation + # @param [Object] vat_invoice_reference_number Value to be assigned + def vat_invoice_reference_number=(vat_invoice_reference_number) + if !vat_invoice_reference_number.nil? && vat_invoice_reference_number.to_s.length > 15 + fail ArgumentError, 'invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.' + end + + @vat_invoice_reference_number = vat_invoice_reference_number + end + + # Custom attribute writer method with validation + # @param [Object] commodity_code Value to be assigned + def commodity_code=(commodity_code) + if !commodity_code.nil? && commodity_code.to_s.length > 4 + fail ArgumentError, 'invalid value for "commodity_code", the character length must be smaller than or equal to 4.' + end + + @commodity_code = commodity_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 && + purchase_order_number == o.purchase_order_number && + purchase_order_date == o.purchase_order_date && + purchase_contact_name == o.purchase_contact_name && + taxable == o.taxable && + vat_invoice_reference_number == o.vat_invoice_reference_number && + commodity_code == o.commodity_code && + transaction_advice_addendum == o.transaction_advice_addendum + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [purchase_order_number, purchase_order_date, purchase_contact_name, taxable, vat_invoice_reference_number, commodity_code, transaction_advice_addendum].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_ship_to.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_ship_to.rb new file mode 100644 index 00000000..bda090dd --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_ship_to.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 Ptsv2paymentsidcapturesOrderInformationShipTo + # State or province of the shipping address. Use the State, Province, and Territory Codes for the United States and Canada. + attr_accessor :administrative_area + + # Country of the shipping address. Use the two character ISO Standard Country Codes. + attr_accessor :country + + # 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 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'administrative_area' => :'administrativeArea', + :'country' => :'country', + :'postal_code' => :'postalCode' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'administrative_area' => :'String', + :'country' => :'String', + :'postal_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?(:'administrativeArea') + self.administrative_area = attributes[:'administrativeArea'] + end + + if attributes.has_key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.has_key?(:'postalCode') + self.postal_code = attributes[:'postalCode'] + end + end + + # Show invalid properties 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 !@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 !@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 !@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 + + invalid_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 !@administrative_area.nil? && @administrative_area.to_s.length > 2 + return false if !@country.nil? && @country.to_s.length > 2 + return false if !@postal_code.nil? && @postal_code.to_s.length > 10 + true + 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] 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] 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 + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + administrative_area == o.administrative_area && + country == o.country && + postal_code == o.postal_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 + [administrative_area, country, postal_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/ptsv2paymentsidcaptures_order_information_shipping_details.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_shipping_details.rb new file mode 100644 index 00000000..2bb1e552 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_shipping_details.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 Ptsv2paymentsidcapturesOrderInformationShippingDetails + # Postal code for the address from which the goods are shipped, which is used to establish nexus. The default is the postal code associated with your CyberSource account. 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 This field is frequently used for Level II and Level III transactions. + attr_accessor :ship_from_postal_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ship_from_postal_code' => :'shipFromPostalCode' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'ship_from_postal_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?(:'shipFromPostalCode') + self.ship_from_postal_code = attributes[:'shipFromPostalCode'] + end + end + + # Show invalid properties 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 !@ship_from_postal_code.nil? && @ship_from_postal_code.to_s.length > 10 + invalid_properties.push('invalid value for "ship_from_postal_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 !@ship_from_postal_code.nil? && @ship_from_postal_code.to_s.length > 10 + true + end + + # Custom attribute writer method with validation + # @param [Object] ship_from_postal_code Value to be assigned + def ship_from_postal_code=(ship_from_postal_code) + if !ship_from_postal_code.nil? && ship_from_postal_code.to_s.length > 10 + fail ArgumentError, 'invalid value for "ship_from_postal_code", the character length must be smaller than or equal to 10.' + end + + @ship_from_postal_code = ship_from_postal_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 && + ship_from_postal_code == o.ship_from_postal_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 + [ship_from_postal_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/ptsv2paymentsidcaptures_payment_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_payment_information.rb new file mode 100644 index 00000000..639c1d48 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_payment_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 Ptsv2paymentsidcapturesPaymentInformation + attr_accessor :customer + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'customer' => :'customer' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'customer' => :'Ptsv2paymentsPaymentInformationCustomer' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'customer') + self.customer = attributes[:'customer'] + end + end + + # Show invalid properties 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 && + customer == o.customer + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [customer].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information.rb new file mode 100644 index 00000000..a3d00b3f --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_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 Ptsv2paymentsidcapturesPointOfSaleInformation + 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' => :'Ptsv2paymentsidcapturesPointOfSaleInformationEmv', + :'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/ptsv2paymentsidcaptures_point_of_sale_information_emv.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information_emv.rb new file mode 100644 index 00000000..1996ef5d --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information_emv.rb @@ -0,0 +1,211 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsidcapturesPointOfSaleInformationEmv + # 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 + + # Indicates whether a fallback method was used to enter credit card information into the POS terminal. When a technical problem prevents a successful exchange of information between a chip card and a chip-capable terminal: 1. Swipe the card or key the credit card information into the POS terminal. 2. Use the pos_entry_mode field to indicate whether the information was swiped or keyed. This field is supported only on **Chase Paymentech Solutions** and **GPN**. + attr_accessor :fallback + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'tags' => :'tags', + :'fallback' => :'fallback' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'tags' => :'String', + :'fallback' => :'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?(:'tags') + self.tags = attributes[:'tags'] + end + + if attributes.has_key?(:'fallback') + self.fallback = attributes[:'fallback'] + else + self.fallback = false + end + end + + # Show invalid properties 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 && + fallback == o.fallback + end + + # @see the `==` method + # @param [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, fallback].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information.rb new file mode 100644 index 00000000..79e43a7a --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information.rb @@ -0,0 +1,351 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsidcapturesProcessingInformation + # 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 + + # Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). + attr_accessor :reconciliation_id + + # Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. + attr_accessor :link_id + + # Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. + attr_accessor :report_group + + # Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. + attr_accessor :visa_checkout_id + + # Set this field to 3 to indicate that the request includes Level III data. + attr_accessor :purchase_level + + attr_accessor :issuer + + attr_accessor :authorization_options + + attr_accessor :capture_options + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'payment_solution' => :'paymentSolution', + :'reconciliation_id' => :'reconciliationId', + :'link_id' => :'linkId', + :'report_group' => :'reportGroup', + :'visa_checkout_id' => :'visaCheckoutId', + :'purchase_level' => :'purchaseLevel', + :'issuer' => :'issuer', + :'authorization_options' => :'authorizationOptions', + :'capture_options' => :'captureOptions' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'payment_solution' => :'String', + :'reconciliation_id' => :'String', + :'link_id' => :'String', + :'report_group' => :'String', + :'visa_checkout_id' => :'String', + :'purchase_level' => :'String', + :'issuer' => :'Ptsv2paymentsProcessingInformationIssuer', + :'authorization_options' => :'Ptsv2paymentsidcapturesProcessingInformationAuthorizationOptions', + :'capture_options' => :'Ptsv2paymentsidcapturesProcessingInformationCaptureOptions' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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?(:'reconciliationId') + self.reconciliation_id = attributes[:'reconciliationId'] + end + + if attributes.has_key?(:'linkId') + self.link_id = attributes[:'linkId'] + end + + if attributes.has_key?(:'reportGroup') + self.report_group = attributes[:'reportGroup'] + end + + if attributes.has_key?(:'visaCheckoutId') + self.visa_checkout_id = attributes[:'visaCheckoutId'] + end + + if attributes.has_key?(:'purchaseLevel') + self.purchase_level = attributes[:'purchaseLevel'] + end + + if attributes.has_key?(:'issuer') + self.issuer = attributes[:'issuer'] + end + + if attributes.has_key?(:'authorizationOptions') + self.authorization_options = attributes[:'authorizationOptions'] + end + + if attributes.has_key?(:'captureOptions') + self.capture_options = attributes[:'captureOptions'] + end + end + + # Show invalid properties 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 !@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 + + if !@link_id.nil? && @link_id.to_s.length > 26 + invalid_properties.push('invalid value for "link_id", the character length must be smaller than or equal to 26.') + end + + if !@report_group.nil? && @report_group.to_s.length > 25 + invalid_properties.push('invalid value for "report_group", the character length must be smaller than or equal to 25.') + end + + if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 + invalid_properties.push('invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.') + end + + if !@purchase_level.nil? && @purchase_level.to_s.length > 1 + invalid_properties.push('invalid value for "purchase_level", 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 !@payment_solution.nil? && @payment_solution.to_s.length > 12 + return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + return false if !@link_id.nil? && @link_id.to_s.length > 26 + return false if !@report_group.nil? && @report_group.to_s.length > 25 + return false if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 + return false if !@purchase_level.nil? && @purchase_level.to_s.length > 1 + 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] 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 + + # Custom attribute writer method with validation + # @param [Object] link_id Value to be assigned + def link_id=(link_id) + if !link_id.nil? && link_id.to_s.length > 26 + fail ArgumentError, 'invalid value for "link_id", the character length must be smaller than or equal to 26.' + end + + @link_id = link_id + end + + # Custom attribute writer method with validation + # @param [Object] report_group Value to be assigned + def report_group=(report_group) + if !report_group.nil? && report_group.to_s.length > 25 + fail ArgumentError, 'invalid value for "report_group", the character length must be smaller than or equal to 25.' + end + + @report_group = report_group + end + + # Custom attribute writer method with validation + # @param [Object] visa_checkout_id Value to be assigned + def visa_checkout_id=(visa_checkout_id) + if !visa_checkout_id.nil? && visa_checkout_id.to_s.length > 48 + fail ArgumentError, 'invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.' + end + + @visa_checkout_id = visa_checkout_id + end + + # Custom attribute writer method with validation + # @param [Object] purchase_level Value to be assigned + def purchase_level=(purchase_level) + if !purchase_level.nil? && purchase_level.to_s.length > 1 + fail ArgumentError, 'invalid value for "purchase_level", the character length must be smaller than or equal to 1.' + end + + @purchase_level = purchase_level + end + + # 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 && + reconciliation_id == o.reconciliation_id && + link_id == o.link_id && + report_group == o.report_group && + visa_checkout_id == o.visa_checkout_id && + purchase_level == o.purchase_level && + issuer == o.issuer && + authorization_options == o.authorization_options && + capture_options == o.capture_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, reconciliation_id, link_id, report_group, visa_checkout_id, purchase_level, issuer, authorization_options, capture_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/ptsv2paymentsidcaptures_processing_information_authorization_options.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information_authorization_options.rb new file mode 100644 index 00000000..e7cef359 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information_authorization_options.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 Ptsv2paymentsidcapturesProcessingInformationAuthorizationOptions + # 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 + + # Authorization code. **Forced Capture** Use this field to send the authorization code you received from a payment that you authorized outside the CyberSource system. **Verbal Authorization** Use this field in CAPTURE API to send the verbally received authorization code. For processor-specific information, see the auth_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :verbal_auth_code + + # Transaction ID (TID). + attr_accessor :verbal_auth_transaction_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'auth_type' => :'authType', + :'verbal_auth_code' => :'verbalAuthCode', + :'verbal_auth_transaction_id' => :'verbalAuthTransactionId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'auth_type' => :'String', + :'verbal_auth_code' => :'String', + :'verbal_auth_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?(:'authType') + self.auth_type = attributes[:'authType'] + end + + if attributes.has_key?(:'verbalAuthCode') + self.verbal_auth_code = attributes[:'verbalAuthCode'] + end + + if attributes.has_key?(:'verbalAuthTransactionId') + self.verbal_auth_transaction_id = attributes[:'verbalAuthTransactionId'] + end + end + + # Show invalid properties 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 + + if !@verbal_auth_code.nil? && @verbal_auth_code.to_s.length > 7 + invalid_properties.push('invalid value for "verbal_auth_code", the character length must be smaller than or equal to 7.') + end + + if !@verbal_auth_transaction_id.nil? && @verbal_auth_transaction_id.to_s.length > 15 + invalid_properties.push('invalid value for "verbal_auth_transaction_id", 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 + return false if !@verbal_auth_code.nil? && @verbal_auth_code.to_s.length > 7 + return false if !@verbal_auth_transaction_id.nil? && @verbal_auth_transaction_id.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 + + # Custom attribute writer method with validation + # @param [Object] verbal_auth_code Value to be assigned + def verbal_auth_code=(verbal_auth_code) + if !verbal_auth_code.nil? && verbal_auth_code.to_s.length > 7 + fail ArgumentError, 'invalid value for "verbal_auth_code", the character length must be smaller than or equal to 7.' + end + + @verbal_auth_code = verbal_auth_code + end + + # Custom attribute writer method with validation + # @param [Object] verbal_auth_transaction_id Value to be assigned + def verbal_auth_transaction_id=(verbal_auth_transaction_id) + if !verbal_auth_transaction_id.nil? && verbal_auth_transaction_id.to_s.length > 15 + fail ArgumentError, 'invalid value for "verbal_auth_transaction_id", the character length must be smaller than or equal to 15.' + end + + @verbal_auth_transaction_id = verbal_auth_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 && + auth_type == o.auth_type && + verbal_auth_code == o.verbal_auth_code && + verbal_auth_transaction_id == o.verbal_auth_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 + [auth_type, verbal_auth_code, verbal_auth_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/ptsv2paymentsidcaptures_processing_information_capture_options.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information_capture_options.rb new file mode 100644 index 00000000..60181960 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information_capture_options.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 Ptsv2paymentsidcapturesProcessingInformationCaptureOptions + # Capture number when requesting multiple partial captures for one payment. Used along with _totalCaptureCount_ to track which capture is being processed. For example, the second of five captures would be passed to CyberSource as: - _captureSequenceNumber_ = 2, and - _totalCaptureCount_ = 5 + attr_accessor :capture_sequence_number + + # Total number of captures when requesting multiple partial captures for one payment. Used along with _captureSequenceNumber_ which capture is being processed. For example, the second of five captures would be passed to CyberSource as: - _captureSequenceNumber_ = 2, and - _totalCaptureCount_ = 5 + attr_accessor :total_capture_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'capture_sequence_number' => :'captureSequenceNumber', + :'total_capture_count' => :'totalCaptureCount' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'capture_sequence_number' => :'Float', + :'total_capture_count' => :'Float' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'captureSequenceNumber') + self.capture_sequence_number = attributes[:'captureSequenceNumber'] + end + + if attributes.has_key?(:'totalCaptureCount') + self.total_capture_count = attributes[:'totalCaptureCount'] + end + end + + # Show invalid properties 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 !@capture_sequence_number.nil? && @capture_sequence_number > 99 + invalid_properties.push('invalid value for "capture_sequence_number", must be smaller than or equal to 99.') + end + + if !@capture_sequence_number.nil? && @capture_sequence_number < 1 + invalid_properties.push('invalid value for "capture_sequence_number", must be greater than or equal to 1.') + end + + if !@total_capture_count.nil? && @total_capture_count > 99 + invalid_properties.push('invalid value for "total_capture_count", must be smaller than or equal to 99.') + end + + if !@total_capture_count.nil? && @total_capture_count < 1 + invalid_properties.push('invalid value for "total_capture_count", 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 !@capture_sequence_number.nil? && @capture_sequence_number > 99 + return false if !@capture_sequence_number.nil? && @capture_sequence_number < 1 + return false if !@total_capture_count.nil? && @total_capture_count > 99 + return false if !@total_capture_count.nil? && @total_capture_count < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] capture_sequence_number Value to be assigned + def capture_sequence_number=(capture_sequence_number) + if !capture_sequence_number.nil? && capture_sequence_number > 99 + fail ArgumentError, 'invalid value for "capture_sequence_number", must be smaller than or equal to 99.' + end + + if !capture_sequence_number.nil? && capture_sequence_number < 1 + fail ArgumentError, 'invalid value for "capture_sequence_number", must be greater than or equal to 1.' + end + + @capture_sequence_number = capture_sequence_number + end + + # Custom attribute writer method with validation + # @param [Object] total_capture_count Value to be assigned + def total_capture_count=(total_capture_count) + if !total_capture_count.nil? && total_capture_count > 99 + fail ArgumentError, 'invalid value for "total_capture_count", must be smaller than or equal to 99.' + end + + if !total_capture_count.nil? && total_capture_count < 1 + fail ArgumentError, 'invalid value for "total_capture_count", must be greater than or equal to 1.' + end + + @total_capture_count = total_capture_count + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + capture_sequence_number == o.capture_sequence_number && + total_capture_count == o.total_capture_count + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [capture_sequence_number, total_capture_count].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_merchant_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_merchant_information.rb new file mode 100644 index 00000000..edd09fcd --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_merchant_information.rb @@ -0,0 +1,258 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsidrefundsMerchantInformation + attr_accessor :merchant_descriptor + + # Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :category_code + + # Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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 :vat_registration_number + + # Reference number that facilitates card acceptor/corporation communication and record keeping. For processor-specific information, see the card_acceptor_ref_number 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 :card_acceptor_reference_number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'merchant_descriptor' => :'merchantDescriptor', + :'category_code' => :'categoryCode', + :'vat_registration_number' => :'vatRegistrationNumber', + :'card_acceptor_reference_number' => :'cardAcceptorReferenceNumber' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'merchant_descriptor' => :'Ptsv2paymentsMerchantInformationMerchantDescriptor', + :'category_code' => :'Integer', + :'vat_registration_number' => :'String', + :'card_acceptor_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?(:'merchantDescriptor') + self.merchant_descriptor = attributes[:'merchantDescriptor'] + end + + if attributes.has_key?(:'categoryCode') + self.category_code = attributes[:'categoryCode'] + end + + if attributes.has_key?(:'vatRegistrationNumber') + self.vat_registration_number = attributes[:'vatRegistrationNumber'] + end + + if attributes.has_key?(:'cardAcceptorReferenceNumber') + self.card_acceptor_reference_number = attributes[:'cardAcceptorReferenceNumber'] + end + end + + # Show invalid properties 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 !@category_code.nil? && @category_code > 9999 + invalid_properties.push('invalid value for "category_code", must be smaller than or equal to 9999.') + end + + if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 + invalid_properties.push('invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.') + end + + if !@card_acceptor_reference_number.nil? && @card_acceptor_reference_number.to_s.length > 25 + invalid_properties.push('invalid value for "card_acceptor_reference_number", the character length must be smaller than or equal to 25.') + 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 !@category_code.nil? && @category_code > 9999 + return false if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 + return false if !@card_acceptor_reference_number.nil? && @card_acceptor_reference_number.to_s.length > 25 + true + end + + # Custom attribute writer method with validation + # @param [Object] category_code Value to be assigned + def category_code=(category_code) + if !category_code.nil? && category_code > 9999 + fail ArgumentError, 'invalid value for "category_code", must be smaller than or equal to 9999.' + end + + @category_code = category_code + end + + # Custom attribute writer method with validation + # @param [Object] vat_registration_number Value to be assigned + def vat_registration_number=(vat_registration_number) + if !vat_registration_number.nil? && vat_registration_number.to_s.length > 21 + fail ArgumentError, 'invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.' + end + + @vat_registration_number = vat_registration_number + end + + # Custom attribute writer method with validation + # @param [Object] card_acceptor_reference_number Value to be assigned + def card_acceptor_reference_number=(card_acceptor_reference_number) + if !card_acceptor_reference_number.nil? && card_acceptor_reference_number.to_s.length > 25 + fail ArgumentError, 'invalid value for "card_acceptor_reference_number", the character length must be smaller than or equal to 25.' + end + + @card_acceptor_reference_number = card_acceptor_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 && + merchant_descriptor == o.merchant_descriptor && + category_code == o.category_code && + vat_registration_number == o.vat_registration_number && + card_acceptor_reference_number == o.card_acceptor_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 + [merchant_descriptor, category_code, vat_registration_number, card_acceptor_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/ptsv2paymentsidrefunds_order_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information.rb new file mode 100644 index 00000000..3fcd7e05 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information.rb @@ -0,0 +1,230 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsidrefundsOrderInformation + attr_accessor :amount_details + + attr_accessor :bill_to + + attr_accessor :ship_to + + attr_accessor :line_items + + attr_accessor :invoice_details + + attr_accessor :shipping_details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'amount_details' => :'amountDetails', + :'bill_to' => :'billTo', + :'ship_to' => :'shipTo', + :'line_items' => :'lineItems', + :'invoice_details' => :'invoiceDetails', + :'shipping_details' => :'shippingDetails' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'amount_details' => :'Ptsv2paymentsidcapturesOrderInformationAmountDetails', + :'bill_to' => :'Ptsv2paymentsidcapturesOrderInformationBillTo', + :'ship_to' => :'Ptsv2paymentsidcapturesOrderInformationShipTo', + :'line_items' => :'Array', + :'invoice_details' => :'Ptsv2paymentsidcapturesOrderInformationInvoiceDetails', + :'shipping_details' => :'Ptsv2paymentsidcapturesOrderInformationShippingDetails' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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?(:'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?(:'invoiceDetails') + self.invoice_details = attributes[:'invoiceDetails'] + 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 && + amount_details == o.amount_details && + bill_to == o.bill_to && + ship_to == o.ship_to && + line_items == o.line_items && + invoice_details == o.invoice_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 + [amount_details, bill_to, ship_to, line_items, invoice_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/ptsv2paymentsidrefunds_order_information_line_items.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information_line_items.rb new file mode 100644 index 00000000..dea0d0a4 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information_line_items.rb @@ -0,0 +1,639 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsidrefundsOrderInformationLineItems + # 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 + + # 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 + + # Unit of measure, or unit of measure code, for the item. + attr_accessor :unit_of_measure + + # Total amount for the item. Normally calculated as the unit price x quantity. + attr_accessor :total_amount + + # 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 + + # Tax rate applied to the item. See \"Numbered Elements,\" page 14. Visa: Valid range is 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated). Mastercard: Valid range is 0.00001 to 0.99999 (0.001% to 99.999%). + attr_accessor :tax_rate + + # Flag to indicate how you handle discount at the line item level. - 0: no line level discount provided - 1: tax was calculated on the post-discount line item total - 2: tax was calculated on the pre-discount line item total `Note` Visa will inset 0 (zero) if an invalid value is included in this field. This field relates to the value in the _lineItems[].discountAmount_ field. + attr_accessor :tax_applied_after_discount + + # Flag to indicate whether tax is exempted or not included. - 0: tax not included - 1: tax included - 2: transaction is not subject to tax + attr_accessor :tax_status_indicator + + # Type of tax being applied to the item. Possible values: Below values are used by **RBS WorldPay Atlanta**, **FDC Nashville Global**, **Litle** - 0000: unknown tax type - 0001: federal/national sales tax - 0002: state sales tax - 0003: city sales tax - 0004: local sales tax - 0005: municipal sales tax - 0006: other tax - 0010: value-added tax - 0011: goods and services tax - 0012: provincial sales tax - 0013: harmonized sales tax - 0014: Quebec sales tax (QST) - 0020: room tax - 0021: occupancy tax - 0022: energy tax - Blank: Tax not supported on line item. + attr_accessor :tax_type_code + + # Flag that indicates whether the tax amount is included in the Line Item Total. + attr_accessor :amount_includes_tax + + # Flag to indicate whether the purchase is categorized as goods or services. Possible values: - 00: goods - 01: services + attr_accessor :type_of_supply + + # Commodity code or International description code used to classify the item. Contact your acquirer for a list of codes. + attr_accessor :commodity_code + + # Discount applied to the item. + attr_accessor :discount_amount + + # Flag that indicates whether the amount is discounted. If you do not provide a value but you set Discount Amount to a value greater than zero, then CyberSource sets this field to **true**. + attr_accessor :discount_applied + + # Rate the item is discounted. Maximum of 2 decimal places. Example 5.25 (=5.25%) + attr_accessor :discount_rate + + # Field to support an invoice number for a transaction. You must specify the number of line items that will include an invoice number. By default, the first line item will include an invoice number field. The invoice number field can be included for up to 10 line items. + attr_accessor :invoice_number + + attr_accessor :tax_details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'product_code' => :'productCode', + :'product_name' => :'productName', + :'product_sku' => :'productSku', + :'quantity' => :'quantity', + :'unit_price' => :'unitPrice', + :'unit_of_measure' => :'unitOfMeasure', + :'total_amount' => :'totalAmount', + :'tax_amount' => :'taxAmount', + :'tax_rate' => :'taxRate', + :'tax_applied_after_discount' => :'taxAppliedAfterDiscount', + :'tax_status_indicator' => :'taxStatusIndicator', + :'tax_type_code' => :'taxTypeCode', + :'amount_includes_tax' => :'amountIncludesTax', + :'type_of_supply' => :'typeOfSupply', + :'commodity_code' => :'commodityCode', + :'discount_amount' => :'discountAmount', + :'discount_applied' => :'discountApplied', + :'discount_rate' => :'discountRate', + :'invoice_number' => :'invoiceNumber', + :'tax_details' => :'taxDetails' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'product_code' => :'String', + :'product_name' => :'String', + :'product_sku' => :'String', + :'quantity' => :'Float', + :'unit_price' => :'String', + :'unit_of_measure' => :'String', + :'total_amount' => :'String', + :'tax_amount' => :'String', + :'tax_rate' => :'String', + :'tax_applied_after_discount' => :'String', + :'tax_status_indicator' => :'String', + :'tax_type_code' => :'String', + :'amount_includes_tax' => :'BOOLEAN', + :'type_of_supply' => :'String', + :'commodity_code' => :'String', + :'discount_amount' => :'String', + :'discount_applied' => :'BOOLEAN', + :'discount_rate' => :'String', + :'invoice_number' => :'String', + :'tax_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?(:'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?(:'quantity') + self.quantity = attributes[:'quantity'] + end + + if attributes.has_key?(:'unitPrice') + self.unit_price = attributes[:'unitPrice'] + end + + if attributes.has_key?(:'unitOfMeasure') + self.unit_of_measure = attributes[:'unitOfMeasure'] + end + + if attributes.has_key?(:'totalAmount') + self.total_amount = attributes[:'totalAmount'] + end + + if attributes.has_key?(:'taxAmount') + self.tax_amount = attributes[:'taxAmount'] + end + + if attributes.has_key?(:'taxRate') + self.tax_rate = attributes[:'taxRate'] + end + + if attributes.has_key?(:'taxAppliedAfterDiscount') + self.tax_applied_after_discount = attributes[:'taxAppliedAfterDiscount'] + end + + if attributes.has_key?(:'taxStatusIndicator') + self.tax_status_indicator = attributes[:'taxStatusIndicator'] + end + + if attributes.has_key?(:'taxTypeCode') + self.tax_type_code = attributes[:'taxTypeCode'] + end + + if attributes.has_key?(:'amountIncludesTax') + self.amount_includes_tax = attributes[:'amountIncludesTax'] + end + + if attributes.has_key?(:'typeOfSupply') + self.type_of_supply = attributes[:'typeOfSupply'] + end + + if attributes.has_key?(:'commodityCode') + self.commodity_code = attributes[:'commodityCode'] + end + + if attributes.has_key?(:'discountAmount') + self.discount_amount = attributes[:'discountAmount'] + end + + if attributes.has_key?(:'discountApplied') + self.discount_applied = attributes[:'discountApplied'] + end + + if attributes.has_key?(:'discountRate') + self.discount_rate = attributes[:'discountRate'] + end + + if attributes.has_key?(:'invoiceNumber') + self.invoice_number = attributes[:'invoiceNumber'] + end + + if attributes.has_key?(:'taxDetails') + if (value = attributes[:'taxDetails']).is_a?(Array) + self.tax_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 + 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 !@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 + + if !@unit_of_measure.nil? && @unit_of_measure.to_s.length > 12 + invalid_properties.push('invalid value for "unit_of_measure", the character length must be smaller than or equal to 12.') + end + + if !@total_amount.nil? && @total_amount.to_s.length > 13 + invalid_properties.push('invalid value for "total_amount", the character length must be smaller than or equal to 13.') + 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 !@tax_rate.nil? && @tax_rate.to_s.length > 7 + invalid_properties.push('invalid value for "tax_rate", the character length must be smaller than or equal to 7.') + end + + if !@tax_applied_after_discount.nil? && @tax_applied_after_discount.to_s.length > 1 + invalid_properties.push('invalid value for "tax_applied_after_discount", the character length must be smaller than or equal to 1.') + end + + if !@tax_status_indicator.nil? && @tax_status_indicator.to_s.length > 1 + invalid_properties.push('invalid value for "tax_status_indicator", the character length must be smaller than or equal to 1.') + end + + if !@tax_type_code.nil? && @tax_type_code.to_s.length > 4 + invalid_properties.push('invalid value for "tax_type_code", the character length must be smaller than or equal to 4.') + end + + if !@type_of_supply.nil? && @type_of_supply.to_s.length > 2 + invalid_properties.push('invalid value for "type_of_supply", the character length must be smaller than or equal to 2.') + end + + if !@commodity_code.nil? && @commodity_code.to_s.length > 15 + invalid_properties.push('invalid value for "commodity_code", the character length must be smaller than or equal to 15.') + end + + if !@discount_amount.nil? && @discount_amount.to_s.length > 13 + invalid_properties.push('invalid value for "discount_amount", the character length must be smaller than or equal to 13.') + end + + if !@discount_rate.nil? && @discount_rate.to_s.length > 6 + invalid_properties.push('invalid value for "discount_rate", the character length must be smaller than or equal to 6.') + end + + if !@invoice_number.nil? && @invoice_number.to_s.length > 23 + invalid_properties.push('invalid value for "invoice_number", 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 !@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 !@quantity.nil? && @quantity > 9999999999 + return false if !@quantity.nil? && @quantity < 1 + return false if !@unit_price.nil? && @unit_price.to_s.length > 15 + return false if !@unit_of_measure.nil? && @unit_of_measure.to_s.length > 12 + return false if !@total_amount.nil? && @total_amount.to_s.length > 13 + return false if !@tax_amount.nil? && @tax_amount.to_s.length > 15 + return false if !@tax_rate.nil? && @tax_rate.to_s.length > 7 + return false if !@tax_applied_after_discount.nil? && @tax_applied_after_discount.to_s.length > 1 + return false if !@tax_status_indicator.nil? && @tax_status_indicator.to_s.length > 1 + return false if !@tax_type_code.nil? && @tax_type_code.to_s.length > 4 + return false if !@type_of_supply.nil? && @type_of_supply.to_s.length > 2 + return false if !@commodity_code.nil? && @commodity_code.to_s.length > 15 + return false if !@discount_amount.nil? && @discount_amount.to_s.length > 13 + return false if !@discount_rate.nil? && @discount_rate.to_s.length > 6 + return false if !@invoice_number.nil? && @invoice_number.to_s.length > 23 + 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] 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 + + # Custom attribute writer method with validation + # @param [Object] unit_of_measure Value to be assigned + def unit_of_measure=(unit_of_measure) + if !unit_of_measure.nil? && unit_of_measure.to_s.length > 12 + fail ArgumentError, 'invalid value for "unit_of_measure", the character length must be smaller than or equal to 12.' + end + + @unit_of_measure = unit_of_measure + 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 > 13 + fail ArgumentError, 'invalid value for "total_amount", the character length must be smaller than or equal to 13.' + end + + @total_amount = total_amount + 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] tax_rate Value to be assigned + def tax_rate=(tax_rate) + if !tax_rate.nil? && tax_rate.to_s.length > 7 + fail ArgumentError, 'invalid value for "tax_rate", the character length must be smaller than or equal to 7.' + end + + @tax_rate = tax_rate + end + + # Custom attribute writer method with validation + # @param [Object] tax_applied_after_discount Value to be assigned + def tax_applied_after_discount=(tax_applied_after_discount) + if !tax_applied_after_discount.nil? && tax_applied_after_discount.to_s.length > 1 + fail ArgumentError, 'invalid value for "tax_applied_after_discount", the character length must be smaller than or equal to 1.' + end + + @tax_applied_after_discount = tax_applied_after_discount + end + + # Custom attribute writer method with validation + # @param [Object] tax_status_indicator Value to be assigned + def tax_status_indicator=(tax_status_indicator) + if !tax_status_indicator.nil? && tax_status_indicator.to_s.length > 1 + fail ArgumentError, 'invalid value for "tax_status_indicator", the character length must be smaller than or equal to 1.' + end + + @tax_status_indicator = tax_status_indicator + end + + # Custom attribute writer method with validation + # @param [Object] tax_type_code Value to be assigned + def tax_type_code=(tax_type_code) + if !tax_type_code.nil? && tax_type_code.to_s.length > 4 + fail ArgumentError, 'invalid value for "tax_type_code", the character length must be smaller than or equal to 4.' + end + + @tax_type_code = tax_type_code + end + + # Custom attribute writer method with validation + # @param [Object] type_of_supply Value to be assigned + def type_of_supply=(type_of_supply) + if !type_of_supply.nil? && type_of_supply.to_s.length > 2 + fail ArgumentError, 'invalid value for "type_of_supply", the character length must be smaller than or equal to 2.' + end + + @type_of_supply = type_of_supply + end + + # Custom attribute writer method with validation + # @param [Object] commodity_code Value to be assigned + def commodity_code=(commodity_code) + if !commodity_code.nil? && commodity_code.to_s.length > 15 + fail ArgumentError, 'invalid value for "commodity_code", the character length must be smaller than or equal to 15.' + end + + @commodity_code = commodity_code + end + + # Custom attribute writer method with validation + # @param [Object] discount_amount Value to be assigned + def discount_amount=(discount_amount) + if !discount_amount.nil? && discount_amount.to_s.length > 13 + fail ArgumentError, 'invalid value for "discount_amount", the character length must be smaller than or equal to 13.' + end + + @discount_amount = discount_amount + end + + # Custom attribute writer method with validation + # @param [Object] discount_rate Value to be assigned + def discount_rate=(discount_rate) + if !discount_rate.nil? && discount_rate.to_s.length > 6 + fail ArgumentError, 'invalid value for "discount_rate", the character length must be smaller than or equal to 6.' + end + + @discount_rate = discount_rate + end + + # Custom attribute writer method with validation + # @param [Object] invoice_number Value to be assigned + def invoice_number=(invoice_number) + if !invoice_number.nil? && invoice_number.to_s.length > 23 + fail ArgumentError, 'invalid value for "invoice_number", the character length must be smaller than or equal to 23.' + end + + @invoice_number = invoice_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 && + product_code == o.product_code && + product_name == o.product_name && + product_sku == o.product_sku && + quantity == o.quantity && + unit_price == o.unit_price && + unit_of_measure == o.unit_of_measure && + total_amount == o.total_amount && + tax_amount == o.tax_amount && + tax_rate == o.tax_rate && + tax_applied_after_discount == o.tax_applied_after_discount && + tax_status_indicator == o.tax_status_indicator && + tax_type_code == o.tax_type_code && + amount_includes_tax == o.amount_includes_tax && + type_of_supply == o.type_of_supply && + commodity_code == o.commodity_code && + discount_amount == o.discount_amount && + discount_applied == o.discount_applied && + discount_rate == o.discount_rate && + invoice_number == o.invoice_number && + tax_details == o.tax_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 + [product_code, product_name, product_sku, quantity, unit_price, unit_of_measure, total_amount, tax_amount, tax_rate, tax_applied_after_discount, tax_status_indicator, tax_type_code, amount_includes_tax, type_of_supply, commodity_code, discount_amount, discount_applied, discount_rate, invoice_number, tax_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/ptsv2paymentsidrefunds_payment_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information.rb new file mode 100644 index 00000000..366e3f57 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_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 Ptsv2paymentsidrefundsPaymentInformation + attr_accessor :card + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'card' => :'card' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'card' => :'Ptsv2paymentsidrefundsPaymentInformationCard' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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 + end + + # Show invalid properties 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 + end + + # @see the `==` method + # @param [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].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card.rb new file mode 100644 index 00000000..94f27401 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card.rb @@ -0,0 +1,374 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsidrefundsPaymentInformationCard + # Customer’s credit card number. Encoded Account Numbers when processing encoded account numbers, use this field for the encoded account number. For processor-specific information, see the customer_cc_number field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :number + + # 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 + + # 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 + + # 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 + + # 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 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number' => :'number', + :'expiration_month' => :'expirationMonth', + :'expiration_year' => :'expirationYear', + :'type' => :'type', + :'account_encoder_id' => :'accountEncoderId', + :'issue_number' => :'issueNumber', + :'start_month' => :'startMonth', + :'start_year' => :'startYear' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'number' => :'String', + :'expiration_month' => :'String', + :'expiration_year' => :'String', + :'type' => :'String', + :'account_encoder_id' => :'String', + :'issue_number' => :'String', + :'start_month' => :'String', + :'start_year' => :'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?(:'expirationMonth') + self.expiration_month = attributes[:'expirationMonth'] + end + + if attributes.has_key?(:'expirationYear') + self.expiration_year = attributes[:'expirationYear'] + 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?(:'issueNumber') + self.issue_number = attributes[:'issueNumber'] + end + + if attributes.has_key?(:'startMonth') + self.start_month = attributes[:'startMonth'] + end + + if attributes.has_key?(:'startYear') + self.start_year = attributes[:'startYear'] + end + end + + # Show invalid properties 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 !@number.nil? && @number.to_s.length > 20 + invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 20.') + 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 !@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 !@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 !@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 + + invalid_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 !@number.nil? && @number.to_s.length > 20 + 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 !@type.nil? && @type.to_s.length > 3 + return false if !@account_encoder_id.nil? && @account_encoder_id.to_s.length > 3 + return false if !@issue_number.nil? && @issue_number.to_s.length > 5 + return false if !@start_month.nil? && @start_month.to_s.length > 2 + return false if !@start_year.nil? && @start_year.to_s.length > 4 + true + end + + # Custom attribute writer method with validation + # @param [Object] number Value to be assigned + def number=(number) + if !number.nil? && number.to_s.length > 20 + fail ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 20.' + end + + @number = number + 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] 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] 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] 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 + + # 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 && + expiration_month == o.expiration_month && + expiration_year == o.expiration_year && + type == o.type && + account_encoder_id == o.account_encoder_id && + issue_number == o.issue_number && + start_month == o.start_month && + start_year == o.start_year + end + + # @see the `==` method + # @param [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, expiration_month, expiration_year, type, account_encoder_id, issue_number, start_month, start_year].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_point_of_sale_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_point_of_sale_information.rb new file mode 100644 index 00000000..1a5d388e --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_point_of_sale_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 Ptsv2paymentsidrefundsPointOfSaleInformation + attr_accessor :emv + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'emv' => :'emv' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'emv' => :'Ptsv2paymentsidcapturesPointOfSaleInformationEmv' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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 + end + + # Show invalid properties 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 && + emv == o.emv + end + + # @see the `==` method + # @param [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].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information.rb new file mode 100644 index 00000000..cb537b5a --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information.rb @@ -0,0 +1,333 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsidrefundsProcessingInformation + # 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 + + # Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). + attr_accessor :reconciliation_id + + # Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. + attr_accessor :link_id + + # Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. + attr_accessor :report_group + + # Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. + attr_accessor :visa_checkout_id + + # Set this field to 3 to indicate that the request includes Level III data. + attr_accessor :purchase_level + + attr_accessor :recurring_options + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'payment_solution' => :'paymentSolution', + :'reconciliation_id' => :'reconciliationId', + :'link_id' => :'linkId', + :'report_group' => :'reportGroup', + :'visa_checkout_id' => :'visaCheckoutId', + :'purchase_level' => :'purchaseLevel', + :'recurring_options' => :'recurringOptions' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'payment_solution' => :'String', + :'reconciliation_id' => :'String', + :'link_id' => :'String', + :'report_group' => :'String', + :'visa_checkout_id' => :'String', + :'purchase_level' => :'String', + :'recurring_options' => :'Ptsv2paymentsidrefundsProcessingInformationRecurringOptions' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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?(:'reconciliationId') + self.reconciliation_id = attributes[:'reconciliationId'] + end + + if attributes.has_key?(:'linkId') + self.link_id = attributes[:'linkId'] + end + + if attributes.has_key?(:'reportGroup') + self.report_group = attributes[:'reportGroup'] + end + + if attributes.has_key?(:'visaCheckoutId') + self.visa_checkout_id = attributes[:'visaCheckoutId'] + end + + if attributes.has_key?(:'purchaseLevel') + self.purchase_level = attributes[:'purchaseLevel'] + end + + if attributes.has_key?(:'recurringOptions') + self.recurring_options = attributes[:'recurringOptions'] + end + end + + # Show invalid properties 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 !@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 + + if !@link_id.nil? && @link_id.to_s.length > 26 + invalid_properties.push('invalid value for "link_id", the character length must be smaller than or equal to 26.') + end + + if !@report_group.nil? && @report_group.to_s.length > 25 + invalid_properties.push('invalid value for "report_group", the character length must be smaller than or equal to 25.') + end + + if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 + invalid_properties.push('invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.') + end + + if !@purchase_level.nil? && @purchase_level.to_s.length > 1 + invalid_properties.push('invalid value for "purchase_level", 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 !@payment_solution.nil? && @payment_solution.to_s.length > 12 + return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + return false if !@link_id.nil? && @link_id.to_s.length > 26 + return false if !@report_group.nil? && @report_group.to_s.length > 25 + return false if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 + return false if !@purchase_level.nil? && @purchase_level.to_s.length > 1 + 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] 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 + + # Custom attribute writer method with validation + # @param [Object] link_id Value to be assigned + def link_id=(link_id) + if !link_id.nil? && link_id.to_s.length > 26 + fail ArgumentError, 'invalid value for "link_id", the character length must be smaller than or equal to 26.' + end + + @link_id = link_id + end + + # Custom attribute writer method with validation + # @param [Object] report_group Value to be assigned + def report_group=(report_group) + if !report_group.nil? && report_group.to_s.length > 25 + fail ArgumentError, 'invalid value for "report_group", the character length must be smaller than or equal to 25.' + end + + @report_group = report_group + end + + # Custom attribute writer method with validation + # @param [Object] visa_checkout_id Value to be assigned + def visa_checkout_id=(visa_checkout_id) + if !visa_checkout_id.nil? && visa_checkout_id.to_s.length > 48 + fail ArgumentError, 'invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.' + end + + @visa_checkout_id = visa_checkout_id + end + + # Custom attribute writer method with validation + # @param [Object] purchase_level Value to be assigned + def purchase_level=(purchase_level) + if !purchase_level.nil? && purchase_level.to_s.length > 1 + fail ArgumentError, 'invalid value for "purchase_level", the character length must be smaller than or equal to 1.' + end + + @purchase_level = purchase_level + end + + # 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 && + reconciliation_id == o.reconciliation_id && + link_id == o.link_id && + report_group == o.report_group && + visa_checkout_id == o.visa_checkout_id && + purchase_level == o.purchase_level && + recurring_options == o.recurring_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, reconciliation_id, link_id, report_group, visa_checkout_id, purchase_level, recurring_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/ptsv2paymentsidrefunds_processing_information_recurring_options.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information_recurring_options.rb new file mode 100644 index 00000000..0a64f651 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information_recurring_options.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 Ptsv2paymentsidrefundsProcessingInformationRecurringOptions + # Flag that indicates whether this is a payment towards an existing contractual loan. + attr_accessor :loan_payment + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'loan_payment' => :'loanPayment' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'loan_payment' => :'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?(:'loanPayment') + self.loan_payment = attributes[:'loanPayment'] + else + self.loan_payment = false + end + end + + # Show invalid properties 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 && + loan_payment == o.loan_payment + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [loan_payment].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + 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_client_reference_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_client_reference_information.rb new file mode 100644 index 00000000..f6d3651d --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_client_reference_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 Ptsv2paymentsidreversalsClientReferenceInformation + # 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 + + # Comments + attr_accessor :comments + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'comments' => :'comments' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'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?(:'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 && + 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, 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/ptsv2paymentsidreversals_order_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_order_information.rb new file mode 100644 index 00000000..5f996d64 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_order_information.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 Ptsv2paymentsidreversalsOrderInformation + attr_accessor :line_items + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'line_items' => :'lineItems' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'line_items' => :'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?(:'lineItems') + if (value = attributes[:'lineItems']).is_a?(Array) + self.line_items = 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 && + line_items == o.line_items + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [line_items].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + 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_order_information_line_items.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_order_information_line_items.rb new file mode 100644 index 00000000..cf654951 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_order_information_line_items.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 Ptsv2paymentsidreversalsOrderInformationLineItems + # 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 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'quantity' => :'quantity', + :'unit_price' => :'unitPrice' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'quantity' => :'Float', + :'unit_price' => :'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?(:'quantity') + self.quantity = attributes[:'quantity'] + end + + if attributes.has_key?(:'unitPrice') + self.unit_price = attributes[:'unitPrice'] + end + end + + # Show invalid properties 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 !@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 !@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] 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 && + quantity == o.quantity && + unit_price == o.unit_price + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [quantity, unit_price].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + 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 new file mode 100644 index 00000000..b7ef1876 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_point_of_sale_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 Ptsv2paymentsidreversalsPointOfSaleInformation + attr_accessor :emv + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'emv' => :'emv' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'emv' => :'InlineResponse201PointOfSaleInformationEmv' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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 + end + + # Show invalid properties 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 && + emv == o.emv + end + + # @see the `==` method + # @param [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].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + 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_processing_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_processing_information.rb new file mode 100644 index 00000000..3c101d46 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_processing_information.rb @@ -0,0 +1,308 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsidreversalsProcessingInformation + # 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 + + # Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). + attr_accessor :reconciliation_id + + # Value that links the current payment request to the original request. Set this value to the ID that was returned in the reply message from the original payment request. This value is used for: - Partial authorizations. - Split shipments. + attr_accessor :link_id + + # Attribute that lets you define custom grouping for your processor reports. This field is supported only for **Litle**. + attr_accessor :report_group + + # Identifier for the **Visa Checkout** order. Visa Checkout provides a unique order ID for every transaction in the Visa Checkout **callID** field. + attr_accessor :visa_checkout_id + + attr_accessor :issuer + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'payment_solution' => :'paymentSolution', + :'reconciliation_id' => :'reconciliationId', + :'link_id' => :'linkId', + :'report_group' => :'reportGroup', + :'visa_checkout_id' => :'visaCheckoutId', + :'issuer' => :'issuer' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'payment_solution' => :'String', + :'reconciliation_id' => :'String', + :'link_id' => :'String', + :'report_group' => :'String', + :'visa_checkout_id' => :'String', + :'issuer' => :'Ptsv2paymentsProcessingInformationIssuer' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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?(:'reconciliationId') + self.reconciliation_id = attributes[:'reconciliationId'] + end + + if attributes.has_key?(:'linkId') + self.link_id = attributes[:'linkId'] + end + + if attributes.has_key?(:'reportGroup') + self.report_group = attributes[:'reportGroup'] + end + + if attributes.has_key?(:'visaCheckoutId') + self.visa_checkout_id = attributes[:'visaCheckoutId'] + end + + if attributes.has_key?(:'issuer') + self.issuer = attributes[:'issuer'] + end + end + + # Show invalid properties 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 !@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 + + if !@link_id.nil? && @link_id.to_s.length > 26 + invalid_properties.push('invalid value for "link_id", the character length must be smaller than or equal to 26.') + end + + if !@report_group.nil? && @report_group.to_s.length > 25 + invalid_properties.push('invalid value for "report_group", the character length must be smaller than or equal to 25.') + end + + if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 + invalid_properties.push('invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.') + 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 !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + return false if !@link_id.nil? && @link_id.to_s.length > 26 + return false if !@report_group.nil? && @report_group.to_s.length > 25 + return false if !@visa_checkout_id.nil? && @visa_checkout_id.to_s.length > 48 + 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] 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 + + # Custom attribute writer method with validation + # @param [Object] link_id Value to be assigned + def link_id=(link_id) + if !link_id.nil? && link_id.to_s.length > 26 + fail ArgumentError, 'invalid value for "link_id", the character length must be smaller than or equal to 26.' + end + + @link_id = link_id + end + + # Custom attribute writer method with validation + # @param [Object] report_group Value to be assigned + def report_group=(report_group) + if !report_group.nil? && report_group.to_s.length > 25 + fail ArgumentError, 'invalid value for "report_group", the character length must be smaller than or equal to 25.' + end + + @report_group = report_group + end + + # Custom attribute writer method with validation + # @param [Object] visa_checkout_id Value to be assigned + def visa_checkout_id=(visa_checkout_id) + if !visa_checkout_id.nil? && visa_checkout_id.to_s.length > 48 + fail ArgumentError, 'invalid value for "visa_checkout_id", the character length must be smaller than or equal to 48.' + end + + @visa_checkout_id = visa_checkout_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 && + payment_solution == o.payment_solution && + reconciliation_id == o.reconciliation_id && + link_id == o.link_id && + report_group == o.report_group && + visa_checkout_id == o.visa_checkout_id && + issuer == o.issuer + end + + # @see the `==` method + # @param [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, reconciliation_id, link_id, report_group, visa_checkout_id, issuer].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + 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_reversal_information.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_information.rb new file mode 100644 index 00000000..66b821a2 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_information.rb @@ -0,0 +1,214 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2paymentsidreversalsReversalInformation + attr_accessor :amount_details + + # Reason for the authorization reversal. Possible value: - 34: Suspected fraud CyberSource ignores this field for processors that do not support this value. + attr_accessor :reason + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'amount_details' => :'amountDetails', + :'reason' => :'reason' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'amount_details' => :'Ptsv2paymentsidreversalsReversalInformationAmountDetails', + :'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?(:'amountDetails') + self.amount_details = attributes[:'amountDetails'] + 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 + # 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 + + invalid_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 !@reason.nil? && @reason.to_s.length > 3 + true + end + + # 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 + + @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 && + amount_details == o.amount_details && + 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 + [amount_details, 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/ptsv2paymentsidreversals_reversal_information_amount_details.rb b/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_information_amount_details.rb new file mode 100644 index 00000000..c86ac49a --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_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 Ptsv2paymentsidreversalsReversalInformationAmountDetails + # 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 + + # 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 > 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 + + invalid_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 + 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 + + # 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/ptsv2payouts_merchant_information.rb b/lib/cybersource_rest_client/models/ptsv2payouts_merchant_information.rb new file mode 100644 index 00000000..5dea0284 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payouts_merchant_information.rb @@ -0,0 +1,258 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2payoutsMerchantInformation + # Four-digit number that the payment card industry uses to classify merchants into market segments. Visa assigned one or more of these values to your business when you started accepting Visa cards. If you do not include this field in your request, CyberSource uses the value in your CyberSource account. For processor-specific information, see the merchant_category_code field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :category_code + + # Time that the transaction was submitted in local time. The time is in hhmmss format. + attr_accessor :submit_local_date_time + + # Your government-assigned tax identification number. For CtV processors, the maximum length is 20. For other processor-specific information, see the merchant_vat_registration_number 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 :vat_registration_number + + attr_accessor :merchant_descriptor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'category_code' => :'categoryCode', + :'submit_local_date_time' => :'submitLocalDateTime', + :'vat_registration_number' => :'vatRegistrationNumber', + :'merchant_descriptor' => :'merchantDescriptor' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'category_code' => :'Integer', + :'submit_local_date_time' => :'String', + :'vat_registration_number' => :'String', + :'merchant_descriptor' => :'Ptsv2payoutsMerchantInformationMerchantDescriptor' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'categoryCode') + self.category_code = attributes[:'categoryCode'] + end + + if attributes.has_key?(:'submitLocalDateTime') + self.submit_local_date_time = attributes[:'submitLocalDateTime'] + end + + if attributes.has_key?(:'vatRegistrationNumber') + self.vat_registration_number = attributes[:'vatRegistrationNumber'] + end + + 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 + if !@category_code.nil? && @category_code > 9999 + invalid_properties.push('invalid value for "category_code", must be smaller than or equal to 9999.') + end + + if !@submit_local_date_time.nil? && @submit_local_date_time.to_s.length > 6 + invalid_properties.push('invalid value for "submit_local_date_time", the character length must be smaller than or equal to 6.') + end + + if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 + invalid_properties.push('invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.') + 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 !@category_code.nil? && @category_code > 9999 + return false if !@submit_local_date_time.nil? && @submit_local_date_time.to_s.length > 6 + return false if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 21 + true + end + + # Custom attribute writer method with validation + # @param [Object] category_code Value to be assigned + def category_code=(category_code) + if !category_code.nil? && category_code > 9999 + fail ArgumentError, 'invalid value for "category_code", must be smaller than or equal to 9999.' + end + + @category_code = category_code + end + + # Custom attribute writer method with validation + # @param [Object] submit_local_date_time Value to be assigned + def submit_local_date_time=(submit_local_date_time) + if !submit_local_date_time.nil? && submit_local_date_time.to_s.length > 6 + fail ArgumentError, 'invalid value for "submit_local_date_time", the character length must be smaller than or equal to 6.' + end + + @submit_local_date_time = submit_local_date_time + end + + # Custom attribute writer method with validation + # @param [Object] vat_registration_number Value to be assigned + def vat_registration_number=(vat_registration_number) + if !vat_registration_number.nil? && vat_registration_number.to_s.length > 21 + fail ArgumentError, 'invalid value for "vat_registration_number", the character length must be smaller than or equal to 21.' + end + + @vat_registration_number = vat_registration_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 && + category_code == o.category_code && + submit_local_date_time == o.submit_local_date_time && + vat_registration_number == o.vat_registration_number && + 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 + [category_code, submit_local_date_time, vat_registration_number, 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/ptsv2payouts_merchant_information_merchant_descriptor.rb b/lib/cybersource_rest_client/models/ptsv2payouts_merchant_information_merchant_descriptor.rb new file mode 100644 index 00000000..1d1113e2 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payouts_merchant_information_merchant_descriptor.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 Ptsv2payoutsMerchantInformationMerchantDescriptor + # 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 + + # Merchant City. 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) + attr_accessor :locality + + # 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) + attr_accessor :country + + # Merchant State. 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) + attr_accessor :administrative_area + + # 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) + attr_accessor :postal_code + + # 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) * FDCCompass (13) * Paymentech (13) + attr_accessor :contact + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'locality' => :'locality', + :'country' => :'country', + :'administrative_area' => :'administrativeArea', + :'postal_code' => :'postalCode', + :'contact' => :'contact' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'name' => :'String', + :'locality' => :'String', + :'country' => :'String', + :'administrative_area' => :'String', + :'postal_code' => :'String', + :'contact' => :'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?(:'locality') + self.locality = attributes[:'locality'] + end + + if attributes.has_key?(:'country') + self.country = attributes[:'country'] + 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?(:'contact') + self.contact = attributes[:'contact'] + end + end + + # Show invalid properties 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 + + if !@locality.nil? && @locality.to_s.length > 13 + invalid_properties.push('invalid value for "locality", the character length must be smaller than or equal to 13.') + 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 !@administrative_area.nil? && @administrative_area.to_s.length > 3 + invalid_properties.push('invalid value for "administrative_area", the character length must be smaller than or equal to 3.') + end + + if !@postal_code.nil? && @postal_code.to_s.length > 14 + invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 14.') + end + + if !@contact.nil? && @contact.to_s.length > 14 + invalid_properties.push('invalid value for "contact", the character length must be smaller than or equal to 14.') + 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 + return false if !@locality.nil? && @locality.to_s.length > 13 + return false if !@country.nil? && @country.to_s.length > 2 + return false if !@administrative_area.nil? && @administrative_area.to_s.length > 3 + return false if !@postal_code.nil? && @postal_code.to_s.length > 14 + return false if !@contact.nil? && @contact.to_s.length > 14 + 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 + + # Custom attribute writer method with validation + # @param [Object] locality Value to be assigned + def locality=(locality) + if !locality.nil? && locality.to_s.length > 13 + fail ArgumentError, 'invalid value for "locality", the character length must be smaller than or equal to 13.' + end + + @locality = locality + 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] administrative_area Value to be assigned + def administrative_area=(administrative_area) + if !administrative_area.nil? && administrative_area.to_s.length > 3 + fail ArgumentError, 'invalid value for "administrative_area", the character length must be smaller than or equal to 3.' + 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 > 14 + fail ArgumentError, 'invalid value for "postal_code", the character length must be smaller than or equal to 14.' + end + + @postal_code = postal_code + end + + # Custom attribute writer method with validation + # @param [Object] contact Value to be assigned + def contact=(contact) + if !contact.nil? && contact.to_s.length > 14 + fail ArgumentError, 'invalid value for "contact", the character length must be smaller than or equal to 14.' + end + + @contact = contact + end + + # 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 && + locality == o.locality && + country == o.country && + administrative_area == o.administrative_area && + postal_code == o.postal_code && + contact == o.contact + end + + # @see the `==` method + # @param [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, locality, country, administrative_area, postal_code, contact].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payouts_order_information.rb b/lib/cybersource_rest_client/models/ptsv2payouts_order_information.rb new file mode 100644 index 00000000..d4788745 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payouts_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 Ptsv2payoutsOrderInformation + attr_accessor :amount_details + + attr_accessor :bill_to + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'amount_details' => :'amountDetails', + :'bill_to' => :'billTo' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'amount_details' => :'Ptsv2payoutsOrderInformationAmountDetails', + :'bill_to' => :'Ptsv2payoutsOrderInformationBillTo' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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?(:'billTo') + self.bill_to = attributes[:'billTo'] + end + end + + # Show invalid properties 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 && + bill_to == o.bill_to + end + + # @see the `==` method + # @param [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, bill_to].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payouts_order_information_amount_details.rb b/lib/cybersource_rest_client/models/ptsv2payouts_order_information_amount_details.rb new file mode 100644 index 00000000..6c4cb8b1 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payouts_order_information_amount_details.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 Ptsv2payoutsOrderInformationAmountDetails + # 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 + + attr_accessor :surcharge + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'total_amount' => :'totalAmount', + :'currency' => :'currency', + :'surcharge' => :'surcharge' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'total_amount' => :'String', + :'currency' => :'String', + :'surcharge' => :'Ptsv2payoutsOrderInformationAmountDetailsSurcharge' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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?(:'surcharge') + self.surcharge = attributes[:'surcharge'] + end + end + + # Show invalid properties 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 + + invalid_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 + 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 + + # 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 && + surcharge == o.surcharge + end + + # @see the `==` method + # @param [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, surcharge].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payouts_order_information_amount_details_surcharge.rb b/lib/cybersource_rest_client/models/ptsv2payouts_order_information_amount_details_surcharge.rb new file mode 100644 index 00000000..5fdff57d --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payouts_order_information_amount_details_surcharge.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 Ptsv2payoutsOrderInformationAmountDetailsSurcharge + # The surcharge amount is included in the total transaction amount but is passed in a separate field to the issuer and acquirer for tracking. The issuer can provide information about the surcharge amount to the customer. - Applicable only for CTV for Payouts. - CTV (<= 08) For processor-specific information, see the surcharge_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 :amount + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'amount' => :'amount' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'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?(:'amount') + self.amount = attributes[:'amount'] + end + end + + # Show invalid properties 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 !@amount.nil? && @amount.to_s.length > 15 + invalid_properties.push('invalid value for "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 !@amount.nil? && @amount.to_s.length > 15 + true + end + + # Custom attribute writer method with validation + # @param [Object] amount Value to be assigned + def amount=(amount) + if !amount.nil? && amount.to_s.length > 15 + fail ArgumentError, 'invalid value for "amount", the character length must be smaller than or equal to 15.' + end + + @amount = 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 && + amount == o.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 + [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/ptsv2payouts_order_information_bill_to.rb b/lib/cybersource_rest_client/models/ptsv2payouts_order_information_bill_to.rb new file mode 100644 index 00000000..8eac72b6 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payouts_order_information_bill_to.rb @@ -0,0 +1,443 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2payoutsOrderInformationBillTo + # 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 + + # 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 + + # 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 + + # 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 + + # 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 + + # Customer's phone number type. For Payouts: This field may be sent only for FDC Compass. Possible Values - * day * home * night * work + attr_accessor :phone_type + + 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 + { + :'first_name' => :'firstName', + :'last_name' => :'lastName', + :'address1' => :'address1', + :'address2' => :'address2', + :'country' => :'country', + :'locality' => :'locality', + :'administrative_area' => :'administrativeArea', + :'postal_code' => :'postalCode', + :'phone_number' => :'phoneNumber', + :'phone_type' => :'phoneType' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'first_name' => :'String', + :'last_name' => :'String', + :'address1' => :'String', + :'address2' => :'String', + :'country' => :'String', + :'locality' => :'String', + :'administrative_area' => :'String', + :'postal_code' => :'String', + :'phone_number' => :'String', + :'phone_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?(:'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?(:'country') + self.country = attributes[:'country'] + 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?(:'phoneNumber') + self.phone_number = attributes[:'phoneNumber'] + end + + if attributes.has_key?(:'phoneType') + self.phone_type = attributes[:'phoneType'] + end + end + + # Show invalid properties 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 !@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 !@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 !@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 !@country.nil? && @country.to_s.length > 2 + 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 !@phone_number.nil? && @phone_number.to_s.length > 15 + phone_type_validator = EnumAttributeValidator.new('String', ['day', 'home', 'night', 'work']) + return false unless phone_type_validator.valid?(@phone_type) + 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] 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] 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] 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 + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] phone_type Object to be assigned + def phone_type=(phone_type) + validator = EnumAttributeValidator.new('String', ['day', 'home', 'night', 'work']) + unless validator.valid?(phone_type) + fail ArgumentError, 'invalid value for "phone_type", must be one of #{validator.allowable_values}.' + end + @phone_type = phone_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 && + first_name == o.first_name && + last_name == o.last_name && + address1 == o.address1 && + address2 == o.address2 && + country == o.country && + locality == o.locality && + administrative_area == o.administrative_area && + postal_code == o.postal_code && + phone_number == o.phone_number && + phone_type == o.phone_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 + [first_name, last_name, address1, address2, country, locality, administrative_area, postal_code, phone_number, phone_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/ptsv2payouts_payment_information.rb b/lib/cybersource_rest_client/models/ptsv2payouts_payment_information.rb new file mode 100644 index 00000000..0f9c1bf3 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payouts_payment_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 Ptsv2payoutsPaymentInformation + attr_accessor :card + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'card' => :'card' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'card' => :'Ptsv2payoutsPaymentInformationCard' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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 + end + + # Show invalid properties 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 + end + + # @see the `==` method + # @param [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].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payouts_payment_information_card.rb b/lib/cybersource_rest_client/models/ptsv2payouts_payment_information_card.rb new file mode 100644 index 00000000..7a403d15 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payouts_payment_information_card.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 Ptsv2payoutsPaymentInformationCard + # Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover + attr_accessor :type + + # Customer’s credit card number. Encoded Account Numbers when processing encoded account numbers, use this field for the encoded account number. For processor-specific information, see the customer_cc_number field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) + attr_accessor :number + + # 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 + + # Flag that specifies the type of account associated with the card. The cardholder provides this information during the payment process. This field is required in the following cases. - Debit transactions on Cielo and Comercio Latino. - Transactions with Brazilian-issued cards on CyberSource through VisaNet. - Applicable only for CTV. **Note** Combo cards in Brazil contain credit and debit functionality in a single card. Visa systems use a credit bank identification number (BIN) for this type of card. Using the BIN to determine whether a card is debit or credit can cause transactions with these cards to be processed incorrectly. CyberSource strongly recommends that you include this field for combo card transactions. Possible values include the following. - CHECKING: Checking account - CREDIT: Credit card account - SAVING: Saving account - LINE_OF_CREDIT: Line of credit - PREPAID: Prepaid card account - UNIVERSAL: Universal account + attr_accessor :source_account_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'number' => :'number', + :'expiration_month' => :'expirationMonth', + :'expiration_year' => :'expirationYear', + :'source_account_type' => :'sourceAccountType' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'type' => :'String', + :'number' => :'String', + :'expiration_month' => :'String', + :'expiration_year' => :'String', + :'source_account_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 + + if attributes.has_key?(:'number') + self.number = attributes[:'number'] + 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?(:'sourceAccountType') + self.source_account_type = attributes[:'sourceAccountType'] + end + end + + # Show invalid properties 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 !@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 !@number.nil? && @number.to_s.length > 20 + invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 20.') + 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 !@source_account_type.nil? && @source_account_type.to_s.length > 2 + invalid_properties.push('invalid value for "source_account_type", 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 !@type.nil? && @type.to_s.length > 3 + return false if !@number.nil? && @number.to_s.length > 20 + 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 !@source_account_type.nil? && @source_account_type.to_s.length > 2 + true + 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] number Value to be assigned + def number=(number) + if !number.nil? && number.to_s.length > 20 + fail ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 20.' + end + + @number = number + 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] source_account_type Value to be assigned + def source_account_type=(source_account_type) + if !source_account_type.nil? && source_account_type.to_s.length > 2 + fail ArgumentError, 'invalid value for "source_account_type", the character length must be smaller than or equal to 2.' + end + + @source_account_type = source_account_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 && + type == o.type && + number == o.number && + expiration_month == o.expiration_month && + expiration_year == o.expiration_year && + source_account_type == o.source_account_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, number, expiration_month, expiration_year, source_account_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/ptsv2payouts_processing_information.rb b/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb new file mode 100644 index 00000000..a0aa2c93 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb @@ -0,0 +1,283 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2payoutsProcessingInformation + # Payouts transaction type. Applicable Processors: FDC Compass, Paymentech, CtV Possible values: **Credit Card Bill Payment** - **CP**: credit card bill payment **Funds Disbursement** - **FD**: funds disbursement - **GD**: government disbursement - **MD**: merchant disbursement **Money Transfer** - **AA**: account to account. Sender and receiver are same person. - **PP**: person to person. Sender and receiver are different. **Prepaid Load** - **TU**: top up + attr_accessor :business_application_id + + # This field is optionally used by Push Payments Gateway participants (merchants and acquirers) to get the attributes for specified networks only. The networks specified in this field must be a subset of the information provided during program enrollment. Refer to Sharing Group Code/Network Routing Order. Note: Supported only in US for domestic transactions involving Push Payments Gateway Service. VisaNet checks to determine if there are issuer routing preferences for any of the networks specified by the network routing order. If an issuer preference exists for one of the specified debit networks, VisaNet makes a routing selection based on the issuer’s preference. If an issuer preference exists for more than one of the specified debit networks, or if no issuer preference exists, VisaNet makes a selection based on the acquirer’s routing priorities. See https://developer.visa.com/request_response_codes#network_id_and_sharing_group_code , under section 'Network ID and Sharing Group Code' on the left panel for available values + attr_accessor :network_routing_order + + # Type of transaction. Possible value for Fast Payments transactions: - internet + attr_accessor :commerce_indicator + + # Please check with Cybersource customer support to see if your merchant account is configured correctly so you can include this field in your request. * For Payouts: max length for FDCCompass is String (22). + attr_accessor :reconciliation_id + + attr_accessor :payouts_options + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'business_application_id' => :'businessApplicationId', + :'network_routing_order' => :'networkRoutingOrder', + :'commerce_indicator' => :'commerceIndicator', + :'reconciliation_id' => :'reconciliationId', + :'payouts_options' => :'payoutsOptions' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'business_application_id' => :'String', + :'network_routing_order' => :'String', + :'commerce_indicator' => :'String', + :'reconciliation_id' => :'String', + :'payouts_options' => :'Ptsv2payoutsProcessingInformationPayoutsOptions' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'businessApplicationId') + self.business_application_id = attributes[:'businessApplicationId'] + end + + if attributes.has_key?(:'networkRoutingOrder') + self.network_routing_order = attributes[:'networkRoutingOrder'] + end + + if attributes.has_key?(:'commerceIndicator') + self.commerce_indicator = attributes[:'commerceIndicator'] + end + + if attributes.has_key?(:'reconciliationId') + self.reconciliation_id = attributes[:'reconciliationId'] + end + + if attributes.has_key?(:'payoutsOptions') + self.payouts_options = attributes[:'payoutsOptions'] + end + end + + # Show invalid properties 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 !@business_application_id.nil? && @business_application_id.to_s.length > 2 + invalid_properties.push('invalid value for "business_application_id", the character length must be smaller than or equal to 2.') + end + + if !@network_routing_order.nil? && @network_routing_order.to_s.length > 30 + invalid_properties.push('invalid value for "network_routing_order", the character length must be smaller than or equal to 30.') + end + + if !@commerce_indicator.nil? && @commerce_indicator.to_s.length > 13 + invalid_properties.push('invalid value for "commerce_indicator", the character length must be smaller than or equal to 13.') + 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 !@business_application_id.nil? && @business_application_id.to_s.length > 2 + return false if !@network_routing_order.nil? && @network_routing_order.to_s.length > 30 + return false if !@commerce_indicator.nil? && @commerce_indicator.to_s.length > 13 + return false if !@reconciliation_id.nil? && @reconciliation_id.to_s.length > 60 + true + end + + # Custom attribute writer method with validation + # @param [Object] business_application_id Value to be assigned + def business_application_id=(business_application_id) + if !business_application_id.nil? && business_application_id.to_s.length > 2 + fail ArgumentError, 'invalid value for "business_application_id", the character length must be smaller than or equal to 2.' + end + + @business_application_id = business_application_id + end + + # Custom attribute writer method with validation + # @param [Object] network_routing_order Value to be assigned + def network_routing_order=(network_routing_order) + if !network_routing_order.nil? && network_routing_order.to_s.length > 30 + fail ArgumentError, 'invalid value for "network_routing_order", the character length must be smaller than or equal to 30.' + end + + @network_routing_order = network_routing_order + 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 > 13 + fail ArgumentError, 'invalid value for "commerce_indicator", the character length must be smaller than or equal to 13.' + end + + @commerce_indicator = commerce_indicator + 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 && + business_application_id == o.business_application_id && + network_routing_order == o.network_routing_order && + commerce_indicator == o.commerce_indicator && + reconciliation_id == o.reconciliation_id && + payouts_options == o.payouts_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 + [business_application_id, network_routing_order, commerce_indicator, reconciliation_id, payouts_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/ptsv2payouts_processing_information_payouts_options.rb b/lib/cybersource_rest_client/models/ptsv2payouts_processing_information_payouts_options.rb new file mode 100644 index 00000000..ca66f289 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payouts_processing_information_payouts_options.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 Ptsv2payoutsProcessingInformationPayoutsOptions + # This field identifies the card acceptor for defining the point of service terminal in both local and interchange environments. An acquirer-assigned code identifying the card acceptor for the transaction. Depending on the acquirer and merchant billing and reporting requirements, the code can represent a merchant, a specific merchant location, or a specific merchant location terminal. Acquiring Institution Identification Code uniquely identifies the merchant. The value from the original is required in any subsequent messages, including reversals, chargebacks, and representments. * Applicable only for CTV for Payouts. + attr_accessor :acquirer_merchant_id + + # This code identifies the financial institution acting as the acquirer of this customer transaction. The acquirer is the member or system user that signed the merchant or ADM or dispensed cash. This number is usually Visa-assigned. * Applicable only for CTV for Payouts. + attr_accessor :acquirer_bin + + # This field contains a number that is used with other data elements as a key to identify and track all messages related to a given cardholder transaction; that is, to a given transaction set. * Applicable only for CTV for Payouts. + attr_accessor :retrieval_reference_number + + # Visa-generated transaction identifier (TID) that is unique for each original authorization and financial request. * Applicable only for CTV for Payouts. + attr_accessor :account_funding_reference_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'acquirer_merchant_id' => :'acquirerMerchantId', + :'acquirer_bin' => :'acquirerBin', + :'retrieval_reference_number' => :'retrievalReferenceNumber', + :'account_funding_reference_id' => :'accountFundingReferenceId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'acquirer_merchant_id' => :'String', + :'acquirer_bin' => :'String', + :'retrieval_reference_number' => :'String', + :'account_funding_reference_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?(:'acquirerMerchantId') + self.acquirer_merchant_id = attributes[:'acquirerMerchantId'] + end + + if attributes.has_key?(:'acquirerBin') + self.acquirer_bin = attributes[:'acquirerBin'] + end + + if attributes.has_key?(:'retrievalReferenceNumber') + self.retrieval_reference_number = attributes[:'retrievalReferenceNumber'] + end + + if attributes.has_key?(:'accountFundingReferenceId') + self.account_funding_reference_id = attributes[:'accountFundingReferenceId'] + end + end + + # Show invalid properties 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 !@acquirer_merchant_id.nil? && @acquirer_merchant_id.to_s.length > 15 + invalid_properties.push('invalid value for "acquirer_merchant_id", the character length must be smaller than or equal to 15.') + end + + if !@acquirer_bin.nil? && @acquirer_bin.to_s.length > 11 + invalid_properties.push('invalid value for "acquirer_bin", the character length must be smaller than or equal to 11.') + end + + if !@retrieval_reference_number.nil? && @retrieval_reference_number.to_s.length > 12 + invalid_properties.push('invalid value for "retrieval_reference_number", the character length must be smaller than or equal to 12.') + end + + if !@account_funding_reference_id.nil? && @account_funding_reference_id.to_s.length > 15 + invalid_properties.push('invalid value for "account_funding_reference_id", 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 !@acquirer_merchant_id.nil? && @acquirer_merchant_id.to_s.length > 15 + return false if !@acquirer_bin.nil? && @acquirer_bin.to_s.length > 11 + return false if !@retrieval_reference_number.nil? && @retrieval_reference_number.to_s.length > 12 + return false if !@account_funding_reference_id.nil? && @account_funding_reference_id.to_s.length > 15 + true + end + + # Custom attribute writer method with validation + # @param [Object] acquirer_merchant_id Value to be assigned + def acquirer_merchant_id=(acquirer_merchant_id) + if !acquirer_merchant_id.nil? && acquirer_merchant_id.to_s.length > 15 + fail ArgumentError, 'invalid value for "acquirer_merchant_id", the character length must be smaller than or equal to 15.' + end + + @acquirer_merchant_id = acquirer_merchant_id + end + + # Custom attribute writer method with validation + # @param [Object] acquirer_bin Value to be assigned + def acquirer_bin=(acquirer_bin) + if !acquirer_bin.nil? && acquirer_bin.to_s.length > 11 + fail ArgumentError, 'invalid value for "acquirer_bin", the character length must be smaller than or equal to 11.' + end + + @acquirer_bin = acquirer_bin + end + + # Custom attribute writer method with validation + # @param [Object] retrieval_reference_number Value to be assigned + def retrieval_reference_number=(retrieval_reference_number) + if !retrieval_reference_number.nil? && retrieval_reference_number.to_s.length > 12 + fail ArgumentError, 'invalid value for "retrieval_reference_number", the character length must be smaller than or equal to 12.' + end + + @retrieval_reference_number = retrieval_reference_number + end + + # Custom attribute writer method with validation + # @param [Object] account_funding_reference_id Value to be assigned + def account_funding_reference_id=(account_funding_reference_id) + if !account_funding_reference_id.nil? && account_funding_reference_id.to_s.length > 15 + fail ArgumentError, 'invalid value for "account_funding_reference_id", the character length must be smaller than or equal to 15.' + end + + @account_funding_reference_id = account_funding_reference_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 && + acquirer_merchant_id == o.acquirer_merchant_id && + acquirer_bin == o.acquirer_bin && + retrieval_reference_number == o.retrieval_reference_number && + account_funding_reference_id == o.account_funding_reference_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 + [acquirer_merchant_id, acquirer_bin, retrieval_reference_number, account_funding_reference_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/ptsv2payouts_recipient_information.rb b/lib/cybersource_rest_client/models/ptsv2payouts_recipient_information.rb new file mode 100644 index 00000000..a290e270 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payouts_recipient_information.rb @@ -0,0 +1,433 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2payoutsRecipientInformation + # First name of recipient. characters. * CTV (14) * Paymentech (30) + attr_accessor :first_name + + # Middle Initial of recipient. Required only for FDCCompass. + attr_accessor :middle_initial + + # Last name of recipient. characters. * CTV (14) * Paymentech (30) + attr_accessor :last_name + + # Recipient address information. Required only for FDCCompass. + attr_accessor :address1 + + # Recipient city. Required only for FDCCompass. + attr_accessor :locality + + # Recipient State. Required only for FDCCompass. + attr_accessor :administrative_area + + # Recipient country code. Required only for FDCCompass. + attr_accessor :country + + # Recipient postal code. Required only for FDCCompass. + attr_accessor :postal_code + + # Recipient phone number. Required only for FDCCompass. + attr_accessor :phone_number + + # Recipient date of birth in YYYYMMDD format. Required only for FDCCompass. + attr_accessor :date_of_birth + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'first_name' => :'firstName', + :'middle_initial' => :'middleInitial', + :'last_name' => :'lastName', + :'address1' => :'address1', + :'locality' => :'locality', + :'administrative_area' => :'administrativeArea', + :'country' => :'country', + :'postal_code' => :'postalCode', + :'phone_number' => :'phoneNumber', + :'date_of_birth' => :'dateOfBirth' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'first_name' => :'String', + :'middle_initial' => :'String', + :'last_name' => :'String', + :'address1' => :'String', + :'locality' => :'String', + :'administrative_area' => :'String', + :'country' => :'String', + :'postal_code' => :'String', + :'phone_number' => :'String', + :'date_of_birth' => :'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?(:'middleInitial') + self.middle_initial = attributes[:'middleInitial'] + 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?(:'locality') + self.locality = attributes[:'locality'] + end + + if attributes.has_key?(:'administrativeArea') + self.administrative_area = attributes[:'administrativeArea'] + end + + if attributes.has_key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.has_key?(:'postalCode') + self.postal_code = attributes[:'postalCode'] + end + + if attributes.has_key?(:'phoneNumber') + self.phone_number = attributes[:'phoneNumber'] + end + + if attributes.has_key?(:'dateOfBirth') + self.date_of_birth = attributes[:'dateOfBirth'] + end + end + + # Show invalid properties 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 > 35 + invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 35.') + end + + if !@middle_initial.nil? && @middle_initial.to_s.length > 1 + invalid_properties.push('invalid value for "middle_initial", the character length must be smaller than or equal to 1.') + end + + if !@last_name.nil? && @last_name.to_s.length > 35 + invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 35.') + end + + if !@address1.nil? && @address1.to_s.length > 50 + invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 50.') + end + + if !@locality.nil? && @locality.to_s.length > 25 + invalid_properties.push('invalid value for "locality", the character length must be smaller than or equal to 25.') + end + + if !@administrative_area.nil? && @administrative_area.to_s.length > 3 + invalid_properties.push('invalid value for "administrative_area", the character length must be smaller than or equal to 3.') + 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 !@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 !@phone_number.nil? && @phone_number.to_s.length > 20 + invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 20.') + end + + if !@date_of_birth.nil? && @date_of_birth.to_s.length > 8 + invalid_properties.push('invalid value for "date_of_birth", the character length must be smaller than or equal to 8.') + end + + if !@date_of_birth.nil? && @date_of_birth.to_s.length < 8 + invalid_properties.push('invalid value for "date_of_birth", the character length must be great 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 !@first_name.nil? && @first_name.to_s.length > 35 + return false if !@middle_initial.nil? && @middle_initial.to_s.length > 1 + return false if !@last_name.nil? && @last_name.to_s.length > 35 + return false if !@address1.nil? && @address1.to_s.length > 50 + return false if !@locality.nil? && @locality.to_s.length > 25 + return false if !@administrative_area.nil? && @administrative_area.to_s.length > 3 + return false if !@country.nil? && @country.to_s.length > 2 + return false if !@postal_code.nil? && @postal_code.to_s.length > 10 + return false if !@phone_number.nil? && @phone_number.to_s.length > 20 + return false if !@date_of_birth.nil? && @date_of_birth.to_s.length > 8 + return false if !@date_of_birth.nil? && @date_of_birth.to_s.length < 8 + 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 > 35 + fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 35.' + end + + @first_name = first_name + end + + # Custom attribute writer method with validation + # @param [Object] middle_initial Value to be assigned + def middle_initial=(middle_initial) + if !middle_initial.nil? && middle_initial.to_s.length > 1 + fail ArgumentError, 'invalid value for "middle_initial", the character length must be smaller than or equal to 1.' + end + + @middle_initial = middle_initial + 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 > 35 + fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 35.' + 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 > 50 + fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 50.' + end + + @address1 = address1 + end + + # Custom attribute writer method with validation + # @param [Object] locality Value to be assigned + def locality=(locality) + if !locality.nil? && locality.to_s.length > 25 + fail ArgumentError, 'invalid value for "locality", the character length must be smaller than or equal to 25.' + 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 > 3 + fail ArgumentError, 'invalid value for "administrative_area", the character length must be smaller than or equal to 3.' + end + + @administrative_area = administrative_area + 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] 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] phone_number Value to be assigned + def phone_number=(phone_number) + if !phone_number.nil? && phone_number.to_s.length > 20 + fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 20.' + end + + @phone_number = phone_number + end + + # Custom attribute writer method with validation + # @param [Object] date_of_birth Value to be assigned + def date_of_birth=(date_of_birth) + if !date_of_birth.nil? && date_of_birth.to_s.length > 8 + fail ArgumentError, 'invalid value for "date_of_birth", the character length must be smaller than or equal to 8.' + end + + if !date_of_birth.nil? && date_of_birth.to_s.length < 8 + fail ArgumentError, 'invalid value for "date_of_birth", the character length must be great than or equal to 8.' + end + + @date_of_birth = date_of_birth + end + + # 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 && + middle_initial == o.middle_initial && + last_name == o.last_name && + address1 == o.address1 && + locality == o.locality && + administrative_area == o.administrative_area && + country == o.country && + postal_code == o.postal_code && + phone_number == o.phone_number && + date_of_birth == o.date_of_birth + end + + # @see the `==` method + # @param [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, middle_initial, last_name, address1, locality, administrative_area, country, postal_code, phone_number, date_of_birth].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/ptsv2payouts_sender_information.rb b/lib/cybersource_rest_client/models/ptsv2payouts_sender_information.rb new file mode 100644 index 00000000..b3bba409 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payouts_sender_information.rb @@ -0,0 +1,517 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Ptsv2payoutsSenderInformation + # Reference number generated by you that uniquely identifies the sender. + attr_accessor :reference_number + + attr_accessor :account + + # First name of sender (Optional). * CTV (14) * Paymentech (30) + attr_accessor :first_name + + # Recipient middle initial (Optional). + attr_accessor :middle_initial + + # Recipient last name (Optional). * CTV (14) * Paymentech (30) + attr_accessor :last_name + + # Name of sender. **Funds Disbursement** This value is the name of the originator sending the funds disbursement. * CTV, Paymentech (30) + attr_accessor :name + + # Street address of sender. **Funds Disbursement** This value is the address of the originator sending the funds disbursement. + attr_accessor :address1 + + # City of sender. **Funds Disbursement** This value is the city of the originator sending the funds disbursement. + attr_accessor :locality + + # Sender’s state. Use the State, Province, and Territory Codes for the United States and Canada. + attr_accessor :administrative_area + + # Country of sender. Use the ISO Standard Country Codes. * CTV (3) + attr_accessor :country_code + + # Sender’s postal code. Required only for FDCCompass. + attr_accessor :postal_code + + # Sender’s phone number. Required only for FDCCompass. + attr_accessor :phone_number + + # Sender’s date of birth in YYYYMMDD format. Required only for FDCCompass. + attr_accessor :date_of_birth + + # Customer's government-assigned tax identification number. + attr_accessor :vat_registration_number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reference_number' => :'referenceNumber', + :'account' => :'account', + :'first_name' => :'firstName', + :'middle_initial' => :'middleInitial', + :'last_name' => :'lastName', + :'name' => :'name', + :'address1' => :'address1', + :'locality' => :'locality', + :'administrative_area' => :'administrativeArea', + :'country_code' => :'countryCode', + :'postal_code' => :'postalCode', + :'phone_number' => :'phoneNumber', + :'date_of_birth' => :'dateOfBirth', + :'vat_registration_number' => :'vatRegistrationNumber' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'reference_number' => :'String', + :'account' => :'Ptsv2payoutsSenderInformationAccount', + :'first_name' => :'String', + :'middle_initial' => :'String', + :'last_name' => :'String', + :'name' => :'String', + :'address1' => :'String', + :'locality' => :'String', + :'administrative_area' => :'String', + :'country_code' => :'String', + :'postal_code' => :'String', + :'phone_number' => :'String', + :'date_of_birth' => :'String', + :'vat_registration_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 + + if attributes.has_key?(:'account') + self.account = attributes[:'account'] + end + + if attributes.has_key?(:'firstName') + self.first_name = attributes[:'firstName'] + end + + if attributes.has_key?(:'middleInitial') + self.middle_initial = attributes[:'middleInitial'] + end + + if attributes.has_key?(:'lastName') + self.last_name = attributes[:'lastName'] + end + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'address1') + self.address1 = attributes[:'address1'] + 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?(:'countryCode') + self.country_code = attributes[:'countryCode'] + end + + if attributes.has_key?(:'postalCode') + self.postal_code = attributes[:'postalCode'] + end + + if attributes.has_key?(:'phoneNumber') + self.phone_number = attributes[:'phoneNumber'] + end + + if attributes.has_key?(:'dateOfBirth') + self.date_of_birth = attributes[:'dateOfBirth'] + end + + if attributes.has_key?(:'vatRegistrationNumber') + self.vat_registration_number = attributes[:'vatRegistrationNumber'] + end + end + + # Show invalid properties 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 + + if !@first_name.nil? && @first_name.to_s.length > 35 + invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 35.') + end + + if !@middle_initial.nil? && @middle_initial.to_s.length > 1 + invalid_properties.push('invalid value for "middle_initial", the character length must be smaller than or equal to 1.') + end + + if !@last_name.nil? && @last_name.to_s.length > 35 + invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 35.') + end + + if !@name.nil? && @name.to_s.length > 24 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 24.') + end + + if !@address1.nil? && @address1.to_s.length > 50 + invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 50.') + end + + if !@locality.nil? && @locality.to_s.length > 25 + invalid_properties.push('invalid value for "locality", the character length must be smaller than or equal to 25.') + 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 !@country_code.nil? && @country_code.to_s.length > 2 + invalid_properties.push('invalid value for "country_code", 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 !@phone_number.nil? && @phone_number.to_s.length > 20 + invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 20.') + end + + if !@date_of_birth.nil? && @date_of_birth.to_s.length > 8 + invalid_properties.push('invalid value for "date_of_birth", the character length must be smaller than or equal to 8.') + end + + if !@date_of_birth.nil? && @date_of_birth.to_s.length < 8 + invalid_properties.push('invalid value for "date_of_birth", the character length must be great than or equal to 8.') + end + + if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 13 + invalid_properties.push('invalid value for "vat_registration_number", the character length must be smaller than or equal to 13.') + 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 + return false if !@first_name.nil? && @first_name.to_s.length > 35 + return false if !@middle_initial.nil? && @middle_initial.to_s.length > 1 + return false if !@last_name.nil? && @last_name.to_s.length > 35 + return false if !@name.nil? && @name.to_s.length > 24 + return false if !@address1.nil? && @address1.to_s.length > 50 + return false if !@locality.nil? && @locality.to_s.length > 25 + return false if !@administrative_area.nil? && @administrative_area.to_s.length > 2 + return false if !@country_code.nil? && @country_code.to_s.length > 2 + return false if !@postal_code.nil? && @postal_code.to_s.length > 10 + return false if !@phone_number.nil? && @phone_number.to_s.length > 20 + return false if !@date_of_birth.nil? && @date_of_birth.to_s.length > 8 + return false if !@date_of_birth.nil? && @date_of_birth.to_s.length < 8 + return false if !@vat_registration_number.nil? && @vat_registration_number.to_s.length > 13 + 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 + + # 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 > 35 + fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 35.' + end + + @first_name = first_name + end + + # Custom attribute writer method with validation + # @param [Object] middle_initial Value to be assigned + def middle_initial=(middle_initial) + if !middle_initial.nil? && middle_initial.to_s.length > 1 + fail ArgumentError, 'invalid value for "middle_initial", the character length must be smaller than or equal to 1.' + end + + @middle_initial = middle_initial + 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 > 35 + fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 35.' + end + + @last_name = last_name + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if !name.nil? && name.to_s.length > 24 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 24.' + end + + @name = 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 > 50 + fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 50.' + end + + @address1 = address1 + end + + # Custom attribute writer method with validation + # @param [Object] locality Value to be assigned + def locality=(locality) + if !locality.nil? && locality.to_s.length > 25 + fail ArgumentError, 'invalid value for "locality", the character length must be smaller than or equal to 25.' + 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] country_code Value to be assigned + def country_code=(country_code) + if !country_code.nil? && country_code.to_s.length > 2 + fail ArgumentError, 'invalid value for "country_code", the character length must be smaller than or equal to 2.' + end + + @country_code = country_code + 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] phone_number Value to be assigned + def phone_number=(phone_number) + if !phone_number.nil? && phone_number.to_s.length > 20 + fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 20.' + end + + @phone_number = phone_number + end + + # Custom attribute writer method with validation + # @param [Object] date_of_birth Value to be assigned + def date_of_birth=(date_of_birth) + if !date_of_birth.nil? && date_of_birth.to_s.length > 8 + fail ArgumentError, 'invalid value for "date_of_birth", the character length must be smaller than or equal to 8.' + end + + if !date_of_birth.nil? && date_of_birth.to_s.length < 8 + fail ArgumentError, 'invalid value for "date_of_birth", the character length must be great than or equal to 8.' + end + + @date_of_birth = date_of_birth + end + + # Custom attribute writer method with validation + # @param [Object] vat_registration_number Value to be assigned + def vat_registration_number=(vat_registration_number) + if !vat_registration_number.nil? && vat_registration_number.to_s.length > 13 + fail ArgumentError, 'invalid value for "vat_registration_number", the character length must be smaller than or equal to 13.' + end + + @vat_registration_number = vat_registration_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 && + account == o.account && + first_name == o.first_name && + middle_initial == o.middle_initial && + last_name == o.last_name && + name == o.name && + address1 == o.address1 && + locality == o.locality && + administrative_area == o.administrative_area && + country_code == o.country_code && + postal_code == o.postal_code && + phone_number == o.phone_number && + date_of_birth == o.date_of_birth && + vat_registration_number == o.vat_registration_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, account, first_name, middle_initial, last_name, name, address1, locality, administrative_area, country_code, postal_code, phone_number, date_of_birth, vat_registration_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/ptsv2payouts_sender_information_account.rb b/lib/cybersource_rest_client/models/ptsv2payouts_sender_information_account.rb new file mode 100644 index 00000000..2fdd56e2 --- /dev/null +++ b/lib/cybersource_rest_client/models/ptsv2payouts_sender_information_account.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 Ptsv2payoutsSenderInformationAccount + # Source of funds. Possible values: Paymentech, CTV, FDC Compass: - 01: Credit card - 02: Debit card - 03: Prepaid card Paymentech, CTV - - 04: Cash - 05: Debit or deposit account that is not linked to a Visa card. Includes checking accounts, savings accounts, and proprietary debit or ATM cards. - 06: Credit account that is not linked to a Visa card. Includes credit cards and proprietary lines of credit. FDCCompass - - 04: Deposit Account **Funds Disbursement** This value is most likely 05 to identify that the originator used a deposit account to fund the disbursement. **Credit Card Bill Payment** This value must be 02, 03, 04, or 05. + attr_accessor :funds_source + + # The account number of the entity funding the transaction. It is the sender’s account number. It can be a debit/credit card account number or bank account number. **Funds disbursements** This field is optional. **All other transactions** This field is required when the sender funds the transaction with a financial instrument, for example debit card. Length: * FDCCompass (<= 19) * Paymentech (<= 16) + attr_accessor :number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'funds_source' => :'fundsSource', + :'number' => :'number' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'funds_source' => :'String', + :'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?(:'fundsSource') + self.funds_source = attributes[:'fundsSource'] + end + + if attributes.has_key?(:'number') + self.number = attributes[:'number'] + end + end + + # Show invalid properties 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 !@funds_source.nil? && @funds_source.to_s.length > 2 + invalid_properties.push('invalid value for "funds_source", the character length must be smaller than or equal to 2.') + end + + if !@funds_source.nil? && @funds_source.to_s.length < 2 + invalid_properties.push('invalid value for "funds_source", the character length must be great than or equal to 2.') + end + + if !@number.nil? && @number.to_s.length > 34 + invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 34.') + 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 !@funds_source.nil? && @funds_source.to_s.length > 2 + return false if !@funds_source.nil? && @funds_source.to_s.length < 2 + return false if !@number.nil? && @number.to_s.length > 34 + true + end + + # Custom attribute writer method with validation + # @param [Object] funds_source Value to be assigned + def funds_source=(funds_source) + if !funds_source.nil? && funds_source.to_s.length > 2 + fail ArgumentError, 'invalid value for "funds_source", the character length must be smaller than or equal to 2.' + end + + if !funds_source.nil? && funds_source.to_s.length < 2 + fail ArgumentError, 'invalid value for "funds_source", the character length must be great than or equal to 2.' + end + + @funds_source = funds_source + end + + # Custom attribute writer method with validation + # @param [Object] number Value to be assigned + def number=(number) + if !number.nil? && number.to_s.length > 34 + fail ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 34.' + end + + @number = 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 && + funds_source == o.funds_source && + number == o.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 + [funds_source, 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_client/models/refund_capture_request.rb b/lib/cybersource_rest_client/models/refund_capture_request.rb similarity index 90% rename from lib/cyberSource_client/models/refund_capture_request.rb rename to lib/cybersource_rest_client/models/refund_capture_request.rb index 757cd195..62b9392f 100644 --- a/lib/cyberSource_client/models/refund_capture_request.rb +++ b/lib/cybersource_rest_client/models/refund_capture_request.rb @@ -32,7 +32,7 @@ class RefundCaptureRequest attr_accessor :point_of_sale_information - # TBD + # Description of this field is not available. attr_accessor :merchant_defined_information # Attribute mapping from ruby-style variable name to JSON key. @@ -54,16 +54,16 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'client_reference_information' => :'V2paymentsClientReferenceInformation', - :'processing_information' => :'V2paymentsidrefundsProcessingInformation', - :'payment_information' => :'V2paymentsidrefundsPaymentInformation', - :'order_information' => :'V2paymentsidrefundsOrderInformation', - :'buyer_information' => :'V2paymentsidcapturesBuyerInformation', - :'device_information' => :'V2paymentsDeviceInformation', - :'merchant_information' => :'V2paymentsidrefundsMerchantInformation', - :'aggregator_information' => :'V2paymentsidcapturesAggregatorInformation', - :'point_of_sale_information' => :'V2paymentsidrefundsPointOfSaleInformation', - :'merchant_defined_information' => :'Array' + :'client_reference_information' => :'Ptsv2paymentsClientReferenceInformation', + :'processing_information' => :'Ptsv2paymentsidrefundsProcessingInformation', + :'payment_information' => :'Ptsv2paymentsidrefundsPaymentInformation', + :'order_information' => :'Ptsv2paymentsidrefundsOrderInformation', + :'buyer_information' => :'Ptsv2paymentsidcapturesBuyerInformation', + :'device_information' => :'Ptsv2paymentsDeviceInformation', + :'merchant_information' => :'Ptsv2paymentsidrefundsMerchantInformation', + :'aggregator_information' => :'Ptsv2paymentsidcapturesAggregatorInformation', + :'point_of_sale_information' => :'Ptsv2paymentsidrefundsPointOfSaleInformation', + :'merchant_defined_information' => :'Array' } end diff --git a/lib/cyberSource_client/models/refund_payment_request.rb b/lib/cybersource_rest_client/models/refund_payment_request.rb similarity index 90% rename from lib/cyberSource_client/models/refund_payment_request.rb rename to lib/cybersource_rest_client/models/refund_payment_request.rb index 9be6bbf8..33cf2c84 100644 --- a/lib/cyberSource_client/models/refund_payment_request.rb +++ b/lib/cybersource_rest_client/models/refund_payment_request.rb @@ -32,7 +32,7 @@ class RefundPaymentRequest attr_accessor :point_of_sale_information - # TBD + # Description of this field is not available. attr_accessor :merchant_defined_information # Attribute mapping from ruby-style variable name to JSON key. @@ -54,16 +54,16 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'client_reference_information' => :'V2paymentsClientReferenceInformation', - :'processing_information' => :'V2paymentsidrefundsProcessingInformation', - :'payment_information' => :'V2paymentsidrefundsPaymentInformation', - :'order_information' => :'V2paymentsidrefundsOrderInformation', - :'buyer_information' => :'V2paymentsidcapturesBuyerInformation', - :'device_information' => :'V2paymentsDeviceInformation', - :'merchant_information' => :'V2paymentsidrefundsMerchantInformation', - :'aggregator_information' => :'V2paymentsidcapturesAggregatorInformation', - :'point_of_sale_information' => :'V2paymentsidrefundsPointOfSaleInformation', - :'merchant_defined_information' => :'Array' + :'client_reference_information' => :'Ptsv2paymentsClientReferenceInformation', + :'processing_information' => :'Ptsv2paymentsidrefundsProcessingInformation', + :'payment_information' => :'Ptsv2paymentsidrefundsPaymentInformation', + :'order_information' => :'Ptsv2paymentsidrefundsOrderInformation', + :'buyer_information' => :'Ptsv2paymentsidcapturesBuyerInformation', + :'device_information' => :'Ptsv2paymentsDeviceInformation', + :'merchant_information' => :'Ptsv2paymentsidrefundsMerchantInformation', + :'aggregator_information' => :'Ptsv2paymentsidcapturesAggregatorInformation', + :'point_of_sale_information' => :'Ptsv2paymentsidrefundsPointOfSaleInformation', + :'merchant_defined_information' => :'Array' } end diff --git a/lib/cybersource_rest_client/models/request_body.rb b/lib/cybersource_rest_client/models/request_body.rb new file mode 100644 index 00000000..31394447 --- /dev/null +++ b/lib/cybersource_rest_client/models/request_body.rb @@ -0,0 +1,463 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class RequestBody + attr_accessor :organization_id + + attr_accessor :report_definition_name + + attr_accessor :report_fields + + attr_accessor :report_mime_type + + attr_accessor :report_frequency + + attr_accessor :report_name + + attr_accessor :timezone + + attr_accessor :start_time + + attr_accessor :start_day + + attr_accessor :report_filters + + attr_accessor :report_preferences + + 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_name' => :'reportDefinitionName', + :'report_fields' => :'reportFields', + :'report_mime_type' => :'reportMimeType', + :'report_frequency' => :'reportFrequency', + :'report_name' => :'reportName', + :'timezone' => :'timezone', + :'start_time' => :'startTime', + :'start_day' => :'startDay', + :'report_filters' => :'reportFilters', + :'report_preferences' => :'reportPreferences', + :'selected_merchant_group_name' => :'selectedMerchantGroupName' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'organization_id' => :'String', + :'report_definition_name' => :'String', + :'report_fields' => :'Array', + :'report_mime_type' => :'String', + :'report_frequency' => :'String', + :'report_name' => :'String', + :'timezone' => :'String', + :'start_time' => :'DateTime', + :'start_day' => :'Integer', + :'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?(:'reportDefinitionName') + self.report_definition_name = attributes[:'reportDefinitionName'] + end + + if attributes.has_key?(:'reportFields') + if (value = attributes[:'reportFields']).is_a?(Array) + self.report_fields = value + end + 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?(:'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 + if !@organization_id.nil? && @organization_id !~ Regexp.new(/[a-zA-Z0-9-_]+/) + invalid_properties.push('invalid value for "organization_id", must conform to the pattern /[a-zA-Z0-9-_]+/.') + end + + if @report_definition_name.nil? + invalid_properties.push('invalid value for "report_definition_name", report_definition_name cannot be nil.') + end + + if @report_definition_name.to_s.length > 80 + invalid_properties.push('invalid value for "report_definition_name", the character length must be smaller than or equal to 80.') + end + + if @report_definition_name.to_s.length < 1 + invalid_properties.push('invalid value for "report_definition_name", the character length must be great than or equal to 1.') + end + + if @report_definition_name !~ Regexp.new(/[a-zA-Z0-9-]+/) + invalid_properties.push('invalid value for "report_definition_name", must conform to the pattern /[a-zA-Z0-9-]+/.') + end + + if @report_fields.nil? + invalid_properties.push('invalid value for "report_fields", report_fields cannot be nil.') + end + + if @report_name.nil? + invalid_properties.push('invalid value for "report_name", report_name cannot be nil.') + end + + if @report_name.to_s.length > 128 + invalid_properties.push('invalid value for "report_name", the character length must be smaller than or equal to 128.') + end + + if @report_name.to_s.length < 1 + invalid_properties.push('invalid value for "report_name", the character length must be great than or equal to 1.') + end + + if @report_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/) + invalid_properties.push('invalid value for "report_name", must conform to the pattern /[a-zA-Z0-9-_ ]+/.') + end + + if !@start_day.nil? && @start_day > 7 + invalid_properties.push('invalid value for "start_day", must be smaller than or equal to 7.') + end + + if !@start_day.nil? && @start_day < 1 + invalid_properties.push('invalid value for "start_day", must be greater than or equal to 1.') + end + + if !@selected_merchant_group_name.nil? && @selected_merchant_group_name !~ Regexp.new(/[0-9]*/) + invalid_properties.push('invalid value for "selected_merchant_group_name", must conform to the pattern /[0-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 !@organization_id.nil? && @organization_id !~ Regexp.new(/[a-zA-Z0-9-_]+/) + return false if @report_definition_name.nil? + return false if @report_definition_name.to_s.length > 80 + return false if @report_definition_name.to_s.length < 1 + return false if @report_definition_name !~ Regexp.new(/[a-zA-Z0-9-]+/) + return false if @report_fields.nil? + report_mime_type_validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv']) + return false unless report_mime_type_validator.valid?(@report_mime_type) + return false if @report_name.nil? + return false if @report_name.to_s.length > 128 + return false if @report_name.to_s.length < 1 + return false if @report_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/) + return false if !@start_day.nil? && @start_day > 7 + return false if !@start_day.nil? && @start_day < 1 + return false if !@selected_merchant_group_name.nil? && @selected_merchant_group_name !~ Regexp.new(/[0-9]*/) + true + end + + # Custom attribute writer method with validation + # @param [Object] organization_id Value to be assigned + def organization_id=(organization_id) + if !organization_id.nil? && organization_id !~ Regexp.new(/[a-zA-Z0-9-_]+/) + fail ArgumentError, 'invalid value for "organization_id", must conform to the pattern /[a-zA-Z0-9-_]+/.' + end + + @organization_id = organization_id + end + + # Custom attribute writer method with validation + # @param [Object] report_definition_name Value to be assigned + def report_definition_name=(report_definition_name) + if report_definition_name.nil? + fail ArgumentError, 'report_definition_name cannot be nil' + end + + if report_definition_name.to_s.length > 80 + fail ArgumentError, 'invalid value for "report_definition_name", the character length must be smaller than or equal to 80.' + end + + if report_definition_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "report_definition_name", the character length must be great than or equal to 1.' + end + + if report_definition_name !~ Regexp.new(/[a-zA-Z0-9-]+/) + fail ArgumentError, 'invalid value for "report_definition_name", must conform to the pattern /[a-zA-Z0-9-]+/.' + end + + @report_definition_name = report_definition_name + 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 with validation + # @param [Object] report_name Value to be assigned + def report_name=(report_name) + if report_name.nil? + fail ArgumentError, 'report_name cannot be nil' + end + + if report_name.to_s.length > 128 + fail ArgumentError, 'invalid value for "report_name", the character length must be smaller than or equal to 128.' + end + + if report_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "report_name", the character length must be great than or equal to 1.' + end + + if report_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/) + fail ArgumentError, 'invalid value for "report_name", must conform to the pattern /[a-zA-Z0-9-_ ]+/.' + end + + @report_name = report_name + end + + # Custom attribute writer method with validation + # @param [Object] start_day Value to be assigned + def start_day=(start_day) + if !start_day.nil? && start_day > 7 + fail ArgumentError, 'invalid value for "start_day", must be smaller than or equal to 7.' + end + + if !start_day.nil? && start_day < 1 + fail ArgumentError, 'invalid value for "start_day", must be greater than or equal to 1.' + end + + @start_day = start_day + end + + # Custom attribute writer method with validation + # @param [Object] selected_merchant_group_name Value to be assigned + def selected_merchant_group_name=(selected_merchant_group_name) + if !selected_merchant_group_name.nil? && selected_merchant_group_name !~ Regexp.new(/[0-9]*/) + fail ArgumentError, 'invalid value for "selected_merchant_group_name", must conform to the pattern /[0-9]*/.' + end + + @selected_merchant_group_name = selected_merchant_group_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 && + organization_id == o.organization_id && + report_definition_name == o.report_definition_name && + report_fields == o.report_fields && + 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_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_name, report_fields, report_mime_type, report_frequency, report_name, timezone, start_time, start_day, 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_1.rb b/lib/cybersource_rest_client/models/request_body_1.rb new file mode 100644 index 00000000..9b114a78 --- /dev/null +++ b/lib/cybersource_rest_client/models/request_body_1.rb @@ -0,0 +1,415 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class RequestBody1 + # Valid CyberSource Organization Id + attr_accessor :organization_id + + attr_accessor :report_definition_name + + # List of fields which needs to get included in a report + attr_accessor :report_fields + + # Format of the report + attr_accessor :report_mime_type + + # Name of the report + attr_accessor :report_name + + # Timezone of the report + attr_accessor :timezone + + # Start time of the report + attr_accessor :report_start_time + + # End time of the report + attr_accessor :report_end_time + + attr_accessor :report_filters + + attr_accessor :report_preferences + + # Specifies the 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_definition_name' => :'reportDefinitionName', + :'report_fields' => :'reportFields', + :'report_mime_type' => :'reportMimeType', + :'report_name' => :'reportName', + :'timezone' => :'timezone', + :'report_start_time' => :'reportStartTime', + :'report_end_time' => :'reportEndTime', + :'report_filters' => :'reportFilters', + :'report_preferences' => :'reportPreferences', + :'selected_merchant_group_name' => :'selectedMerchantGroupName' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'organization_id' => :'String', + :'report_definition_name' => :'String', + :'report_fields' => :'Array', + :'report_mime_type' => :'String', + :'report_name' => :'String', + :'timezone' => :'String', + :'report_start_time' => :'DateTime', + :'report_end_time' => :'DateTime', + :'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?(:'reportDefinitionName') + self.report_definition_name = attributes[:'reportDefinitionName'] + end + + if attributes.has_key?(:'reportFields') + if (value = attributes[:'reportFields']).is_a?(Array) + self.report_fields = value + end + end + + if attributes.has_key?(:'reportMimeType') + self.report_mime_type = attributes[:'reportMimeType'] + 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?(:'reportStartTime') + self.report_start_time = attributes[:'reportStartTime'] + end + + if attributes.has_key?(:'reportEndTime') + self.report_end_time = attributes[:'reportEndTime'] + 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 + if !@organization_id.nil? && @organization_id !~ Regexp.new(/[a-zA-Z0-9-_]+/) + invalid_properties.push('invalid value for "organization_id", must conform to the pattern /[a-zA-Z0-9-_]+/.') + end + + if !@report_definition_name.nil? && @report_definition_name.to_s.length > 80 + invalid_properties.push('invalid value for "report_definition_name", the character length must be smaller than or equal to 80.') + end + + if !@report_definition_name.nil? && @report_definition_name.to_s.length < 1 + invalid_properties.push('invalid value for "report_definition_name", the character length must be great than or equal to 1.') + end + + if !@report_definition_name.nil? && @report_definition_name !~ Regexp.new(/[a-zA-Z0-9-]+/) + invalid_properties.push('invalid value for "report_definition_name", must conform to the pattern /[a-zA-Z0-9-]+/.') + end + + if !@report_name.nil? && @report_name.to_s.length > 128 + invalid_properties.push('invalid value for "report_name", the character length must be smaller than or equal to 128.') + end + + if !@report_name.nil? && @report_name.to_s.length < 1 + invalid_properties.push('invalid value for "report_name", the character length must be great than or equal to 1.') + end + + if !@report_name.nil? && @report_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/) + invalid_properties.push('invalid value for "report_name", must conform to the pattern /[a-zA-Z0-9-_ ]+/.') + end + + if !@selected_merchant_group_name.nil? && @selected_merchant_group_name !~ Regexp.new(/[0-9]*/) + invalid_properties.push('invalid value for "selected_merchant_group_name", must conform to the pattern /[0-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 !@organization_id.nil? && @organization_id !~ Regexp.new(/[a-zA-Z0-9-_]+/) + return false if !@report_definition_name.nil? && @report_definition_name.to_s.length > 80 + return false if !@report_definition_name.nil? && @report_definition_name.to_s.length < 1 + return false if !@report_definition_name.nil? && @report_definition_name !~ Regexp.new(/[a-zA-Z0-9-]+/) + report_mime_type_validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv']) + return false unless report_mime_type_validator.valid?(@report_mime_type) + return false if !@report_name.nil? && @report_name.to_s.length > 128 + return false if !@report_name.nil? && @report_name.to_s.length < 1 + return false if !@report_name.nil? && @report_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/) + return false if !@selected_merchant_group_name.nil? && @selected_merchant_group_name !~ Regexp.new(/[0-9]*/) + true + end + + # Custom attribute writer method with validation + # @param [Object] organization_id Value to be assigned + def organization_id=(organization_id) + if !organization_id.nil? && organization_id !~ Regexp.new(/[a-zA-Z0-9-_]+/) + fail ArgumentError, 'invalid value for "organization_id", must conform to the pattern /[a-zA-Z0-9-_]+/.' + end + + @organization_id = organization_id + end + + # Custom attribute writer method with validation + # @param [Object] report_definition_name Value to be assigned + def report_definition_name=(report_definition_name) + if !report_definition_name.nil? && report_definition_name.to_s.length > 80 + fail ArgumentError, 'invalid value for "report_definition_name", the character length must be smaller than or equal to 80.' + end + + if !report_definition_name.nil? && report_definition_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "report_definition_name", the character length must be great than or equal to 1.' + end + + if !report_definition_name.nil? && report_definition_name !~ Regexp.new(/[a-zA-Z0-9-]+/) + fail ArgumentError, 'invalid value for "report_definition_name", must conform to the pattern /[a-zA-Z0-9-]+/.' + end + + @report_definition_name = report_definition_name + 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 with validation + # @param [Object] report_name Value to be assigned + def report_name=(report_name) + if !report_name.nil? && report_name.to_s.length > 128 + fail ArgumentError, 'invalid value for "report_name", the character length must be smaller than or equal to 128.' + end + + if !report_name.nil? && report_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "report_name", the character length must be great than or equal to 1.' + end + + if !report_name.nil? && report_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/) + fail ArgumentError, 'invalid value for "report_name", must conform to the pattern /[a-zA-Z0-9-_ ]+/.' + end + + @report_name = report_name + end + + # Custom attribute writer method with validation + # @param [Object] selected_merchant_group_name Value to be assigned + def selected_merchant_group_name=(selected_merchant_group_name) + if !selected_merchant_group_name.nil? && selected_merchant_group_name !~ Regexp.new(/[0-9]*/) + fail ArgumentError, 'invalid value for "selected_merchant_group_name", must conform to the pattern /[0-9]*/.' + end + + @selected_merchant_group_name = selected_merchant_group_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 && + organization_id == o.organization_id && + report_definition_name == o.report_definition_name && + report_fields == o.report_fields && + report_mime_type == o.report_mime_type && + report_name == o.report_name && + timezone == o.timezone && + report_start_time == o.report_start_time && + report_end_time == o.report_end_time && + 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_name, report_fields, report_mime_type, report_name, timezone, report_start_time, report_end_time, 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_client/models/response_status.rb b/lib/cybersource_rest_client/models/response_status.rb similarity index 100% rename from lib/cyberSource_client/models/response_status.rb rename to lib/cybersource_rest_client/models/response_status.rb diff --git a/lib/cyberSource_client/models/response_status_details.rb b/lib/cybersource_rest_client/models/response_status_details.rb similarity index 100% rename from lib/cyberSource_client/models/response_status_details.rb rename to lib/cybersource_rest_client/models/response_status_details.rb diff --git a/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers__links.rb b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers__links.rb new file mode 100644 index 00000000..82c832b8 --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers__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 Tmsv1instrumentidentifiersLinks + attr_accessor :_self + + attr_accessor :ancestor + + attr_accessor :successor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_self' => :'self', + :'ancestor' => :'ancestor', + :'successor' => :'successor' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_self' => :'Tmsv1instrumentidentifiersLinksSelf', + :'ancestor' => :'Tmsv1instrumentidentifiersLinksSelf', + :'successor' => :'Tmsv1instrumentidentifiersLinksSelf' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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?(:'ancestor') + self.ancestor = attributes[:'ancestor'] + end + + if attributes.has_key?(:'successor') + self.successor = attributes[:'successor'] + end + end + + # Show invalid properties 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 && + ancestor == o.ancestor && + successor == o.successor + end + + # @see the `==` method + # @param [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, ancestor, successor].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + 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__links_self.rb b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers__links_self.rb new file mode 100644 index 00000000..c2ae2a2d --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers__links_self.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 Tmsv1instrumentidentifiersLinksSelf + 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/tmsv1instrumentidentifiers_authorization_options_merchant_initiated_transaction.rb b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_authorization_options_merchant_initiated_transaction.rb new file mode 100644 index 00000000..178c52c5 --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_authorization_options_merchant_initiated_transaction.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 Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction + # Previous Consumer Initiated Transaction Id. + attr_accessor :previous_transaction_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'previous_transaction_id' => :'previousTransactionId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'previous_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?(:'previousTransactionId') + self.previous_transaction_id = attributes[:'previousTransactionId'] + end + end + + # Show invalid properties 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 && + previous_transaction_id == o.previous_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 + [previous_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/tmsv1instrumentidentifiers_bank_account.rb b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_bank_account.rb new file mode 100644 index 00000000..1defca24 --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_bank_account.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 Tmsv1instrumentidentifiersBankAccount + # Bank account number. + attr_accessor :number + + # Routing number. + attr_accessor :routing_number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number' => :'number', + :'routing_number' => :'routingNumber' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'number' => :'String', + :'routing_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?(:'number') + self.number = attributes[:'number'] + end + + if attributes.has_key?(:'routingNumber') + self.routing_number = attributes[:'routingNumber'] + end + end + + # Show invalid properties 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 && + routing_number == o.routing_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 + [number, routing_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/tmsv1instrumentidentifiers_card.rb b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_card.rb new file mode 100644 index 00000000..b2fc2ca5 --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_card.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 Tmsv1instrumentidentifiersCard + # Credit card number (PAN). + attr_accessor :number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number' => :'number' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'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?(:'number') + self.number = attributes[:'number'] + end + end + + # Show invalid properties 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 + end + + # @see the `==` method + # @param [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].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + 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_details.rb b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_details.rb new file mode 100644 index 00000000..20f4b3c4 --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_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 Tmsv1instrumentidentifiersDetails + # The name of the field that threw the error. + attr_accessor :name + + # The location of the field that threw the error. + attr_accessor :location + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'location' => :'location' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'name' => :'String', + :'location' => :'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?(:'location') + self.location = attributes[:'location'] + end + end + + # Show invalid properties 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 && + location == o.location + end + + # @see the `==` method + # @param [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, location].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + 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_metadata.rb b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_metadata.rb new file mode 100644 index 00000000..55a39c72 --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_metadata.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 Tmsv1instrumentidentifiersMetadata + # The creator of the token. + attr_accessor :creator + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'creator' => :'creator' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'creator' => :'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?(:'creator') + self.creator = attributes[:'creator'] + end + end + + # Show invalid properties 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 && + creator == o.creator + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [creator].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + 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.rb b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_processing_information.rb new file mode 100644 index 00000000..798456b6 --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_processing_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 Tmsv1instrumentidentifiersProcessingInformation + attr_accessor :authorization_options + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'authorization_options' => :'authorizationOptions' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'authorization_options' => :'Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptions' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'authorizationOptions') + self.authorization_options = attributes[:'authorizationOptions'] + end + end + + # Show invalid properties 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 && + authorization_options == o.authorization_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 + [authorization_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/tmsv1instrumentidentifiers_processing_information_authorization_options.rb b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_processing_information_authorization_options.rb new file mode 100644 index 00000000..7c4d0ded --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_processing_information_authorization_options.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 Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptions + attr_accessor :initiator + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'initiator' => :'initiator' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'initiator' => :'Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'initiator') + self.initiator = attributes[:'initiator'] + end + end + + # Show invalid properties 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 && + initiator == o.initiator + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [initiator].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + 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 new file mode 100644 index 00000000..9c821f4d --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_processing_information_authorization_options_initiator.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 Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator + attr_accessor :merchant_initiated_transaction + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'merchant_initiated_transaction' => :'merchantInitiatedTransaction' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'merchant_initiated_transaction' => :'Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'merchantInitiatedTransaction') + self.merchant_initiated_transaction = attributes[:'merchantInitiatedTransaction'] + end + end + + # Show invalid properties 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_initiated_transaction == o.merchant_initiated_transaction + end + + # @see the `==` method + # @param [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_initiated_transaction].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tmsv1paymentinstruments_bank_account.rb b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_bank_account.rb new file mode 100644 index 00000000..f992b62c --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_bank_account.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 Tmsv1paymentinstrumentsBankAccount + # Type of Bank Account. + 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/tmsv1paymentinstruments_bill_to.rb b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_bill_to.rb new file mode 100644 index 00000000..074bbf88 --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_bill_to.rb @@ -0,0 +1,284 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Tmsv1paymentinstrumentsBillTo + # Bill to First Name. + attr_accessor :first_name + + # Bill to Last Name. + attr_accessor :last_name + + # Bill to Company. + attr_accessor :company + + # Bill to Address Line 1. + attr_accessor :address1 + + # Bill to Address Line 2. + attr_accessor :address2 + + # Bill to City. + attr_accessor :locality + + # Bill to State. + attr_accessor :administrative_area + + # Bill to Postal Code. + attr_accessor :postal_code + + # Bill to Country. Accepts input in the ISO 3166-1 standard, stores as ISO 3166-1-Alpha-2 + attr_accessor :country + + # Valid Bill to Email. + attr_accessor :email + + # Bill to Phone Number. + attr_accessor :phone_number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'first_name' => :'firstName', + :'last_name' => :'lastName', + :'company' => :'company', + :'address1' => :'address1', + :'address2' => :'address2', + :'locality' => :'locality', + :'administrative_area' => :'administrativeArea', + :'postal_code' => :'postalCode', + :'country' => :'country', + :'email' => :'email', + :'phone_number' => :'phoneNumber' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'first_name' => :'String', + :'last_name' => :'String', + :'company' => :'String', + :'address1' => :'String', + :'address2' => :'String', + :'locality' => :'String', + :'administrative_area' => :'String', + :'postal_code' => :'String', + :'country' => :'String', + :'email' => :'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?(:'company') + self.company = attributes[:'company'] + 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?(:'country') + self.country = attributes[:'country'] + end + + if attributes.has_key?(:'email') + self.email = attributes[:'email'] + 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 + invalid_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 && + first_name == o.first_name && + last_name == o.last_name && + company == o.company && + address1 == o.address1 && + address2 == o.address2 && + locality == o.locality && + administrative_area == o.administrative_area && + postal_code == o.postal_code && + country == o.country && + email == o.email && + 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, company, address1, address2, locality, administrative_area, postal_code, country, email, 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/tmsv1paymentinstruments_buyer_information.rb b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_buyer_information.rb new file mode 100644 index 00000000..6f054c08 --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_buyer_information.rb @@ -0,0 +1,215 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'date' + +module CyberSource + class Tmsv1paymentinstrumentsBuyerInformation + # Company Tax ID. + attr_accessor :company_tax_id + + # Currency. Accepts input in the ISO 4217 standard, stores as ISO 4217 Alpha + attr_accessor :currency + + # Date of birth YYYY-MM-DD. + attr_accessor :date_o_birth + + attr_accessor :personal_identification + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'company_tax_id' => :'companyTaxID', + :'currency' => :'currency', + :'date_o_birth' => :'dateOBirth', + :'personal_identification' => :'personalIdentification' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'company_tax_id' => :'String', + :'currency' => :'String', + :'date_o_birth' => :'String', + :'personal_identification' => :'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?(:'companyTaxID') + self.company_tax_id = attributes[:'companyTaxID'] + end + + if attributes.has_key?(:'currency') + self.currency = attributes[:'currency'] + end + + if attributes.has_key?(:'dateOBirth') + self.date_o_birth = attributes[:'dateOBirth'] + end + + if attributes.has_key?(:'personalIdentification') + if (value = attributes[:'personalIdentification']).is_a?(Array) + self.personal_identification = 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 && + company_tax_id == o.company_tax_id && + currency == o.currency && + date_o_birth == o.date_o_birth && + personal_identification == o.personal_identification + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [company_tax_id, currency, date_o_birth, personal_identification].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tmsv1paymentinstruments_buyer_information_issued_by.rb b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_buyer_information_issued_by.rb new file mode 100644 index 00000000..b2b62ebf --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_buyer_information_issued_by.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 Tmsv1paymentinstrumentsBuyerInformationIssuedBy + # State or province where the identification was issued. + attr_accessor :administrative_area + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'administrative_area' => :'administrativeArea' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'administrative_area' => :'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?(:'administrativeArea') + self.administrative_area = attributes[:'administrativeArea'] + end + end + + # Show invalid properties 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 && + administrative_area == o.administrative_area + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [administrative_area].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tmsv1paymentinstruments_buyer_information_personal_identification.rb b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_buyer_information_personal_identification.rb new file mode 100644 index 00000000..b40bdb6b --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_buyer_information_personal_identification.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 Tmsv1paymentinstrumentsBuyerInformationPersonalIdentification + # Identification Number. + attr_accessor :id + + # Type of personal identification. + attr_accessor :type + + attr_accessor :issued_by + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type', + :'issued_by' => :'issuedBy' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'id' => :'String', + :'type' => :'String', + :'issued_by' => :'Tmsv1paymentinstrumentsBuyerInformationIssuedBy' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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?(:'type') + self.type = attributes[:'type'] + end + + if attributes.has_key?(:'issuedBy') + self.issued_by = attributes[:'issuedBy'] + end + end + + # Show invalid properties 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 && + type == o.type && + issued_by == o.issued_by + end + + # @see the `==` method + # @param [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, type, issued_by].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = CyberSource.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/cybersource_rest_client/models/tmsv1paymentinstruments_card.rb b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_card.rb new file mode 100644 index 00000000..35690dc1 --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_card.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 Tmsv1paymentinstrumentsCard + # Credit card expiration month. + attr_accessor :expiration_month + + # Credit card expiration year. + attr_accessor :expiration_year + + # Credit card brand. + attr_accessor :type + + # Credit card issue number. + attr_accessor :issue_number + + # Credit card start month. + attr_accessor :start_month + + # Credit card start year. + attr_accessor :start_year + + # Card Use As Field. Supported value of \"pinless debit\" only. Only for use with Pinless Debit tokens. + attr_accessor :use_as + + 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 + { + :'expiration_month' => :'expirationMonth', + :'expiration_year' => :'expirationYear', + :'type' => :'type', + :'issue_number' => :'issueNumber', + :'start_month' => :'startMonth', + :'start_year' => :'startYear', + :'use_as' => :'useAs' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'expiration_month' => :'String', + :'expiration_year' => :'String', + :'type' => :'String', + :'issue_number' => :'String', + :'start_month' => :'String', + :'start_year' => :'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?(:'expirationMonth') + self.expiration_month = attributes[:'expirationMonth'] + end + + if attributes.has_key?(:'expirationYear') + self.expiration_year = attributes[:'expirationYear'] + end + + if attributes.has_key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.has_key?(:'issueNumber') + self.issue_number = attributes[:'issueNumber'] + 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?(:'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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + type_validator = EnumAttributeValidator.new('String', ['visa', 'mastercard', 'american express', 'discover', 'diners club', 'carte blanche', 'jcb', 'optima', 'twinpay credit', 'twinpay debit', 'walmart', 'enroute', 'lowes consumer', 'home depot consumer', 'mbna', 'dicks sportswear', 'casual corner', 'sears', 'jal', 'disney', 'maestro uk domestic', 'sams club consumer', 'sams club business', 'nicos', 'bill me later', 'bebe', 'restoration hardware', 'delta online', 'solo', 'visa electron', 'dankort', 'laser', 'carte bleue', 'carta si', 'pinless debit', 'encoded account', 'uatp', 'household', 'maestro international', 'ge money uk', 'korean cards', 'style', 'jcrew', 'payease china processing ewallet', 'payease china processing bank transfer', 'meijer private label', 'hipercard', 'aura', 'redecard', 'orico', 'elo', 'capital one private label', 'synchrony private label', 'china union pay']) + return false unless type_validator.valid?(@type) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ['visa', 'mastercard', 'american express', 'discover', 'diners club', 'carte blanche', 'jcb', 'optima', 'twinpay credit', 'twinpay debit', 'walmart', 'enroute', 'lowes consumer', 'home depot consumer', 'mbna', 'dicks sportswear', 'casual corner', 'sears', 'jal', 'disney', 'maestro uk domestic', 'sams club consumer', 'sams club business', 'nicos', 'bill me later', 'bebe', 'restoration hardware', 'delta online', 'solo', 'visa electron', 'dankort', 'laser', 'carte bleue', 'carta si', 'pinless debit', 'encoded account', 'uatp', 'household', 'maestro international', 'ge money uk', 'korean cards', 'style', 'jcrew', 'payease china processing ewallet', 'payease china processing bank transfer', 'meijer private label', 'hipercard', 'aura', 'redecard', 'orico', 'elo', 'capital one private label', 'synchrony private label', 'china union pay']) + unless validator.valid?(type) + fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.' + 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 && + expiration_month == o.expiration_month && + expiration_year == o.expiration_year && + type == o.type && + issue_number == o.issue_number && + start_month == o.start_month && + start_year == o.start_year && + 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 + [expiration_month, expiration_year, type, issue_number, start_month, start_year, 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/tmsv1paymentinstruments_instrument_identifier.rb b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_instrument_identifier.rb new file mode 100644 index 00000000..62843df7 --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_instrument_identifier.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 Tmsv1paymentinstrumentsInstrumentIdentifier + attr_accessor :_links + + # Describes type of token. For example: customer, paymentInstrument or instrumentIdentifier. + attr_accessor :object + + # Current state of the token. + attr_accessor :state + + # The id of the existing instrument identifier to be linked to the newly created payment instrument. + attr_accessor :id + + 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', + :'object' => :'object', + :'state' => :'state', + :'id' => :'id', + :'card' => :'card', + :'bank_account' => :'bankAccount', + :'processing_information' => :'processingInformation', + :'metadata' => :'metadata' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'_links' => :'Tmsv1instrumentidentifiersLinks', + :'object' => :'String', + :'state' => :'String', + :'id' => :'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?(:'object') + self.object = attributes[:'object'] + end + + if attributes.has_key?(:'state') + self.state = attributes[:'state'] + end + + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + 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 && + object == o.object && + state == o.state && + id == o.id && + 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, object, state, id, 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/tmsv1paymentinstruments_merchant_information.rb b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_merchant_information.rb new file mode 100644 index 00000000..40acaeb9 --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_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 Tmsv1paymentinstrumentsMerchantInformation + 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' => :'Tmsv1paymentinstrumentsMerchantInformationMerchantDescriptor' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # 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/tmsv1paymentinstruments_merchant_information_merchant_descriptor.rb b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_merchant_information_merchant_descriptor.rb new file mode 100644 index 00000000..6f109716 --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_merchant_information_merchant_descriptor.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 Tmsv1paymentinstrumentsMerchantInformationMerchantDescriptor + # Alternate information for your business. This API field overrides the company entry description value in your CyberSource account. + attr_accessor :alternate_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'alternate_name' => :'alternateName' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'alternate_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?(:'alternateName') + self.alternate_name = attributes[:'alternateName'] + end + end + + # Show invalid properties 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 && + alternate_name == o.alternate_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 + [alternate_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/tmsv1paymentinstruments_processing_information.rb b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_processing_information.rb new file mode 100644 index 00000000..6fc93e3d --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_processing_information.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 Tmsv1paymentinstrumentsProcessingInformation + # Bill Payment Program Enabled. + attr_accessor :bill_payment_program_enabled + + attr_accessor :bank_transfer_options + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'bill_payment_program_enabled' => :'billPaymentProgramEnabled', + :'bank_transfer_options' => :'bankTransferOptions' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'bill_payment_program_enabled' => :'BOOLEAN', + :'bank_transfer_options' => :'Tmsv1paymentinstrumentsProcessingInformationBankTransferOptions' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'billPaymentProgramEnabled') + self.bill_payment_program_enabled = attributes[:'billPaymentProgramEnabled'] + 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 + invalid_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_payment_program_enabled == o.bill_payment_program_enabled && + 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 + [bill_payment_program_enabled, 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/tmsv1paymentinstruments_processing_information_bank_transfer_options.rb b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_processing_information_bank_transfer_options.rb new file mode 100644 index 00000000..6645c332 --- /dev/null +++ b/lib/cybersource_rest_client/models/tmsv1paymentinstruments_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 Tmsv1paymentinstrumentsProcessingInformationBankTransferOptions + # Authorization method used for the transaction.(acceptable values are CCD, PPD, TEL, WEB). + 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_client/models/tokenize_parameters.rb b/lib/cybersource_rest_client/models/tokenize_parameters.rb similarity index 99% rename from lib/cyberSource_client/models/tokenize_parameters.rb rename to lib/cybersource_rest_client/models/tokenize_parameters.rb index c2929c1b..73452efb 100644 --- a/lib/cyberSource_client/models/tokenize_parameters.rb +++ b/lib/cybersource_rest_client/models/tokenize_parameters.rb @@ -31,7 +31,7 @@ def self.attribute_map def self.swagger_types { :'key_id' => :'String', - :'card_info' => :'Paymentsflexv1tokensCardInfo' + :'card_info' => :'Flexv1tokensCardInfo' } end diff --git a/lib/cyberSource_client/models/tokenize_request.rb b/lib/cybersource_rest_client/models/tokenize_request.rb similarity index 99% rename from lib/cyberSource_client/models/tokenize_request.rb rename to lib/cybersource_rest_client/models/tokenize_request.rb index 0f1b2f6b..94187e65 100644 --- a/lib/cyberSource_client/models/tokenize_request.rb +++ b/lib/cybersource_rest_client/models/tokenize_request.rb @@ -31,7 +31,7 @@ def self.attribute_map def self.swagger_types { :'key_id' => :'String', - :'card_info' => :'Paymentsflexv1tokensCardInfo' + :'card_info' => :'Flexv1tokensCardInfo' } end diff --git a/lib/cyberSource_client/models/tokenize_result.rb b/lib/cybersource_rest_client/models/tokenize_result.rb similarity index 100% rename from lib/cyberSource_client/models/tokenize_result.rb rename to lib/cybersource_rest_client/models/tokenize_result.rb diff --git a/lib/cyberSource_client/models/void_capture_request.rb b/lib/cybersource_rest_client/models/void_capture_request.rb similarity index 98% rename from lib/cyberSource_client/models/void_capture_request.rb rename to lib/cybersource_rest_client/models/void_capture_request.rb index 0c06a810..db8ac491 100644 --- a/lib/cyberSource_client/models/void_capture_request.rb +++ b/lib/cybersource_rest_client/models/void_capture_request.rb @@ -26,7 +26,7 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'client_reference_information' => :'V2paymentsidreversalsClientReferenceInformation' + :'client_reference_information' => :'Ptsv2paymentsidreversalsClientReferenceInformation' } end diff --git a/lib/cyberSource_client/models/void_credit_request.rb b/lib/cybersource_rest_client/models/void_credit_request.rb similarity index 98% rename from lib/cyberSource_client/models/void_credit_request.rb rename to lib/cybersource_rest_client/models/void_credit_request.rb index 31c38d97..edcc898b 100644 --- a/lib/cyberSource_client/models/void_credit_request.rb +++ b/lib/cybersource_rest_client/models/void_credit_request.rb @@ -26,7 +26,7 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'client_reference_information' => :'V2paymentsidreversalsClientReferenceInformation' + :'client_reference_information' => :'Ptsv2paymentsidreversalsClientReferenceInformation' } end diff --git a/lib/cyberSource_client/models/void_payment_request.rb b/lib/cybersource_rest_client/models/void_payment_request.rb similarity index 98% rename from lib/cyberSource_client/models/void_payment_request.rb rename to lib/cybersource_rest_client/models/void_payment_request.rb index 742975d9..c4d2c97e 100644 --- a/lib/cyberSource_client/models/void_payment_request.rb +++ b/lib/cybersource_rest_client/models/void_payment_request.rb @@ -26,7 +26,7 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'client_reference_information' => :'V2paymentsidreversalsClientReferenceInformation' + :'client_reference_information' => :'Ptsv2paymentsidreversalsClientReferenceInformation' } end diff --git a/lib/cyberSource_client/models/void_refund_request.rb b/lib/cybersource_rest_client/models/void_refund_request.rb similarity index 98% rename from lib/cyberSource_client/models/void_refund_request.rb rename to lib/cybersource_rest_client/models/void_refund_request.rb index 43a06a2d..83f83c5d 100644 --- a/lib/cyberSource_client/models/void_refund_request.rb +++ b/lib/cybersource_rest_client/models/void_refund_request.rb @@ -26,7 +26,7 @@ def self.attribute_map # Attribute type mapping. def self.swagger_types { - :'client_reference_information' => :'V2paymentsidreversalsClientReferenceInformation' + :'client_reference_information' => :'Ptsv2paymentsidreversalsClientReferenceInformation' } end diff --git a/lib/cyberSource_client/version.rb b/lib/cybersource_rest_client/version.rb similarity index 100% rename from lib/cyberSource_client/version.rb rename to lib/cybersource_rest_client/version.rb diff --git a/spec/api/capture_api_spec.rb b/spec/api/capture_api_spec.rb index 7f320a11..b1d26f2f 100644 --- a/spec/api/capture_api_spec.rb +++ b/spec/api/capture_api_spec.rb @@ -45,16 +45,4 @@ end end - # unit tests for get_capture - # Retrieve a Capture - # Include the capture ID in the GET request to retrieve the capture details. - # @param id The capture ID returned from a previous capture request. - # @param [Hash] opts the optional parameters - # @return [InlineResponse2004] - describe 'get_capture test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - end diff --git a/spec/api/credit_api_spec.rb b/spec/api/credit_api_spec.rb index 73134a05..ddb34b3a 100644 --- a/spec/api/credit_api_spec.rb +++ b/spec/api/credit_api_spec.rb @@ -44,16 +44,4 @@ end end - # unit tests for get_credit - # Retrieve a Credit - # Include the credit ID in the GET request to return details of the credit. - # @param id The credit ID returned from a previous stand-alone credit request. - # @param [Hash] opts the optional parameters - # @return [InlineResponse2006] - describe 'get_credit test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - end diff --git a/spec/api/default_api_spec.rb b/spec/api/default_api_spec.rb deleted file mode 100644 index 90b58712..00000000 --- a/spec/api/default_api_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' - -# Unit tests for CyberSource::DefaultApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'DefaultApi' do - before do - # run before each test - @instance = CyberSource::DefaultApi.new - end - - after do - # run after each test - end - - describe 'test an instance of DefaultApi' do - it 'should create an instance of DefaultApi' do - expect(@instance).to be_instance_of(CyberSource::DefaultApi) - end - end - - # unit tests for oct_create_payment - # Process a Payout - # Send funds from a selected funding source to a designated credit/debit card account or a prepaid card using an Original Credit Transaction (OCT). - # @param oct_create_payment_request - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'oct_create_payment test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/api/flex_token_api_spec.rb b/spec/api/flex_token_api_spec.rb new file mode 100644 index 00000000..a6f20d74 --- /dev/null +++ b/spec/api/flex_token_api_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' + +# Unit tests for CyberSource::FlexTokenApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'FlexTokenApi' do + before do + # run before each test + @instance = CyberSource::FlexTokenApi.new + end + + after do + # run after each test + end + + describe 'test an instance of FlexTokenApi' do + it 'should create an instance of FlexTokenApi' do + expect(@instance).to be_instance_of(CyberSource::FlexTokenApi) + end + end + + # unit tests for tokenize + # Flex Tokenize card + # 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] + describe 'tokenize test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api/instrument_identifier_api_spec.rb b/spec/api/instrument_identifier_api_spec.rb index 08e98647..6283bdcd 100644 --- a/spec/api/instrument_identifier_api_spec.rb +++ b/spec/api/instrument_identifier_api_spec.rb @@ -32,64 +32,38 @@ end end - # unit tests for instrumentidentifiers_post - # Create an Instrument Identifier - # @param profile_id The id of a profile containing user specific TMS configuration. - # @param [Hash] opts the optional parameters - # @option opts [Body] :body Please specify either a Card or Bank Account. - # @return [InlineResponse2007] - describe 'instrumentidentifiers_post test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for instrumentidentifiers_token_id_delete + # unit tests for tms_v1_instrumentidentifiers_token_id_delete # Delete an Instrument Identifier # @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 [nil] - describe 'instrumentidentifiers_token_id_delete test' do + describe 'tms_v1_instrumentidentifiers_token_id_delete test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - # unit tests for instrumentidentifiers_token_id_get + # unit tests for tms_v1_instrumentidentifiers_token_id_get # Retrieve an Instrument Identifier # @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 [InlineResponse2007] - describe 'instrumentidentifiers_token_id_get test' do + # @return [InlineResponse20010] + 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 end end - # unit tests for instrumentidentifiers_token_id_patch + # unit tests for tms_v1_instrumentidentifiers_token_id_patch # Update a Instrument Identifier # @param profile_id The id of a profile containing user specific TMS configuration. - # @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 [InlineResponse2007] - describe 'instrumentidentifiers_token_id_patch test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for instrumentidentifiers_token_id_paymentinstruments_get - # Retrieve all Payment Instruments associated with an Instrument Identifier - # @param profile_id The id of a profile containing user specific TMS configuration. # @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 - # @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 [InlineResponse2008] - describe 'instrumentidentifiers_token_id_paymentinstruments_get test' do + # @return [InlineResponse20010] + 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 end diff --git a/spec/api/instrument_identifiers_api_spec.rb b/spec/api/instrument_identifiers_api_spec.rb new file mode 100644 index 00000000..09717345 --- /dev/null +++ b/spec/api/instrument_identifiers_api_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' + +# Unit tests for CyberSource::InstrumentIdentifiersApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'InstrumentIdentifiersApi' do + before do + # run before each test + @instance = CyberSource::InstrumentIdentifiersApi.new + end + + after do + # run after each test + end + + describe 'test an instance of InstrumentIdentifiersApi' do + it 'should create an instance of InstrumentIdentifiersApi' do + expect(@instance).to be_instance_of(CyberSource::InstrumentIdentifiersApi) + end + end + + # unit tests for tms_v1_instrumentidentifiers_post + # Create an Instrument Identifier + # @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] + 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 + end + end + +end diff --git a/spec/api/key_generation_api_spec.rb b/spec/api/key_generation_api_spec.rb index 3d804faa..2a92f45a 100644 --- a/spec/api/key_generation_api_spec.rb +++ b/spec/api/key_generation_api_spec.rb @@ -35,8 +35,8 @@ # unit tests for generate_public_key # Generate Key # 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 generate_public_key_request # @param [Hash] opts the optional parameters + # @option opts [GeneratePublicKeyRequest] :generate_public_key_request # @return [InlineResponse200] describe 'generate_public_key test' do it 'should work' do diff --git a/spec/api/notification_of_changes_api_spec.rb b/spec/api/notification_of_changes_api_spec.rb new file mode 100644 index 00000000..581e8e62 --- /dev/null +++ b/spec/api/notification_of_changes_api_spec.rb @@ -0,0 +1,48 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for CyberSource::NotificationOfChangesApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'NotificationOfChangesApi' do + before do + # run before each test + @instance = CyberSource::NotificationOfChangesApi.new + end + + after do + # run after each test + end + + describe 'test an instance of NotificationOfChangesApi' do + it 'should create an instance of NotificationOfChangesApi' do + expect(@instance).to be_instance_of(CyberSource::NotificationOfChangesApi) + end + end + + # unit tests for get_notification_of_change_report + # Get Notification Of Changes + # Notification of Change Report + # @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] + 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 + end + end + +end diff --git a/spec/api/payment_api_spec.rb b/spec/api/payment_api_spec.rb deleted file mode 100644 index d0f55086..00000000 --- a/spec/api/payment_api_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' - -# Unit tests for CyberSource::PaymentApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PaymentApi' do - before do - # run before each test - @instance = CyberSource::PaymentApi.new - end - - after do - # run after each test - end - - describe 'test an instance of PaymentApi' do - it 'should create an instance of PaymentApi' do - expect(@instance).to be_instance_of(CyberSource::PaymentApi) - end - end - - # unit tests for create_payment - # Process a Payment - # Authorize the payment for the transaction. - # @param create_payment_request - # @param [Hash] opts the optional parameters - # @return [InlineResponse201] - describe 'create_payment test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_payment - # Retrieve a Payment - # Include the payment ID in the GET request to retrieve the payment details. - # @param id The payment ID returned from a previous payment request. - # @param [Hash] opts the optional parameters - # @return [InlineResponse2002] - describe 'get_payment test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/api/payment_instrument_api_spec.rb b/spec/api/payment_instrument_api_spec.rb deleted file mode 100644 index acf6046d..00000000 --- a/spec/api/payment_instrument_api_spec.rb +++ /dev/null @@ -1,84 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' - -# Unit tests for CyberSource::PaymentInstrumentApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PaymentInstrumentApi' do - before do - # run before each test - @instance = CyberSource::PaymentInstrumentApi.new - end - - after do - # run after each test - end - - describe 'test an instance of PaymentInstrumentApi' do - it 'should create an instance of PaymentInstrumentApi' do - expect(@instance).to be_instance_of(CyberSource::PaymentInstrumentApi) - end - end - - # unit tests for paymentinstruments_post - # Create a Payment Instrument - # @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] - describe 'paymentinstruments_post test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for paymentinstruments_token_id_delete - # Delete a Payment Instrument - # @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 [nil] - describe 'paymentinstruments_token_id_delete test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for paymentinstruments_token_id_get - # Retrieve a Payment Instrument - # @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] - describe 'paymentinstruments_token_id_get test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for paymentinstruments_token_id_patch - # Update a Payment Instrument - # @param profile_id The id of a profile containing user specific TMS configuration. - # @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] - describe 'paymentinstruments_token_id_patch test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/api/payment_instruments_api_spec.rb b/spec/api/payment_instruments_api_spec.rb new file mode 100644 index 00000000..03b00c7e --- /dev/null +++ b/spec/api/payment_instruments_api_spec.rb @@ -0,0 +1,98 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for CyberSource::PaymentInstrumentsApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PaymentInstrumentsApi' do + before do + # run before each test + @instance = CyberSource::PaymentInstrumentsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of PaymentInstrumentsApi' do + it 'should create an instance of PaymentInstrumentsApi' do + expect(@instance).to be_instance_of(CyberSource::PaymentInstrumentsApi) + end + end + + # unit tests for tms_v1_instrumentidentifiers_token_id_paymentinstruments_get + # Retrieve all Payment Instruments associated with an Instrument Identifier + # @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 + # @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] + 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 + end + end + + # unit tests for tms_v1_paymentinstruments_post + # Create a Payment Instrument + # @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] + 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 + end + end + + # unit tests for tms_v1_paymentinstruments_token_id_delete + # Delete a Payment Instrument + # @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 [nil] + describe 'tms_v1_paymentinstruments_token_id_delete test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for tms_v1_paymentinstruments_token_id_get + # Retrieve a Payment Instrument + # @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] + 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 + end + end + + # unit tests for tms_v1_paymentinstruments_token_id_patch + # Update a Payment Instrument + # @param profile_id The id of a profile containing user specific TMS configuration. + # @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] + 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 + end + end + +end diff --git a/spec/api/payments_api_spec.rb b/spec/api/payments_api_spec.rb new file mode 100644 index 00000000..3fb84898 --- /dev/null +++ b/spec/api/payments_api_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' + +# Unit tests for CyberSource::PaymentsApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PaymentsApi' do + before do + # run before each test + @instance = CyberSource::PaymentsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of PaymentsApi' do + it 'should create an instance of PaymentsApi' do + expect(@instance).to be_instance_of(CyberSource::PaymentsApi) + end + end + + # unit tests for create_payment + # Process a Payment + # Authorize the payment for the transaction. + # @param create_payment_request + # @param [Hash] opts the optional parameters + # @return [InlineResponse201] + describe 'create_payment test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api/process_a_payout_api_spec.rb b/spec/api/process_a_payout_api_spec.rb new file mode 100644 index 00000000..e3dda35a --- /dev/null +++ b/spec/api/process_a_payout_api_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' + +# Unit tests for CyberSource::ProcessAPayoutApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ProcessAPayoutApi' do + before do + # run before each test + @instance = CyberSource::ProcessAPayoutApi.new + end + + after do + # run after each test + end + + describe 'test an instance of ProcessAPayoutApi' do + it 'should create an instance of ProcessAPayoutApi' do + expect(@instance).to be_instance_of(CyberSource::ProcessAPayoutApi) + end + end + + # unit tests for oct_create_payment + # Process a Payout + # Send funds from a selected funding source to a designated credit/debit card account or a prepaid card using an Original Credit Transaction (OCT). + # @param oct_create_payment_request + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'oct_create_payment test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api/purchase_and_refund_details_api_spec.rb b/spec/api/purchase_and_refund_details_api_spec.rb new file mode 100644 index 00000000..ea3536fa --- /dev/null +++ b/spec/api/purchase_and_refund_details_api_spec.rb @@ -0,0 +1,54 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for CyberSource::PurchaseAndRefundDetailsApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'PurchaseAndRefundDetailsApi' do + before do + # run before each test + @instance = CyberSource::PurchaseAndRefundDetailsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of PurchaseAndRefundDetailsApi' do + it 'should create an instance of PurchaseAndRefundDetailsApi' do + expect(@instance).to be_instance_of(CyberSource::PurchaseAndRefundDetailsApi) + end + end + + # unit tests for get_purchase_and_refund_details + # Get Purchase and Refund details + # Purchase And Refund Details Description + # @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 + # @option opts [String] :organization_id Valid Cybersource Organization Id + # @option opts [String] :payment_subtype Payment Subtypes. - **ALL**: All Payment Subtypes - **VI** : Visa - **MC** : Master Card - **AX** : American Express - **DI** : Discover - **DP** : Pinless Debit + # @option opts [String] :view_by View results by Request Date or Submission Date. - **requestDate** : Request Date - **submissionDate**: Submission Date + # @option opts [String] :group_name Valid CyberSource Group Name.User can define groups using CBAPI and Group Management Module in EBC2. Groups are collection of organizationIds + # @option opts [Integer] :offset Offset of the Purchase and Refund Results. + # @option opts [Integer] :limit Results count per page. Range(1-2000) + # @return [nil] + describe 'get_purchase_and_refund_details test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api/refund_api_spec.rb b/spec/api/refund_api_spec.rb index 90718d4b..5a56cf66 100644 --- a/spec/api/refund_api_spec.rb +++ b/spec/api/refund_api_spec.rb @@ -32,18 +32,6 @@ end end - # unit tests for get_refund - # Retrieve a Refund - # Include the refund ID in the GET request to to retrieve the refund details. - # @param id The refund ID. This ID is returned from a previous refund request. - # @param [Hash] opts the optional parameters - # @return [InlineResponse2005] - describe 'get_refund test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - # unit tests for refund_capture # Refund a Capture # Include the capture ID in the POST request to refund the captured amount. diff --git a/spec/api/report_definitions_api_spec.rb b/spec/api/report_definitions_api_spec.rb new file mode 100644 index 00000000..db8c4dfb --- /dev/null +++ b/spec/api/report_definitions_api_spec.rb @@ -0,0 +1,60 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for CyberSource::ReportDefinitionsApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportDefinitionsApi' do + before do + # run before each test + @instance = CyberSource::ReportDefinitionsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportDefinitionsApi' do + it 'should create an instance of ReportDefinitionsApi' do + expect(@instance).to be_instance_of(CyberSource::ReportDefinitionsApi) + end + end + + # unit tests for get_resource_info_by_report_definition + # Get a single report definition information + # The report definition name must be used as path parameter exclusive of each other + # @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] + 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 + end + end + + # unit tests for get_resource_v2_info + # Get reporting resource information + # + # @param [Hash] opts the optional parameters + # @option opts [String] :organization_id Valid Cybersource Organization Id + # @return [InlineResponse2004] + 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 + end + end + +end diff --git a/spec/api/report_downloads_api_spec.rb b/spec/api/report_downloads_api_spec.rb new file mode 100644 index 00000000..bf9a7e8a --- /dev/null +++ b/spec/api/report_downloads_api_spec.rb @@ -0,0 +1,49 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for CyberSource::ReportDownloadsApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportDownloadsApi' do + before do + # run before each test + @instance = CyberSource::ReportDownloadsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportDownloadsApi' do + it 'should create an instance of ReportDownloadsApi' do + expect(@instance).to be_instance_of(CyberSource::ReportDownloadsApi) + end + end + + # unit tests for download_report + # Download a report + # Download a report for the given report name on the specified date + # @param report_date Valid date on which to download the report 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 report_name Name of the report to download + # @param [Hash] opts the optional parameters + # @option opts [String] :organization_id Valid Cybersource Organization Id + # @return [nil] + describe 'download_report test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api/report_subscriptions_api_spec.rb b/spec/api/report_subscriptions_api_spec.rb new file mode 100644 index 00000000..2718ffb8 --- /dev/null +++ b/spec/api/report_subscriptions_api_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' + +# Unit tests for CyberSource::ReportSubscriptionsApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportSubscriptionsApi' do + before do + # run before each test + @instance = CyberSource::ReportSubscriptionsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportSubscriptionsApi' do + it 'should create an instance of ReportSubscriptionsApi' do + expect(@instance).to be_instance_of(CyberSource::ReportSubscriptionsApi) + end + end + + # unit tests for create_subscription + # Create Report Subscription for a report name by organization + # + # @param report_name Name of the Report to Create + # @param request_body Report subscription request payload + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'create_subscription test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for delete_subscription + # Delete subscription of a report name by organization + # + # @param report_name Name of the Report to Delete + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'delete_subscription test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_all_subscriptions + # Retrieve all subscriptions by organization + # + # @param [Hash] opts the optional parameters + # @return [InlineResponse2006] + describe 'get_all_subscriptions test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_subscription + # Retrieve subscription for a report name by organization + # + # @param report_name Name of the Report to Retrieve + # @param [Hash] opts the optional parameters + # @return [InlineResponse2006Subscriptions] + describe 'get_subscription test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api/reports_api_spec.rb b/spec/api/reports_api_spec.rb new file mode 100644 index 00000000..234f61fb --- /dev/null +++ b/spec/api/reports_api_spec.rb @@ -0,0 +1,80 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for CyberSource::ReportsApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReportsApi' do + before do + # run before each test + @instance = CyberSource::ReportsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of ReportsApi' do + it 'should create an instance of ReportsApi' do + expect(@instance).to be_instance_of(CyberSource::ReportsApi) + end + end + + # unit tests for create_report + # Create Adhoc Report + # Create one time report + # @param request_body Report subscription request payload + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'create_report test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_report_by_report_id + # Get Report based on reportId + # ReportId is mandatory input + # @param report_id Valid Report Id + # @param [Hash] opts the optional parameters + # @option opts [String] :organization_id Valid Cybersource Organization Id + # @return [InlineResponse2008] + 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 + end + end + + # unit tests for search_reports + # Retrieve available reports + # Retrieve list of available reports + # @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 time_query_type Specify time you woud like to search + # @param [Hash] opts the optional parameters + # @option opts [String] :organization_id Valid Cybersource Organization Id + # @option opts [String] :report_mime_type Valid Report Format + # @option opts [String] :report_frequency Valid Report Frequency + # @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] + describe 'search_reports test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api/reversal_api_spec.rb b/spec/api/reversal_api_spec.rb index b2d40583..d6e06f51 100644 --- a/spec/api/reversal_api_spec.rb +++ b/spec/api/reversal_api_spec.rb @@ -45,16 +45,4 @@ end end - # unit tests for get_auth_reversal - # Retrieve an Authorization Reversal - # Include the authorization reversal ID in the GET request to retrieve the authorization reversal details. - # @param id The authorization reversal ID returned from a previous authorization reversal request. - # @param [Hash] opts the optional parameters - # @return [InlineResponse2003] - describe 'get_auth_reversal test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - end diff --git a/spec/api/search_transactions_api_spec.rb b/spec/api/search_transactions_api_spec.rb new file mode 100644 index 00000000..70806777 --- /dev/null +++ b/spec/api/search_transactions_api_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' + +# Unit tests for CyberSource::SearchTransactionsApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'SearchTransactionsApi' do + before do + # run before each test + @instance = CyberSource::SearchTransactionsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of SearchTransactionsApi' do + it 'should create an instance of SearchTransactionsApi' do + expect(@instance).to be_instance_of(CyberSource::SearchTransactionsApi) + end + end + + # unit tests for create_search + # Create a search request + # Create a search request. + # @param create_search_request + # @param [Hash] opts the optional parameters + # @return [InlineResponse2017] + describe 'create_search test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_search + # Get Search results + # 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] + describe 'get_search test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api/secure_file_share_api_spec.rb b/spec/api/secure_file_share_api_spec.rb new file mode 100644 index 00000000..4adaf9be --- /dev/null +++ b/spec/api/secure_file_share_api_spec.rb @@ -0,0 +1,62 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for CyberSource::SecureFileShareApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'SecureFileShareApi' do + before do + # run before each test + @instance = CyberSource::SecureFileShareApi.new + end + + after do + # run after each test + end + + describe 'test an instance of SecureFileShareApi' do + it 'should create an instance of SecureFileShareApi' do + expect(@instance).to be_instance_of(CyberSource::SecureFileShareApi) + end + end + + # unit tests for get_file + # Download a file with file identifier + # Download a file for the given file identifier + # @param file_id Unique identifier for each file + # @param [Hash] opts the optional parameters + # @option opts [String] :organization_id Valid Cybersource Organization Id + # @return [nil] + describe 'get_file test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_file_details + # Get list of files + # Get list of files and it's information of them available inside the report directory + # @param start_date Valid start 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 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] + describe 'get_file_details test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api/tokenization_api_spec.rb b/spec/api/tokenization_api_spec.rb deleted file mode 100644 index 1dcaf61a..00000000 --- a/spec/api/tokenization_api_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' - -# Unit tests for CyberSource::TokenizationApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'TokenizationApi' do - before do - # run before each test - @instance = CyberSource::TokenizationApi.new - end - - after do - # run after each test - end - - describe 'test an instance of TokenizationApi' do - it 'should create an instance of TokenizationApi' do - expect(@instance).to be_instance_of(CyberSource::TokenizationApi) - end - end - - # unit tests for tokenize - # Tokenize card - # 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] - describe 'tokenize test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/api/transaction_batch_api_spec.rb b/spec/api/transaction_batch_api_spec.rb new file mode 100644 index 00000000..52dcc40c --- /dev/null +++ b/spec/api/transaction_batch_api_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' + +# Unit tests for CyberSource::TransactionBatchApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TransactionBatchApi' do + before do + # run before each test + @instance = CyberSource::TransactionBatchApi.new + end + + after do + # run after each test + end + + describe 'test an instance of TransactionBatchApi' do + it 'should create an instance of TransactionBatchApi' do + expect(@instance).to be_instance_of(CyberSource::TransactionBatchApi) + end + end + + # unit tests for pts_v1_transaction_batches_id_get + # Get an individual batch file Details processed through the Offline Transaction Submission Services + # Provide the search range + # @param id The batch id assigned for the template. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'pts_v1_transaction_batches_id_get test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api/transaction_batches_api_spec.rb b/spec/api/transaction_batches_api_spec.rb new file mode 100644 index 00000000..ae7f1080 --- /dev/null +++ b/spec/api/transaction_batches_api_spec.rb @@ -0,0 +1,48 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for CyberSource::TransactionBatchesApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TransactionBatchesApi' do + before do + # run before each test + @instance = CyberSource::TransactionBatchesApi.new + end + + after do + # run after each test + end + + describe 'test an instance of TransactionBatchesApi' do + it 'should create an instance of TransactionBatchesApi' do + expect(@instance).to be_instance_of(CyberSource::TransactionBatchesApi) + end + end + + # unit tests for pts_v1_transaction_batches_get + # Get a list of batch files processed through the Offline Transaction Submission Services + # Provide the search range + # @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] + 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 + end + end + +end diff --git a/spec/api/transaction_details_api_spec.rb b/spec/api/transaction_details_api_spec.rb new file mode 100644 index 00000000..0014351a --- /dev/null +++ b/spec/api/transaction_details_api_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' + +# Unit tests for CyberSource::TransactionDetailsApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'TransactionDetailsApi' do + before do + # run before each test + @instance = CyberSource::TransactionDetailsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of TransactionDetailsApi' do + it 'should create an instance of TransactionDetailsApi' do + expect(@instance).to be_instance_of(CyberSource::TransactionDetailsApi) + end + end + + # unit tests for get_transaction + # Retrieve a Transaction + # 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] + describe 'get_transaction test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api/user_management_api_spec.rb b/spec/api/user_management_api_spec.rb new file mode 100644 index 00000000..2b1e4955 --- /dev/null +++ b/spec/api/user_management_api_spec.rb @@ -0,0 +1,50 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for CyberSource::UserManagementApi +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'UserManagementApi' do + before do + # run before each test + @instance = CyberSource::UserManagementApi.new + end + + after do + # run after each test + end + + describe 'test an instance of UserManagementApi' do + it 'should create an instance of UserManagementApi' do + expect(@instance).to be_instance_of(CyberSource::UserManagementApi) + end + end + + # unit tests for get_users + # Get user based on organization Id, username, permission and role + # This endpoint is to get all the user information depending on the filter criteria passed in the query. + # @param [Hash] opts the optional parameters + # @option opts [String] :organization_id This is the orgId of the organization which the user belongs to. + # @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] + describe 'get_users test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api/void_api_spec.rb b/spec/api/void_api_spec.rb index 084492d6..f25e2e0b 100644 --- a/spec/api/void_api_spec.rb +++ b/spec/api/void_api_spec.rb @@ -32,18 +32,6 @@ end end - # unit tests for get_void - # Retrieve A Void - # Include the void ID in the GET request to retrieve the void details. - # @param id The void ID returned from a previous void request. - # @param [Hash] opts the optional parameters - # @return [InlineResponse2015] - describe 'get_void test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - # unit tests for void_capture # Void a Capture # Include the capture ID in the POST request to cancel the capture. diff --git a/spec/configuration_spec.rb b/spec/configuration_spec.rb index bb8c325b..4c821f64 100644 --- a/spec/configuration_spec.rb +++ b/spec/configuration_spec.rb @@ -18,7 +18,7 @@ before(:each) do # uncomment below to setup host and base_path # require 'URI' - # uri = URI.parse("https://api.cybersource.com") + # uri = URI.parse("https://apitest.cybersource.com") # CyberSource.configure do |c| # c.host = uri.host # c.base_path = uri.path @@ -28,14 +28,14 @@ describe '#base_url' do it 'should have the default value' do # uncomment below to test default value of the base path - # expect(config.base_url).to eq("https://api.cybersource.com") + # expect(config.base_url).to eq("https://apitest.cybersource.com") end it 'should remove trailing slashes' do [nil, '', '/', '//'].each do |base_path| config.base_path = base_path # uncomment below to test trailing slashes - # expect(config.base_url).to eq("https://api.cybersource.com") + # expect(config.base_url).to eq("https://apitest.cybersource.com") end end end diff --git a/spec/models/create_search_request_spec.rb b/spec/models/create_search_request_spec.rb new file mode 100644 index 00000000..e969092f --- /dev/null +++ b/spec/models/create_search_request_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::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/flexv1tokens_card_info_spec.rb b/spec/models/flexv1tokens_card_info_spec.rb new file mode 100644 index 00000000..d5bc5e64 --- /dev/null +++ b/spec/models/flexv1tokens_card_info_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::Flexv1tokensCardInfo +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Flexv1tokensCardInfo' do + before do + # run before each test + @instance = CyberSource::Flexv1tokensCardInfo.new + end + + after do + # run after each test + end + + describe 'test an instance of Flexv1tokensCardInfo' do + it 'should create an instance of Flexv1tokensCardInfo' do + expect(@instance).to be_instance_of(CyberSource::Flexv1tokensCardInfo) + end + end + describe 'test attribute "card_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 "card_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 "card_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 "card_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/generate_public_key_request_spec.rb b/spec/models/generate_public_key_request_spec.rb index f52e85d3..4397f4c0 100644 --- a/spec/models/generate_public_key_request_spec.rb +++ b/spec/models/generate_public_key_request_spec.rb @@ -38,4 +38,40 @@ end end + describe 'test attribute "target_origin"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "unmasked_left"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "unmasked_right"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "enable_billing_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 "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 "enable_auto_auth"' do + it 'should 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 new file mode 100644 index 00000000..63c6d01b --- /dev/null +++ b/spec/models/inline_response_200_10_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::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 new file mode 100644 index 00000000..22c636e2 --- /dev/null +++ b/spec/models/inline_response_200_11__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::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 new file mode 100644 index 00000000..af8e8f3b --- /dev/null +++ b/spec/models/inline_response_200_11__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::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 new file mode 100644 index 00000000..8378f7f3 --- /dev/null +++ b/spec/models/inline_response_200_11__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::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 new file mode 100644 index 00000000..cda7f3c3 --- /dev/null +++ b/spec/models/inline_response_200_11__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::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 new file mode 100644 index 00000000..70cf61d8 --- /dev/null +++ b/spec/models/inline_response_200_11__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::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 new file mode 100644 index 00000000..de798bc2 --- /dev/null +++ b/spec/models/inline_response_200_11__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::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 new file mode 100644 index 00000000..53046dcf --- /dev/null +++ b/spec/models/inline_response_200_11_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::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 new file mode 100644 index 00000000..55605b80 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..c8886f61 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..786068c9 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..e7f730f1 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..26f36435 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..e2d2aa03 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..2ea44ce9 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..cba8292f --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..cc7575e6 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..11c2dbd1 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..79caa7bd --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..d77a2016 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..910fb5d4 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..e125c615 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..0f68f3d9 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..355b58ab --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..57d8fb05 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..9c157adf --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..12d39bbe --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..9cdce1c2 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..062abfc3 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..7bbabcee --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..850e1b50 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..b18ed82f --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..03c4363d --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..6cf6bdb2 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..5075d815 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..24698e96 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..d259d369 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..ec58d782 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..53dd5072 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..02a81d1c --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..a71a9507 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..eed08872 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..594952fb --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..a9f82432 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..345cc404 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..9855ba05 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..ee21a23e --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..90c91e34 --- /dev/null +++ b/spec/models/inline_response_200_12_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::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 new file mode 100644 index 00000000..89e89357 --- /dev/null +++ b/spec/models/inline_response_200_13_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::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 new file mode 100644 index 00000000..08c117e8 --- /dev/null +++ b/spec/models/inline_response_200_13_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::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 new file mode 100644 index 00000000..4d19458d --- /dev/null +++ b/spec/models/inline_response_200_13_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::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 new file mode 100644 index 00000000..531cc57a --- /dev/null +++ b/spec/models/inline_response_200_13_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::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 new file mode 100644 index 00000000..fcf20a00 --- /dev/null +++ b/spec/models/inline_response_200_13_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::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_2__links_self_spec.rb b/spec/models/inline_response_200_2__links_self_spec.rb new file mode 100644 index 00000000..9d941468 --- /dev/null +++ b/spec/models/inline_response_200_2__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::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 new file mode 100644 index 00000000..de7446e9 --- /dev/null +++ b/spec/models/inline_response_200_2__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::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_buyer_information_spec.rb b/spec/models/inline_response_200_2_buyer_information_spec.rb deleted file mode 100644 index 3b4fc002..00000000 --- a/spec/models/inline_response_200_2_buyer_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::InlineResponse2002BuyerInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002BuyerInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002BuyerInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002BuyerInformation' do - it 'should create an instance of InlineResponse2002BuyerInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002BuyerInformation) - 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 "date_of_birth"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "vat_registration_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 "personal_identification"' 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_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_2_device_information_spec.rb b/spec/models/inline_response_200_2_device_information_spec.rb deleted file mode 100644 index ff2ac084..00000000 --- a/spec/models/inline_response_200_2_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::InlineResponse2002DeviceInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002DeviceInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002DeviceInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002DeviceInformation' do - it 'should create an instance of InlineResponse2002DeviceInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002DeviceInformation) - 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 "fingerprint_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 "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_200_2_merchant_information_spec.rb b/spec/models/inline_response_200_2_merchant_information_spec.rb deleted file mode 100644 index 37b0112c..00000000 --- a/spec/models/inline_response_200_2_merchant_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::InlineResponse2002MerchantInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002MerchantInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002MerchantInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002MerchantInformation' do - it 'should create an instance of InlineResponse2002MerchantInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002MerchantInformation) - end - end - describe 'test attribute "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 "vat_registration_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 "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_2_order_information_amount_details_spec.rb b/spec/models/inline_response_200_2_order_information_amount_details_spec.rb deleted file mode 100644 index 8d67734a..00000000 --- a/spec/models/inline_response_200_2_order_information_amount_details_spec.rb +++ /dev/null @@ -1,89 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2002OrderInformationAmountDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002OrderInformationAmountDetails' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002OrderInformationAmountDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002OrderInformationAmountDetails' do - it 'should create an instance of InlineResponse2002OrderInformationAmountDetails' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002OrderInformationAmountDetails) - 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 "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 "discount_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 "duty_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 "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 "national_tax_included"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "freight_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 "tax_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_2_order_information_bill_to_spec.rb b/spec/models/inline_response_200_2_order_information_bill_to_spec.rb deleted file mode 100644 index 49636c62..00000000 --- a/spec/models/inline_response_200_2_order_information_bill_to_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::InlineResponse2002OrderInformationBillTo -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002OrderInformationBillTo' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002OrderInformationBillTo.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002OrderInformationBillTo' do - it 'should create an instance of InlineResponse2002OrderInformationBillTo' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002OrderInformationBillTo) - 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 "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 "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 "county"' 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 "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 - -end diff --git a/spec/models/inline_response_200_2_order_information_invoice_details_spec.rb b/spec/models/inline_response_200_2_order_information_invoice_details_spec.rb deleted file mode 100644 index d09adb55..00000000 --- a/spec/models/inline_response_200_2_order_information_invoice_details_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::InlineResponse2002OrderInformationInvoiceDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002OrderInformationInvoiceDetails' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002OrderInformationInvoiceDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002OrderInformationInvoiceDetails' do - it 'should create an instance of InlineResponse2002OrderInformationInvoiceDetails' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002OrderInformationInvoiceDetails) - end - end - describe 'test attribute "purchase_order_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 "purchase_order_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 "taxable"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "vat_invoice_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 "commodity_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 "merchandise_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_advice_addendum"' 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_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_200_2_order_information_line_items_spec.rb b/spec/models/inline_response_200_2_order_information_line_items_spec.rb deleted file mode 100644 index de5dc033..00000000 --- a/spec/models/inline_response_200_2_order_information_line_items_spec.rb +++ /dev/null @@ -1,137 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::InlineResponse2002OrderInformationLineItems -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002OrderInformationLineItems' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002OrderInformationLineItems.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002OrderInformationLineItems' do - it 'should create an instance of InlineResponse2002OrderInformationLineItems' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002OrderInformationLineItems) - 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 "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 "unit_of_measure"' 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_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 "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 "tax_rate"' 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_type_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 "amount_includes_tax"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "commodity_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 "discount_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 "discount_applied"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "discount_rate"' 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_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 "tax_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_2_order_information_ship_to_spec.rb b/spec/models/inline_response_200_2_order_information_ship_to_spec.rb deleted file mode 100644 index 7a7de132..00000000 --- a/spec/models/inline_response_200_2_order_information_ship_to_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::InlineResponse2002OrderInformationShipTo -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002OrderInformationShipTo' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002OrderInformationShipTo.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002OrderInformationShipTo' do - it 'should create an instance of InlineResponse2002OrderInformationShipTo' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002OrderInformationShipTo) - 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 "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 "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 "county"' 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 "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 - -end diff --git a/spec/models/inline_response_200_2_order_information_spec.rb b/spec/models/inline_response_200_2_order_information_spec.rb deleted file mode 100644 index b7920922..00000000 --- a/spec/models/inline_response_200_2_order_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::InlineResponse2002OrderInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002OrderInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002OrderInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002OrderInformation' do - it 'should create an instance of InlineResponse2002OrderInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002OrderInformation) - 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 "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 "invoice_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_2_payment_information_card_spec.rb b/spec/models/inline_response_200_2_payment_information_card_spec.rb deleted file mode 100644 index 64965c9b..00000000 --- a/spec/models/inline_response_200_2_payment_information_card_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::InlineResponse2002PaymentInformationCard -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002PaymentInformationCard' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002PaymentInformationCard.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002PaymentInformationCard' do - it 'should create an instance of InlineResponse2002PaymentInformationCard' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002PaymentInformationCard) - 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 "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 "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_2_payment_information_spec.rb b/spec/models/inline_response_200_2_payment_information_spec.rb deleted file mode 100644 index 00c7a23e..00000000 --- a/spec/models/inline_response_200_2_payment_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::InlineResponse2002PaymentInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002PaymentInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002PaymentInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002PaymentInformation' do - it 'should create an instance of InlineResponse2002PaymentInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002PaymentInformation) - 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 - -end diff --git a/spec/models/inline_response_200_2_payment_information_tokenized_card_spec.rb b/spec/models/inline_response_200_2_payment_information_tokenized_card_spec.rb deleted file mode 100644 index 261a6034..00000000 --- a/spec/models/inline_response_200_2_payment_information_tokenized_card_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::InlineResponse2002PaymentInformationTokenizedCard -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002PaymentInformationTokenizedCard' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002PaymentInformationTokenizedCard.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002PaymentInformationTokenizedCard' do - it 'should create an instance of InlineResponse2002PaymentInformationTokenizedCard' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002PaymentInformationTokenizedCard) - 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 "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 - -end diff --git a/spec/models/inline_response_200_2_processing_information_spec.rb b/spec/models/inline_response_200_2_processing_information_spec.rb deleted file mode 100644 index 3ddadc44..00000000 --- a/spec/models/inline_response_200_2_processing_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::InlineResponse2002ProcessingInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002ProcessingInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002ProcessingInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002ProcessingInformation' do - it 'should create an instance of InlineResponse2002ProcessingInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002ProcessingInformation) - 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 - -end diff --git a/spec/models/inline_response_200_2_processor_information_avs_spec.rb b/spec/models/inline_response_200_2_processor_information_avs_spec.rb deleted file mode 100644 index b06b7fec..00000000 --- a/spec/models/inline_response_200_2_processor_information_avs_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::InlineResponse2002ProcessorInformationAvs -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002ProcessorInformationAvs' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002ProcessorInformationAvs.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002ProcessorInformationAvs' do - it 'should create an instance of InlineResponse2002ProcessorInformationAvs' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002ProcessorInformationAvs) - 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_200_2_processor_information_card_verification_spec.rb b/spec/models/inline_response_200_2_processor_information_card_verification_spec.rb deleted file mode 100644 index 7412e69c..00000000 --- a/spec/models/inline_response_200_2_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::InlineResponse2002ProcessorInformationCardVerification -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002ProcessorInformationCardVerification' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002ProcessorInformationCardVerification.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002ProcessorInformationCardVerification' do - it 'should create an instance of InlineResponse2002ProcessorInformationCardVerification' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002ProcessorInformationCardVerification) - 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_2_processor_information_spec.rb b/spec/models/inline_response_200_2_processor_information_spec.rb deleted file mode 100644 index ace4c4ec..00000000 --- a/spec/models/inline_response_200_2_processor_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::InlineResponse2002ProcessorInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2002ProcessorInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2002ProcessorInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2002ProcessorInformation' do - it 'should create an instance of InlineResponse2002ProcessorInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2002ProcessorInformation) - 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 "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 "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 "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_2_spec.rb b/spec/models/inline_response_200_2_spec.rb index a392a289..9f8a3840 100644 --- a/spec/models/inline_response_200_2_spec.rb +++ b/spec/models/inline_response_200_2_spec.rb @@ -32,19 +32,13 @@ expect(@instance).to be_instance_of(CyberSource::InlineResponse2002) 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 "_embedded"' do + 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 "id"' do + describe 'test attribute "_links"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end @@ -56,74 +50,4 @@ 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 "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 "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 "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 "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 "device_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_2_transaction_batches_spec.rb b/spec/models/inline_response_200_2_transaction_batches_spec.rb new file mode 100644 index 00000000..8db07aa6 --- /dev/null +++ b/spec/models/inline_response_200_2_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::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 new file mode 100644 index 00000000..bee30198 --- /dev/null +++ b/spec/models/inline_response_200_3_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::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 index a96913f2..1f46f7c1 100644 --- a/spec/models/inline_response_200_3_spec.rb +++ b/spec/models/inline_response_200_3_spec.rb @@ -32,53 +32,7 @@ expect(@instance).to be_instance_of(CyberSource::InlineResponse2003) 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 "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 "reversal_amount_details"' do + 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 diff --git a/spec/models/inline_response_200_4_device_information_spec.rb b/spec/models/inline_response_200_4_device_information_spec.rb deleted file mode 100644 index 852e26f6..00000000 --- a/spec/models/inline_response_200_4_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::InlineResponse2004DeviceInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2004DeviceInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2004DeviceInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2004DeviceInformation' do - it 'should create an instance of InlineResponse2004DeviceInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2004DeviceInformation) - 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_200_4_order_information_amount_details_spec.rb b/spec/models/inline_response_200_4_order_information_amount_details_spec.rb deleted file mode 100644 index 1c673e52..00000000 --- a/spec/models/inline_response_200_4_order_information_amount_details_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::InlineResponse2004OrderInformationAmountDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2004OrderInformationAmountDetails' do - before do - # run before each test - @instance = CyberSource::InlineResponse2004OrderInformationAmountDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2004OrderInformationAmountDetails' do - it 'should create an instance of InlineResponse2004OrderInformationAmountDetails' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2004OrderInformationAmountDetails) - 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 "discount_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 "duty_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 "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 "national_tax_included"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "freight_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 "tax_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_4_order_information_invoice_details_spec.rb b/spec/models/inline_response_200_4_order_information_invoice_details_spec.rb deleted file mode 100644 index 02a83ae0..00000000 --- a/spec/models/inline_response_200_4_order_information_invoice_details_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::InlineResponse2004OrderInformationInvoiceDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2004OrderInformationInvoiceDetails' do - before do - # run before each test - @instance = CyberSource::InlineResponse2004OrderInformationInvoiceDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2004OrderInformationInvoiceDetails' do - it 'should create an instance of InlineResponse2004OrderInformationInvoiceDetails' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2004OrderInformationInvoiceDetails) - end - end - describe 'test attribute "purchase_order_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 "purchase_order_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 "taxable"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "vat_invoice_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 "commodity_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_advice_addendum"' 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_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_200_4_order_information_ship_to_spec.rb b/spec/models/inline_response_200_4_order_information_ship_to_spec.rb deleted file mode 100644 index 60815b05..00000000 --- a/spec/models/inline_response_200_4_order_information_ship_to_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::InlineResponse2004OrderInformationShipTo -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2004OrderInformationShipTo' do - before do - # run before each test - @instance = CyberSource::InlineResponse2004OrderInformationShipTo.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2004OrderInformationShipTo' do - it 'should create an instance of InlineResponse2004OrderInformationShipTo' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2004OrderInformationShipTo) - 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 "country"' do - it 'should 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_order_information_spec.rb b/spec/models/inline_response_200_4_order_information_spec.rb deleted file mode 100644 index e8c4599e..00000000 --- a/spec/models/inline_response_200_4_order_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::InlineResponse2004OrderInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2004OrderInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2004OrderInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2004OrderInformation' do - it 'should create an instance of InlineResponse2004OrderInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2004OrderInformation) - 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 "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 "invoice_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_4_processing_information_authorization_options_spec.rb b/spec/models/inline_response_200_4_processing_information_authorization_options_spec.rb deleted file mode 100644 index 5ba13467..00000000 --- a/spec/models/inline_response_200_4_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::InlineResponse2004ProcessingInformationAuthorizationOptions -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2004ProcessingInformationAuthorizationOptions' do - before do - # run before each test - @instance = CyberSource::InlineResponse2004ProcessingInformationAuthorizationOptions.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2004ProcessingInformationAuthorizationOptions' do - it 'should create an instance of InlineResponse2004ProcessingInformationAuthorizationOptions' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2004ProcessingInformationAuthorizationOptions) - end - end - describe 'test attribute "verbal_auth_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_4_processing_information_spec.rb b/spec/models/inline_response_200_4_processing_information_spec.rb deleted file mode 100644 index b774844c..00000000 --- a/spec/models/inline_response_200_4_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::InlineResponse2004ProcessingInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2004ProcessingInformation' do - before do - # run before each test - @instance = CyberSource::InlineResponse2004ProcessingInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2004ProcessingInformation' do - it 'should create an instance of InlineResponse2004ProcessingInformation' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2004ProcessingInformation) - 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 "authorization_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_4_report_definitions_spec.rb b/spec/models/inline_response_200_4_report_definitions_spec.rb new file mode 100644 index 00000000..8a830eeb --- /dev/null +++ b/spec/models/inline_response_200_4_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::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 index 75814bc8..b286e4e3 100644 --- a/spec/models/inline_response_200_4_spec.rb +++ b/spec/models/inline_response_200_4_spec.rb @@ -32,77 +32,7 @@ expect(@instance).to be_instance_of(CyberSource::InlineResponse2004) 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", "TRANSMITTED", "BATCH_ERROR", "VOIDED"]) - # 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 "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 "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 "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 "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 "device_information"' do + 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 diff --git a/spec/models/inline_response_200_5_attributes_spec.rb b/spec/models/inline_response_200_5_attributes_spec.rb new file mode 100644 index 00000000..82c4ea77 --- /dev/null +++ b/spec/models/inline_response_200_5_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::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 index f9ac05c4..3adb9460 100644 --- a/spec/models/inline_response_200_5_spec.rb +++ b/spec/models/inline_response_200_5_spec.rb @@ -32,47 +32,41 @@ expect(@instance).to be_instance_of(CyberSource::InlineResponse2005) end end - describe 'test attribute "_links"' 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 "id"' do + 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 "submit_time_utc"' do + 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 "status"' do + describe 'test attribute "attributes"' 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", "TRANSMITTED", "BATCH_ERROR", "VOIDED"]) - # 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 + 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 "refund_amount_details"' do + describe 'test attribute "description"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers 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 new file mode 100644 index 00000000..f084bd63 --- /dev/null +++ b/spec/models/inline_response_200_6_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::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 index 36e5759a..033e8821 100644 --- a/spec/models/inline_response_200_6_spec.rb +++ b/spec/models/inline_response_200_6_spec.rb @@ -32,47 +32,7 @@ expect(@instance).to be_instance_of(CyberSource::InlineResponse2006) 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", "TRANSMITTED", "BATCH_ERROR", "VOIDED"]) - # 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 + describe 'test attribute "subscriptions"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end diff --git a/spec/models/inline_response_200_6_subscriptions_spec.rb b/spec/models/inline_response_200_6_subscriptions_spec.rb new file mode 100644 index 00000000..3426c985 --- /dev/null +++ b/spec/models/inline_response_200_6_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::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 new file mode 100644 index 00000000..2bdfd5f5 --- /dev/null +++ b/spec/models/inline_response_200_7_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::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 index c520c515..600bb958 100644 --- a/spec/models/inline_response_200_7_spec.rb +++ b/spec/models/inline_response_200_7_spec.rb @@ -32,57 +32,7 @@ expect(@instance).to be_instance_of(CyberSource::InlineResponse2007) 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 + describe 'test attribute "reports"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end diff --git a/spec/models/inline_response_200_8__links_first_spec.rb b/spec/models/inline_response_200_8__links_first_spec.rb deleted file mode 100644 index 1dd7aa45..00000000 --- a/spec/models/inline_response_200_8__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::InlineResponse2008LinksFirst -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2008LinksFirst' do - before do - # run before each test - @instance = CyberSource::InlineResponse2008LinksFirst.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2008LinksFirst' do - it 'should create an instance of InlineResponse2008LinksFirst' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2008LinksFirst) - 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_8__links_last_spec.rb b/spec/models/inline_response_200_8__links_last_spec.rb deleted file mode 100644 index 0ad00a51..00000000 --- a/spec/models/inline_response_200_8__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::InlineResponse2008LinksLast -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2008LinksLast' do - before do - # run before each test - @instance = CyberSource::InlineResponse2008LinksLast.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2008LinksLast' do - it 'should create an instance of InlineResponse2008LinksLast' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2008LinksLast) - 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_8__links_next_spec.rb b/spec/models/inline_response_200_8__links_next_spec.rb deleted file mode 100644 index 337d9102..00000000 --- a/spec/models/inline_response_200_8__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::InlineResponse2008LinksNext -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2008LinksNext' do - before do - # run before each test - @instance = CyberSource::InlineResponse2008LinksNext.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2008LinksNext' do - it 'should create an instance of InlineResponse2008LinksNext' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2008LinksNext) - 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_8__links_prev_spec.rb b/spec/models/inline_response_200_8__links_prev_spec.rb deleted file mode 100644 index 5ea78857..00000000 --- a/spec/models/inline_response_200_8__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::InlineResponse2008LinksPrev -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2008LinksPrev' do - before do - # run before each test - @instance = CyberSource::InlineResponse2008LinksPrev.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2008LinksPrev' do - it 'should create an instance of InlineResponse2008LinksPrev' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2008LinksPrev) - 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_8__links_self_spec.rb b/spec/models/inline_response_200_8__links_self_spec.rb deleted file mode 100644 index 051089b4..00000000 --- a/spec/models/inline_response_200_8__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::InlineResponse2008LinksSelf -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2008LinksSelf' do - before do - # run before each test - @instance = CyberSource::InlineResponse2008LinksSelf.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2008LinksSelf' do - it 'should create an instance of InlineResponse2008LinksSelf' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2008LinksSelf) - 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_8__links_spec.rb b/spec/models/inline_response_200_8__links_spec.rb deleted file mode 100644 index 726b7fee..00000000 --- a/spec/models/inline_response_200_8__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::InlineResponse2008Links -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse2008Links' do - before do - # run before each test - @instance = CyberSource::InlineResponse2008Links.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse2008Links' do - it 'should create an instance of InlineResponse2008Links' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse2008Links) - 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_8_spec.rb b/spec/models/inline_response_200_8_spec.rb index 62f07932..ac474d0f 100644 --- a/spec/models/inline_response_200_8_spec.rb +++ b/spec/models/inline_response_200_8_spec.rb @@ -32,47 +32,97 @@ expect(@instance).to be_instance_of(CyberSource::InlineResponse2008) end end - describe 'test attribute "_links"' do + 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 "object"' do + describe 'test attribute "report_id"' 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"]) + 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.object = value }.not_to raise_error + # expect { @instance.report_mime_type = value }.not_to raise_error # end end end - describe 'test attribute "offset"' do + 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 "limit"' do + 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 "count"' do + 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 "total"' do + 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 "_embedded"' do + 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 diff --git a/spec/models/inline_response_200_9__links_files_spec.rb b/spec/models/inline_response_200_9__links_files_spec.rb new file mode 100644 index 00000000..36598be0 --- /dev/null +++ b/spec/models/inline_response_200_9__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::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 new file mode 100644 index 00000000..96a10b04 --- /dev/null +++ b/spec/models/inline_response_200_9__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::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 new file mode 100644 index 00000000..d92b185f --- /dev/null +++ b/spec/models/inline_response_200_9__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::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 new file mode 100644 index 00000000..1b0131f5 --- /dev/null +++ b/spec/models/inline_response_200_9_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::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 new file mode 100644 index 00000000..e4ca7942 --- /dev/null +++ b/spec/models/inline_response_200_9_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::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_201_1__links_spec.rb b/spec/models/inline_response_201_1__links_spec.rb new file mode 100644 index 00000000..846c895c --- /dev/null +++ b/spec/models/inline_response_201_1__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::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_7__embedded__links_spec.rb b/spec/models/inline_response_201_7__embedded__links_spec.rb new file mode 100644 index 00000000..0ed8c480 --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..8d85a815 --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..0e77a5c7 --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..19283b5a --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..1fd94d15 --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..62aa9c27 --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..e8ec2126 --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..5efbef80 --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..bf56caf0 --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..7aa455e0 --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..2db795dc --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..73ba8eff --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..fecad03d --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..519e3246 --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..c0cc2c87 --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..f77c103c --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..ee7341e8 --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..4244dde1 --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..1cacc675 --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..ba1e5a59 --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..c2114dbe --- /dev/null +++ b/spec/models/inline_response_201_7__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::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 new file mode 100644 index 00000000..bffaf439 --- /dev/null +++ b/spec/models/inline_response_201_7_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::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__embedded_capture__links_spec.rb b/spec/models/inline_response_201__embedded_capture__links_spec.rb deleted file mode 100644 index 1b5e4638..00000000 --- a/spec/models/inline_response_201__embedded_capture__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::InlineResponse201EmbeddedCaptureLinks -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201EmbeddedCaptureLinks' do - before do - # run before each test - @instance = CyberSource::InlineResponse201EmbeddedCaptureLinks.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201EmbeddedCaptureLinks' do - it 'should create an instance of InlineResponse201EmbeddedCaptureLinks' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201EmbeddedCaptureLinks) - 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__embedded_capture_spec.rb b/spec/models/inline_response_201__embedded_capture_spec.rb deleted file mode 100644 index 5bd34fd8..00000000 --- a/spec/models/inline_response_201__embedded_capture_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::InlineResponse201EmbeddedCapture -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201EmbeddedCapture' do - before do - # run before each test - @instance = CyberSource::InlineResponse201EmbeddedCapture.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201EmbeddedCapture' do - it 'should create an instance of InlineResponse201EmbeddedCapture' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201EmbeddedCapture) - 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 "_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__embedded_spec.rb b/spec/models/inline_response_201__embedded_spec.rb deleted file mode 100644 index 2b9faa1c..00000000 --- a/spec/models/inline_response_201__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::InlineResponse201Embedded -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InlineResponse201Embedded' do - before do - # run before each test - @instance = CyberSource::InlineResponse201Embedded.new - end - - after do - # run after each test - end - - describe 'test an instance of InlineResponse201Embedded' do - it 'should create an instance of InlineResponse201Embedded' do - expect(@instance).to be_instance_of(CyberSource::InlineResponse201Embedded) - 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_spec.rb b/spec/models/inline_response_201_spec.rb index 0d124cfd..a34c858c 100644 --- a/spec/models/inline_response_201_spec.rb +++ b/spec/models/inline_response_201_spec.rb @@ -38,12 +38,6 @@ 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 "id"' 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_400_5_error_information_details_spec.rb b/spec/models/inline_response_400_5_error_information_details_spec.rb new file mode 100644 index 00000000..b0c01b2c --- /dev/null +++ b/spec/models/inline_response_400_5_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::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 new file mode 100644 index 00000000..9cded22c --- /dev/null +++ b/spec/models/inline_response_400_5_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::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 index 61c405f0..97419880 100644 --- a/spec/models/inline_response_400_5_spec.rb +++ b/spec/models/inline_response_400_5_spec.rb @@ -32,35 +32,13 @@ expect(@instance).to be_instance_of(CyberSource::InlineResponse4005) end end - describe 'test attribute "submit_time_utc"' do + 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 "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 + 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 diff --git a/spec/models/inline_response_400_6_spec.rb b/spec/models/inline_response_400_6_spec.rb index 3452a182..8de36fc4 100644 --- a/spec/models/inline_response_400_6_spec.rb +++ b/spec/models/inline_response_400_6_spec.rb @@ -32,12 +32,28 @@ expect(@instance).to be_instance_of(CyberSource::InlineResponse4006) end end - describe 'test attribute "type"' do + 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 diff --git a/spec/models/inline_response_400_7_fields_spec.rb b/spec/models/inline_response_400_7_fields_spec.rb new file mode 100644 index 00000000..3df8b1d4 --- /dev/null +++ b/spec/models/inline_response_400_7_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::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 new file mode 100644 index 00000000..7db67fa0 --- /dev/null +++ b/spec/models/inline_response_400_7_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::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 new file mode 100644 index 00000000..7aa0d9bf --- /dev/null +++ b/spec/models/inline_response_400_8_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::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 new file mode 100644 index 00000000..104594b6 --- /dev/null +++ b/spec/models/inline_response_400_9_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::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_500_error_information_spec.rb b/spec/models/inline_response_500_error_information_spec.rb new file mode 100644 index 00000000..d7e0c6bd --- /dev/null +++ b/spec/models/inline_response_500_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::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 new file mode 100644 index 00000000..2d79ef55 --- /dev/null +++ b/spec/models/inline_response_500_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::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/instrumentidentifiers__links_self_spec.rb b/spec/models/instrumentidentifiers__links_self_spec.rb deleted file mode 100644 index e0eeec0d..00000000 --- a/spec/models/instrumentidentifiers__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::InstrumentidentifiersLinksSelf -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InstrumentidentifiersLinksSelf' do - before do - # run before each test - @instance = CyberSource::InstrumentidentifiersLinksSelf.new - end - - after do - # run after each test - end - - describe 'test an instance of InstrumentidentifiersLinksSelf' do - it 'should create an instance of InstrumentidentifiersLinksSelf' do - expect(@instance).to be_instance_of(CyberSource::InstrumentidentifiersLinksSelf) - 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/instrumentidentifiers__links_spec.rb b/spec/models/instrumentidentifiers__links_spec.rb deleted file mode 100644 index dd532249..00000000 --- a/spec/models/instrumentidentifiers__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::InstrumentidentifiersLinks -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InstrumentidentifiersLinks' do - before do - # run before each test - @instance = CyberSource::InstrumentidentifiersLinks.new - end - - after do - # run after each test - end - - describe 'test an instance of InstrumentidentifiersLinks' do - it 'should create an instance of InstrumentidentifiersLinks' do - expect(@instance).to be_instance_of(CyberSource::InstrumentidentifiersLinks) - 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 "ancestor"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "successor"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/instrumentidentifiers_bank_account_spec.rb b/spec/models/instrumentidentifiers_bank_account_spec.rb deleted file mode 100644 index 3c18daba..00000000 --- a/spec/models/instrumentidentifiers_bank_account_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::InstrumentidentifiersBankAccount -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InstrumentidentifiersBankAccount' do - before do - # run before each test - @instance = CyberSource::InstrumentidentifiersBankAccount.new - end - - after do - # run after each test - end - - describe 'test an instance of InstrumentidentifiersBankAccount' do - it 'should create an instance of InstrumentidentifiersBankAccount' do - expect(@instance).to be_instance_of(CyberSource::InstrumentidentifiersBankAccount) - 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 "routing_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/instrumentidentifiers_card_spec.rb b/spec/models/instrumentidentifiers_card_spec.rb deleted file mode 100644 index 28c2df65..00000000 --- a/spec/models/instrumentidentifiers_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::InstrumentidentifiersCard -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InstrumentidentifiersCard' do - before do - # run before each test - @instance = CyberSource::InstrumentidentifiersCard.new - end - - after do - # run after each test - end - - describe 'test an instance of InstrumentidentifiersCard' do - it 'should create an instance of InstrumentidentifiersCard' do - expect(@instance).to be_instance_of(CyberSource::InstrumentidentifiersCard) - 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 - -end diff --git a/spec/models/instrumentidentifiers_details_spec.rb b/spec/models/instrumentidentifiers_details_spec.rb deleted file mode 100644 index df841dc6..00000000 --- a/spec/models/instrumentidentifiers_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::InstrumentidentifiersDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InstrumentidentifiersDetails' do - before do - # run before each test - @instance = CyberSource::InstrumentidentifiersDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of InstrumentidentifiersDetails' do - it 'should create an instance of InstrumentidentifiersDetails' do - expect(@instance).to be_instance_of(CyberSource::InstrumentidentifiersDetails) - 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 "location"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/instrumentidentifiers_metadata_spec.rb b/spec/models/instrumentidentifiers_metadata_spec.rb deleted file mode 100644 index 51f8c151..00000000 --- a/spec/models/instrumentidentifiers_metadata_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::InstrumentidentifiersMetadata -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InstrumentidentifiersMetadata' do - before do - # run before each test - @instance = CyberSource::InstrumentidentifiersMetadata.new - end - - after do - # run after each test - end - - describe 'test an instance of InstrumentidentifiersMetadata' do - it 'should create an instance of InstrumentidentifiersMetadata' do - expect(@instance).to be_instance_of(CyberSource::InstrumentidentifiersMetadata) - end - end - describe 'test attribute "creator"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/instrumentidentifiers_processing_information_authorization_options_initiator_merchant_initiated_transaction_spec.rb b/spec/models/instrumentidentifiers_processing_information_authorization_options_initiator_merchant_initiated_transaction_spec.rb deleted file mode 100644 index 467e5bf8..00000000 --- a/spec/models/instrumentidentifiers_processing_information_authorization_options_initiator_merchant_initiated_transaction_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::InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction' do - before do - # run before each test - @instance = CyberSource::InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.new - end - - after do - # run after each test - end - - describe 'test an instance of InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction' do - it 'should create an instance of InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction' do - expect(@instance).to be_instance_of(CyberSource::InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction) - end - end - describe 'test attribute "previous_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/instrumentidentifiers_processing_information_authorization_options_initiator_spec.rb b/spec/models/instrumentidentifiers_processing_information_authorization_options_initiator_spec.rb deleted file mode 100644 index 2157eba3..00000000 --- a/spec/models/instrumentidentifiers_processing_information_authorization_options_initiator_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::InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiator -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiator' do - before do - # run before each test - @instance = CyberSource::InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.new - end - - after do - # run after each test - end - - describe 'test an instance of InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiator' do - it 'should create an instance of InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiator' do - expect(@instance).to be_instance_of(CyberSource::InstrumentidentifiersProcessingInformationAuthorizationOptionsInitiator) - end - end - describe 'test attribute "merchant_initiated_transaction"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/instrumentidentifiers_processing_information_authorization_options_spec.rb b/spec/models/instrumentidentifiers_processing_information_authorization_options_spec.rb deleted file mode 100644 index 9b1a5e9b..00000000 --- a/spec/models/instrumentidentifiers_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::InstrumentidentifiersProcessingInformationAuthorizationOptions -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InstrumentidentifiersProcessingInformationAuthorizationOptions' do - before do - # run before each test - @instance = CyberSource::InstrumentidentifiersProcessingInformationAuthorizationOptions.new - end - - after do - # run after each test - end - - describe 'test an instance of InstrumentidentifiersProcessingInformationAuthorizationOptions' do - it 'should create an instance of InstrumentidentifiersProcessingInformationAuthorizationOptions' do - expect(@instance).to be_instance_of(CyberSource::InstrumentidentifiersProcessingInformationAuthorizationOptions) - end - end - describe 'test attribute "initiator"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/instrumentidentifiers_processing_information_spec.rb b/spec/models/instrumentidentifiers_processing_information_spec.rb deleted file mode 100644 index 5afa4ed6..00000000 --- a/spec/models/instrumentidentifiers_processing_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::InstrumentidentifiersProcessingInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InstrumentidentifiersProcessingInformation' do - before do - # run before each test - @instance = CyberSource::InstrumentidentifiersProcessingInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of InstrumentidentifiersProcessingInformation' do - it 'should create an instance of InstrumentidentifiersProcessingInformation' do - expect(@instance).to be_instance_of(CyberSource::InstrumentidentifiersProcessingInformation) - 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 - -end diff --git a/spec/models/paymentinstruments_bank_account_spec.rb b/spec/models/paymentinstruments_bank_account_spec.rb deleted file mode 100644 index 6d693885..00000000 --- a/spec/models/paymentinstruments_bank_account_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::PaymentinstrumentsBankAccount -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PaymentinstrumentsBankAccount' do - before do - # run before each test - @instance = CyberSource::PaymentinstrumentsBankAccount.new - end - - after do - # run after each test - end - - describe 'test an instance of PaymentinstrumentsBankAccount' do - it 'should create an instance of PaymentinstrumentsBankAccount' do - expect(@instance).to be_instance_of(CyberSource::PaymentinstrumentsBankAccount) - 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/paymentinstruments_bill_to_spec.rb b/spec/models/paymentinstruments_bill_to_spec.rb deleted file mode 100644 index adeee4e0..00000000 --- a/spec/models/paymentinstruments_bill_to_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::PaymentinstrumentsBillTo -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PaymentinstrumentsBillTo' do - before do - # run before each test - @instance = CyberSource::PaymentinstrumentsBillTo.new - end - - after do - # run after each test - end - - describe 'test an instance of PaymentinstrumentsBillTo' do - it 'should create an instance of PaymentinstrumentsBillTo' do - expect(@instance).to be_instance_of(CyberSource::PaymentinstrumentsBillTo) - 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 "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 "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 "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 "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 - -end diff --git a/spec/models/paymentinstruments_buyer_information_issued_by_spec.rb b/spec/models/paymentinstruments_buyer_information_issued_by_spec.rb deleted file mode 100644 index c39caf74..00000000 --- a/spec/models/paymentinstruments_buyer_information_issued_by_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::PaymentinstrumentsBuyerInformationIssuedBy -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PaymentinstrumentsBuyerInformationIssuedBy' do - before do - # run before each test - @instance = CyberSource::PaymentinstrumentsBuyerInformationIssuedBy.new - end - - after do - # run after each test - end - - describe 'test an instance of PaymentinstrumentsBuyerInformationIssuedBy' do - it 'should create an instance of PaymentinstrumentsBuyerInformationIssuedBy' do - expect(@instance).to be_instance_of(CyberSource::PaymentinstrumentsBuyerInformationIssuedBy) - 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 - -end diff --git a/spec/models/paymentinstruments_buyer_information_personal_identification_spec.rb b/spec/models/paymentinstruments_buyer_information_personal_identification_spec.rb deleted file mode 100644 index 4f07d8ce..00000000 --- a/spec/models/paymentinstruments_buyer_information_personal_identification_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::PaymentinstrumentsBuyerInformationPersonalIdentification -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PaymentinstrumentsBuyerInformationPersonalIdentification' do - before do - # run before each test - @instance = CyberSource::PaymentinstrumentsBuyerInformationPersonalIdentification.new - end - - after do - # run after each test - end - - describe 'test an instance of PaymentinstrumentsBuyerInformationPersonalIdentification' do - it 'should create an instance of PaymentinstrumentsBuyerInformationPersonalIdentification' do - expect(@instance).to be_instance_of(CyberSource::PaymentinstrumentsBuyerInformationPersonalIdentification) - 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 "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 "issued_by"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/paymentinstruments_buyer_information_spec.rb b/spec/models/paymentinstruments_buyer_information_spec.rb deleted file mode 100644 index c19899ef..00000000 --- a/spec/models/paymentinstruments_buyer_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::PaymentinstrumentsBuyerInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PaymentinstrumentsBuyerInformation' do - before do - # run before each test - @instance = CyberSource::PaymentinstrumentsBuyerInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of PaymentinstrumentsBuyerInformation' do - it 'should create an instance of PaymentinstrumentsBuyerInformation' do - expect(@instance).to be_instance_of(CyberSource::PaymentinstrumentsBuyerInformation) - end - end - describe 'test attribute "company_tax_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 "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 "date_o_birth"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "personal_identification"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/paymentinstruments_card_spec.rb b/spec/models/paymentinstruments_card_spec.rb deleted file mode 100644 index 2b5b39b8..00000000 --- a/spec/models/paymentinstruments_card_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::PaymentinstrumentsCard -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PaymentinstrumentsCard' do - before do - # run before each test - @instance = CyberSource::PaymentinstrumentsCard.new - end - - after do - # run after each test - end - - describe 'test an instance of PaymentinstrumentsCard' do - it 'should create an instance of PaymentinstrumentsCard' do - expect(@instance).to be_instance_of(CyberSource::PaymentinstrumentsCard) - 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 "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', ["visa", "mastercard", "american express", "discover", "diners club", "carte blanche", "jcb", "optima", "twinpay credit", "twinpay debit", "walmart", "enroute", "lowes consumer", "home depot consumer", "mbna", "dicks sportswear", "casual corner", "sears", "jal", "disney", "maestro uk domestic", "sams club consumer", "sams club business", "nicos", "bill me later", "bebe", "restoration hardware", "delta online", "solo", "visa electron", "dankort", "laser", "carte bleue", "carta si", "pinless debit", "encoded account", "uatp", "household", "maestro international", "ge money uk", "korean cards", "style", "jcrew", "payease china processing ewallet", "payease china processing bank transfer", "meijer private label", "hipercard", "aura", "redecard", "orico", "elo", "capital one private label", "synchrony private label", "china union pay"]) - # validator.allowable_values.each do |value| - # expect { @instance.type = value }.not_to raise_error - # end - 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 "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 "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/paymentinstruments_instrument_identifier_spec.rb b/spec/models/paymentinstruments_instrument_identifier_spec.rb deleted file mode 100644 index f8544c9c..00000000 --- a/spec/models/paymentinstruments_instrument_identifier_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::PaymentinstrumentsInstrumentIdentifier -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PaymentinstrumentsInstrumentIdentifier' do - before do - # run before each test - @instance = CyberSource::PaymentinstrumentsInstrumentIdentifier.new - end - - after do - # run after each test - end - - describe 'test an instance of PaymentinstrumentsInstrumentIdentifier' do - it 'should create an instance of PaymentinstrumentsInstrumentIdentifier' do - expect(@instance).to be_instance_of(CyberSource::PaymentinstrumentsInstrumentIdentifier) - 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', ["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 "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 "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/paymentinstruments_merchant_information_merchant_descriptor_spec.rb b/spec/models/paymentinstruments_merchant_information_merchant_descriptor_spec.rb deleted file mode 100644 index a480ee23..00000000 --- a/spec/models/paymentinstruments_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::PaymentinstrumentsMerchantInformationMerchantDescriptor -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PaymentinstrumentsMerchantInformationMerchantDescriptor' do - before do - # run before each test - @instance = CyberSource::PaymentinstrumentsMerchantInformationMerchantDescriptor.new - end - - after do - # run after each test - end - - describe 'test an instance of PaymentinstrumentsMerchantInformationMerchantDescriptor' do - it 'should create an instance of PaymentinstrumentsMerchantInformationMerchantDescriptor' do - expect(@instance).to be_instance_of(CyberSource::PaymentinstrumentsMerchantInformationMerchantDescriptor) - end - end - describe 'test attribute "alternate_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/paymentinstruments_merchant_information_spec.rb b/spec/models/paymentinstruments_merchant_information_spec.rb deleted file mode 100644 index 7b7e7e90..00000000 --- a/spec/models/paymentinstruments_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::PaymentinstrumentsMerchantInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PaymentinstrumentsMerchantInformation' do - before do - # run before each test - @instance = CyberSource::PaymentinstrumentsMerchantInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of PaymentinstrumentsMerchantInformation' do - it 'should create an instance of PaymentinstrumentsMerchantInformation' do - expect(@instance).to be_instance_of(CyberSource::PaymentinstrumentsMerchantInformation) - 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/paymentinstruments_processing_information_bank_transfer_options_spec.rb b/spec/models/paymentinstruments_processing_information_bank_transfer_options_spec.rb deleted file mode 100644 index 1054d7c1..00000000 --- a/spec/models/paymentinstruments_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::PaymentinstrumentsProcessingInformationBankTransferOptions -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PaymentinstrumentsProcessingInformationBankTransferOptions' do - before do - # run before each test - @instance = CyberSource::PaymentinstrumentsProcessingInformationBankTransferOptions.new - end - - after do - # run after each test - end - - describe 'test an instance of PaymentinstrumentsProcessingInformationBankTransferOptions' do - it 'should create an instance of PaymentinstrumentsProcessingInformationBankTransferOptions' do - expect(@instance).to be_instance_of(CyberSource::PaymentinstrumentsProcessingInformationBankTransferOptions) - 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/paymentinstruments_processing_information_spec.rb b/spec/models/paymentinstruments_processing_information_spec.rb deleted file mode 100644 index 15d992c3..00000000 --- a/spec/models/paymentinstruments_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::PaymentinstrumentsProcessingInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PaymentinstrumentsProcessingInformation' do - before do - # run before each test - @instance = CyberSource::PaymentinstrumentsProcessingInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of PaymentinstrumentsProcessingInformation' do - it 'should create an instance of PaymentinstrumentsProcessingInformation' do - expect(@instance).to be_instance_of(CyberSource::PaymentinstrumentsProcessingInformation) - end - end - describe 'test attribute "bill_payment_program_enabled"' 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/paymentsflexv1tokens_card_info_spec.rb b/spec/models/paymentsflexv1tokens_card_info_spec.rb deleted file mode 100644 index eb676657..00000000 --- a/spec/models/paymentsflexv1tokens_card_info_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::Paymentsflexv1tokensCardInfo -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Paymentsflexv1tokensCardInfo' do - before do - # run before each test - @instance = CyberSource::Paymentsflexv1tokensCardInfo.new - end - - after do - # run after each test - end - - describe 'test an instance of Paymentsflexv1tokensCardInfo' do - it 'should create an instance of Paymentsflexv1tokensCardInfo' do - expect(@instance).to be_instance_of(CyberSource::Paymentsflexv1tokensCardInfo) - end - end - describe 'test attribute "card_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 "card_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 "card_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 "card_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/ptsv2credits_point_of_sale_information_emv_spec.rb b/spec/models/ptsv2credits_point_of_sale_information_emv_spec.rb new file mode 100644 index 00000000..16dcadb8 --- /dev/null +++ b/spec/models/ptsv2credits_point_of_sale_information_emv_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::Ptsv2creditsPointOfSaleInformationEmv +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2creditsPointOfSaleInformationEmv' do + before do + # run before each test + @instance = CyberSource::Ptsv2creditsPointOfSaleInformationEmv.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2creditsPointOfSaleInformationEmv' do + it 'should create an instance of Ptsv2creditsPointOfSaleInformationEmv' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2creditsPointOfSaleInformationEmv) + 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 + + describe 'test attribute "fallback"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "fallback_condition"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2credits_point_of_sale_information_spec.rb b/spec/models/ptsv2credits_point_of_sale_information_spec.rb new file mode 100644 index 00000000..c10dfdf0 --- /dev/null +++ b/spec/models/ptsv2credits_point_of_sale_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::Ptsv2creditsPointOfSaleInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2creditsPointOfSaleInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2creditsPointOfSaleInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2creditsPointOfSaleInformation' do + it 'should create an instance of Ptsv2creditsPointOfSaleInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2creditsPointOfSaleInformation) + 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 + +end diff --git a/spec/models/ptsv2credits_processing_information_spec.rb b/spec/models/ptsv2credits_processing_information_spec.rb new file mode 100644 index 00000000..e425c25d --- /dev/null +++ b/spec/models/ptsv2credits_processing_information_spec.rb @@ -0,0 +1,89 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::Ptsv2creditsProcessingInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2creditsProcessingInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2creditsProcessingInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2creditsProcessingInformation' do + it 'should create an instance of Ptsv2creditsProcessingInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2creditsProcessingInformation) + 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 "processor_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 "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 "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 "link_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_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 "visa_checkout_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 "purchase_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 "recurring_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/ptsv2payments_aggregator_information_spec.rb b/spec/models/ptsv2payments_aggregator_information_spec.rb new file mode 100644 index 00000000..682f6bec --- /dev/null +++ b/spec/models/ptsv2payments_aggregator_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::Ptsv2paymentsAggregatorInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsAggregatorInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsAggregatorInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsAggregatorInformation' do + it 'should create an instance of Ptsv2paymentsAggregatorInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsAggregatorInformation) + end + end + describe 'test attribute "aggregator_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 "sub_merchant"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2payments_aggregator_information_sub_merchant_spec.rb b/spec/models/ptsv2payments_aggregator_information_sub_merchant_spec.rb new file mode 100644 index 00000000..7e8582d2 --- /dev/null +++ b/spec/models/ptsv2payments_aggregator_information_sub_merchant_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::Ptsv2paymentsAggregatorInformationSubMerchant +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsAggregatorInformationSubMerchant' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsAggregatorInformationSubMerchant.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsAggregatorInformationSubMerchant' do + it 'should create an instance of Ptsv2paymentsAggregatorInformationSubMerchant' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsAggregatorInformationSubMerchant) + end + end + describe 'test attribute "card_acceptor_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 "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 "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 "region"' 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 "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 "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 + +end diff --git a/spec/models/ptsv2payments_buyer_information_personal_identification_spec.rb b/spec/models/ptsv2payments_buyer_information_personal_identification_spec.rb new file mode 100644 index 00000000..431dc535 --- /dev/null +++ b/spec/models/ptsv2payments_buyer_information_personal_identification_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::Ptsv2paymentsBuyerInformationPersonalIdentification +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsBuyerInformationPersonalIdentification' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsBuyerInformationPersonalIdentification.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsBuyerInformationPersonalIdentification' do + it 'should create an instance of Ptsv2paymentsBuyerInformationPersonalIdentification' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsBuyerInformationPersonalIdentification) + 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 + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ssn", "driverlicense"]) + # validator.allowable_values.each do |value| + # expect { @instance.type = value }.not_to raise_error + # end + 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 "issued_by"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2payments_buyer_information_spec.rb b/spec/models/ptsv2payments_buyer_information_spec.rb new file mode 100644 index 00000000..436b53cf --- /dev/null +++ b/spec/models/ptsv2payments_buyer_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::Ptsv2paymentsBuyerInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsBuyerInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsBuyerInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsBuyerInformation' do + it 'should create an instance of Ptsv2paymentsBuyerInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsBuyerInformation) + 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 "date_of_birth"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "vat_registration_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 "personal_identification"' 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/ptsv2payments_client_reference_information_spec.rb b/spec/models/ptsv2payments_client_reference_information_spec.rb new file mode 100644 index 00000000..38ba8421 --- /dev/null +++ b/spec/models/ptsv2payments_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::Ptsv2paymentsClientReferenceInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsClientReferenceInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsClientReferenceInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsClientReferenceInformation' do + it 'should create an instance of Ptsv2paymentsClientReferenceInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsClientReferenceInformation) + 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 "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 "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/ptsv2payments_consumer_authentication_information_spec.rb b/spec/models/ptsv2payments_consumer_authentication_information_spec.rb new file mode 100644 index 00000000..18581a53 --- /dev/null +++ b/spec/models/ptsv2payments_consumer_authentication_information_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::Ptsv2paymentsConsumerAuthenticationInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsConsumerAuthenticationInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsConsumerAuthenticationInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsConsumerAuthenticationInformation' do + it 'should create an instance of Ptsv2paymentsConsumerAuthenticationInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsConsumerAuthenticationInformation) + 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 "cavv_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 "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 "pares_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 "veres_enrolled"' 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 "ucaf_authentication_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 "ucaf_collection_indicator"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2payments_device_information_spec.rb b/spec/models/ptsv2payments_device_information_spec.rb new file mode 100644 index 00000000..47d136ed --- /dev/null +++ b/spec/models/ptsv2payments_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::Ptsv2paymentsDeviceInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsDeviceInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsDeviceInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsDeviceInformation' do + it 'should create an instance of Ptsv2paymentsDeviceInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsDeviceInformation) + 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 "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 "user_agent"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2payments_merchant_defined_information_spec.rb b/spec/models/ptsv2payments_merchant_defined_information_spec.rb new file mode 100644 index 00000000..02c220a6 --- /dev/null +++ b/spec/models/ptsv2payments_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::Ptsv2paymentsMerchantDefinedInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsMerchantDefinedInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsMerchantDefinedInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsMerchantDefinedInformation' do + it 'should create an instance of Ptsv2paymentsMerchantDefinedInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsMerchantDefinedInformation) + 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/ptsv2payments_merchant_information_merchant_descriptor_spec.rb b/spec/models/ptsv2payments_merchant_information_merchant_descriptor_spec.rb new file mode 100644 index 00000000..26c0ad81 --- /dev/null +++ b/spec/models/ptsv2payments_merchant_information_merchant_descriptor_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::Ptsv2paymentsMerchantInformationMerchantDescriptor +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsMerchantInformationMerchantDescriptor' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsMerchantInformationMerchantDescriptor.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsMerchantInformationMerchantDescriptor' do + it 'should create an instance of Ptsv2paymentsMerchantInformationMerchantDescriptor' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsMerchantInformationMerchantDescriptor) + 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 "alternate_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 "contact"' 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 "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 "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 "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 "administrative_area"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2payments_merchant_information_spec.rb b/spec/models/ptsv2payments_merchant_information_spec.rb new file mode 100644 index 00000000..ad2465c5 --- /dev/null +++ b/spec/models/ptsv2payments_merchant_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::Ptsv2paymentsMerchantInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsMerchantInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsMerchantInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsMerchantInformation' do + it 'should create an instance of Ptsv2paymentsMerchantInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsMerchantInformation) + 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 + + describe 'test attribute "sales_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 "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 "vat_registration_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 "card_acceptor_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_local_date_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/ptsv2payments_order_information_amount_details_amex_additional_amounts_spec.rb b/spec/models/ptsv2payments_order_information_amount_details_amex_additional_amounts_spec.rb new file mode 100644 index 00000000..a34d4ace --- /dev/null +++ b/spec/models/ptsv2payments_order_information_amount_details_amex_additional_amounts_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::Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts' do + it 'should create an instance of Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts) + 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 "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/ptsv2payments_order_information_amount_details_spec.rb b/spec/models/ptsv2payments_order_information_amount_details_spec.rb new file mode 100644 index 00000000..ac70dd63 --- /dev/null +++ b/spec/models/ptsv2payments_order_information_amount_details_spec.rb @@ -0,0 +1,149 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::Ptsv2paymentsOrderInformationAmountDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsOrderInformationAmountDetails' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsOrderInformationAmountDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsOrderInformationAmountDetails' do + it 'should create an instance of Ptsv2paymentsOrderInformationAmountDetails' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsOrderInformationAmountDetails) + 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 "discount_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 "duty_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 "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 "national_tax_included"' 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_applied_after_discount"' 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_applied_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 "tax_type_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 "freight_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 "foreign_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 "foreign_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 "exchange_rate"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "exchange_rate_time_stamp"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "surcharge"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "settlement_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 "settlement_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 "amex_additional_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 "tax_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/ptsv2payments_order_information_amount_details_surcharge_spec.rb b/spec/models/ptsv2payments_order_information_amount_details_surcharge_spec.rb new file mode 100644 index 00000000..90b5ec35 --- /dev/null +++ b/spec/models/ptsv2payments_order_information_amount_details_surcharge_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::Ptsv2paymentsOrderInformationAmountDetailsSurcharge +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsOrderInformationAmountDetailsSurcharge' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsOrderInformationAmountDetailsSurcharge.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsOrderInformationAmountDetailsSurcharge' do + it 'should create an instance of Ptsv2paymentsOrderInformationAmountDetailsSurcharge' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsOrderInformationAmountDetailsSurcharge) + end + end + describe 'test attribute "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 "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/ptsv2payments_order_information_amount_details_tax_details_spec.rb b/spec/models/ptsv2payments_order_information_amount_details_tax_details_spec.rb new file mode 100644 index 00000000..e3f266e7 --- /dev/null +++ b/spec/models/ptsv2payments_order_information_amount_details_tax_details_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::Ptsv2paymentsOrderInformationAmountDetailsTaxDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsOrderInformationAmountDetailsTaxDetails' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsOrderInformationAmountDetailsTaxDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsOrderInformationAmountDetailsTaxDetails' do + it 'should create an instance of Ptsv2paymentsOrderInformationAmountDetailsTaxDetails' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsOrderInformationAmountDetailsTaxDetails) + 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 + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["alternate", "local", "national", "vat"]) + # validator.allowable_values.each do |value| + # expect { @instance.type = value }.not_to raise_error + # end + end + end + + describe 'test attribute "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 "rate"' 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 "tax_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 "applied"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2payments_order_information_bill_to_spec.rb b/spec/models/ptsv2payments_order_information_bill_to_spec.rb new file mode 100644 index 00000000..a37722d0 --- /dev/null +++ b/spec/models/ptsv2payments_order_information_bill_to_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::Ptsv2paymentsOrderInformationBillTo +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsOrderInformationBillTo' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsOrderInformationBillTo.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsOrderInformationBillTo' do + it 'should create an instance of Ptsv2paymentsOrderInformationBillTo' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsOrderInformationBillTo) + 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 "middle_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 "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 "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 "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 "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 "district"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "building_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 "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 "phone_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', ["day", "home", "night", "work"]) + # validator.allowable_values.each do |value| + # expect { @instance.phone_type = value }.not_to raise_error + # end + end + end + +end diff --git a/spec/models/ptsv2payments_order_information_invoice_details_spec.rb b/spec/models/ptsv2payments_order_information_invoice_details_spec.rb new file mode 100644 index 00000000..40ff462f --- /dev/null +++ b/spec/models/ptsv2payments_order_information_invoice_details_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::Ptsv2paymentsOrderInformationInvoiceDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsOrderInformationInvoiceDetails' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsOrderInformationInvoiceDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsOrderInformationInvoiceDetails' do + it 'should create an instance of Ptsv2paymentsOrderInformationInvoiceDetails' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsOrderInformationInvoiceDetails) + end + end + describe 'test attribute "invoice_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 + + describe 'test attribute "purchase_order_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 "purchase_order_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 "purchase_contact_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 "taxable"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "vat_invoice_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 "commodity_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 "merchandise_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_advice_addendum"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2payments_order_information_invoice_details_transaction_advice_addendum_spec.rb b/spec/models/ptsv2payments_order_information_invoice_details_transaction_advice_addendum_spec.rb new file mode 100644 index 00000000..1c63270a --- /dev/null +++ b/spec/models/ptsv2payments_order_information_invoice_details_transaction_advice_addendum_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::Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum' do + it 'should create an instance of Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum) + end + end + describe 'test attribute "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/ptsv2payments_order_information_line_items_spec.rb b/spec/models/ptsv2payments_order_information_line_items_spec.rb new file mode 100644 index 00000000..2a470087 --- /dev/null +++ b/spec/models/ptsv2payments_order_information_line_items_spec.rb @@ -0,0 +1,161 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::Ptsv2paymentsOrderInformationLineItems +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsOrderInformationLineItems' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsOrderInformationLineItems.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsOrderInformationLineItems' do + it 'should create an instance of Ptsv2paymentsOrderInformationLineItems' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsOrderInformationLineItems) + 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 "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 "unit_of_measure"' 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_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 "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 "tax_rate"' 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_applied_after_discount"' 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_status_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 "tax_type_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 "amount_includes_tax"' 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_of_supply"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "commodity_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 "discount_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 "discount_applied"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "discount_rate"' 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_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 "tax_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 "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/ptsv2payments_order_information_ship_to_spec.rb b/spec/models/ptsv2payments_order_information_ship_to_spec.rb new file mode 100644 index 00000000..e912ce80 --- /dev/null +++ b/spec/models/ptsv2payments_order_information_ship_to_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::Ptsv2paymentsOrderInformationShipTo +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsOrderInformationShipTo' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsOrderInformationShipTo.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsOrderInformationShipTo' do + it 'should create an instance of Ptsv2paymentsOrderInformationShipTo' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsOrderInformationShipTo) + 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 "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 "district"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "building_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"' 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 + +end diff --git a/spec/models/ptsv2payments_order_information_shipping_details_spec.rb b/spec/models/ptsv2payments_order_information_shipping_details_spec.rb new file mode 100644 index 00000000..df5cd5b4 --- /dev/null +++ b/spec/models/ptsv2payments_order_information_shipping_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::Ptsv2paymentsOrderInformationShippingDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsOrderInformationShippingDetails' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsOrderInformationShippingDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsOrderInformationShippingDetails' do + it 'should create an instance of Ptsv2paymentsOrderInformationShippingDetails' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsOrderInformationShippingDetails) + 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 + + describe 'test attribute "ship_from_postal_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/ptsv2payments_order_information_spec.rb b/spec/models/ptsv2payments_order_information_spec.rb new file mode 100644 index 00000000..4d08e132 --- /dev/null +++ b/spec/models/ptsv2payments_order_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::Ptsv2paymentsOrderInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsOrderInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsOrderInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsOrderInformation' do + it 'should create an instance of Ptsv2paymentsOrderInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsOrderInformation) + 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 "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 "invoice_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/ptsv2payments_payment_information_card_spec.rb b/spec/models/ptsv2payments_payment_information_card_spec.rb new file mode 100644 index 00000000..8bd12b31 --- /dev/null +++ b/spec/models/ptsv2payments_payment_information_card_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::Ptsv2paymentsPaymentInformationCard +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsPaymentInformationCard' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsPaymentInformationCard.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsPaymentInformationCard' do + it 'should create an instance of Ptsv2paymentsPaymentInformationCard' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsPaymentInformationCard) + 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 "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 "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 "use_as"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "source_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 "security_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 "security_code_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 "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 "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 "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 + +end diff --git a/spec/models/ptsv2payments_payment_information_customer_spec.rb b/spec/models/ptsv2payments_payment_information_customer_spec.rb new file mode 100644 index 00000000..abddd676 --- /dev/null +++ b/spec/models/ptsv2payments_payment_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::Ptsv2paymentsPaymentInformationCustomer +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsPaymentInformationCustomer' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsPaymentInformationCustomer.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsPaymentInformationCustomer' do + it 'should create an instance of Ptsv2paymentsPaymentInformationCustomer' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsPaymentInformationCustomer) + end + end + describe 'test attribute "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/ptsv2payments_payment_information_fluid_data_spec.rb b/spec/models/ptsv2payments_payment_information_fluid_data_spec.rb new file mode 100644 index 00000000..4d7079ef --- /dev/null +++ b/spec/models/ptsv2payments_payment_information_fluid_data_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::Ptsv2paymentsPaymentInformationFluidData +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsPaymentInformationFluidData' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsPaymentInformationFluidData.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsPaymentInformationFluidData' do + it 'should create an instance of Ptsv2paymentsPaymentInformationFluidData' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsPaymentInformationFluidData) + 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 "descriptor"' 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 + + describe 'test attribute "encoding"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2payments_payment_information_spec.rb b/spec/models/ptsv2payments_payment_information_spec.rb new file mode 100644 index 00000000..86dc8c8e --- /dev/null +++ b/spec/models/ptsv2payments_payment_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::Ptsv2paymentsPaymentInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsPaymentInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsPaymentInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsPaymentInformation' do + it 'should create an instance of Ptsv2paymentsPaymentInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsPaymentInformation) + 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 "fluid_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 "customer"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2payments_payment_information_tokenized_card_spec.rb b/spec/models/ptsv2payments_payment_information_tokenized_card_spec.rb new file mode 100644 index 00000000..1447019d --- /dev/null +++ b/spec/models/ptsv2payments_payment_information_tokenized_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::Ptsv2paymentsPaymentInformationTokenizedCard +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsPaymentInformationTokenizedCard' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsPaymentInformationTokenizedCard.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsPaymentInformationTokenizedCard' do + it 'should create an instance of Ptsv2paymentsPaymentInformationTokenizedCard' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsPaymentInformationTokenizedCard) + 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 "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 "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 "cryptogram"' 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 + + describe 'test attribute "transaction_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 "storage_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 "security_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/ptsv2payments_point_of_sale_information_emv_spec.rb b/spec/models/ptsv2payments_point_of_sale_information_emv_spec.rb new file mode 100644 index 00000000..74c64d6f --- /dev/null +++ b/spec/models/ptsv2payments_point_of_sale_information_emv_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::Ptsv2paymentsPointOfSaleInformationEmv +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsPointOfSaleInformationEmv' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsPointOfSaleInformationEmv.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsPointOfSaleInformationEmv' do + it 'should create an instance of Ptsv2paymentsPointOfSaleInformationEmv' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsPointOfSaleInformationEmv) + 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 + + describe 'test attribute "cardholder_verification_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 "card_sequence_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 "fallback"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "fallback_condition"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2payments_point_of_sale_information_spec.rb b/spec/models/ptsv2payments_point_of_sale_information_spec.rb new file mode 100644 index 00000000..bc5c8b7c --- /dev/null +++ b/spec/models/ptsv2payments_point_of_sale_information_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::Ptsv2paymentsPointOfSaleInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsPointOfSaleInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsPointOfSaleInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsPointOfSaleInformation' do + it 'should create an instance of Ptsv2paymentsPointOfSaleInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsPointOfSaleInformation) + 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 "lane_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 "card_present"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "cat_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 "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 + + describe 'test attribute "pin_entry_capability"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "operating_environment"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + 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 + + describe 'test attribute "track_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/ptsv2payments_processing_information_authorization_options_initiator_merchant_initiated_transaction_spec.rb b/spec/models/ptsv2payments_processing_information_authorization_options_initiator_merchant_initiated_transaction_spec.rb new file mode 100644 index 00000000..e8cf00d0 --- /dev/null +++ b/spec/models/ptsv2payments_processing_information_authorization_options_initiator_merchant_initiated_transaction_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::Ptsv2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction' do + it 'should create an instance of Ptsv2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction) + 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 "previous_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/ptsv2payments_processing_information_authorization_options_initiator_spec.rb b/spec/models/ptsv2payments_processing_information_authorization_options_initiator_spec.rb new file mode 100644 index 00000000..65eb3d12 --- /dev/null +++ b/spec/models/ptsv2payments_processing_information_authorization_options_initiator_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::Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator' do + it 'should create an instance of Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator) + 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 + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["customer", "merchant"]) + # validator.allowable_values.each do |value| + # expect { @instance.type = value }.not_to raise_error + # end + end + end + + describe 'test attribute "credential_stored_on_file"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "stored_credential_used"' 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_initiated_transaction"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2payments_processing_information_authorization_options_spec.rb b/spec/models/ptsv2payments_processing_information_authorization_options_spec.rb new file mode 100644 index 00000000..fd30a8f6 --- /dev/null +++ b/spec/models/ptsv2payments_processing_information_authorization_options_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::Ptsv2paymentsProcessingInformationAuthorizationOptions +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsProcessingInformationAuthorizationOptions' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsProcessingInformationAuthorizationOptions.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsProcessingInformationAuthorizationOptions' do + it 'should create an instance of Ptsv2paymentsProcessingInformationAuthorizationOptions' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsProcessingInformationAuthorizationOptions) + 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 + + describe 'test attribute "verbal_auth_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 "verbal_auth_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 "auth_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 "partial_auth_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 "balance_inquiry"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "ignore_avs_result"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "decline_avs_flags"' 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', ["D", "A", "V", "S", "N", "O"]) + # validator.allowable_values.each do |value| + # expect { @instance.decline_avs_flags = value }.not_to raise_error + # end + end + end + + describe 'test attribute "ignore_cv_result"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "initiator"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2payments_processing_information_capture_options_spec.rb b/spec/models/ptsv2payments_processing_information_capture_options_spec.rb new file mode 100644 index 00000000..b7fd8ba0 --- /dev/null +++ b/spec/models/ptsv2payments_processing_information_capture_options_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::Ptsv2paymentsProcessingInformationCaptureOptions +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsProcessingInformationCaptureOptions' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsProcessingInformationCaptureOptions.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsProcessingInformationCaptureOptions' do + it 'should create an instance of Ptsv2paymentsProcessingInformationCaptureOptions' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsProcessingInformationCaptureOptions) + end + end + describe 'test attribute "capture_sequence_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 "total_capture_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 "date_to_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/ptsv2payments_processing_information_issuer_spec.rb b/spec/models/ptsv2payments_processing_information_issuer_spec.rb new file mode 100644 index 00000000..26231175 --- /dev/null +++ b/spec/models/ptsv2payments_processing_information_issuer_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::Ptsv2paymentsProcessingInformationIssuer +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsProcessingInformationIssuer' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsProcessingInformationIssuer.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsProcessingInformationIssuer' do + it 'should create an instance of Ptsv2paymentsProcessingInformationIssuer' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsProcessingInformationIssuer) + 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/ptsv2payments_processing_information_recurring_options_spec.rb b/spec/models/ptsv2payments_processing_information_recurring_options_spec.rb new file mode 100644 index 00000000..2468b68a --- /dev/null +++ b/spec/models/ptsv2payments_processing_information_recurring_options_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::Ptsv2paymentsProcessingInformationRecurringOptions +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsProcessingInformationRecurringOptions' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsProcessingInformationRecurringOptions.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsProcessingInformationRecurringOptions' do + it 'should create an instance of Ptsv2paymentsProcessingInformationRecurringOptions' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsProcessingInformationRecurringOptions) + end + end + describe 'test attribute "loan_payment"' 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_recurring_payment"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2payments_processing_information_spec.rb b/spec/models/ptsv2payments_processing_information_spec.rb new file mode 100644 index 00000000..3bc8ecea --- /dev/null +++ b/spec/models/ptsv2payments_processing_information_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::Ptsv2paymentsProcessingInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsProcessingInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsProcessingInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsProcessingInformation' do + it 'should create an instance of Ptsv2paymentsProcessingInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsProcessingInformation) + 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 + + describe 'test attribute "processor_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 "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 "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 "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 "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 "link_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 "purchase_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 "report_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 "visa_checkout_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 "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 "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 "capture_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 "recurring_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/ptsv2payments_recipient_information_spec.rb b/spec/models/ptsv2payments_recipient_information_spec.rb new file mode 100644 index 00000000..749a51a1 --- /dev/null +++ b/spec/models/ptsv2payments_recipient_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::Ptsv2paymentsRecipientInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsRecipientInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsRecipientInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsRecipientInformation' do + it 'should create an instance of Ptsv2paymentsRecipientInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsRecipientInformation) + end + end + describe 'test attribute "account_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 "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 "postal_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/ptsv2paymentsidcaptures_aggregator_information_spec.rb b/spec/models/ptsv2paymentsidcaptures_aggregator_information_spec.rb new file mode 100644 index 00000000..c6e476a4 --- /dev/null +++ b/spec/models/ptsv2paymentsidcaptures_aggregator_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::Ptsv2paymentsidcapturesAggregatorInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidcapturesAggregatorInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidcapturesAggregatorInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidcapturesAggregatorInformation' do + it 'should create an instance of Ptsv2paymentsidcapturesAggregatorInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidcapturesAggregatorInformation) + end + end + describe 'test attribute "aggregator_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 "sub_merchant"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant_spec.rb b/spec/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant_spec.rb new file mode 100644 index 00000000..4a965735 --- /dev/null +++ b/spec/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant_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::Ptsv2paymentsidcapturesAggregatorInformationSubMerchant +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidcapturesAggregatorInformationSubMerchant' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidcapturesAggregatorInformationSubMerchant.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidcapturesAggregatorInformationSubMerchant' do + it 'should create an instance of Ptsv2paymentsidcapturesAggregatorInformationSubMerchant' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidcapturesAggregatorInformationSubMerchant) + 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 "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 "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 "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 "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 + +end diff --git a/spec/models/ptsv2paymentsidcaptures_buyer_information_spec.rb b/spec/models/ptsv2paymentsidcaptures_buyer_information_spec.rb new file mode 100644 index 00000000..4155d8a5 --- /dev/null +++ b/spec/models/ptsv2paymentsidcaptures_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::Ptsv2paymentsidcapturesBuyerInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidcapturesBuyerInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidcapturesBuyerInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidcapturesBuyerInformation' do + it 'should create an instance of Ptsv2paymentsidcapturesBuyerInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidcapturesBuyerInformation) + 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 "vat_registration_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/ptsv2paymentsidcaptures_merchant_information_spec.rb b/spec/models/ptsv2paymentsidcaptures_merchant_information_spec.rb new file mode 100644 index 00000000..a4c73533 --- /dev/null +++ b/spec/models/ptsv2paymentsidcaptures_merchant_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::Ptsv2paymentsidcapturesMerchantInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidcapturesMerchantInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidcapturesMerchantInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidcapturesMerchantInformation' do + it 'should create an instance of Ptsv2paymentsidcapturesMerchantInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidcapturesMerchantInformation) + 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 + + describe 'test attribute "card_acceptor_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 "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 "vat_registration_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/ptsv2paymentsidcaptures_order_information_amount_details_spec.rb b/spec/models/ptsv2paymentsidcaptures_order_information_amount_details_spec.rb new file mode 100644 index 00000000..ddec7394 --- /dev/null +++ b/spec/models/ptsv2paymentsidcaptures_order_information_amount_details_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::Ptsv2paymentsidcapturesOrderInformationAmountDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidcapturesOrderInformationAmountDetails' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidcapturesOrderInformationAmountDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidcapturesOrderInformationAmountDetails' do + it 'should create an instance of Ptsv2paymentsidcapturesOrderInformationAmountDetails' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidcapturesOrderInformationAmountDetails) + 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 "discount_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 "duty_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 "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 "national_tax_included"' 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_applied_after_discount"' 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_applied_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 "tax_type_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 "freight_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 "foreign_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 "foreign_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 "exchange_rate"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "exchange_rate_time_stamp"' 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_additional_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 "tax_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/ptsv2paymentsidcaptures_order_information_bill_to_spec.rb b/spec/models/ptsv2paymentsidcaptures_order_information_bill_to_spec.rb new file mode 100644 index 00000000..c126f814 --- /dev/null +++ b/spec/models/ptsv2paymentsidcaptures_order_information_bill_to_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::Ptsv2paymentsidcapturesOrderInformationBillTo +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidcapturesOrderInformationBillTo' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidcapturesOrderInformationBillTo.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidcapturesOrderInformationBillTo' do + it 'should create an instance of Ptsv2paymentsidcapturesOrderInformationBillTo' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidcapturesOrderInformationBillTo) + 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 "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 "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 "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 "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 + +end diff --git a/spec/models/ptsv2paymentsidcaptures_order_information_invoice_details_spec.rb b/spec/models/ptsv2paymentsidcaptures_order_information_invoice_details_spec.rb new file mode 100644 index 00000000..5a5bc15c --- /dev/null +++ b/spec/models/ptsv2paymentsidcaptures_order_information_invoice_details_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::Ptsv2paymentsidcapturesOrderInformationInvoiceDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidcapturesOrderInformationInvoiceDetails' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidcapturesOrderInformationInvoiceDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidcapturesOrderInformationInvoiceDetails' do + it 'should create an instance of Ptsv2paymentsidcapturesOrderInformationInvoiceDetails' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidcapturesOrderInformationInvoiceDetails) + end + end + describe 'test attribute "purchase_order_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 "purchase_order_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 "purchase_contact_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 "taxable"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "vat_invoice_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 "commodity_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_advice_addendum"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2paymentsidcaptures_order_information_ship_to_spec.rb b/spec/models/ptsv2paymentsidcaptures_order_information_ship_to_spec.rb new file mode 100644 index 00000000..2ead049a --- /dev/null +++ b/spec/models/ptsv2paymentsidcaptures_order_information_ship_to_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::Ptsv2paymentsidcapturesOrderInformationShipTo +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidcapturesOrderInformationShipTo' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidcapturesOrderInformationShipTo.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidcapturesOrderInformationShipTo' do + it 'should create an instance of Ptsv2paymentsidcapturesOrderInformationShipTo' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidcapturesOrderInformationShipTo) + 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 "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 "postal_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/ptsv2paymentsidcaptures_order_information_shipping_details_spec.rb b/spec/models/ptsv2paymentsidcaptures_order_information_shipping_details_spec.rb new file mode 100644 index 00000000..17de0a60 --- /dev/null +++ b/spec/models/ptsv2paymentsidcaptures_order_information_shipping_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::Ptsv2paymentsidcapturesOrderInformationShippingDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidcapturesOrderInformationShippingDetails' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidcapturesOrderInformationShippingDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidcapturesOrderInformationShippingDetails' do + it 'should create an instance of Ptsv2paymentsidcapturesOrderInformationShippingDetails' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidcapturesOrderInformationShippingDetails) + end + end + describe 'test attribute "ship_from_postal_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/ptsv2paymentsidcaptures_order_information_spec.rb b/spec/models/ptsv2paymentsidcaptures_order_information_spec.rb new file mode 100644 index 00000000..00bcfda1 --- /dev/null +++ b/spec/models/ptsv2paymentsidcaptures_order_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::Ptsv2paymentsidcapturesOrderInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidcapturesOrderInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidcapturesOrderInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidcapturesOrderInformation' do + it 'should create an instance of Ptsv2paymentsidcapturesOrderInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidcapturesOrderInformation) + 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 "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 "invoice_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/ptsv2paymentsidcaptures_payment_information_spec.rb b/spec/models/ptsv2paymentsidcaptures_payment_information_spec.rb new file mode 100644 index 00000000..af346eb8 --- /dev/null +++ b/spec/models/ptsv2paymentsidcaptures_payment_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::Ptsv2paymentsidcapturesPaymentInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidcapturesPaymentInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidcapturesPaymentInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidcapturesPaymentInformation' do + it 'should create an instance of Ptsv2paymentsidcapturesPaymentInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidcapturesPaymentInformation) + 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 + +end diff --git a/spec/models/ptsv2paymentsidcaptures_point_of_sale_information_emv_spec.rb b/spec/models/ptsv2paymentsidcaptures_point_of_sale_information_emv_spec.rb new file mode 100644 index 00000000..d2a67743 --- /dev/null +++ b/spec/models/ptsv2paymentsidcaptures_point_of_sale_information_emv_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::Ptsv2paymentsidcapturesPointOfSaleInformationEmv +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidcapturesPointOfSaleInformationEmv' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidcapturesPointOfSaleInformationEmv.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidcapturesPointOfSaleInformationEmv' do + it 'should create an instance of Ptsv2paymentsidcapturesPointOfSaleInformationEmv' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidcapturesPointOfSaleInformationEmv) + 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 + + describe 'test attribute "fallback"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2paymentsidcaptures_point_of_sale_information_spec.rb b/spec/models/ptsv2paymentsidcaptures_point_of_sale_information_spec.rb new file mode 100644 index 00000000..cdcdec18 --- /dev/null +++ b/spec/models/ptsv2paymentsidcaptures_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::Ptsv2paymentsidcapturesPointOfSaleInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidcapturesPointOfSaleInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidcapturesPointOfSaleInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidcapturesPointOfSaleInformation' do + it 'should create an instance of Ptsv2paymentsidcapturesPointOfSaleInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidcapturesPointOfSaleInformation) + 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/ptsv2paymentsidcaptures_processing_information_authorization_options_spec.rb b/spec/models/ptsv2paymentsidcaptures_processing_information_authorization_options_spec.rb new file mode 100644 index 00000000..7efdcd6f --- /dev/null +++ b/spec/models/ptsv2paymentsidcaptures_processing_information_authorization_options_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::Ptsv2paymentsidcapturesProcessingInformationAuthorizationOptions +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidcapturesProcessingInformationAuthorizationOptions' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidcapturesProcessingInformationAuthorizationOptions.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidcapturesProcessingInformationAuthorizationOptions' do + it 'should create an instance of Ptsv2paymentsidcapturesProcessingInformationAuthorizationOptions' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidcapturesProcessingInformationAuthorizationOptions) + 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 + + describe 'test attribute "verbal_auth_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 "verbal_auth_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/ptsv2paymentsidcaptures_processing_information_capture_options_spec.rb b/spec/models/ptsv2paymentsidcaptures_processing_information_capture_options_spec.rb new file mode 100644 index 00000000..567b4f78 --- /dev/null +++ b/spec/models/ptsv2paymentsidcaptures_processing_information_capture_options_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::Ptsv2paymentsidcapturesProcessingInformationCaptureOptions +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidcapturesProcessingInformationCaptureOptions' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidcapturesProcessingInformationCaptureOptions.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidcapturesProcessingInformationCaptureOptions' do + it 'should create an instance of Ptsv2paymentsidcapturesProcessingInformationCaptureOptions' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidcapturesProcessingInformationCaptureOptions) + end + end + describe 'test attribute "capture_sequence_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 "total_capture_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2paymentsidcaptures_processing_information_spec.rb b/spec/models/ptsv2paymentsidcaptures_processing_information_spec.rb new file mode 100644 index 00000000..7bbf1104 --- /dev/null +++ b/spec/models/ptsv2paymentsidcaptures_processing_information_spec.rb @@ -0,0 +1,89 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::Ptsv2paymentsidcapturesProcessingInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidcapturesProcessingInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidcapturesProcessingInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidcapturesProcessingInformation' do + it 'should create an instance of Ptsv2paymentsidcapturesProcessingInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidcapturesProcessingInformation) + 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 "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 "link_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_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 "visa_checkout_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 "purchase_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 "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 "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 "capture_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/ptsv2paymentsidrefunds_merchant_information_spec.rb b/spec/models/ptsv2paymentsidrefunds_merchant_information_spec.rb new file mode 100644 index 00000000..03d50647 --- /dev/null +++ b/spec/models/ptsv2paymentsidrefunds_merchant_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::Ptsv2paymentsidrefundsMerchantInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidrefundsMerchantInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidrefundsMerchantInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidrefundsMerchantInformation' do + it 'should create an instance of Ptsv2paymentsidrefundsMerchantInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidrefundsMerchantInformation) + 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 + + describe 'test attribute "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 "vat_registration_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 "card_acceptor_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/ptsv2paymentsidrefunds_order_information_line_items_spec.rb b/spec/models/ptsv2paymentsidrefunds_order_information_line_items_spec.rb new file mode 100644 index 00000000..f4cfaa8b --- /dev/null +++ b/spec/models/ptsv2paymentsidrefunds_order_information_line_items_spec.rb @@ -0,0 +1,155 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::Ptsv2paymentsidrefundsOrderInformationLineItems +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidrefundsOrderInformationLineItems' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidrefundsOrderInformationLineItems.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidrefundsOrderInformationLineItems' do + it 'should create an instance of Ptsv2paymentsidrefundsOrderInformationLineItems' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidrefundsOrderInformationLineItems) + 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 "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 "unit_of_measure"' 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_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 "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 "tax_rate"' 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_applied_after_discount"' 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_status_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 "tax_type_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 "amount_includes_tax"' 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_of_supply"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "commodity_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 "discount_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 "discount_applied"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "discount_rate"' 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_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 "tax_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/ptsv2paymentsidrefunds_order_information_spec.rb b/spec/models/ptsv2paymentsidrefunds_order_information_spec.rb new file mode 100644 index 00000000..1988d070 --- /dev/null +++ b/spec/models/ptsv2paymentsidrefunds_order_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::Ptsv2paymentsidrefundsOrderInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidrefundsOrderInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidrefundsOrderInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidrefundsOrderInformation' do + it 'should create an instance of Ptsv2paymentsidrefundsOrderInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidrefundsOrderInformation) + 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 "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 "invoice_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/ptsv2paymentsidrefunds_payment_information_card_spec.rb b/spec/models/ptsv2paymentsidrefunds_payment_information_card_spec.rb new file mode 100644 index 00000000..64ac63f2 --- /dev/null +++ b/spec/models/ptsv2paymentsidrefunds_payment_information_card_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::Ptsv2paymentsidrefundsPaymentInformationCard +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidrefundsPaymentInformationCard' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidrefundsPaymentInformationCard.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidrefundsPaymentInformationCard' do + it 'should create an instance of Ptsv2paymentsidrefundsPaymentInformationCard' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidrefundsPaymentInformationCard) + 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 "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 "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 "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 "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 + +end diff --git a/spec/models/ptsv2paymentsidrefunds_payment_information_spec.rb b/spec/models/ptsv2paymentsidrefunds_payment_information_spec.rb new file mode 100644 index 00000000..53b2928b --- /dev/null +++ b/spec/models/ptsv2paymentsidrefunds_payment_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::Ptsv2paymentsidrefundsPaymentInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidrefundsPaymentInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidrefundsPaymentInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidrefundsPaymentInformation' do + it 'should create an instance of Ptsv2paymentsidrefundsPaymentInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidrefundsPaymentInformation) + 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/ptsv2paymentsidrefunds_point_of_sale_information_spec.rb b/spec/models/ptsv2paymentsidrefunds_point_of_sale_information_spec.rb new file mode 100644 index 00000000..35d71d4b --- /dev/null +++ b/spec/models/ptsv2paymentsidrefunds_point_of_sale_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::Ptsv2paymentsidrefundsPointOfSaleInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidrefundsPointOfSaleInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidrefundsPointOfSaleInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidrefundsPointOfSaleInformation' do + it 'should create an instance of Ptsv2paymentsidrefundsPointOfSaleInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidrefundsPointOfSaleInformation) + 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 + +end diff --git a/spec/models/ptsv2paymentsidrefunds_processing_information_recurring_options_spec.rb b/spec/models/ptsv2paymentsidrefunds_processing_information_recurring_options_spec.rb new file mode 100644 index 00000000..a1055854 --- /dev/null +++ b/spec/models/ptsv2paymentsidrefunds_processing_information_recurring_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::Ptsv2paymentsidrefundsProcessingInformationRecurringOptions +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidrefundsProcessingInformationRecurringOptions' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidrefundsProcessingInformationRecurringOptions.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidrefundsProcessingInformationRecurringOptions' do + it 'should create an instance of Ptsv2paymentsidrefundsProcessingInformationRecurringOptions' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidrefundsProcessingInformationRecurringOptions) + end + end + describe 'test attribute "loan_payment"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2paymentsidrefunds_processing_information_spec.rb b/spec/models/ptsv2paymentsidrefunds_processing_information_spec.rb new file mode 100644 index 00000000..276e8fac --- /dev/null +++ b/spec/models/ptsv2paymentsidrefunds_processing_information_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::Ptsv2paymentsidrefundsProcessingInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidrefundsProcessingInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidrefundsProcessingInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidrefundsProcessingInformation' do + it 'should create an instance of Ptsv2paymentsidrefundsProcessingInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidrefundsProcessingInformation) + 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 "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 "link_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_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 "visa_checkout_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 "purchase_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 "recurring_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/ptsv2paymentsidreversals_client_reference_information_spec.rb b/spec/models/ptsv2paymentsidreversals_client_reference_information_spec.rb new file mode 100644 index 00000000..aaa6f8cf --- /dev/null +++ b/spec/models/ptsv2paymentsidreversals_client_reference_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::Ptsv2paymentsidreversalsClientReferenceInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidreversalsClientReferenceInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidreversalsClientReferenceInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidreversalsClientReferenceInformation' do + it 'should create an instance of Ptsv2paymentsidreversalsClientReferenceInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidreversalsClientReferenceInformation) + 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 "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/ptsv2paymentsidreversals_order_information_line_items_spec.rb b/spec/models/ptsv2paymentsidreversals_order_information_line_items_spec.rb new file mode 100644 index 00000000..f8ccb973 --- /dev/null +++ b/spec/models/ptsv2paymentsidreversals_order_information_line_items_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::Ptsv2paymentsidreversalsOrderInformationLineItems +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidreversalsOrderInformationLineItems' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidreversalsOrderInformationLineItems.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidreversalsOrderInformationLineItems' do + it 'should create an instance of Ptsv2paymentsidreversalsOrderInformationLineItems' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidreversalsOrderInformationLineItems) + 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 + +end diff --git a/spec/models/ptsv2paymentsidreversals_order_information_spec.rb b/spec/models/ptsv2paymentsidreversals_order_information_spec.rb new file mode 100644 index 00000000..67b9330f --- /dev/null +++ b/spec/models/ptsv2paymentsidreversals_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::Ptsv2paymentsidreversalsOrderInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidreversalsOrderInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidreversalsOrderInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidreversalsOrderInformation' do + it 'should create an instance of Ptsv2paymentsidreversalsOrderInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidreversalsOrderInformation) + 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 + +end diff --git a/spec/models/ptsv2paymentsidreversals_point_of_sale_information_spec.rb b/spec/models/ptsv2paymentsidreversals_point_of_sale_information_spec.rb new file mode 100644 index 00000000..0e29338c --- /dev/null +++ b/spec/models/ptsv2paymentsidreversals_point_of_sale_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::Ptsv2paymentsidreversalsPointOfSaleInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidreversalsPointOfSaleInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidreversalsPointOfSaleInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidreversalsPointOfSaleInformation' do + it 'should create an instance of Ptsv2paymentsidreversalsPointOfSaleInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidreversalsPointOfSaleInformation) + 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 + +end diff --git a/spec/models/ptsv2paymentsidreversals_processing_information_spec.rb b/spec/models/ptsv2paymentsidreversals_processing_information_spec.rb new file mode 100644 index 00000000..06e663fe --- /dev/null +++ b/spec/models/ptsv2paymentsidreversals_processing_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::Ptsv2paymentsidreversalsProcessingInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidreversalsProcessingInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidreversalsProcessingInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidreversalsProcessingInformation' do + it 'should create an instance of Ptsv2paymentsidreversalsProcessingInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidreversalsProcessingInformation) + 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 "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 "link_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_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 "visa_checkout_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 "issuer"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2paymentsidreversals_reversal_information_amount_details_spec.rb b/spec/models/ptsv2paymentsidreversals_reversal_information_amount_details_spec.rb new file mode 100644 index 00000000..55c8dec6 --- /dev/null +++ b/spec/models/ptsv2paymentsidreversals_reversal_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::Ptsv2paymentsidreversalsReversalInformationAmountDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidreversalsReversalInformationAmountDetails' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidreversalsReversalInformationAmountDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidreversalsReversalInformationAmountDetails' do + it 'should create an instance of Ptsv2paymentsidreversalsReversalInformationAmountDetails' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidreversalsReversalInformationAmountDetails) + 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/ptsv2paymentsidreversals_reversal_information_spec.rb b/spec/models/ptsv2paymentsidreversals_reversal_information_spec.rb new file mode 100644 index 00000000..d52658d6 --- /dev/null +++ b/spec/models/ptsv2paymentsidreversals_reversal_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::Ptsv2paymentsidreversalsReversalInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2paymentsidreversalsReversalInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2paymentsidreversalsReversalInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2paymentsidreversalsReversalInformation' do + it 'should create an instance of Ptsv2paymentsidreversalsReversalInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2paymentsidreversalsReversalInformation) + 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 "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/ptsv2payouts_merchant_information_merchant_descriptor_spec.rb b/spec/models/ptsv2payouts_merchant_information_merchant_descriptor_spec.rb new file mode 100644 index 00000000..e7f19f96 --- /dev/null +++ b/spec/models/ptsv2payouts_merchant_information_merchant_descriptor_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::Ptsv2payoutsMerchantInformationMerchantDescriptor +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2payoutsMerchantInformationMerchantDescriptor' do + before do + # run before each test + @instance = CyberSource::Ptsv2payoutsMerchantInformationMerchantDescriptor.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2payoutsMerchantInformationMerchantDescriptor' do + it 'should create an instance of Ptsv2payoutsMerchantInformationMerchantDescriptor' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2payoutsMerchantInformationMerchantDescriptor) + 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 "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 "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 "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 "contact"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2payouts_merchant_information_spec.rb b/spec/models/ptsv2payouts_merchant_information_spec.rb new file mode 100644 index 00000000..c3a66652 --- /dev/null +++ b/spec/models/ptsv2payouts_merchant_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::Ptsv2payoutsMerchantInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2payoutsMerchantInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2payoutsMerchantInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2payoutsMerchantInformation' do + it 'should create an instance of Ptsv2payoutsMerchantInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2payoutsMerchantInformation) + end + end + describe 'test attribute "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 "submit_local_date_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 "vat_registration_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 "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/ptsv2payouts_order_information_amount_details_spec.rb b/spec/models/ptsv2payouts_order_information_amount_details_spec.rb new file mode 100644 index 00000000..c29f98d6 --- /dev/null +++ b/spec/models/ptsv2payouts_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::Ptsv2payoutsOrderInformationAmountDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2payoutsOrderInformationAmountDetails' do + before do + # run before each test + @instance = CyberSource::Ptsv2payoutsOrderInformationAmountDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2payoutsOrderInformationAmountDetails' do + it 'should create an instance of Ptsv2payoutsOrderInformationAmountDetails' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2payoutsOrderInformationAmountDetails) + 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 "surcharge"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2payouts_order_information_amount_details_surcharge_spec.rb b/spec/models/ptsv2payouts_order_information_amount_details_surcharge_spec.rb new file mode 100644 index 00000000..1507e0d0 --- /dev/null +++ b/spec/models/ptsv2payouts_order_information_amount_details_surcharge_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::Ptsv2payoutsOrderInformationAmountDetailsSurcharge +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2payoutsOrderInformationAmountDetailsSurcharge' do + before do + # run before each test + @instance = CyberSource::Ptsv2payoutsOrderInformationAmountDetailsSurcharge.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2payoutsOrderInformationAmountDetailsSurcharge' do + it 'should create an instance of Ptsv2payoutsOrderInformationAmountDetailsSurcharge' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2payoutsOrderInformationAmountDetailsSurcharge) + end + end + describe 'test attribute "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/ptsv2payouts_order_information_bill_to_spec.rb b/spec/models/ptsv2payouts_order_information_bill_to_spec.rb new file mode 100644 index 00000000..6f0f442c --- /dev/null +++ b/spec/models/ptsv2payouts_order_information_bill_to_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::Ptsv2payoutsOrderInformationBillTo +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2payoutsOrderInformationBillTo' do + before do + # run before each test + @instance = CyberSource::Ptsv2payoutsOrderInformationBillTo.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2payoutsOrderInformationBillTo' do + it 'should create an instance of Ptsv2payoutsOrderInformationBillTo' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2payoutsOrderInformationBillTo) + 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 "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 "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 "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_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', ["day", "home", "night", "work"]) + # validator.allowable_values.each do |value| + # expect { @instance.phone_type = value }.not_to raise_error + # end + end + end + +end diff --git a/spec/models/ptsv2payouts_order_information_spec.rb b/spec/models/ptsv2payouts_order_information_spec.rb new file mode 100644 index 00000000..4498eccb --- /dev/null +++ b/spec/models/ptsv2payouts_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::Ptsv2payoutsOrderInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2payoutsOrderInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2payoutsOrderInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2payoutsOrderInformation' do + it 'should create an instance of Ptsv2payoutsOrderInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2payoutsOrderInformation) + 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 "bill_to"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2payouts_payment_information_card_spec.rb b/spec/models/ptsv2payouts_payment_information_card_spec.rb new file mode 100644 index 00000000..4750116e --- /dev/null +++ b/spec/models/ptsv2payouts_payment_information_card_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::Ptsv2payoutsPaymentInformationCard +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2payoutsPaymentInformationCard' do + before do + # run before each test + @instance = CyberSource::Ptsv2payoutsPaymentInformationCard.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2payoutsPaymentInformationCard' do + it 'should create an instance of Ptsv2payoutsPaymentInformationCard' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2payoutsPaymentInformationCard) + 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 "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_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 "source_account_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/ptsv2payouts_payment_information_spec.rb b/spec/models/ptsv2payouts_payment_information_spec.rb new file mode 100644 index 00000000..bc2eac1e --- /dev/null +++ b/spec/models/ptsv2payouts_payment_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::Ptsv2payoutsPaymentInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2payoutsPaymentInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2payoutsPaymentInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2payoutsPaymentInformation' do + it 'should create an instance of Ptsv2payoutsPaymentInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2payoutsPaymentInformation) + 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/ptsv2payouts_processing_information_payouts_options_spec.rb b/spec/models/ptsv2payouts_processing_information_payouts_options_spec.rb new file mode 100644 index 00000000..99a01cdf --- /dev/null +++ b/spec/models/ptsv2payouts_processing_information_payouts_options_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::Ptsv2payoutsProcessingInformationPayoutsOptions +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2payoutsProcessingInformationPayoutsOptions' do + before do + # run before each test + @instance = CyberSource::Ptsv2payoutsProcessingInformationPayoutsOptions.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2payoutsProcessingInformationPayoutsOptions' do + it 'should create an instance of Ptsv2payoutsProcessingInformationPayoutsOptions' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2payoutsProcessingInformationPayoutsOptions) + end + end + describe 'test attribute "acquirer_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 "acquirer_bin"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "retrieval_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 "account_funding_reference_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/ptsv2payouts_processing_information_spec.rb b/spec/models/ptsv2payouts_processing_information_spec.rb new file mode 100644 index 00000000..65409856 --- /dev/null +++ b/spec/models/ptsv2payouts_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::Ptsv2payoutsProcessingInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2payoutsProcessingInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2payoutsProcessingInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2payoutsProcessingInformation' do + it 'should create an instance of Ptsv2payoutsProcessingInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2payoutsProcessingInformation) + 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 "network_routing_order"' 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 "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 "payouts_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/ptsv2payouts_recipient_information_spec.rb b/spec/models/ptsv2payouts_recipient_information_spec.rb new file mode 100644 index 00000000..87776e99 --- /dev/null +++ b/spec/models/ptsv2payouts_recipient_information_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::Ptsv2payoutsRecipientInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2payoutsRecipientInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2payoutsRecipientInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2payoutsRecipientInformation' do + it 'should create an instance of Ptsv2payoutsRecipientInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2payoutsRecipientInformation) + 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 "middle_initial"' 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 "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 "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 "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 "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 "date_of_birth"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/ptsv2payouts_sender_information_account_spec.rb b/spec/models/ptsv2payouts_sender_information_account_spec.rb new file mode 100644 index 00000000..4e7b5df9 --- /dev/null +++ b/spec/models/ptsv2payouts_sender_information_account_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::Ptsv2payoutsSenderInformationAccount +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2payoutsSenderInformationAccount' do + before do + # run before each test + @instance = CyberSource::Ptsv2payoutsSenderInformationAccount.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2payoutsSenderInformationAccount' do + it 'should create an instance of Ptsv2payoutsSenderInformationAccount' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2payoutsSenderInformationAccount) + end + end + describe 'test attribute "funds_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 "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/ptsv2payouts_sender_information_spec.rb b/spec/models/ptsv2payouts_sender_information_spec.rb new file mode 100644 index 00000000..45cef70b --- /dev/null +++ b/spec/models/ptsv2payouts_sender_information_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::Ptsv2payoutsSenderInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ptsv2payoutsSenderInformation' do + before do + # run before each test + @instance = CyberSource::Ptsv2payoutsSenderInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Ptsv2payoutsSenderInformation' do + it 'should create an instance of Ptsv2payoutsSenderInformation' do + expect(@instance).to be_instance_of(CyberSource::Ptsv2payoutsSenderInformation) + 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 "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 "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 "middle_initial"' 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 "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 "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 "country_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"' 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 "date_of_birth"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "vat_registration_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/request_body_1_spec.rb b/spec/models/request_body_1_spec.rb new file mode 100644 index 00000000..60ffaece --- /dev/null +++ b/spec/models/request_body_1_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::RequestBody1 +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'RequestBody1' do + before do + # run before each test + @instance = CyberSource::RequestBody1.new + end + + after do + # run after each test + end + + describe 'test an instance of RequestBody1' do + it 'should create an instance of RequestBody1' do + expect(@instance).to be_instance_of(CyberSource::RequestBody1) + 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_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_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_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_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 "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 "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/request_body_spec.rb b/spec/models/request_body_spec.rb new file mode 100644 index 00000000..122b01f8 --- /dev/null +++ b/spec/models/request_body_spec.rb @@ -0,0 +1,111 @@ +=begin +#CyberSource Flex API + +#Simple PAN tokenization service + +OpenAPI spec version: 0.0.1 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.2.3 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for CyberSource::RequestBody +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'RequestBody' do + before do + # run before each test + @instance = CyberSource::RequestBody.new + end + + after do + # run after each test + end + + describe 'test an instance of RequestBody' do + it 'should create an instance of RequestBody' do + expect(@instance).to be_instance_of(CyberSource::RequestBody) + 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_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_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_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 + 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_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/tmsv1instrumentidentifiers__links_self_spec.rb b/spec/models/tmsv1instrumentidentifiers__links_self_spec.rb new file mode 100644 index 00000000..4af5d249 --- /dev/null +++ b/spec/models/tmsv1instrumentidentifiers__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::Tmsv1instrumentidentifiersLinksSelf +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1instrumentidentifiersLinksSelf' do + before do + # run before each test + @instance = CyberSource::Tmsv1instrumentidentifiersLinksSelf.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1instrumentidentifiersLinksSelf' do + it 'should create an instance of Tmsv1instrumentidentifiersLinksSelf' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1instrumentidentifiersLinksSelf) + 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/tmsv1instrumentidentifiers__links_spec.rb b/spec/models/tmsv1instrumentidentifiers__links_spec.rb new file mode 100644 index 00000000..27d8afda --- /dev/null +++ b/spec/models/tmsv1instrumentidentifiers__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::Tmsv1instrumentidentifiersLinks +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1instrumentidentifiersLinks' do + before do + # run before each test + @instance = CyberSource::Tmsv1instrumentidentifiersLinks.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1instrumentidentifiersLinks' do + it 'should create an instance of Tmsv1instrumentidentifiersLinks' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1instrumentidentifiersLinks) + 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 "ancestor"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "successor"' do + it 'should 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_bank_account_spec.rb b/spec/models/tmsv1instrumentidentifiers_bank_account_spec.rb new file mode 100644 index 00000000..e2102871 --- /dev/null +++ b/spec/models/tmsv1instrumentidentifiers_bank_account_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::Tmsv1instrumentidentifiersBankAccount +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1instrumentidentifiersBankAccount' do + before do + # run before each test + @instance = CyberSource::Tmsv1instrumentidentifiersBankAccount.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1instrumentidentifiersBankAccount' do + it 'should create an instance of Tmsv1instrumentidentifiersBankAccount' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1instrumentidentifiersBankAccount) + 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 "routing_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/tmsv1instrumentidentifiers_card_spec.rb b/spec/models/tmsv1instrumentidentifiers_card_spec.rb new file mode 100644 index 00000000..d48262b0 --- /dev/null +++ b/spec/models/tmsv1instrumentidentifiers_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::Tmsv1instrumentidentifiersCard +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1instrumentidentifiersCard' do + before do + # run before each test + @instance = CyberSource::Tmsv1instrumentidentifiersCard.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1instrumentidentifiersCard' do + it 'should create an instance of Tmsv1instrumentidentifiersCard' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1instrumentidentifiersCard) + 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 + +end diff --git a/spec/models/tmsv1instrumentidentifiers_details_spec.rb b/spec/models/tmsv1instrumentidentifiers_details_spec.rb new file mode 100644 index 00000000..8556a447 --- /dev/null +++ b/spec/models/tmsv1instrumentidentifiers_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::Tmsv1instrumentidentifiersDetails +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1instrumentidentifiersDetails' do + before do + # run before each test + @instance = CyberSource::Tmsv1instrumentidentifiersDetails.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1instrumentidentifiersDetails' do + it 'should create an instance of Tmsv1instrumentidentifiersDetails' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1instrumentidentifiersDetails) + 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 "location"' do + it 'should 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_metadata_spec.rb b/spec/models/tmsv1instrumentidentifiers_metadata_spec.rb new file mode 100644 index 00000000..d18fb7ef --- /dev/null +++ b/spec/models/tmsv1instrumentidentifiers_metadata_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::Tmsv1instrumentidentifiersMetadata +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1instrumentidentifiersMetadata' do + before do + # run before each test + @instance = CyberSource::Tmsv1instrumentidentifiersMetadata.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1instrumentidentifiersMetadata' do + it 'should create an instance of Tmsv1instrumentidentifiersMetadata' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1instrumentidentifiersMetadata) + end + end + describe 'test attribute "creator"' do + it 'should 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 new file mode 100644 index 00000000..f86abc81 --- /dev/null +++ b/spec/models/tmsv1instrumentidentifiers_processing_information_authorization_options_initiator_merchant_initiated_transaction_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::Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction' do + before do + # run before each test + @instance = CyberSource::Tmsv1instrumentidentifiersAuthorizationOptionsMerchantInitiatedTransaction.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) + end + end + describe 'test attribute "previous_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/tmsv1instrumentidentifiers_processing_information_authorization_options_initiator_spec.rb b/spec/models/tmsv1instrumentidentifiers_processing_information_authorization_options_initiator_spec.rb new file mode 100644 index 00000000..fc25e70c --- /dev/null +++ b/spec/models/tmsv1instrumentidentifiers_processing_information_authorization_options_initiator_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::Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator' do + before do + # run before each test + @instance = CyberSource::Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptionsInitiator.new + end + + after do + # run after each test + end + + 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 "merchant_initiated_transaction"' do + it 'should 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_spec.rb b/spec/models/tmsv1instrumentidentifiers_processing_information_authorization_options_spec.rb new file mode 100644 index 00000000..a8c92012 --- /dev/null +++ b/spec/models/tmsv1instrumentidentifiers_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::Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptions +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptions' do + before do + # run before each test + @instance = CyberSource::Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptions.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptions' do + it 'should create an instance of Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptions' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1instrumentidentifiersProcessingInformationAuthorizationOptions) + end + end + describe 'test attribute "initiator"' do + it 'should 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_spec.rb b/spec/models/tmsv1instrumentidentifiers_processing_information_spec.rb new file mode 100644 index 00000000..1a3625a5 --- /dev/null +++ b/spec/models/tmsv1instrumentidentifiers_processing_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::Tmsv1instrumentidentifiersProcessingInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1instrumentidentifiersProcessingInformation' do + before do + # run before each test + @instance = CyberSource::Tmsv1instrumentidentifiersProcessingInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1instrumentidentifiersProcessingInformation' do + it 'should create an instance of Tmsv1instrumentidentifiersProcessingInformation' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1instrumentidentifiersProcessingInformation) + 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 + +end diff --git a/spec/models/tmsv1paymentinstruments_bank_account_spec.rb b/spec/models/tmsv1paymentinstruments_bank_account_spec.rb new file mode 100644 index 00000000..a42996f8 --- /dev/null +++ b/spec/models/tmsv1paymentinstruments_bank_account_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::Tmsv1paymentinstrumentsBankAccount +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1paymentinstrumentsBankAccount' do + before do + # run before each test + @instance = CyberSource::Tmsv1paymentinstrumentsBankAccount.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1paymentinstrumentsBankAccount' do + it 'should create an instance of Tmsv1paymentinstrumentsBankAccount' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1paymentinstrumentsBankAccount) + 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/tmsv1paymentinstruments_bill_to_spec.rb b/spec/models/tmsv1paymentinstruments_bill_to_spec.rb new file mode 100644 index 00000000..9611f082 --- /dev/null +++ b/spec/models/tmsv1paymentinstruments_bill_to_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::Tmsv1paymentinstrumentsBillTo +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1paymentinstrumentsBillTo' do + before do + # run before each test + @instance = CyberSource::Tmsv1paymentinstrumentsBillTo.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1paymentinstrumentsBillTo' do + it 'should create an instance of Tmsv1paymentinstrumentsBillTo' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1paymentinstrumentsBillTo) + 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 "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 "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 "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 "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 + +end diff --git a/spec/models/tmsv1paymentinstruments_buyer_information_issued_by_spec.rb b/spec/models/tmsv1paymentinstruments_buyer_information_issued_by_spec.rb new file mode 100644 index 00000000..8cb731dd --- /dev/null +++ b/spec/models/tmsv1paymentinstruments_buyer_information_issued_by_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::Tmsv1paymentinstrumentsBuyerInformationIssuedBy +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1paymentinstrumentsBuyerInformationIssuedBy' do + before do + # run before each test + @instance = CyberSource::Tmsv1paymentinstrumentsBuyerInformationIssuedBy.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1paymentinstrumentsBuyerInformationIssuedBy' do + it 'should create an instance of Tmsv1paymentinstrumentsBuyerInformationIssuedBy' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1paymentinstrumentsBuyerInformationIssuedBy) + 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 + +end diff --git a/spec/models/tmsv1paymentinstruments_buyer_information_personal_identification_spec.rb b/spec/models/tmsv1paymentinstruments_buyer_information_personal_identification_spec.rb new file mode 100644 index 00000000..ebd0b577 --- /dev/null +++ b/spec/models/tmsv1paymentinstruments_buyer_information_personal_identification_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::Tmsv1paymentinstrumentsBuyerInformationPersonalIdentification +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1paymentinstrumentsBuyerInformationPersonalIdentification' do + before do + # run before each test + @instance = CyberSource::Tmsv1paymentinstrumentsBuyerInformationPersonalIdentification.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1paymentinstrumentsBuyerInformationPersonalIdentification' do + it 'should create an instance of Tmsv1paymentinstrumentsBuyerInformationPersonalIdentification' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1paymentinstrumentsBuyerInformationPersonalIdentification) + 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 "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 "issued_by"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tmsv1paymentinstruments_buyer_information_spec.rb b/spec/models/tmsv1paymentinstruments_buyer_information_spec.rb new file mode 100644 index 00000000..5e70ce26 --- /dev/null +++ b/spec/models/tmsv1paymentinstruments_buyer_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::Tmsv1paymentinstrumentsBuyerInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1paymentinstrumentsBuyerInformation' do + before do + # run before each test + @instance = CyberSource::Tmsv1paymentinstrumentsBuyerInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1paymentinstrumentsBuyerInformation' do + it 'should create an instance of Tmsv1paymentinstrumentsBuyerInformation' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1paymentinstrumentsBuyerInformation) + end + end + describe 'test attribute "company_tax_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 "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 "date_o_birth"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "personal_identification"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/tmsv1paymentinstruments_card_spec.rb b/spec/models/tmsv1paymentinstruments_card_spec.rb new file mode 100644 index 00000000..cc794515 --- /dev/null +++ b/spec/models/tmsv1paymentinstruments_card_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::Tmsv1paymentinstrumentsCard +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1paymentinstrumentsCard' do + before do + # run before each test + @instance = CyberSource::Tmsv1paymentinstrumentsCard.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1paymentinstrumentsCard' do + it 'should create an instance of Tmsv1paymentinstrumentsCard' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1paymentinstrumentsCard) + 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 "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', ["visa", "mastercard", "american express", "discover", "diners club", "carte blanche", "jcb", "optima", "twinpay credit", "twinpay debit", "walmart", "enroute", "lowes consumer", "home depot consumer", "mbna", "dicks sportswear", "casual corner", "sears", "jal", "disney", "maestro uk domestic", "sams club consumer", "sams club business", "nicos", "bill me later", "bebe", "restoration hardware", "delta online", "solo", "visa electron", "dankort", "laser", "carte bleue", "carta si", "pinless debit", "encoded account", "uatp", "household", "maestro international", "ge money uk", "korean cards", "style", "jcrew", "payease china processing ewallet", "payease china processing bank transfer", "meijer private label", "hipercard", "aura", "redecard", "orico", "elo", "capital one private label", "synchrony private label", "china union pay"]) + # validator.allowable_values.each do |value| + # expect { @instance.type = value }.not_to raise_error + # end + 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 "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 "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/tmsv1paymentinstruments_instrument_identifier_spec.rb b/spec/models/tmsv1paymentinstruments_instrument_identifier_spec.rb new file mode 100644 index 00000000..e68b69a3 --- /dev/null +++ b/spec/models/tmsv1paymentinstruments_instrument_identifier_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::Tmsv1paymentinstrumentsInstrumentIdentifier +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1paymentinstrumentsInstrumentIdentifier' do + before do + # run before each test + @instance = CyberSource::Tmsv1paymentinstrumentsInstrumentIdentifier.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1paymentinstrumentsInstrumentIdentifier' do + it 'should create an instance of Tmsv1paymentinstrumentsInstrumentIdentifier' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1paymentinstrumentsInstrumentIdentifier) + 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', ["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 "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 "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/tmsv1paymentinstruments_merchant_information_merchant_descriptor_spec.rb b/spec/models/tmsv1paymentinstruments_merchant_information_merchant_descriptor_spec.rb new file mode 100644 index 00000000..f2c67626 --- /dev/null +++ b/spec/models/tmsv1paymentinstruments_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::Tmsv1paymentinstrumentsMerchantInformationMerchantDescriptor +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1paymentinstrumentsMerchantInformationMerchantDescriptor' do + before do + # run before each test + @instance = CyberSource::Tmsv1paymentinstrumentsMerchantInformationMerchantDescriptor.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1paymentinstrumentsMerchantInformationMerchantDescriptor' do + it 'should create an instance of Tmsv1paymentinstrumentsMerchantInformationMerchantDescriptor' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1paymentinstrumentsMerchantInformationMerchantDescriptor) + end + end + describe 'test attribute "alternate_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/tmsv1paymentinstruments_merchant_information_spec.rb b/spec/models/tmsv1paymentinstruments_merchant_information_spec.rb new file mode 100644 index 00000000..d863dcb2 --- /dev/null +++ b/spec/models/tmsv1paymentinstruments_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::Tmsv1paymentinstrumentsMerchantInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1paymentinstrumentsMerchantInformation' do + before do + # run before each test + @instance = CyberSource::Tmsv1paymentinstrumentsMerchantInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1paymentinstrumentsMerchantInformation' do + it 'should create an instance of Tmsv1paymentinstrumentsMerchantInformation' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1paymentinstrumentsMerchantInformation) + 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/tmsv1paymentinstruments_processing_information_bank_transfer_options_spec.rb b/spec/models/tmsv1paymentinstruments_processing_information_bank_transfer_options_spec.rb new file mode 100644 index 00000000..4adb64cb --- /dev/null +++ b/spec/models/tmsv1paymentinstruments_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::Tmsv1paymentinstrumentsProcessingInformationBankTransferOptions +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1paymentinstrumentsProcessingInformationBankTransferOptions' do + before do + # run before each test + @instance = CyberSource::Tmsv1paymentinstrumentsProcessingInformationBankTransferOptions.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1paymentinstrumentsProcessingInformationBankTransferOptions' do + it 'should create an instance of Tmsv1paymentinstrumentsProcessingInformationBankTransferOptions' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1paymentinstrumentsProcessingInformationBankTransferOptions) + 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/tmsv1paymentinstruments_processing_information_spec.rb b/spec/models/tmsv1paymentinstruments_processing_information_spec.rb new file mode 100644 index 00000000..22fa4a4e --- /dev/null +++ b/spec/models/tmsv1paymentinstruments_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::Tmsv1paymentinstrumentsProcessingInformation +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Tmsv1paymentinstrumentsProcessingInformation' do + before do + # run before each test + @instance = CyberSource::Tmsv1paymentinstrumentsProcessingInformation.new + end + + after do + # run after each test + end + + describe 'test an instance of Tmsv1paymentinstrumentsProcessingInformation' do + it 'should create an instance of Tmsv1paymentinstrumentsProcessingInformation' do + expect(@instance).to be_instance_of(CyberSource::Tmsv1paymentinstrumentsProcessingInformation) + end + end + describe 'test attribute "bill_payment_program_enabled"' 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/v2credits_point_of_sale_information_emv_spec.rb b/spec/models/v2credits_point_of_sale_information_emv_spec.rb deleted file mode 100644 index 8b0c821c..00000000 --- a/spec/models/v2credits_point_of_sale_information_emv_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::V2creditsPointOfSaleInformationEmv -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2creditsPointOfSaleInformationEmv' do - before do - # run before each test - @instance = CyberSource::V2creditsPointOfSaleInformationEmv.new - end - - after do - # run after each test - end - - describe 'test an instance of V2creditsPointOfSaleInformationEmv' do - it 'should create an instance of V2creditsPointOfSaleInformationEmv' do - expect(@instance).to be_instance_of(CyberSource::V2creditsPointOfSaleInformationEmv) - 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 - - describe 'test attribute "fallback"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "fallback_condition"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2credits_point_of_sale_information_spec.rb b/spec/models/v2credits_point_of_sale_information_spec.rb deleted file mode 100644 index 18d9053e..00000000 --- a/spec/models/v2credits_point_of_sale_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::V2creditsPointOfSaleInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2creditsPointOfSaleInformation' do - before do - # run before each test - @instance = CyberSource::V2creditsPointOfSaleInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2creditsPointOfSaleInformation' do - it 'should create an instance of V2creditsPointOfSaleInformation' do - expect(@instance).to be_instance_of(CyberSource::V2creditsPointOfSaleInformation) - 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 - -end diff --git a/spec/models/v2credits_processing_information_spec.rb b/spec/models/v2credits_processing_information_spec.rb deleted file mode 100644 index 3eae458e..00000000 --- a/spec/models/v2credits_processing_information_spec.rb +++ /dev/null @@ -1,89 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::V2creditsProcessingInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2creditsProcessingInformation' do - before do - # run before each test - @instance = CyberSource::V2creditsProcessingInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2creditsProcessingInformation' do - it 'should create an instance of V2creditsProcessingInformation' do - expect(@instance).to be_instance_of(CyberSource::V2creditsProcessingInformation) - 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 "processor_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 "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 "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 "link_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_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 "visa_checkout_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 "purchase_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 "recurring_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/v2payments_aggregator_information_spec.rb b/spec/models/v2payments_aggregator_information_spec.rb deleted file mode 100644 index 3e4e34aa..00000000 --- a/spec/models/v2payments_aggregator_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::V2paymentsAggregatorInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsAggregatorInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsAggregatorInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsAggregatorInformation' do - it 'should create an instance of V2paymentsAggregatorInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsAggregatorInformation) - end - end - describe 'test attribute "aggregator_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 "sub_merchant"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2payments_aggregator_information_sub_merchant_spec.rb b/spec/models/v2payments_aggregator_information_sub_merchant_spec.rb deleted file mode 100644 index a8212706..00000000 --- a/spec/models/v2payments_aggregator_information_sub_merchant_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::V2paymentsAggregatorInformationSubMerchant -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsAggregatorInformationSubMerchant' do - before do - # run before each test - @instance = CyberSource::V2paymentsAggregatorInformationSubMerchant.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsAggregatorInformationSubMerchant' do - it 'should create an instance of V2paymentsAggregatorInformationSubMerchant' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsAggregatorInformationSubMerchant) - end - end - describe 'test attribute "card_acceptor_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 "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 "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 "region"' 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 "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 "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 - -end diff --git a/spec/models/v2payments_buyer_information_personal_identification_spec.rb b/spec/models/v2payments_buyer_information_personal_identification_spec.rb deleted file mode 100644 index cc155c39..00000000 --- a/spec/models/v2payments_buyer_information_personal_identification_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::V2paymentsBuyerInformationPersonalIdentification -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsBuyerInformationPersonalIdentification' do - before do - # run before each test - @instance = CyberSource::V2paymentsBuyerInformationPersonalIdentification.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsBuyerInformationPersonalIdentification' do - it 'should create an instance of V2paymentsBuyerInformationPersonalIdentification' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsBuyerInformationPersonalIdentification) - 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 - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ssn", "driverlicense"]) - # validator.allowable_values.each do |value| - # expect { @instance.type = value }.not_to raise_error - # end - 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 "issued_by"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2payments_buyer_information_spec.rb b/spec/models/v2payments_buyer_information_spec.rb deleted file mode 100644 index c5b196b9..00000000 --- a/spec/models/v2payments_buyer_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::V2paymentsBuyerInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsBuyerInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsBuyerInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsBuyerInformation' do - it 'should create an instance of V2paymentsBuyerInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsBuyerInformation) - 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 "date_of_birth"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "vat_registration_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 "personal_identification"' 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/v2payments_client_reference_information_spec.rb b/spec/models/v2payments_client_reference_information_spec.rb deleted file mode 100644 index 115bdc97..00000000 --- a/spec/models/v2payments_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::V2paymentsClientReferenceInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsClientReferenceInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsClientReferenceInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsClientReferenceInformation' do - it 'should create an instance of V2paymentsClientReferenceInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsClientReferenceInformation) - 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 "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 "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/v2payments_consumer_authentication_information_spec.rb b/spec/models/v2payments_consumer_authentication_information_spec.rb deleted file mode 100644 index 0871db24..00000000 --- a/spec/models/v2payments_consumer_authentication_information_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::V2paymentsConsumerAuthenticationInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsConsumerAuthenticationInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsConsumerAuthenticationInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsConsumerAuthenticationInformation' do - it 'should create an instance of V2paymentsConsumerAuthenticationInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsConsumerAuthenticationInformation) - 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 "cavv_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 "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 "pares_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 "veres_enrolled"' 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 "ucaf_authentication_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 "ucaf_collection_indicator"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2payments_device_information_spec.rb b/spec/models/v2payments_device_information_spec.rb deleted file mode 100644 index 6d38843e..00000000 --- a/spec/models/v2payments_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::V2paymentsDeviceInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsDeviceInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsDeviceInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsDeviceInformation' do - it 'should create an instance of V2paymentsDeviceInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsDeviceInformation) - 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 "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 "user_agent"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2payments_merchant_defined_information_spec.rb b/spec/models/v2payments_merchant_defined_information_spec.rb deleted file mode 100644 index 1d136975..00000000 --- a/spec/models/v2payments_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::V2paymentsMerchantDefinedInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsMerchantDefinedInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsMerchantDefinedInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsMerchantDefinedInformation' do - it 'should create an instance of V2paymentsMerchantDefinedInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsMerchantDefinedInformation) - 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/v2payments_merchant_information_merchant_descriptor_spec.rb b/spec/models/v2payments_merchant_information_merchant_descriptor_spec.rb deleted file mode 100644 index 74406752..00000000 --- a/spec/models/v2payments_merchant_information_merchant_descriptor_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::V2paymentsMerchantInformationMerchantDescriptor -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsMerchantInformationMerchantDescriptor' do - before do - # run before each test - @instance = CyberSource::V2paymentsMerchantInformationMerchantDescriptor.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsMerchantInformationMerchantDescriptor' do - it 'should create an instance of V2paymentsMerchantInformationMerchantDescriptor' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsMerchantInformationMerchantDescriptor) - 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 "alternate_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 "contact"' 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 "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 "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 "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 "administrative_area"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2payments_merchant_information_spec.rb b/spec/models/v2payments_merchant_information_spec.rb deleted file mode 100644 index 8d5b5b54..00000000 --- a/spec/models/v2payments_merchant_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::V2paymentsMerchantInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsMerchantInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsMerchantInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsMerchantInformation' do - it 'should create an instance of V2paymentsMerchantInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsMerchantInformation) - 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 - - describe 'test attribute "sales_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 "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 "vat_registration_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 "card_acceptor_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_local_date_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/v2payments_order_information_amount_details_amex_additional_amounts_spec.rb b/spec/models/v2payments_order_information_amount_details_amex_additional_amounts_spec.rb deleted file mode 100644 index a74bf6cf..00000000 --- a/spec/models/v2payments_order_information_amount_details_amex_additional_amounts_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::V2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts' do - before do - # run before each test - @instance = CyberSource::V2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts' do - it 'should create an instance of V2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts) - 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 "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/v2payments_order_information_amount_details_spec.rb b/spec/models/v2payments_order_information_amount_details_spec.rb deleted file mode 100644 index 590e914a..00000000 --- a/spec/models/v2payments_order_information_amount_details_spec.rb +++ /dev/null @@ -1,149 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::V2paymentsOrderInformationAmountDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsOrderInformationAmountDetails' do - before do - # run before each test - @instance = CyberSource::V2paymentsOrderInformationAmountDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsOrderInformationAmountDetails' do - it 'should create an instance of V2paymentsOrderInformationAmountDetails' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsOrderInformationAmountDetails) - 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 "discount_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 "duty_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 "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 "national_tax_included"' 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_applied_after_discount"' 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_applied_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 "tax_type_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 "freight_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 "foreign_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 "foreign_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 "exchange_rate"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "exchange_rate_time_stamp"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "surcharge"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "settlement_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 "settlement_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 "amex_additional_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 "tax_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/v2payments_order_information_amount_details_surcharge_spec.rb b/spec/models/v2payments_order_information_amount_details_surcharge_spec.rb deleted file mode 100644 index 240a5a07..00000000 --- a/spec/models/v2payments_order_information_amount_details_surcharge_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::V2paymentsOrderInformationAmountDetailsSurcharge -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsOrderInformationAmountDetailsSurcharge' do - before do - # run before each test - @instance = CyberSource::V2paymentsOrderInformationAmountDetailsSurcharge.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsOrderInformationAmountDetailsSurcharge' do - it 'should create an instance of V2paymentsOrderInformationAmountDetailsSurcharge' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsOrderInformationAmountDetailsSurcharge) - end - end - describe 'test attribute "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 "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/v2payments_order_information_amount_details_tax_details_spec.rb b/spec/models/v2payments_order_information_amount_details_tax_details_spec.rb deleted file mode 100644 index 2bf8ede2..00000000 --- a/spec/models/v2payments_order_information_amount_details_tax_details_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::V2paymentsOrderInformationAmountDetailsTaxDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsOrderInformationAmountDetailsTaxDetails' do - before do - # run before each test - @instance = CyberSource::V2paymentsOrderInformationAmountDetailsTaxDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsOrderInformationAmountDetailsTaxDetails' do - it 'should create an instance of V2paymentsOrderInformationAmountDetailsTaxDetails' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsOrderInformationAmountDetailsTaxDetails) - 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 - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["alternate", "local", "national", "vat"]) - # validator.allowable_values.each do |value| - # expect { @instance.type = value }.not_to raise_error - # end - end - end - - describe 'test attribute "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 "rate"' 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 "tax_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 "applied"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2payments_order_information_bill_to_spec.rb b/spec/models/v2payments_order_information_bill_to_spec.rb deleted file mode 100644 index d8542577..00000000 --- a/spec/models/v2payments_order_information_bill_to_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::V2paymentsOrderInformationBillTo -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsOrderInformationBillTo' do - before do - # run before each test - @instance = CyberSource::V2paymentsOrderInformationBillTo.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsOrderInformationBillTo' do - it 'should create an instance of V2paymentsOrderInformationBillTo' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsOrderInformationBillTo) - 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 "middle_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 "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 "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 "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 "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 "district"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "building_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 "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 "phone_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', ["day", "home", "night", "work"]) - # validator.allowable_values.each do |value| - # expect { @instance.phone_type = value }.not_to raise_error - # end - end - end - -end diff --git a/spec/models/v2payments_order_information_invoice_details_spec.rb b/spec/models/v2payments_order_information_invoice_details_spec.rb deleted file mode 100644 index a1157f45..00000000 --- a/spec/models/v2payments_order_information_invoice_details_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::V2paymentsOrderInformationInvoiceDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsOrderInformationInvoiceDetails' do - before do - # run before each test - @instance = CyberSource::V2paymentsOrderInformationInvoiceDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsOrderInformationInvoiceDetails' do - it 'should create an instance of V2paymentsOrderInformationInvoiceDetails' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsOrderInformationInvoiceDetails) - end - end - describe 'test attribute "purchase_order_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 "purchase_order_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 "purchase_contact_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 "taxable"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "vat_invoice_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 "commodity_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 "merchandise_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_advice_addendum"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2payments_order_information_invoice_details_transaction_advice_addendum_spec.rb b/spec/models/v2payments_order_information_invoice_details_transaction_advice_addendum_spec.rb deleted file mode 100644 index 1cb8463f..00000000 --- a/spec/models/v2payments_order_information_invoice_details_transaction_advice_addendum_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::V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum' do - before do - # run before each test - @instance = CyberSource::V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum' do - it 'should create an instance of V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum) - end - end - describe 'test attribute "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/v2payments_order_information_line_items_spec.rb b/spec/models/v2payments_order_information_line_items_spec.rb deleted file mode 100644 index 63601996..00000000 --- a/spec/models/v2payments_order_information_line_items_spec.rb +++ /dev/null @@ -1,161 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::V2paymentsOrderInformationLineItems -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsOrderInformationLineItems' do - before do - # run before each test - @instance = CyberSource::V2paymentsOrderInformationLineItems.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsOrderInformationLineItems' do - it 'should create an instance of V2paymentsOrderInformationLineItems' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsOrderInformationLineItems) - 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 "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 "unit_of_measure"' 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_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 "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 "tax_rate"' 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_applied_after_discount"' 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_status_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 "tax_type_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 "amount_includes_tax"' 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_of_supply"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "commodity_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 "discount_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 "discount_applied"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "discount_rate"' 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_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 "tax_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 "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/v2payments_order_information_ship_to_spec.rb b/spec/models/v2payments_order_information_ship_to_spec.rb deleted file mode 100644 index 2b89380b..00000000 --- a/spec/models/v2payments_order_information_ship_to_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::V2paymentsOrderInformationShipTo -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsOrderInformationShipTo' do - before do - # run before each test - @instance = CyberSource::V2paymentsOrderInformationShipTo.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsOrderInformationShipTo' do - it 'should create an instance of V2paymentsOrderInformationShipTo' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsOrderInformationShipTo) - 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 "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 "district"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "building_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"' 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 - -end diff --git a/spec/models/v2payments_order_information_shipping_details_spec.rb b/spec/models/v2payments_order_information_shipping_details_spec.rb deleted file mode 100644 index fefaae56..00000000 --- a/spec/models/v2payments_order_information_shipping_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::V2paymentsOrderInformationShippingDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsOrderInformationShippingDetails' do - before do - # run before each test - @instance = CyberSource::V2paymentsOrderInformationShippingDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsOrderInformationShippingDetails' do - it 'should create an instance of V2paymentsOrderInformationShippingDetails' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsOrderInformationShippingDetails) - 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 - - describe 'test attribute "ship_from_postal_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/v2payments_order_information_spec.rb b/spec/models/v2payments_order_information_spec.rb deleted file mode 100644 index e70ffba9..00000000 --- a/spec/models/v2payments_order_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::V2paymentsOrderInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsOrderInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsOrderInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsOrderInformation' do - it 'should create an instance of V2paymentsOrderInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsOrderInformation) - 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 "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 "invoice_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/v2payments_payment_information_card_spec.rb b/spec/models/v2payments_payment_information_card_spec.rb deleted file mode 100644 index 2a81c7b8..00000000 --- a/spec/models/v2payments_payment_information_card_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::V2paymentsPaymentInformationCard -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsPaymentInformationCard' do - before do - # run before each test - @instance = CyberSource::V2paymentsPaymentInformationCard.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsPaymentInformationCard' do - it 'should create an instance of V2paymentsPaymentInformationCard' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsPaymentInformationCard) - 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 "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 "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 "use_as"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "source_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 "security_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 "security_code_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 "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 "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 "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 - -end diff --git a/spec/models/v2payments_payment_information_customer_spec.rb b/spec/models/v2payments_payment_information_customer_spec.rb deleted file mode 100644 index 339a72f2..00000000 --- a/spec/models/v2payments_payment_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::V2paymentsPaymentInformationCustomer -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsPaymentInformationCustomer' do - before do - # run before each test - @instance = CyberSource::V2paymentsPaymentInformationCustomer.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsPaymentInformationCustomer' do - it 'should create an instance of V2paymentsPaymentInformationCustomer' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsPaymentInformationCustomer) - end - end - describe 'test attribute "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/v2payments_payment_information_fluid_data_spec.rb b/spec/models/v2payments_payment_information_fluid_data_spec.rb deleted file mode 100644 index ea734b48..00000000 --- a/spec/models/v2payments_payment_information_fluid_data_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::V2paymentsPaymentInformationFluidData -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsPaymentInformationFluidData' do - before do - # run before each test - @instance = CyberSource::V2paymentsPaymentInformationFluidData.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsPaymentInformationFluidData' do - it 'should create an instance of V2paymentsPaymentInformationFluidData' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsPaymentInformationFluidData) - 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 "descriptor"' 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 - - describe 'test attribute "encoding"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2payments_payment_information_spec.rb b/spec/models/v2payments_payment_information_spec.rb deleted file mode 100644 index 4d4522a4..00000000 --- a/spec/models/v2payments_payment_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::V2paymentsPaymentInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsPaymentInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsPaymentInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsPaymentInformation' do - it 'should create an instance of V2paymentsPaymentInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsPaymentInformation) - 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 "fluid_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 "customer"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2payments_payment_information_tokenized_card_spec.rb b/spec/models/v2payments_payment_information_tokenized_card_spec.rb deleted file mode 100644 index 8b140456..00000000 --- a/spec/models/v2payments_payment_information_tokenized_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::V2paymentsPaymentInformationTokenizedCard -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsPaymentInformationTokenizedCard' do - before do - # run before each test - @instance = CyberSource::V2paymentsPaymentInformationTokenizedCard.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsPaymentInformationTokenizedCard' do - it 'should create an instance of V2paymentsPaymentInformationTokenizedCard' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsPaymentInformationTokenizedCard) - 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 "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 "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 "cryptogram"' 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 - - describe 'test attribute "transaction_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 "storage_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 "security_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/v2payments_point_of_sale_information_emv_spec.rb b/spec/models/v2payments_point_of_sale_information_emv_spec.rb deleted file mode 100644 index 1f652467..00000000 --- a/spec/models/v2payments_point_of_sale_information_emv_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::V2paymentsPointOfSaleInformationEmv -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsPointOfSaleInformationEmv' do - before do - # run before each test - @instance = CyberSource::V2paymentsPointOfSaleInformationEmv.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsPointOfSaleInformationEmv' do - it 'should create an instance of V2paymentsPointOfSaleInformationEmv' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsPointOfSaleInformationEmv) - 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 - - describe 'test attribute "cardholder_verification_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 "card_sequence_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 "fallback"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "fallback_condition"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2payments_point_of_sale_information_spec.rb b/spec/models/v2payments_point_of_sale_information_spec.rb deleted file mode 100644 index d1601806..00000000 --- a/spec/models/v2payments_point_of_sale_information_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::V2paymentsPointOfSaleInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsPointOfSaleInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsPointOfSaleInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsPointOfSaleInformation' do - it 'should create an instance of V2paymentsPointOfSaleInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsPointOfSaleInformation) - 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 "lane_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 "card_present"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "cat_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 "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 - - describe 'test attribute "pin_entry_capability"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "operating_environment"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - 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 - - describe 'test attribute "track_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/v2payments_processing_information_authorization_options_initiator_merchant_initiated_transaction_spec.rb b/spec/models/v2payments_processing_information_authorization_options_initiator_merchant_initiated_transaction_spec.rb deleted file mode 100644 index 943176fb..00000000 --- a/spec/models/v2payments_processing_information_authorization_options_initiator_merchant_initiated_transaction_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::V2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction' do - before do - # run before each test - @instance = CyberSource::V2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction' do - it 'should create an instance of V2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsProcessingInformationAuthorizationOptionsMerchantInitiatedTransaction) - 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 "previous_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/v2payments_processing_information_authorization_options_initiator_spec.rb b/spec/models/v2payments_processing_information_authorization_options_initiator_spec.rb deleted file mode 100644 index 14d65743..00000000 --- a/spec/models/v2payments_processing_information_authorization_options_initiator_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::V2paymentsProcessingInformationAuthorizationOptionsInitiator -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsProcessingInformationAuthorizationOptionsInitiator' do - before do - # run before each test - @instance = CyberSource::V2paymentsProcessingInformationAuthorizationOptionsInitiator.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsProcessingInformationAuthorizationOptionsInitiator' do - it 'should create an instance of V2paymentsProcessingInformationAuthorizationOptionsInitiator' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsProcessingInformationAuthorizationOptionsInitiator) - 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 - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["customer", "merchant"]) - # validator.allowable_values.each do |value| - # expect { @instance.type = value }.not_to raise_error - # end - end - end - - describe 'test attribute "credential_stored_on_file"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "stored_credential_used"' 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_initiated_transaction"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2payments_processing_information_authorization_options_spec.rb b/spec/models/v2payments_processing_information_authorization_options_spec.rb deleted file mode 100644 index e216d336..00000000 --- a/spec/models/v2payments_processing_information_authorization_options_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::V2paymentsProcessingInformationAuthorizationOptions -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsProcessingInformationAuthorizationOptions' do - before do - # run before each test - @instance = CyberSource::V2paymentsProcessingInformationAuthorizationOptions.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsProcessingInformationAuthorizationOptions' do - it 'should create an instance of V2paymentsProcessingInformationAuthorizationOptions' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsProcessingInformationAuthorizationOptions) - 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 - - describe 'test attribute "verbal_auth_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 "verbal_auth_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 "auth_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 "partial_auth_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 "balance_inquiry"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "ignore_avs_result"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "decline_avs_flags"' 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', ["D", "A", "V", "S", "N", "O"]) - # validator.allowable_values.each do |value| - # expect { @instance.decline_avs_flags = value }.not_to raise_error - # end - end - end - - describe 'test attribute "ignore_cv_result"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "initiator"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2payments_processing_information_capture_options_spec.rb b/spec/models/v2payments_processing_information_capture_options_spec.rb deleted file mode 100644 index 635e51d7..00000000 --- a/spec/models/v2payments_processing_information_capture_options_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::V2paymentsProcessingInformationCaptureOptions -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsProcessingInformationCaptureOptions' do - before do - # run before each test - @instance = CyberSource::V2paymentsProcessingInformationCaptureOptions.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsProcessingInformationCaptureOptions' do - it 'should create an instance of V2paymentsProcessingInformationCaptureOptions' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsProcessingInformationCaptureOptions) - end - end - describe 'test attribute "capture_sequence_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 "total_capture_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 "date_to_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/v2payments_processing_information_issuer_spec.rb b/spec/models/v2payments_processing_information_issuer_spec.rb deleted file mode 100644 index f2813dda..00000000 --- a/spec/models/v2payments_processing_information_issuer_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::V2paymentsProcessingInformationIssuer -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsProcessingInformationIssuer' do - before do - # run before each test - @instance = CyberSource::V2paymentsProcessingInformationIssuer.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsProcessingInformationIssuer' do - it 'should create an instance of V2paymentsProcessingInformationIssuer' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsProcessingInformationIssuer) - 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/v2payments_processing_information_recurring_options_spec.rb b/spec/models/v2payments_processing_information_recurring_options_spec.rb deleted file mode 100644 index f7f0e988..00000000 --- a/spec/models/v2payments_processing_information_recurring_options_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::V2paymentsProcessingInformationRecurringOptions -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsProcessingInformationRecurringOptions' do - before do - # run before each test - @instance = CyberSource::V2paymentsProcessingInformationRecurringOptions.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsProcessingInformationRecurringOptions' do - it 'should create an instance of V2paymentsProcessingInformationRecurringOptions' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsProcessingInformationRecurringOptions) - end - end - describe 'test attribute "loan_payment"' 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_recurring_payment"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2payments_processing_information_spec.rb b/spec/models/v2payments_processing_information_spec.rb deleted file mode 100644 index fcf4cb6c..00000000 --- a/spec/models/v2payments_processing_information_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::V2paymentsProcessingInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsProcessingInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsProcessingInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsProcessingInformation' do - it 'should create an instance of V2paymentsProcessingInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsProcessingInformation) - 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 - - describe 'test attribute "processor_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 "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 "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 "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 "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 "link_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 "purchase_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 "report_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 "visa_checkout_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 "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 "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 "capture_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 "recurring_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/v2payments_recipient_information_spec.rb b/spec/models/v2payments_recipient_information_spec.rb deleted file mode 100644 index a76cf11e..00000000 --- a/spec/models/v2payments_recipient_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::V2paymentsRecipientInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsRecipientInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsRecipientInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsRecipientInformation' do - it 'should create an instance of V2paymentsRecipientInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsRecipientInformation) - end - end - describe 'test attribute "account_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 "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 "postal_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/v2paymentsidcaptures_aggregator_information_spec.rb b/spec/models/v2paymentsidcaptures_aggregator_information_spec.rb deleted file mode 100644 index 1ad72db7..00000000 --- a/spec/models/v2paymentsidcaptures_aggregator_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::V2paymentsidcapturesAggregatorInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidcapturesAggregatorInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsidcapturesAggregatorInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidcapturesAggregatorInformation' do - it 'should create an instance of V2paymentsidcapturesAggregatorInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidcapturesAggregatorInformation) - end - end - describe 'test attribute "aggregator_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 "sub_merchant"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2paymentsidcaptures_aggregator_information_sub_merchant_spec.rb b/spec/models/v2paymentsidcaptures_aggregator_information_sub_merchant_spec.rb deleted file mode 100644 index 170309c1..00000000 --- a/spec/models/v2paymentsidcaptures_aggregator_information_sub_merchant_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::V2paymentsidcapturesAggregatorInformationSubMerchant -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidcapturesAggregatorInformationSubMerchant' do - before do - # run before each test - @instance = CyberSource::V2paymentsidcapturesAggregatorInformationSubMerchant.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidcapturesAggregatorInformationSubMerchant' do - it 'should create an instance of V2paymentsidcapturesAggregatorInformationSubMerchant' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidcapturesAggregatorInformationSubMerchant) - 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 "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 "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 "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 "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 - -end diff --git a/spec/models/v2paymentsidcaptures_buyer_information_spec.rb b/spec/models/v2paymentsidcaptures_buyer_information_spec.rb deleted file mode 100644 index 398b437c..00000000 --- a/spec/models/v2paymentsidcaptures_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::V2paymentsidcapturesBuyerInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidcapturesBuyerInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsidcapturesBuyerInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidcapturesBuyerInformation' do - it 'should create an instance of V2paymentsidcapturesBuyerInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidcapturesBuyerInformation) - 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 "vat_registration_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/v2paymentsidcaptures_merchant_information_spec.rb b/spec/models/v2paymentsidcaptures_merchant_information_spec.rb deleted file mode 100644 index 8d9edd01..00000000 --- a/spec/models/v2paymentsidcaptures_merchant_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::V2paymentsidcapturesMerchantInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidcapturesMerchantInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsidcapturesMerchantInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidcapturesMerchantInformation' do - it 'should create an instance of V2paymentsidcapturesMerchantInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidcapturesMerchantInformation) - 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 - - describe 'test attribute "card_acceptor_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 "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 "vat_registration_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/v2paymentsidcaptures_order_information_amount_details_spec.rb b/spec/models/v2paymentsidcaptures_order_information_amount_details_spec.rb deleted file mode 100644 index 6dd2ee15..00000000 --- a/spec/models/v2paymentsidcaptures_order_information_amount_details_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::V2paymentsidcapturesOrderInformationAmountDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidcapturesOrderInformationAmountDetails' do - before do - # run before each test - @instance = CyberSource::V2paymentsidcapturesOrderInformationAmountDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidcapturesOrderInformationAmountDetails' do - it 'should create an instance of V2paymentsidcapturesOrderInformationAmountDetails' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidcapturesOrderInformationAmountDetails) - 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 "discount_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 "duty_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 "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 "national_tax_included"' 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_applied_after_discount"' 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_applied_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 "tax_type_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 "freight_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 "foreign_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 "foreign_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 "exchange_rate"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "exchange_rate_time_stamp"' 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_additional_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 "tax_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/v2paymentsidcaptures_order_information_bill_to_spec.rb b/spec/models/v2paymentsidcaptures_order_information_bill_to_spec.rb deleted file mode 100644 index 2acc898f..00000000 --- a/spec/models/v2paymentsidcaptures_order_information_bill_to_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::V2paymentsidcapturesOrderInformationBillTo -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidcapturesOrderInformationBillTo' do - before do - # run before each test - @instance = CyberSource::V2paymentsidcapturesOrderInformationBillTo.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidcapturesOrderInformationBillTo' do - it 'should create an instance of V2paymentsidcapturesOrderInformationBillTo' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidcapturesOrderInformationBillTo) - 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 "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 "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 "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 "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 - -end diff --git a/spec/models/v2paymentsidcaptures_order_information_invoice_details_spec.rb b/spec/models/v2paymentsidcaptures_order_information_invoice_details_spec.rb deleted file mode 100644 index 665be162..00000000 --- a/spec/models/v2paymentsidcaptures_order_information_invoice_details_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::V2paymentsidcapturesOrderInformationInvoiceDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidcapturesOrderInformationInvoiceDetails' do - before do - # run before each test - @instance = CyberSource::V2paymentsidcapturesOrderInformationInvoiceDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidcapturesOrderInformationInvoiceDetails' do - it 'should create an instance of V2paymentsidcapturesOrderInformationInvoiceDetails' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidcapturesOrderInformationInvoiceDetails) - end - end - describe 'test attribute "purchase_order_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 "purchase_order_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 "purchase_contact_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 "taxable"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "vat_invoice_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 "commodity_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_advice_addendum"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2paymentsidcaptures_order_information_ship_to_spec.rb b/spec/models/v2paymentsidcaptures_order_information_ship_to_spec.rb deleted file mode 100644 index f930884e..00000000 --- a/spec/models/v2paymentsidcaptures_order_information_ship_to_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::V2paymentsidcapturesOrderInformationShipTo -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidcapturesOrderInformationShipTo' do - before do - # run before each test - @instance = CyberSource::V2paymentsidcapturesOrderInformationShipTo.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidcapturesOrderInformationShipTo' do - it 'should create an instance of V2paymentsidcapturesOrderInformationShipTo' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidcapturesOrderInformationShipTo) - 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 "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 "postal_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/v2paymentsidcaptures_order_information_shipping_details_spec.rb b/spec/models/v2paymentsidcaptures_order_information_shipping_details_spec.rb deleted file mode 100644 index 60e588e9..00000000 --- a/spec/models/v2paymentsidcaptures_order_information_shipping_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::V2paymentsidcapturesOrderInformationShippingDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidcapturesOrderInformationShippingDetails' do - before do - # run before each test - @instance = CyberSource::V2paymentsidcapturesOrderInformationShippingDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidcapturesOrderInformationShippingDetails' do - it 'should create an instance of V2paymentsidcapturesOrderInformationShippingDetails' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidcapturesOrderInformationShippingDetails) - end - end - describe 'test attribute "ship_from_postal_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/v2paymentsidcaptures_order_information_spec.rb b/spec/models/v2paymentsidcaptures_order_information_spec.rb deleted file mode 100644 index 6fec6012..00000000 --- a/spec/models/v2paymentsidcaptures_order_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::V2paymentsidcapturesOrderInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidcapturesOrderInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsidcapturesOrderInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidcapturesOrderInformation' do - it 'should create an instance of V2paymentsidcapturesOrderInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidcapturesOrderInformation) - 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 "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 "invoice_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/v2paymentsidcaptures_payment_information_spec.rb b/spec/models/v2paymentsidcaptures_payment_information_spec.rb deleted file mode 100644 index 6b7b3171..00000000 --- a/spec/models/v2paymentsidcaptures_payment_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::V2paymentsidcapturesPaymentInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidcapturesPaymentInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsidcapturesPaymentInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidcapturesPaymentInformation' do - it 'should create an instance of V2paymentsidcapturesPaymentInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidcapturesPaymentInformation) - 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 - -end diff --git a/spec/models/v2paymentsidcaptures_point_of_sale_information_emv_spec.rb b/spec/models/v2paymentsidcaptures_point_of_sale_information_emv_spec.rb deleted file mode 100644 index 7b66c82a..00000000 --- a/spec/models/v2paymentsidcaptures_point_of_sale_information_emv_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::V2paymentsidcapturesPointOfSaleInformationEmv -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidcapturesPointOfSaleInformationEmv' do - before do - # run before each test - @instance = CyberSource::V2paymentsidcapturesPointOfSaleInformationEmv.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidcapturesPointOfSaleInformationEmv' do - it 'should create an instance of V2paymentsidcapturesPointOfSaleInformationEmv' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidcapturesPointOfSaleInformationEmv) - 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 - - describe 'test attribute "fallback"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2paymentsidcaptures_point_of_sale_information_spec.rb b/spec/models/v2paymentsidcaptures_point_of_sale_information_spec.rb deleted file mode 100644 index 0c7a7620..00000000 --- a/spec/models/v2paymentsidcaptures_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::V2paymentsidcapturesPointOfSaleInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidcapturesPointOfSaleInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsidcapturesPointOfSaleInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidcapturesPointOfSaleInformation' do - it 'should create an instance of V2paymentsidcapturesPointOfSaleInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidcapturesPointOfSaleInformation) - 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/v2paymentsidcaptures_processing_information_authorization_options_spec.rb b/spec/models/v2paymentsidcaptures_processing_information_authorization_options_spec.rb deleted file mode 100644 index 6a256cd8..00000000 --- a/spec/models/v2paymentsidcaptures_processing_information_authorization_options_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::V2paymentsidcapturesProcessingInformationAuthorizationOptions -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidcapturesProcessingInformationAuthorizationOptions' do - before do - # run before each test - @instance = CyberSource::V2paymentsidcapturesProcessingInformationAuthorizationOptions.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidcapturesProcessingInformationAuthorizationOptions' do - it 'should create an instance of V2paymentsidcapturesProcessingInformationAuthorizationOptions' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidcapturesProcessingInformationAuthorizationOptions) - 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 - - describe 'test attribute "verbal_auth_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 "verbal_auth_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/v2paymentsidcaptures_processing_information_capture_options_spec.rb b/spec/models/v2paymentsidcaptures_processing_information_capture_options_spec.rb deleted file mode 100644 index cd8c7867..00000000 --- a/spec/models/v2paymentsidcaptures_processing_information_capture_options_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::V2paymentsidcapturesProcessingInformationCaptureOptions -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidcapturesProcessingInformationCaptureOptions' do - before do - # run before each test - @instance = CyberSource::V2paymentsidcapturesProcessingInformationCaptureOptions.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidcapturesProcessingInformationCaptureOptions' do - it 'should create an instance of V2paymentsidcapturesProcessingInformationCaptureOptions' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidcapturesProcessingInformationCaptureOptions) - end - end - describe 'test attribute "capture_sequence_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 "total_capture_count"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2paymentsidcaptures_processing_information_spec.rb b/spec/models/v2paymentsidcaptures_processing_information_spec.rb deleted file mode 100644 index 210aab21..00000000 --- a/spec/models/v2paymentsidcaptures_processing_information_spec.rb +++ /dev/null @@ -1,89 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::V2paymentsidcapturesProcessingInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidcapturesProcessingInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsidcapturesProcessingInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidcapturesProcessingInformation' do - it 'should create an instance of V2paymentsidcapturesProcessingInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidcapturesProcessingInformation) - 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 "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 "link_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_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 "visa_checkout_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 "purchase_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 "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 "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 "capture_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/v2paymentsidrefunds_merchant_information_spec.rb b/spec/models/v2paymentsidrefunds_merchant_information_spec.rb deleted file mode 100644 index 18c102c7..00000000 --- a/spec/models/v2paymentsidrefunds_merchant_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::V2paymentsidrefundsMerchantInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidrefundsMerchantInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsidrefundsMerchantInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidrefundsMerchantInformation' do - it 'should create an instance of V2paymentsidrefundsMerchantInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidrefundsMerchantInformation) - 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 - - describe 'test attribute "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 "vat_registration_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 "card_acceptor_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/v2paymentsidrefunds_order_information_line_items_spec.rb b/spec/models/v2paymentsidrefunds_order_information_line_items_spec.rb deleted file mode 100644 index 3e64bb03..00000000 --- a/spec/models/v2paymentsidrefunds_order_information_line_items_spec.rb +++ /dev/null @@ -1,155 +0,0 @@ -=begin -#CyberSource Flex API - -#Simple PAN tokenization service - -OpenAPI spec version: 0.0.1 - -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for CyberSource::V2paymentsidrefundsOrderInformationLineItems -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidrefundsOrderInformationLineItems' do - before do - # run before each test - @instance = CyberSource::V2paymentsidrefundsOrderInformationLineItems.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidrefundsOrderInformationLineItems' do - it 'should create an instance of V2paymentsidrefundsOrderInformationLineItems' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidrefundsOrderInformationLineItems) - 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 "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 "unit_of_measure"' 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_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 "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 "tax_rate"' 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_applied_after_discount"' 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_status_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 "tax_type_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 "amount_includes_tax"' 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_of_supply"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "commodity_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 "discount_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 "discount_applied"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "discount_rate"' 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_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 "tax_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/v2paymentsidrefunds_order_information_spec.rb b/spec/models/v2paymentsidrefunds_order_information_spec.rb deleted file mode 100644 index cc76db49..00000000 --- a/spec/models/v2paymentsidrefunds_order_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::V2paymentsidrefundsOrderInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidrefundsOrderInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsidrefundsOrderInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidrefundsOrderInformation' do - it 'should create an instance of V2paymentsidrefundsOrderInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidrefundsOrderInformation) - 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 "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 "invoice_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/v2paymentsidrefunds_payment_information_card_spec.rb b/spec/models/v2paymentsidrefunds_payment_information_card_spec.rb deleted file mode 100644 index 1f832ec2..00000000 --- a/spec/models/v2paymentsidrefunds_payment_information_card_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::V2paymentsidrefundsPaymentInformationCard -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidrefundsPaymentInformationCard' do - before do - # run before each test - @instance = CyberSource::V2paymentsidrefundsPaymentInformationCard.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidrefundsPaymentInformationCard' do - it 'should create an instance of V2paymentsidrefundsPaymentInformationCard' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidrefundsPaymentInformationCard) - 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 "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 "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 "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 "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 - -end diff --git a/spec/models/v2paymentsidrefunds_payment_information_spec.rb b/spec/models/v2paymentsidrefunds_payment_information_spec.rb deleted file mode 100644 index 5c24d0ed..00000000 --- a/spec/models/v2paymentsidrefunds_payment_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::V2paymentsidrefundsPaymentInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidrefundsPaymentInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsidrefundsPaymentInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidrefundsPaymentInformation' do - it 'should create an instance of V2paymentsidrefundsPaymentInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidrefundsPaymentInformation) - 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/v2paymentsidrefunds_point_of_sale_information_spec.rb b/spec/models/v2paymentsidrefunds_point_of_sale_information_spec.rb deleted file mode 100644 index 0a0f44c1..00000000 --- a/spec/models/v2paymentsidrefunds_point_of_sale_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::V2paymentsidrefundsPointOfSaleInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidrefundsPointOfSaleInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsidrefundsPointOfSaleInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidrefundsPointOfSaleInformation' do - it 'should create an instance of V2paymentsidrefundsPointOfSaleInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidrefundsPointOfSaleInformation) - 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 - -end diff --git a/spec/models/v2paymentsidrefunds_processing_information_recurring_options_spec.rb b/spec/models/v2paymentsidrefunds_processing_information_recurring_options_spec.rb deleted file mode 100644 index d0652109..00000000 --- a/spec/models/v2paymentsidrefunds_processing_information_recurring_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::V2paymentsidrefundsProcessingInformationRecurringOptions -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidrefundsProcessingInformationRecurringOptions' do - before do - # run before each test - @instance = CyberSource::V2paymentsidrefundsProcessingInformationRecurringOptions.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidrefundsProcessingInformationRecurringOptions' do - it 'should create an instance of V2paymentsidrefundsProcessingInformationRecurringOptions' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidrefundsProcessingInformationRecurringOptions) - end - end - describe 'test attribute "loan_payment"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2paymentsidrefunds_processing_information_spec.rb b/spec/models/v2paymentsidrefunds_processing_information_spec.rb deleted file mode 100644 index f23cc62a..00000000 --- a/spec/models/v2paymentsidrefunds_processing_information_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::V2paymentsidrefundsProcessingInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidrefundsProcessingInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsidrefundsProcessingInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidrefundsProcessingInformation' do - it 'should create an instance of V2paymentsidrefundsProcessingInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidrefundsProcessingInformation) - 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 "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 "link_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_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 "visa_checkout_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 "purchase_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 "recurring_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/v2paymentsidreversals_client_reference_information_spec.rb b/spec/models/v2paymentsidreversals_client_reference_information_spec.rb deleted file mode 100644 index 93f24d07..00000000 --- a/spec/models/v2paymentsidreversals_client_reference_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::V2paymentsidreversalsClientReferenceInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidreversalsClientReferenceInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsidreversalsClientReferenceInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidreversalsClientReferenceInformation' do - it 'should create an instance of V2paymentsidreversalsClientReferenceInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidreversalsClientReferenceInformation) - 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 "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/v2paymentsidreversals_order_information_line_items_spec.rb b/spec/models/v2paymentsidreversals_order_information_line_items_spec.rb deleted file mode 100644 index bab5eebe..00000000 --- a/spec/models/v2paymentsidreversals_order_information_line_items_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::V2paymentsidreversalsOrderInformationLineItems -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidreversalsOrderInformationLineItems' do - before do - # run before each test - @instance = CyberSource::V2paymentsidreversalsOrderInformationLineItems.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidreversalsOrderInformationLineItems' do - it 'should create an instance of V2paymentsidreversalsOrderInformationLineItems' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidreversalsOrderInformationLineItems) - 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 - -end diff --git a/spec/models/v2paymentsidreversals_order_information_spec.rb b/spec/models/v2paymentsidreversals_order_information_spec.rb deleted file mode 100644 index 60b7dcc7..00000000 --- a/spec/models/v2paymentsidreversals_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::V2paymentsidreversalsOrderInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidreversalsOrderInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsidreversalsOrderInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidreversalsOrderInformation' do - it 'should create an instance of V2paymentsidreversalsOrderInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidreversalsOrderInformation) - 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 - -end diff --git a/spec/models/v2paymentsidreversals_point_of_sale_information_spec.rb b/spec/models/v2paymentsidreversals_point_of_sale_information_spec.rb deleted file mode 100644 index c5f8a5c6..00000000 --- a/spec/models/v2paymentsidreversals_point_of_sale_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::V2paymentsidreversalsPointOfSaleInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidreversalsPointOfSaleInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsidreversalsPointOfSaleInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidreversalsPointOfSaleInformation' do - it 'should create an instance of V2paymentsidreversalsPointOfSaleInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidreversalsPointOfSaleInformation) - 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 - -end diff --git a/spec/models/v2paymentsidreversals_processing_information_spec.rb b/spec/models/v2paymentsidreversals_processing_information_spec.rb deleted file mode 100644 index 9f760d6c..00000000 --- a/spec/models/v2paymentsidreversals_processing_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::V2paymentsidreversalsProcessingInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidreversalsProcessingInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsidreversalsProcessingInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidreversalsProcessingInformation' do - it 'should create an instance of V2paymentsidreversalsProcessingInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidreversalsProcessingInformation) - 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 "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 "link_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_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 "visa_checkout_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 "issuer"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2paymentsidreversals_reversal_information_amount_details_spec.rb b/spec/models/v2paymentsidreversals_reversal_information_amount_details_spec.rb deleted file mode 100644 index 811dc225..00000000 --- a/spec/models/v2paymentsidreversals_reversal_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::V2paymentsidreversalsReversalInformationAmountDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidreversalsReversalInformationAmountDetails' do - before do - # run before each test - @instance = CyberSource::V2paymentsidreversalsReversalInformationAmountDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidreversalsReversalInformationAmountDetails' do - it 'should create an instance of V2paymentsidreversalsReversalInformationAmountDetails' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidreversalsReversalInformationAmountDetails) - 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/v2paymentsidreversals_reversal_information_spec.rb b/spec/models/v2paymentsidreversals_reversal_information_spec.rb deleted file mode 100644 index e921b874..00000000 --- a/spec/models/v2paymentsidreversals_reversal_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::V2paymentsidreversalsReversalInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2paymentsidreversalsReversalInformation' do - before do - # run before each test - @instance = CyberSource::V2paymentsidreversalsReversalInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2paymentsidreversalsReversalInformation' do - it 'should create an instance of V2paymentsidreversalsReversalInformation' do - expect(@instance).to be_instance_of(CyberSource::V2paymentsidreversalsReversalInformation) - 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 "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/v2payouts_merchant_information_merchant_descriptor_spec.rb b/spec/models/v2payouts_merchant_information_merchant_descriptor_spec.rb deleted file mode 100644 index b7bbd371..00000000 --- a/spec/models/v2payouts_merchant_information_merchant_descriptor_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::V2payoutsMerchantInformationMerchantDescriptor -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2payoutsMerchantInformationMerchantDescriptor' do - before do - # run before each test - @instance = CyberSource::V2payoutsMerchantInformationMerchantDescriptor.new - end - - after do - # run after each test - end - - describe 'test an instance of V2payoutsMerchantInformationMerchantDescriptor' do - it 'should create an instance of V2payoutsMerchantInformationMerchantDescriptor' do - expect(@instance).to be_instance_of(CyberSource::V2payoutsMerchantInformationMerchantDescriptor) - 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 "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 "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 "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 "contact"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2payouts_merchant_information_spec.rb b/spec/models/v2payouts_merchant_information_spec.rb deleted file mode 100644 index eef36911..00000000 --- a/spec/models/v2payouts_merchant_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::V2payoutsMerchantInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2payoutsMerchantInformation' do - before do - # run before each test - @instance = CyberSource::V2payoutsMerchantInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2payoutsMerchantInformation' do - it 'should create an instance of V2payoutsMerchantInformation' do - expect(@instance).to be_instance_of(CyberSource::V2payoutsMerchantInformation) - end - end - describe 'test attribute "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 "submit_local_date_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 "vat_registration_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 "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/v2payouts_order_information_amount_details_spec.rb b/spec/models/v2payouts_order_information_amount_details_spec.rb deleted file mode 100644 index 4f9c0830..00000000 --- a/spec/models/v2payouts_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::V2payoutsOrderInformationAmountDetails -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2payoutsOrderInformationAmountDetails' do - before do - # run before each test - @instance = CyberSource::V2payoutsOrderInformationAmountDetails.new - end - - after do - # run after each test - end - - describe 'test an instance of V2payoutsOrderInformationAmountDetails' do - it 'should create an instance of V2payoutsOrderInformationAmountDetails' do - expect(@instance).to be_instance_of(CyberSource::V2payoutsOrderInformationAmountDetails) - 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 "surcharge_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/v2payouts_order_information_bill_to_spec.rb b/spec/models/v2payouts_order_information_bill_to_spec.rb deleted file mode 100644 index a3182532..00000000 --- a/spec/models/v2payouts_order_information_bill_to_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::V2payoutsOrderInformationBillTo -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2payoutsOrderInformationBillTo' do - before do - # run before each test - @instance = CyberSource::V2payoutsOrderInformationBillTo.new - end - - after do - # run after each test - end - - describe 'test an instance of V2payoutsOrderInformationBillTo' do - it 'should create an instance of V2payoutsOrderInformationBillTo' do - expect(@instance).to be_instance_of(CyberSource::V2payoutsOrderInformationBillTo) - 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 "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 "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 "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_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', ["day", "home", "night", "work"]) - # validator.allowable_values.each do |value| - # expect { @instance.phone_type = value }.not_to raise_error - # end - end - end - -end diff --git a/spec/models/v2payouts_order_information_spec.rb b/spec/models/v2payouts_order_information_spec.rb deleted file mode 100644 index 8f01e833..00000000 --- a/spec/models/v2payouts_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::V2payoutsOrderInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2payoutsOrderInformation' do - before do - # run before each test - @instance = CyberSource::V2payoutsOrderInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2payoutsOrderInformation' do - it 'should create an instance of V2payoutsOrderInformation' do - expect(@instance).to be_instance_of(CyberSource::V2payoutsOrderInformation) - 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 "bill_to"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2payouts_payment_information_card_spec.rb b/spec/models/v2payouts_payment_information_card_spec.rb deleted file mode 100644 index bb53fb9e..00000000 --- a/spec/models/v2payouts_payment_information_card_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::V2payoutsPaymentInformationCard -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2payoutsPaymentInformationCard' do - before do - # run before each test - @instance = CyberSource::V2payoutsPaymentInformationCard.new - end - - after do - # run after each test - end - - describe 'test an instance of V2payoutsPaymentInformationCard' do - it 'should create an instance of V2payoutsPaymentInformationCard' do - expect(@instance).to be_instance_of(CyberSource::V2payoutsPaymentInformationCard) - 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 "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_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 "source_account_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/v2payouts_payment_information_spec.rb b/spec/models/v2payouts_payment_information_spec.rb deleted file mode 100644 index f6081162..00000000 --- a/spec/models/v2payouts_payment_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::V2payoutsPaymentInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2payoutsPaymentInformation' do - before do - # run before each test - @instance = CyberSource::V2payoutsPaymentInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2payoutsPaymentInformation' do - it 'should create an instance of V2payoutsPaymentInformation' do - expect(@instance).to be_instance_of(CyberSource::V2payoutsPaymentInformation) - 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/v2payouts_processing_information_payouts_options_spec.rb b/spec/models/v2payouts_processing_information_payouts_options_spec.rb deleted file mode 100644 index 873b4ab3..00000000 --- a/spec/models/v2payouts_processing_information_payouts_options_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::V2payoutsProcessingInformationPayoutsOptions -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2payoutsProcessingInformationPayoutsOptions' do - before do - # run before each test - @instance = CyberSource::V2payoutsProcessingInformationPayoutsOptions.new - end - - after do - # run after each test - end - - describe 'test an instance of V2payoutsProcessingInformationPayoutsOptions' do - it 'should create an instance of V2payoutsProcessingInformationPayoutsOptions' do - expect(@instance).to be_instance_of(CyberSource::V2payoutsProcessingInformationPayoutsOptions) - end - end - describe 'test attribute "acquirer_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 "acquirer_bin"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "retrieval_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 "account_funding_reference_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/v2payouts_processing_information_spec.rb b/spec/models/v2payouts_processing_information_spec.rb deleted file mode 100644 index a498357a..00000000 --- a/spec/models/v2payouts_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::V2payoutsProcessingInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2payoutsProcessingInformation' do - before do - # run before each test - @instance = CyberSource::V2payoutsProcessingInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2payoutsProcessingInformation' do - it 'should create an instance of V2payoutsProcessingInformation' do - expect(@instance).to be_instance_of(CyberSource::V2payoutsProcessingInformation) - 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 "network_routing_order"' 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 "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 "payouts_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/v2payouts_recipient_information_spec.rb b/spec/models/v2payouts_recipient_information_spec.rb deleted file mode 100644 index 7770a509..00000000 --- a/spec/models/v2payouts_recipient_information_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::V2payoutsRecipientInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2payoutsRecipientInformation' do - before do - # run before each test - @instance = CyberSource::V2payoutsRecipientInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2payoutsRecipientInformation' do - it 'should create an instance of V2payoutsRecipientInformation' do - expect(@instance).to be_instance_of(CyberSource::V2payoutsRecipientInformation) - 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 "middle_initial"' 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 "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 "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 "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 "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 "date_of_birth"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/models/v2payouts_sender_information_account_spec.rb b/spec/models/v2payouts_sender_information_account_spec.rb deleted file mode 100644 index 0943f594..00000000 --- a/spec/models/v2payouts_sender_information_account_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::V2payoutsSenderInformationAccount -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2payoutsSenderInformationAccount' do - before do - # run before each test - @instance = CyberSource::V2payoutsSenderInformationAccount.new - end - - after do - # run after each test - end - - describe 'test an instance of V2payoutsSenderInformationAccount' do - it 'should create an instance of V2payoutsSenderInformationAccount' do - expect(@instance).to be_instance_of(CyberSource::V2payoutsSenderInformationAccount) - end - end - describe 'test attribute "funds_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 "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/v2payouts_sender_information_spec.rb b/spec/models/v2payouts_sender_information_spec.rb deleted file mode 100644 index b36bafd9..00000000 --- a/spec/models/v2payouts_sender_information_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::V2payoutsSenderInformation -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'V2payoutsSenderInformation' do - before do - # run before each test - @instance = CyberSource::V2payoutsSenderInformation.new - end - - after do - # run after each test - end - - describe 'test an instance of V2payoutsSenderInformation' do - it 'should create an instance of V2payoutsSenderInformation' do - expect(@instance).to be_instance_of(CyberSource::V2payoutsSenderInformation) - 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 "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 "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 "middle_initial"' 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 "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 "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 "country_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"' 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 "date_of_birth"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "vat_registration_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/spec_helper.rb b/spec/spec_helper.rb index 8526da77..bc9a466d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -11,7 +11,7 @@ =end # load the gem -require 'cyberSource_client' +require 'cybersource_rest_client' # The following was generated by the `rspec --init` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.