cybersource_rest_client 0.0.17 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/AuthenticationSDK/core/MerchantConfig.rb +2 -0
- data/lib/cybersource_rest_client.rb +81 -5
- data/lib/cybersource_rest_client/api/authentication_exemptions_api.rb +89 -0
- data/lib/cybersource_rest_client/api/payer_authentication_api.rb +154 -0
- data/lib/cybersource_rest_client/api/report_definitions_api.rb +9 -0
- data/lib/cybersource_rest_client/api/report_downloads_api.rb +3 -0
- data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +79 -0
- data/lib/cybersource_rest_client/api/reports_api.rb +2 -2
- data/lib/cybersource_rest_client/api_client.rb +12 -0
- data/lib/cybersource_rest_client/models/authentication_exemptions_request.rb +228 -0
- data/lib/cybersource_rest_client/models/buyer_information.rb +20 -20
- data/lib/cybersource_rest_client/models/check_payer_auth_enrollment_request.rb +284 -0
- data/lib/cybersource_rest_client/models/create_payment_instrument_request.rb +2 -41
- data/lib/cybersource_rest_client/models/create_report_subscription_request.rb +27 -2
- data/lib/cybersource_rest_client/models/embedded_instrument_identifier_request.rb +226 -0
- data/lib/cybersource_rest_client/models/{embedded_instrument_identifier.rb → embedded_instrument_identifier_response.rb} +11 -2
- data/lib/cybersource_rest_client/models/{tms_v1_instrument_identifiers_delete409_response__links_payment_instruments.rb → instrument_identifier_payment_instruments_link.rb} +1 -1
- data/lib/cybersource_rest_client/models/{instrument_identifier.rb → instrument_identifier_response.rb} +11 -2
- data/lib/cybersource_rest_client/models/issuer.rb +208 -0
- data/lib/cybersource_rest_client/models/links.rb +10 -1
- data/lib/cybersource_rest_client/models/model_409_links.rb +1 -1
- data/lib/cybersource_rest_client/models/payment_instrument.rb +9 -9
- data/lib/cybersource_rest_client/models/payment_instrument_card.rb +2 -2
- data/lib/cybersource_rest_client/models/payment_instrument_instrument_identifier_request.rb +246 -0
- data/lib/cybersource_rest_client/models/payment_instrument_self_link.rb +183 -0
- data/lib/cybersource_rest_client/models/payment_instruments_links.rb +183 -0
- data/lib/cybersource_rest_client/models/personal_identification.rb +1 -1
- data/lib/cybersource_rest_client/models/predefined_subscription_request_bean.rb +392 -0
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_installment_information.rb +225 -0
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_point_of_sale_information_emv.rb +2 -2
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_merchant_information_merchant_descriptor.rb +0 -15
- data/lib/cybersource_rest_client/models/ptsv2credits_processing_information.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information_sub_merchant.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_installment_information.rb +60 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb +22 -27
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to.rb +26 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_line_items.rb +4 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_installment_information.rb +270 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_amount_details.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2payouts_merchant_information_merchant_descriptor.rb +0 -30
- data/lib/cybersource_rest_client/models/ptsv2payouts_payment_information_card.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information_payouts_options.rb +1 -1
- data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_get200_response_report_definitions.rb +23 -4
- data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response.rb +23 -4
- data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response_default_settings.rb +255 -0
- data/lib/cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response_subscriptions.rb +27 -2
- data/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response__link.rb +183 -0
- data/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response__link_report_download.rb +192 -0
- data/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response_report_search_results.rb +13 -4
- data/lib/cybersource_rest_client/models/request.rb +210 -0
- data/lib/cybersource_rest_client/models/risk_v1_authentication_excemptions_post400_response.rb +225 -0
- data/lib/cybersource_rest_client/models/risk_v1_authentication_exemptions_consumer_authentication_information_strong_authentication.rb +269 -0
- data/lib/cybersource_rest_client/models/risk_v1_authentication_exemptions_post201_response.rb +255 -0
- data/lib/cybersource_rest_client/models/risk_v1_authentication_exemptions_post201_response_consumer_authentication_information.rb +183 -0
- data/lib/cybersource_rest_client/models/risk_v1_authentication_exemptions_post201_response_risk_information.rb +199 -0
- data/lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response.rb +285 -0
- data/lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb +324 -0
- data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response.rb +294 -0
- data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_consumer_authentication_information.rb +444 -0
- data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_order_information.rb +183 -0
- data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_order_information_amount_details.rb +199 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_acquirer_information.rb +199 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_device_information.rb +183 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_merchant_information.rb +258 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_merchant_information_merchant_descriptor.rb +229 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_order_information.rb +212 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_order_information_bill_to.rb +496 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_order_information_line_items.rb +283 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_order_information_ship_to.rb +399 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_payment_information.rb +192 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_payment_information_card.rb +325 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_payment_information_tokenized_card.rb +291 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationresults_consumer_authentication_information.rb +524 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationresults_order_information.rb +194 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationresults_order_information_line_items.rb +267 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information.rb +192 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_card.rb +298 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +264 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_acquirer_information.rb +274 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_buyer_information.rb +196 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_client_reference_information.rb +208 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_consumer_authentication_information.rb +1359 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_consumer_authentication_information_ivr.rb +319 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_consumer_authentication_information_strong_authentication.rb +199 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_device_information.rb +430 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_device_information_raw_data.rb +209 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_merchant_information.rb +208 -0
- data/lib/cybersource_rest_client/models/{tss_v2_transactions_get200_response_payment_information_payment_type_funding_source.rb → riskv1authentications_merchant_information_merchant_descriptor.rb} +25 -40
- data/lib/cybersource_rest_client/models/riskv1authentications_order_information.rb +283 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_order_information_line_items.rb +396 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_order_information_ship_to.rb +459 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_recurring_payment_information.rb +235 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_risk_information.rb +183 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history.rb +262 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history_account_history.rb +209 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history_customer_account.rb +279 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_travel_information.rb +206 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_travel_information_legs.rb +259 -0
- data/lib/cybersource_rest_client/models/riskv1authentications_travel_information_passengers.rb +224 -0
- data/lib/cybersource_rest_client/models/riskv1decisions_device_information.rb +26 -1
- data/lib/cybersource_rest_client/models/riskv1decisions_order_information.rb +13 -4
- data/lib/cybersource_rest_client/models/riskv1decisions_order_information_address.rb +325 -0
- data/lib/cybersource_rest_client/models/riskv1decisions_order_information_bill_to.rb +26 -1
- data/lib/cybersource_rest_client/models/riskv1decisions_payment_information.rb +13 -4
- data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_bank.rb +275 -0
- data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_card.rb +2 -2
- data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +1 -1
- data/lib/cybersource_rest_client/models/riskv1decisions_risk_information.rb +13 -4
- data/lib/cybersource_rest_client/models/riskv1decisions_risk_information_marking_details.rb +275 -0
- data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_delete409_response__links.rb +1 -1
- data/lib/cybersource_rest_client/models/{tms_v1_instrument_identifiers_payment_instruments_get200_response_instrument_identifier.rb → tms_v1_instrument_identifiers_payment_instruments_embedded_instrument_identifier.rb} +11 -2
- data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded__embedded.rb +183 -0
- data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded__links.rb +183 -0
- data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded__links_self.rb +183 -0
- data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded_buyer_information.rb +20 -20
- data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded_card.rb +2 -2
- data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response_payment_instruments.rb +9 -9
- data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response_personal_identification.rb +1 -1
- data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_post200_response.rb +10 -1
- data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_post200_response__links.rb +10 -1
- data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_post200_response__links_payment_instruments.rb +183 -0
- data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_post200_response_issuer.rb +208 -0
- data/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_card.rb +1 -1
- data/lib/cybersource_rest_client/models/tmsv1paymentinstruments_instrument_identifier.rb +226 -0
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_application_information_applications.rb +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_client_reference_information.rb +3 -3
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_card.rb +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_payment_type.rb +12 -31
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information.rb +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_client_reference_information.rb +2 -2
- data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_card.rb +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_payment_type.rb +9 -9
- data/lib/cybersource_rest_client/models/update_payment_instrument_request.rb +2 -41
- data/lib/cybersource_rest_client/utilities/flex/token_verification.rb +42 -0
- metadata +79 -7
data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_amount_details.rb
CHANGED
@@ -26,7 +26,7 @@ module CyberSource
|
|
26
26
|
# 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)
|
27
27
|
attr_accessor :duty_amount
|
28
28
|
|
29
|
-
# Gratuity or tip amount for restaurants when the card is present. Allowed only when `industryDatatype=restaurant`. When your customer uses a debit card or prepaid card, and you receive a partial authorization, the payment networks recommend that you do not submit a capture amount that is higher than the authorized amount. When the capture amount exceeds the partial amount that was approved, the issuer has chargeback rights for the excess amount. For
|
29
|
+
# Gratuity or tip amount for restaurants when the card is present. Allowed only when `industryDatatype=restaurant`. When your customer uses a debit card or prepaid card, and you receive a partial authorization, the payment networks recommend that you do not submit a capture amount that is higher than the authorized amount. When the capture amount exceeds the partial amount that was approved, the issuer has chargeback rights for the excess amount. For details about partial authorizations, see \"Partial Authorizations\" in [Credit Card Services Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/wwhelp/wwhimpl/js/html/wwhelp.htm) Restaurant data is supported only on CyberSource through VisaNet.
|
30
30
|
attr_accessor :gratuity_amount
|
31
31
|
|
32
32
|
# 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)
|
@@ -69,7 +69,7 @@ module CyberSource
|
|
69
69
|
# Your local pricing currency code. For the possible values, see the [ISO Standard Currency Codes.](http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf) For details, see `original_currency` field description in [Credit Card Services Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/wwhelp/wwhimpl/js/html/wwhelp.htm) For details about converting a foreign cardholder’s purchase from your local pricing currency to the cardholder’s billing currency, see the [Dynamic Currency Conversion with a Third Party Provider Guide.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/wwhelp/wwhimpl/js/html/wwhelp.htm).
|
70
70
|
attr_accessor :original_currency
|
71
71
|
|
72
|
-
# Cashback amount requested by the customer. If a cashback amount is included in the request, it must be included in the orderInformation.amountDetails.totalAmount value.
|
72
|
+
# Cashback amount requested by the customer. If a cashback amount is included in the request, it must be included in the `orderInformation.amountDetails.totalAmount` value.
|
73
73
|
attr_accessor :cashback_amount
|
74
74
|
|
75
75
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -32,7 +32,7 @@ module CyberSource
|
|
32
32
|
# Set this field to 3 to indicate that the request includes Level III data.
|
33
33
|
attr_accessor :purchase_level
|
34
34
|
|
35
|
-
# Flag that indicates
|
35
|
+
# Flag that indicates whether the transaction includes airline or restaurant data. To send the data in a transaction request to the processor, you must set this field to `airline` or `restaurant`. **Note** If you do not set this field to one of the possible values, CyberSource does not send any data to the processor. Possible Values: - `airline` - `restaurant`
|
36
36
|
attr_accessor :industry_data_type
|
37
37
|
|
38
38
|
attr_accessor :issuer
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
|
15
15
|
module CyberSource
|
16
16
|
class Ptsv2paymentsidrefundsPaymentInformationCard
|
17
|
-
# The customer’s payment card number, also
|
17
|
+
# The customer’s payment card number, also known as the Primary Account Number (PAN). You can also use this field for encoded account numbers. For processor-specific information, see the `customer_cc_number` field description in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
18
18
|
attr_accessor :number
|
19
19
|
|
20
20
|
# Two-digit month in which the payment card expires. Format: `MM`. Valid values: `01` through `12`. #### Barclays and Streamline For Maestro (UK Domestic) and Maestro (International) cards on Barclays and Streamline, this must be a valid value (`01` through `12`) but is not required to be a valid expiration date. In other words, an expiration date that is in the past does not cause CyberSource to reject your request. However, an invalid expiration date might cause the issuer to reject your request. #### Encoded Account Numbers For encoded account numbers (_type_=039), if there is no expiration date on the card, use `12`. **Important** It is your responsibility to determine whether a field is required for the transaction you are requesting. For processor-specific information, see the `customer_cc_expmo` field description in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
@@ -23,7 +23,7 @@ module CyberSource
|
|
23
23
|
# Four-digit year in which the credit card expires. Format: `YYYY`. #### Barclays and Streamline For Maestro (UK Domestic) and Maestro (International) cards on Barclays and Streamline, this must be a valid value (`1900` through `3000`) but is not required to be a valid expiration date. In other words, an expiration date that is in the past does not cause CyberSource to reject your request. However, an invalid expiration date might cause the issuer to reject your request. #### Encoded Account Numbers For encoded account numbers (**_type_**`=039`), if there is no expiration date on the card, use `2021`. #### FDC Nashville Global and FDMS South You can send in 2 digits or 4 digits. If you send in 2 digits, they must be the last 2 digits of the year. **Important** It is your responsibility to determine whether a field is required for the transaction you are requesting. For processor-specific information, see the `customer_cc_expyr` field description in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
24
24
|
attr_accessor :expiration_year
|
25
25
|
|
26
|
-
# Three-digit value that indicates the card type. Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover - 005: Diners Club - 007: JCB - 024: Maestro (UK Domestic) - 039 Encoded account number - 042: Maestro (International) For the complete list of possible values, see `card_type` field description in the [Credit Card Services Using the SCMP API Guide.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
26
|
+
# Three-digit value that indicates the card type. Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover - 005: Diners Club - 007: JCB - 024: Maestro (UK Domestic) - 036: Cartes Bancaires - 039 Encoded account number - 042: Maestro (International) For the complete list of possible values, see `card_type` field description in the [Credit Card Services Using the SCMP API Guide.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
27
27
|
attr_accessor :type
|
28
28
|
|
29
29
|
# Identifier for the issuing bank that provided the customer’s encoded account number. Contact your processor for the bank’s ID.
|
data/lib/cybersource_rest_client/models/ptsv2payouts_merchant_information_merchant_descriptor.rb
CHANGED
@@ -97,14 +97,6 @@ module CyberSource
|
|
97
97
|
invalid_properties.push('invalid value for "locality", the character length must be smaller than or equal to 13.')
|
98
98
|
end
|
99
99
|
|
100
|
-
if !@country.nil? && @country.to_s.length > 2
|
101
|
-
invalid_properties.push('invalid value for "country", the character length must be smaller than or equal to 2.')
|
102
|
-
end
|
103
|
-
|
104
|
-
if !@administrative_area.nil? && @administrative_area.to_s.length > 3
|
105
|
-
invalid_properties.push('invalid value for "administrative_area", the character length must be smaller than or equal to 3.')
|
106
|
-
end
|
107
|
-
|
108
100
|
if !@postal_code.nil? && @postal_code.to_s.length > 14
|
109
101
|
invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 14.')
|
110
102
|
end
|
@@ -120,8 +112,6 @@ module CyberSource
|
|
120
112
|
# @return true if the model is valid
|
121
113
|
def valid?
|
122
114
|
return false if !@locality.nil? && @locality.to_s.length > 13
|
123
|
-
return false if !@country.nil? && @country.to_s.length > 2
|
124
|
-
return false if !@administrative_area.nil? && @administrative_area.to_s.length > 3
|
125
115
|
return false if !@postal_code.nil? && @postal_code.to_s.length > 14
|
126
116
|
return false if !@contact.nil? && @contact.to_s.length > 14
|
127
117
|
true
|
@@ -137,26 +127,6 @@ module CyberSource
|
|
137
127
|
@locality = locality
|
138
128
|
end
|
139
129
|
|
140
|
-
# Custom attribute writer method with validation
|
141
|
-
# @param [Object] country Value to be assigned
|
142
|
-
def country=(country)
|
143
|
-
if !country.nil? && country.to_s.length > 2
|
144
|
-
fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 2.'
|
145
|
-
end
|
146
|
-
|
147
|
-
@country = country
|
148
|
-
end
|
149
|
-
|
150
|
-
# Custom attribute writer method with validation
|
151
|
-
# @param [Object] administrative_area Value to be assigned
|
152
|
-
def administrative_area=(administrative_area)
|
153
|
-
if !administrative_area.nil? && administrative_area.to_s.length > 3
|
154
|
-
fail ArgumentError, 'invalid value for "administrative_area", the character length must be smaller than or equal to 3.'
|
155
|
-
end
|
156
|
-
|
157
|
-
@administrative_area = administrative_area
|
158
|
-
end
|
159
|
-
|
160
130
|
# Custom attribute writer method with validation
|
161
131
|
# @param [Object] postal_code Value to be assigned
|
162
132
|
def postal_code=(postal_code)
|
@@ -14,10 +14,10 @@ require 'date'
|
|
14
14
|
|
15
15
|
module CyberSource
|
16
16
|
class Ptsv2payoutsPaymentInformationCard
|
17
|
-
# Three-digit value that indicates the card type. Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover - 005: Diners Club - 007: JCB - 024: Maestro (UK Domestic) - 039 Encoded account number - 042: Maestro (International) For the complete list of possible values, see `card_type` field description in the [Credit Card Services Using the SCMP API Guide.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
17
|
+
# Three-digit value that indicates the card type. Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover - 005: Diners Club - 007: JCB - 024: Maestro (UK Domestic) - 036: Cartes Bancaires - 039 Encoded account number - 042: Maestro (International) For the complete list of possible values, see `card_type` field description in the [Credit Card Services Using the SCMP API Guide.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
18
18
|
attr_accessor :type
|
19
19
|
|
20
|
-
# The customer’s payment card number, also
|
20
|
+
# The customer’s payment card number, also known as the Primary Account Number (PAN). You can also use this field for encoded account numbers. For processor-specific information, see the `customer_cc_number` field description in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
21
21
|
attr_accessor :number
|
22
22
|
|
23
23
|
# Two-digit month in which the payment card expires. Format: `MM`. Valid values: `01` through `12`. #### Barclays and Streamline For Maestro (UK Domestic) and Maestro (International) cards on Barclays and Streamline, this must be a valid value (`01` through `12`) but is not required to be a valid expiration date. In other words, an expiration date that is in the past does not cause CyberSource to reject your request. However, an invalid expiration date might cause the issuer to reject your request. #### Encoded Account Numbers For encoded account numbers (_type_=039), if there is no expiration date on the card, use `12`. **Important** It is your responsibility to determine whether a field is required for the transaction you are requesting. For processor-specific information, see the `customer_cc_expmo` field description in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
@@ -17,10 +17,10 @@ module CyberSource
|
|
17
17
|
# 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
|
18
18
|
attr_accessor :business_application_id
|
19
19
|
|
20
|
-
# 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.
|
20
|
+
# 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. For details, see the `network_order` field description in [BIN Lookup Service Using the SCMP API.](http://apps.cybersource.com/library/documentation/BIN_Lookup/BIN_Lookup_SCMP_API/html/wwhelp/wwhimpl/js/html/wwhelp.htm)
|
21
21
|
attr_accessor :network_routing_order
|
22
22
|
|
23
|
-
# Type of transaction.
|
23
|
+
# Type of transaction. Value for an OCT transaction: - `internet` For details, see the `e_commerce_indicator` field description in [Payouts Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/payouts_SCMP/html/wwhelp/wwhimpl/js/html/wwhelp.htm)
|
24
24
|
attr_accessor :commerce_indicator
|
25
25
|
|
26
26
|
# 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).
|
data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information_payouts_options.rb
CHANGED
@@ -20,7 +20,7 @@ module CyberSource
|
|
20
20
|
# 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.
|
21
21
|
attr_accessor :acquirer_bin
|
22
22
|
|
23
|
-
# 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. Format: Positions 1-4: The yddd equivalent of the date, where y = 0-9 and ddd = 001 – 366. Positions 5-12: A unique identification number generated by the merchant * Applicable only for CTV for Payouts.
|
23
|
+
# 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. Format: Positions 1-4: The `yddd` equivalent of the date, where `y` = 0-9 and `ddd` = 001 – 366. Positions 5-12: A unique identification number generated by the merchant * Applicable only for CTV for Payouts.
|
24
24
|
attr_accessor :retrieval_reference_number
|
25
25
|
|
26
26
|
# Visa-generated transaction identifier (TID) that is unique for each original authorization and financial request. * Applicable only for CTV for Payouts.
|
@@ -25,6 +25,11 @@ module CyberSource
|
|
25
25
|
|
26
26
|
attr_accessor :description
|
27
27
|
|
28
|
+
attr_accessor :default_settings
|
29
|
+
|
30
|
+
# 'The subscription type for which report definition is required. By default the type will be CUSTOM.' Valid Values: - CLASSIC - CUSTOM - STANDARD
|
31
|
+
attr_accessor :subscription_type
|
32
|
+
|
28
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
29
34
|
def self.attribute_map
|
30
35
|
{
|
@@ -32,7 +37,9 @@ module CyberSource
|
|
32
37
|
:'report_definition_id' => :'reportDefinitionId',
|
33
38
|
:'report_defintion_name' => :'reportDefintionName',
|
34
39
|
:'supported_formats' => :'supportedFormats',
|
35
|
-
:'description' => :'description'
|
40
|
+
:'description' => :'description',
|
41
|
+
:'default_settings' => :'defaultSettings',
|
42
|
+
:'subscription_type' => :'subscriptionType'
|
36
43
|
}
|
37
44
|
end
|
38
45
|
|
@@ -43,7 +50,9 @@ module CyberSource
|
|
43
50
|
:'report_definition_id' => :'Integer',
|
44
51
|
:'report_defintion_name' => :'String',
|
45
52
|
:'supported_formats' => :'Array<String>',
|
46
|
-
:'description' => :'String'
|
53
|
+
:'description' => :'String',
|
54
|
+
:'default_settings' => :'ReportingV3ReportDefinitionsNameGet200ResponseDefaultSettings',
|
55
|
+
:'subscription_type' => :'String'
|
47
56
|
}
|
48
57
|
end
|
49
58
|
|
@@ -76,6 +85,14 @@ module CyberSource
|
|
76
85
|
if attributes.has_key?(:'description')
|
77
86
|
self.description = attributes[:'description']
|
78
87
|
end
|
88
|
+
|
89
|
+
if attributes.has_key?(:'defaultSettings')
|
90
|
+
self.default_settings = attributes[:'defaultSettings']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_key?(:'subscriptionType')
|
94
|
+
self.subscription_type = attributes[:'subscriptionType']
|
95
|
+
end
|
79
96
|
end
|
80
97
|
|
81
98
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -100,7 +117,9 @@ module CyberSource
|
|
100
117
|
report_definition_id == o.report_definition_id &&
|
101
118
|
report_defintion_name == o.report_defintion_name &&
|
102
119
|
supported_formats == o.supported_formats &&
|
103
|
-
description == o.description
|
120
|
+
description == o.description &&
|
121
|
+
default_settings == o.default_settings &&
|
122
|
+
subscription_type == o.subscription_type
|
104
123
|
end
|
105
124
|
|
106
125
|
# @see the `==` method
|
@@ -112,7 +131,7 @@ module CyberSource
|
|
112
131
|
# Calculates hash code according to all attributes.
|
113
132
|
# @return [Fixnum] Hash code
|
114
133
|
def hash
|
115
|
-
[type, report_definition_id, report_defintion_name, supported_formats, description].hash
|
134
|
+
[type, report_definition_id, report_defintion_name, supported_formats, description, default_settings, subscription_type].hash
|
116
135
|
end
|
117
136
|
|
118
137
|
# Builds the object from hash
|
data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response.rb
CHANGED
@@ -26,6 +26,11 @@ module CyberSource
|
|
26
26
|
|
27
27
|
attr_accessor :description
|
28
28
|
|
29
|
+
attr_accessor :default_settings
|
30
|
+
|
31
|
+
# 'The subscription type for which report definition is required. By default the type will be CUSTOM.' Valid Values: - 'CLASSIC' - 'CUSTOM' - 'STANDARD'
|
32
|
+
attr_accessor :subscription_type
|
33
|
+
|
29
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
35
|
def self.attribute_map
|
31
36
|
{
|
@@ -34,7 +39,9 @@ module CyberSource
|
|
34
39
|
:'report_defintion_name' => :'reportDefintionName',
|
35
40
|
:'attributes' => :'attributes',
|
36
41
|
:'supported_formats' => :'supportedFormats',
|
37
|
-
:'description' => :'description'
|
42
|
+
:'description' => :'description',
|
43
|
+
:'default_settings' => :'defaultSettings',
|
44
|
+
:'subscription_type' => :'subscriptionType'
|
38
45
|
}
|
39
46
|
end
|
40
47
|
|
@@ -46,7 +53,9 @@ module CyberSource
|
|
46
53
|
:'report_defintion_name' => :'String',
|
47
54
|
:'attributes' => :'Array<ReportingV3ReportDefinitionsNameGet200ResponseAttributes>',
|
48
55
|
:'supported_formats' => :'Array<String>',
|
49
|
-
:'description' => :'String'
|
56
|
+
:'description' => :'String',
|
57
|
+
:'default_settings' => :'ReportingV3ReportDefinitionsNameGet200ResponseDefaultSettings',
|
58
|
+
:'subscription_type' => :'String'
|
50
59
|
}
|
51
60
|
end
|
52
61
|
|
@@ -85,6 +94,14 @@ module CyberSource
|
|
85
94
|
if attributes.has_key?(:'description')
|
86
95
|
self.description = attributes[:'description']
|
87
96
|
end
|
97
|
+
|
98
|
+
if attributes.has_key?(:'defaultSettings')
|
99
|
+
self.default_settings = attributes[:'defaultSettings']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.has_key?(:'subscriptionType')
|
103
|
+
self.subscription_type = attributes[:'subscriptionType']
|
104
|
+
end
|
88
105
|
end
|
89
106
|
|
90
107
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -110,7 +127,9 @@ module CyberSource
|
|
110
127
|
report_defintion_name == o.report_defintion_name &&
|
111
128
|
attributes == o.attributes &&
|
112
129
|
supported_formats == o.supported_formats &&
|
113
|
-
description == o.description
|
130
|
+
description == o.description &&
|
131
|
+
default_settings == o.default_settings &&
|
132
|
+
subscription_type == o.subscription_type
|
114
133
|
end
|
115
134
|
|
116
135
|
# @see the `==` method
|
@@ -122,7 +141,7 @@ module CyberSource
|
|
122
141
|
# Calculates hash code according to all attributes.
|
123
142
|
# @return [Fixnum] Hash code
|
124
143
|
def hash
|
125
|
-
[type, report_definition_id, report_defintion_name, attributes, supported_formats, description].hash
|
144
|
+
[type, report_definition_id, report_defintion_name, attributes, supported_formats, description, default_settings, subscription_type].hash
|
126
145
|
end
|
127
146
|
|
128
147
|
# Builds the object from hash
|
@@ -0,0 +1,255 @@
|
|
1
|
+
=begin
|
2
|
+
#CyberSource Merged Spec
|
3
|
+
|
4
|
+
#All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.0.1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module CyberSource
|
16
|
+
class ReportingV3ReportDefinitionsNameGet200ResponseDefaultSettings
|
17
|
+
# Report Format Valid values: - application/xml - text/csv
|
18
|
+
attr_accessor :report_mime_type
|
19
|
+
|
20
|
+
# Report Frequency Value Valid Values: - DAILY - WEEKLY - MONTHLY - ADHOC
|
21
|
+
attr_accessor :report_frequency
|
22
|
+
|
23
|
+
# Report Name
|
24
|
+
attr_accessor :report_name
|
25
|
+
|
26
|
+
# Time Zone
|
27
|
+
attr_accessor :timezone
|
28
|
+
|
29
|
+
# Start Time
|
30
|
+
attr_accessor :start_time
|
31
|
+
|
32
|
+
# Start Day
|
33
|
+
attr_accessor :start_day
|
34
|
+
|
35
|
+
# List of filters to apply
|
36
|
+
attr_accessor :report_filters
|
37
|
+
|
38
|
+
attr_accessor :report_preferences
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'report_mime_type' => :'reportMimeType',
|
44
|
+
:'report_frequency' => :'reportFrequency',
|
45
|
+
:'report_name' => :'reportName',
|
46
|
+
:'timezone' => :'timezone',
|
47
|
+
:'start_time' => :'startTime',
|
48
|
+
:'start_day' => :'startDay',
|
49
|
+
:'report_filters' => :'reportFilters',
|
50
|
+
:'report_preferences' => :'reportPreferences'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Attribute type mapping.
|
55
|
+
def self.swagger_types
|
56
|
+
{
|
57
|
+
:'report_mime_type' => :'String',
|
58
|
+
:'report_frequency' => :'String',
|
59
|
+
:'report_name' => :'String',
|
60
|
+
:'timezone' => :'String',
|
61
|
+
:'start_time' => :'String',
|
62
|
+
:'start_day' => :'Integer',
|
63
|
+
:'report_filters' => :'Hash<String, Array<String>>',
|
64
|
+
:'report_preferences' => :'Reportingv3reportsReportPreferences'
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# Initializes the object
|
69
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
70
|
+
def initialize(attributes = {})
|
71
|
+
return unless attributes.is_a?(Hash)
|
72
|
+
|
73
|
+
# convert string to symbol for hash key
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
75
|
+
|
76
|
+
if attributes.has_key?(:'reportMimeType')
|
77
|
+
self.report_mime_type = attributes[:'reportMimeType']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.has_key?(:'reportFrequency')
|
81
|
+
self.report_frequency = attributes[:'reportFrequency']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.has_key?(:'reportName')
|
85
|
+
self.report_name = attributes[:'reportName']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.has_key?(:'timezone')
|
89
|
+
self.timezone = attributes[:'timezone']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.has_key?(:'startTime')
|
93
|
+
self.start_time = attributes[:'startTime']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.has_key?(:'startDay')
|
97
|
+
self.start_day = attributes[:'startDay']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.has_key?(:'reportFilters')
|
101
|
+
if (value = attributes[:'reportFilters']).is_a?(Hash)
|
102
|
+
self.report_filters = value
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.has_key?(:'reportPreferences')
|
107
|
+
self.report_preferences = attributes[:'reportPreferences']
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
112
|
+
# @return Array for valid properties with the reasons
|
113
|
+
def list_invalid_properties
|
114
|
+
invalid_properties = Array.new
|
115
|
+
invalid_properties
|
116
|
+
end
|
117
|
+
|
118
|
+
# Check to see if the all the properties in the model are valid
|
119
|
+
# @return true if the model is valid
|
120
|
+
def valid?
|
121
|
+
true
|
122
|
+
end
|
123
|
+
|
124
|
+
# Checks equality by comparing each attribute.
|
125
|
+
# @param [Object] Object to be compared
|
126
|
+
def ==(o)
|
127
|
+
return true if self.equal?(o)
|
128
|
+
self.class == o.class &&
|
129
|
+
report_mime_type == o.report_mime_type &&
|
130
|
+
report_frequency == o.report_frequency &&
|
131
|
+
report_name == o.report_name &&
|
132
|
+
timezone == o.timezone &&
|
133
|
+
start_time == o.start_time &&
|
134
|
+
start_day == o.start_day &&
|
135
|
+
report_filters == o.report_filters &&
|
136
|
+
report_preferences == o.report_preferences
|
137
|
+
end
|
138
|
+
|
139
|
+
# @see the `==` method
|
140
|
+
# @param [Object] Object to be compared
|
141
|
+
def eql?(o)
|
142
|
+
self == o
|
143
|
+
end
|
144
|
+
|
145
|
+
# Calculates hash code according to all attributes.
|
146
|
+
# @return [Fixnum] Hash code
|
147
|
+
def hash
|
148
|
+
[report_mime_type, report_frequency, report_name, timezone, start_time, start_day, report_filters, report_preferences].hash
|
149
|
+
end
|
150
|
+
|
151
|
+
# Builds the object from hash
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
153
|
+
# @return [Object] Returns the model itself
|
154
|
+
def build_from_hash(attributes)
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
156
|
+
self.class.swagger_types.each_pair do |key, type|
|
157
|
+
if type =~ /\AArray<(.*)>/i
|
158
|
+
# check to ensure the input is an array given that the the attribute
|
159
|
+
# is documented as an array but the input is not
|
160
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
161
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
162
|
+
end
|
163
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
164
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
165
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
166
|
+
end
|
167
|
+
|
168
|
+
self
|
169
|
+
end
|
170
|
+
|
171
|
+
# Deserializes the data based on type
|
172
|
+
# @param string type Data type
|
173
|
+
# @param string value Value to be deserialized
|
174
|
+
# @return [Object] Deserialized data
|
175
|
+
def _deserialize(type, value)
|
176
|
+
case type.to_sym
|
177
|
+
when :DateTime
|
178
|
+
DateTime.parse(value)
|
179
|
+
when :Date
|
180
|
+
Date.parse(value)
|
181
|
+
when :String
|
182
|
+
value.to_s
|
183
|
+
when :Integer
|
184
|
+
value.to_i
|
185
|
+
when :Float
|
186
|
+
value.to_f
|
187
|
+
when :BOOLEAN
|
188
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
189
|
+
true
|
190
|
+
else
|
191
|
+
false
|
192
|
+
end
|
193
|
+
when :Object
|
194
|
+
# generic object (usually a Hash), return directly
|
195
|
+
value
|
196
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
197
|
+
inner_type = Regexp.last_match[:inner_type]
|
198
|
+
value.map { |v| _deserialize(inner_type, v) }
|
199
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
200
|
+
k_type = Regexp.last_match[:k_type]
|
201
|
+
v_type = Regexp.last_match[:v_type]
|
202
|
+
{}.tap do |hash|
|
203
|
+
value.each do |k, v|
|
204
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
else # model
|
208
|
+
temp_model = CyberSource.const_get(type).new
|
209
|
+
temp_model.build_from_hash(value)
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
# Returns the string representation of the object
|
214
|
+
# @return [String] String presentation of the object
|
215
|
+
def to_s
|
216
|
+
to_hash.to_s
|
217
|
+
end
|
218
|
+
|
219
|
+
# to_body is an alias to to_hash (backward compatibility)
|
220
|
+
# @return [Hash] Returns the object in the form of hash
|
221
|
+
def to_body
|
222
|
+
to_hash
|
223
|
+
end
|
224
|
+
|
225
|
+
# Returns the object in the form of hash
|
226
|
+
# @return [Hash] Returns the object in the form of hash
|
227
|
+
def to_hash
|
228
|
+
hash = {}
|
229
|
+
self.class.attribute_map.each_pair do |attr, param|
|
230
|
+
value = self.send(attr)
|
231
|
+
next if value.nil?
|
232
|
+
hash[param] = _to_hash(value)
|
233
|
+
end
|
234
|
+
hash
|
235
|
+
end
|
236
|
+
|
237
|
+
# Outputs non-array value in the form of hash
|
238
|
+
# For object, use to_hash. Otherwise, just return the value
|
239
|
+
# @param [Object] value Any valid value
|
240
|
+
# @return [Hash] Returns the value in the form of hash
|
241
|
+
def _to_hash(value)
|
242
|
+
if value.is_a?(Array)
|
243
|
+
value.compact.map { |v| _to_hash(v) }
|
244
|
+
elsif value.is_a?(Hash)
|
245
|
+
{}.tap do |hash|
|
246
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
247
|
+
end
|
248
|
+
elsif value.respond_to? :to_hash
|
249
|
+
value.to_hash
|
250
|
+
else
|
251
|
+
value
|
252
|
+
end
|
253
|
+
end
|
254
|
+
end
|
255
|
+
end
|