cybersource_rest_client 0.0.80 → 0.0.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/AuthenticationSDK/authentication/jwt/JwtToken.rb +17 -7
- data/lib/AuthenticationSDK/core/Authorization.rb +2 -2
- data/lib/AuthenticationSDK/core/MerchantConfig.rb +277 -23
- data/lib/AuthenticationSDK/util/Cache.rb +144 -8
- data/lib/AuthenticationSDK/util/CachedMLEKId.rb +17 -0
- data/lib/AuthenticationSDK/util/CertificateUtility.rb +109 -29
- data/lib/AuthenticationSDK/util/Constants.rb +4 -0
- data/lib/AuthenticationSDK/util/MLEUtility.rb +167 -11
- data/lib/AuthenticationSDK/util/Utility.rb +37 -1
- data/lib/cybersource_rest_client/api/bank_account_validation_api.rb +6 -2
- data/lib/cybersource_rest_client/api/batches_api.rb +24 -8
- data/lib/cybersource_rest_client/api/billing_agreements_api.rb +18 -6
- data/lib/cybersource_rest_client/api/bin_lookup_api.rb +6 -2
- data/lib/cybersource_rest_client/api/capture_api.rb +6 -2
- data/lib/cybersource_rest_client/api/chargeback_details_api.rb +6 -2
- data/lib/cybersource_rest_client/api/chargeback_summaries_api.rb +6 -2
- data/lib/cybersource_rest_client/api/conversion_details_api.rb +6 -2
- data/lib/cybersource_rest_client/api/create_new_webhooks_api.rb +18 -6
- data/lib/cybersource_rest_client/api/credit_api.rb +6 -2
- data/lib/cybersource_rest_client/api/customer_api.rb +24 -8
- data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +30 -10
- data/lib/cybersource_rest_client/api/customer_shipping_address_api.rb +30 -10
- data/lib/cybersource_rest_client/api/decision_manager_api.rb +30 -10
- data/lib/cybersource_rest_client/api/device_de_association_api.rb +12 -4
- data/lib/cybersource_rest_client/api/device_search_api.rb +12 -4
- data/lib/cybersource_rest_client/api/download_dtd_api.rb +6 -2
- data/lib/cybersource_rest_client/api/download_xsd_api.rb +6 -2
- data/lib/cybersource_rest_client/api/emv_tag_details_api.rb +12 -4
- data/lib/cybersource_rest_client/api/enrollment_api.rb +104 -0
- data/lib/cybersource_rest_client/api/flex_api_api.rb +6 -2
- data/lib/cybersource_rest_client/api/instructions_api.rb +452 -0
- data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +36 -12
- data/lib/cybersource_rest_client/api/interchange_clearing_level_details_api.rb +6 -2
- data/lib/cybersource_rest_client/api/invoice_settings_api.rb +12 -4
- data/lib/cybersource_rest_client/api/invoices_api.rb +42 -14
- data/lib/cybersource_rest_client/api/manage_webhooks_api.rb +42 -14
- data/lib/cybersource_rest_client/api/merchant_boarding_api.rb +12 -4
- data/lib/cybersource_rest_client/api/merchant_defined_fields_api.rb +24 -8
- data/lib/cybersource_rest_client/api/microform_integration_api.rb +6 -2
- data/lib/cybersource_rest_client/api/net_fundings_api.rb +6 -2
- data/lib/cybersource_rest_client/api/notification_of_changes_api.rb +6 -2
- data/lib/cybersource_rest_client/api/offers_api.rb +12 -4
- data/lib/cybersource_rest_client/api/orders_api.rb +12 -4
- data/lib/cybersource_rest_client/api/payer_authentication_api.rb +18 -6
- data/lib/cybersource_rest_client/api/payment_batch_summaries_api.rb +6 -2
- data/lib/cybersource_rest_client/api/payment_instrument_api.rb +24 -8
- data/lib/cybersource_rest_client/api/payment_links_api.rb +24 -8
- data/lib/cybersource_rest_client/api/payment_tokens_api.rb +6 -2
- data/lib/cybersource_rest_client/api/payments_api.rb +36 -12
- data/lib/cybersource_rest_client/api/payouts_api.rb +6 -2
- data/lib/cybersource_rest_client/api/plans_api.rb +48 -16
- data/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb +6 -2
- data/lib/cybersource_rest_client/api/push_funds_api.rb +6 -2
- data/lib/cybersource_rest_client/api/refund_api.rb +12 -4
- data/lib/cybersource_rest_client/api/report_definitions_api.rb +12 -4
- data/lib/cybersource_rest_client/api/report_downloads_api.rb +6 -2
- data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +30 -10
- data/lib/cybersource_rest_client/api/reports_api.rb +18 -6
- data/lib/cybersource_rest_client/api/retrieval_details_api.rb +6 -2
- data/lib/cybersource_rest_client/api/retrieval_summaries_api.rb +6 -2
- data/lib/cybersource_rest_client/api/reversal_api.rb +12 -4
- data/lib/cybersource_rest_client/api/search_transactions_api.rb +12 -4
- data/lib/cybersource_rest_client/api/secure_file_share_api.rb +12 -4
- data/lib/cybersource_rest_client/api/subscriptions_api.rb +48 -16
- data/lib/cybersource_rest_client/api/subscriptions_follow_ons_api.rb +12 -4
- data/lib/cybersource_rest_client/api/taxes_api.rb +12 -4
- data/lib/cybersource_rest_client/api/token_api.rb +12 -4
- data/lib/cybersource_rest_client/api/tokenize_api.rb +6 -2
- data/lib/cybersource_rest_client/api/tokenized_card_api.rb +24 -8
- data/lib/cybersource_rest_client/api/transaction_batches_api.rb +24 -8
- data/lib/cybersource_rest_client/api/transaction_details_api.rb +6 -2
- data/lib/cybersource_rest_client/api/transient_token_data_api.rb +12 -4
- data/lib/cybersource_rest_client/api/unified_checkout_capture_context_api.rb +6 -2
- data/lib/cybersource_rest_client/api/user_management_api.rb +6 -2
- data/lib/cybersource_rest_client/api/user_management_search_api.rb +6 -2
- data/lib/cybersource_rest_client/api/verification_api.rb +12 -4
- data/lib/cybersource_rest_client/api/void_api.rb +30 -10
- data/lib/cybersource_rest_client/api_client.rb +20 -3
- data/lib/cybersource_rest_client/models/acpv1instructions_decline_threshold.rb +232 -0
- data/lib/cybersource_rest_client/models/acpv1instructions_mandates.rb +405 -0
- data/lib/cybersource_rest_client/models/acpv1instructions_recurring_payment_information.rb +191 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconf_processor_info_payment_instrument_verifi_results.rb +213 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_confirmation_data.rb +229 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_merchant_information.rb +258 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_order_information.rb +377 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_order_information_shipping_details.rb +206 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb +425 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information_payment_instrument.rb +190 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_attachments.rb +258 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_client_reference_information.rb +215 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_mandate_reference_data.rb +205 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_merchant_information.rb +334 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_merchant_information_merchant_descriptor.rb +250 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information.rb +228 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_amount_detail.rb +354 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_items.rb +367 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_items_additional_info.rb +231 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_items_policies.rb +346 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_line_items.rb +190 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb +686 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_payment_options.rb +217 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb +348 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_assurance_data.rb +313 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_authenticated_identities.rb +237 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_authentication_context.rb +191 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_bill_to.rb +400 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_buyer_information.rb +229 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_buyer_information_personal_identification.rb +212 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_consent_data.rb +297 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_consumer_identity.rb +268 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_device_information.rb +378 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_device_information_device_data.rb +302 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_enrollment_reference_data.rb +207 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_payment_information.rb +215 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_payment_information_customer.rb +197 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_payment_information_instrument_identifier.rb +206 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_payment_information_payment_instrument.rb +197 -0
- data/lib/cybersource_rest_client/models/agentic_cancel_purchase_intent_request.rb +257 -0
- data/lib/cybersource_rest_client/models/agentic_card_enrollment_bad_request_response400.rb +189 -0
- data/lib/cybersource_rest_client/models/agentic_card_enrollment_bad_request_response400_error.rb +238 -0
- data/lib/cybersource_rest_client/models/agentic_card_enrollment_bad_request_response400_error_detail.rb +224 -0
- data/lib/cybersource_rest_client/models/agentic_card_enrollment_request.rb +325 -0
- data/lib/cybersource_rest_client/models/agentic_card_enrollment_response200.rb +206 -0
- data/lib/cybersource_rest_client/models/agentic_card_enrollment_response202.rb +219 -0
- data/lib/cybersource_rest_client/models/agentic_confirm_transaction_events_request.rb +247 -0
- data/lib/cybersource_rest_client/models/agentic_confirm_transaction_events_response202.rb +195 -0
- data/lib/cybersource_rest_client/models/agentic_create_purchase_intent_request.rb +327 -0
- data/lib/cybersource_rest_client/models/agentic_create_purchase_intent_response200.rb +222 -0
- data/lib/cybersource_rest_client/models/agentic_pending_purchase_intent_response202.rb +241 -0
- data/lib/cybersource_rest_client/models/agentic_retrieve_payment_credentials_request.rb +247 -0
- data/lib/cybersource_rest_client/models/agentic_retrieve_payment_credentials_response200.rb +200 -0
- data/lib/cybersource_rest_client/models/agentic_retrieve_payment_credentials_response200_transaction_response_complete.rb +244 -0
- data/lib/cybersource_rest_client/models/agentic_retrieve_payment_credentials_response200_transaction_response_with_pending_events.rb +235 -0
- data/lib/cybersource_rest_client/models/agentic_update_purchase_intent_request.rb +315 -0
- data/lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb +36 -1
- data/lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information_localized_names.rb +254 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_ancillary_information.rb +22 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_ancillary_information_service.rb +39 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_travel_information.rb +246 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_travel_information_transit.rb +189 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_travel_information_transit_airline.rb +889 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_travel_information_transit_airline_ancillary_information.rb +259 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_travel_information_transit_airline_ancillary_information_service.rb +213 -0
- data/lib/cybersource_rest_client/models/refund_capture_request.rb +1 -1
- data/lib/cybersource_rest_client/models/refund_payment_request.rb +1 -1
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data.rb +4 -2
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_merchant_defined_information.rb +3 -2
- data/lib/cybersource_rest_client/utilities/jwe_utility.rb +1 -1
- data/lib/cybersource_rest_client.rb +64 -0
- metadata +68 -3
- /data/lib/AuthenticationSDK/util/{JWEUtility.rb → AuthJWEUtility.rb} +0 -0
|
@@ -0,0 +1,686 @@
|
|
|
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.4.38
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'date'
|
|
13
|
+
|
|
14
|
+
module CyberSource
|
|
15
|
+
# Shipping information.
|
|
16
|
+
class Acpv1instructionsinstructionIdcredentialsOrderInformationShipTo
|
|
17
|
+
# (Conditional) Reference identifier of the address Conditionality - Required when address is already registered with VACP System. Optional for requests when address fields are provided.
|
|
18
|
+
attr_accessor :address_id
|
|
19
|
+
|
|
20
|
+
# Name of the business; Name of the community; c/o Name etc. Notes - Shipping Address - The final recipient's name will be captured in deliveryContacts field. Billing Address - The Card Holder or Consumer Name will be recorded as part of Card or Order Information.
|
|
21
|
+
attr_accessor :district
|
|
22
|
+
|
|
23
|
+
# (Conditional) Address line 1 Conditionality - Required when used with the DPA Registration operation in the Management Service APIs Required when address is used as shipping/delivery Address.
|
|
24
|
+
attr_accessor :address1
|
|
25
|
+
|
|
26
|
+
# Address line 2.
|
|
27
|
+
attr_accessor :address2
|
|
28
|
+
|
|
29
|
+
# Address line 3.
|
|
30
|
+
attr_accessor :address3
|
|
31
|
+
|
|
32
|
+
# (Conditional) Address city Conditionality - When used with the DPA Registration operation in the Management Service APIs at least one of the following is required - both city and state - zip Required if this is a shipping address in a valid format for the country
|
|
33
|
+
attr_accessor :locality
|
|
34
|
+
|
|
35
|
+
# (Conditional) Address state Recommendation to support ISO 3166-2 format i.e. made up of ISO 3166-1 alpha 2 country code, followed by an alphanumeric string of 3 characters representing the state or sub-division Conditionality - When used with the DPA Registration operation in the Management Service APIs at least one of the following is required - both city and state - zip Required if this is a shipping address in a valid format for the country.
|
|
36
|
+
attr_accessor :administrative_area
|
|
37
|
+
|
|
38
|
+
# Address country code ISO 3166-1 alpha-2 country code.
|
|
39
|
+
attr_accessor :country
|
|
40
|
+
|
|
41
|
+
# Address zip/postal code Conditionality - When used with the DPA Registration operation in th Management Service APIs at least one of the following is required. - both city and state - zip Required if this is a shipping address in a valid format for the country and has a postal code or zip code
|
|
42
|
+
attr_accessor :postal_code
|
|
43
|
+
|
|
44
|
+
# Date and time the address was created. UTC time in Unix epoch format.
|
|
45
|
+
attr_accessor :create_time
|
|
46
|
+
|
|
47
|
+
# Date and time the address was last used. UTC time in Unix epoch format.
|
|
48
|
+
attr_accessor :last_used_time
|
|
49
|
+
|
|
50
|
+
# First name of the recipient.
|
|
51
|
+
attr_accessor :first_name
|
|
52
|
+
|
|
53
|
+
# Middle name of the recipient.
|
|
54
|
+
attr_accessor :middle_name
|
|
55
|
+
|
|
56
|
+
# Last name of the recipient.
|
|
57
|
+
attr_accessor :last_name
|
|
58
|
+
|
|
59
|
+
# Consumer-provided email address.
|
|
60
|
+
attr_accessor :email
|
|
61
|
+
|
|
62
|
+
# Phone number country code as defined by the International Telecommunication Union.
|
|
63
|
+
attr_accessor :country_calling_code
|
|
64
|
+
|
|
65
|
+
# Phone number without country code.
|
|
66
|
+
attr_accessor :phone_number
|
|
67
|
+
|
|
68
|
+
# Indicates that the phone number provided is not capable of receiving text messages.
|
|
69
|
+
attr_accessor :number_is_voice_only
|
|
70
|
+
|
|
71
|
+
# Consumer-provided delivery instructions.
|
|
72
|
+
attr_accessor :instructions
|
|
73
|
+
|
|
74
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
75
|
+
def self.attribute_map
|
|
76
|
+
{
|
|
77
|
+
:'address_id' => :'addressId',
|
|
78
|
+
:'district' => :'district',
|
|
79
|
+
:'address1' => :'address1',
|
|
80
|
+
:'address2' => :'address2',
|
|
81
|
+
:'address3' => :'address3',
|
|
82
|
+
:'locality' => :'locality',
|
|
83
|
+
:'administrative_area' => :'administrativeArea',
|
|
84
|
+
:'country' => :'country',
|
|
85
|
+
:'postal_code' => :'postalCode',
|
|
86
|
+
:'create_time' => :'createTime',
|
|
87
|
+
:'last_used_time' => :'lastUsedTime',
|
|
88
|
+
:'first_name' => :'firstName',
|
|
89
|
+
:'middle_name' => :'middleName',
|
|
90
|
+
:'last_name' => :'lastName',
|
|
91
|
+
:'email' => :'email',
|
|
92
|
+
:'country_calling_code' => :'countryCallingCode',
|
|
93
|
+
:'phone_number' => :'phoneNumber',
|
|
94
|
+
:'number_is_voice_only' => :'numberIsVoiceOnly',
|
|
95
|
+
:'instructions' => :'instructions'
|
|
96
|
+
}
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Attribute mapping from JSON key to ruby-style variable name.
|
|
100
|
+
def self.json_map
|
|
101
|
+
{
|
|
102
|
+
:'address_id' => :'address_id',
|
|
103
|
+
:'district' => :'district',
|
|
104
|
+
:'address1' => :'address1',
|
|
105
|
+
:'address2' => :'address2',
|
|
106
|
+
:'address3' => :'address3',
|
|
107
|
+
:'locality' => :'locality',
|
|
108
|
+
:'administrative_area' => :'administrative_area',
|
|
109
|
+
:'country' => :'country',
|
|
110
|
+
:'postal_code' => :'postal_code',
|
|
111
|
+
:'create_time' => :'create_time',
|
|
112
|
+
:'last_used_time' => :'last_used_time',
|
|
113
|
+
:'first_name' => :'first_name',
|
|
114
|
+
:'middle_name' => :'middle_name',
|
|
115
|
+
:'last_name' => :'last_name',
|
|
116
|
+
:'email' => :'email',
|
|
117
|
+
:'country_calling_code' => :'country_calling_code',
|
|
118
|
+
:'phone_number' => :'phone_number',
|
|
119
|
+
:'number_is_voice_only' => :'number_is_voice_only',
|
|
120
|
+
:'instructions' => :'instructions'
|
|
121
|
+
}
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Attribute type mapping.
|
|
125
|
+
def self.swagger_types
|
|
126
|
+
{
|
|
127
|
+
:'address_id' => :'String',
|
|
128
|
+
:'district' => :'String',
|
|
129
|
+
:'address1' => :'String',
|
|
130
|
+
:'address2' => :'String',
|
|
131
|
+
:'address3' => :'String',
|
|
132
|
+
:'locality' => :'String',
|
|
133
|
+
:'administrative_area' => :'String',
|
|
134
|
+
:'country' => :'String',
|
|
135
|
+
:'postal_code' => :'String',
|
|
136
|
+
:'create_time' => :'String',
|
|
137
|
+
:'last_used_time' => :'String',
|
|
138
|
+
:'first_name' => :'String',
|
|
139
|
+
:'middle_name' => :'String',
|
|
140
|
+
:'last_name' => :'String',
|
|
141
|
+
:'email' => :'String',
|
|
142
|
+
:'country_calling_code' => :'String',
|
|
143
|
+
:'phone_number' => :'String',
|
|
144
|
+
:'number_is_voice_only' => :'BOOLEAN',
|
|
145
|
+
:'instructions' => :'String'
|
|
146
|
+
}
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Initializes the object
|
|
150
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
+
def initialize(attributes = {})
|
|
152
|
+
return unless attributes.is_a?(Hash)
|
|
153
|
+
|
|
154
|
+
# convert string to symbol for hash key
|
|
155
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
156
|
+
|
|
157
|
+
if attributes.has_key?(:'addressId')
|
|
158
|
+
self.address_id = attributes[:'addressId']
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.has_key?(:'district')
|
|
162
|
+
self.district = attributes[:'district']
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.has_key?(:'address1')
|
|
166
|
+
self.address1 = attributes[:'address1']
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.has_key?(:'address2')
|
|
170
|
+
self.address2 = attributes[:'address2']
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if attributes.has_key?(:'address3')
|
|
174
|
+
self.address3 = attributes[:'address3']
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if attributes.has_key?(:'locality')
|
|
178
|
+
self.locality = attributes[:'locality']
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
if attributes.has_key?(:'administrativeArea')
|
|
182
|
+
self.administrative_area = attributes[:'administrativeArea']
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
if attributes.has_key?(:'country')
|
|
186
|
+
self.country = attributes[:'country']
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if attributes.has_key?(:'postalCode')
|
|
190
|
+
self.postal_code = attributes[:'postalCode']
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
if attributes.has_key?(:'createTime')
|
|
194
|
+
self.create_time = attributes[:'createTime']
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
if attributes.has_key?(:'lastUsedTime')
|
|
198
|
+
self.last_used_time = attributes[:'lastUsedTime']
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
if attributes.has_key?(:'firstName')
|
|
202
|
+
self.first_name = attributes[:'firstName']
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if attributes.has_key?(:'middleName')
|
|
206
|
+
self.middle_name = attributes[:'middleName']
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
if attributes.has_key?(:'lastName')
|
|
210
|
+
self.last_name = attributes[:'lastName']
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
if attributes.has_key?(:'email')
|
|
214
|
+
self.email = attributes[:'email']
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
if attributes.has_key?(:'countryCallingCode')
|
|
218
|
+
self.country_calling_code = attributes[:'countryCallingCode']
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
if attributes.has_key?(:'phoneNumber')
|
|
222
|
+
self.phone_number = attributes[:'phoneNumber']
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
if attributes.has_key?(:'numberIsVoiceOnly')
|
|
226
|
+
self.number_is_voice_only = attributes[:'numberIsVoiceOnly']
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
if attributes.has_key?(:'instructions')
|
|
230
|
+
self.instructions = attributes[:'instructions']
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
235
|
+
# @return Array for valid properties with the reasons
|
|
236
|
+
def list_invalid_properties
|
|
237
|
+
invalid_properties = Array.new
|
|
238
|
+
#if !@address_id.nil? && @address_id !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
239
|
+
#invalid_properties.push('invalid value for "address_id", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
240
|
+
#end
|
|
241
|
+
|
|
242
|
+
#if !@district.nil? && @district !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
243
|
+
#invalid_properties.push('invalid value for "district", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
244
|
+
#end
|
|
245
|
+
|
|
246
|
+
#if !@address1.nil? && @address1 !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
247
|
+
#invalid_properties.push('invalid value for "address1", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
248
|
+
#end
|
|
249
|
+
|
|
250
|
+
#if !@address2.nil? && @address2 !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
251
|
+
#invalid_properties.push('invalid value for "address2", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
252
|
+
#end
|
|
253
|
+
|
|
254
|
+
#if !@address3.nil? && @address3 !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
255
|
+
#invalid_properties.push('invalid value for "address3", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
256
|
+
#end
|
|
257
|
+
|
|
258
|
+
#if !@locality.nil? && @locality !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
259
|
+
#invalid_properties.push('invalid value for "locality", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
260
|
+
#end
|
|
261
|
+
|
|
262
|
+
#if !@administrative_area.nil? && @administrative_area !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
263
|
+
#invalid_properties.push('invalid value for "administrative_area", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
264
|
+
#end
|
|
265
|
+
|
|
266
|
+
if @country.nil?
|
|
267
|
+
invalid_properties.push('invalid value for "country", country cannot be nil.')
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
#if @country !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
271
|
+
#invalid_properties.push('invalid value for "country", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
272
|
+
#end
|
|
273
|
+
|
|
274
|
+
#if !@postal_code.nil? && @postal_code !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
275
|
+
#invalid_properties.push('invalid value for "postal_code", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
276
|
+
#end
|
|
277
|
+
|
|
278
|
+
#if !@create_time.nil? && @create_time !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
279
|
+
#invalid_properties.push('invalid value for "create_time", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
280
|
+
#end
|
|
281
|
+
|
|
282
|
+
#if !@last_used_time.nil? && @last_used_time !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
283
|
+
#invalid_properties.push('invalid value for "last_used_time", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
284
|
+
#end
|
|
285
|
+
|
|
286
|
+
#if !@first_name.nil? && @first_name !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
287
|
+
#invalid_properties.push('invalid value for "first_name", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
288
|
+
#end
|
|
289
|
+
|
|
290
|
+
#if !@middle_name.nil? && @middle_name !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
291
|
+
#invalid_properties.push('invalid value for "middle_name", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
292
|
+
#end
|
|
293
|
+
|
|
294
|
+
#if !@last_name.nil? && @last_name !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
295
|
+
#invalid_properties.push('invalid value for "last_name", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
296
|
+
#end
|
|
297
|
+
|
|
298
|
+
#if !@email.nil? && @email !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
299
|
+
#invalid_properties.push('invalid value for "email", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
300
|
+
#end
|
|
301
|
+
|
|
302
|
+
if @country_calling_code.nil?
|
|
303
|
+
invalid_properties.push('invalid value for "country_calling_code", country_calling_code cannot be nil.')
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
#if @country_calling_code !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
307
|
+
#invalid_properties.push('invalid value for "country_calling_code", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
308
|
+
#end
|
|
309
|
+
|
|
310
|
+
if @phone_number.nil?
|
|
311
|
+
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
#if @phone_number !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
315
|
+
#invalid_properties.push('invalid value for "phone_number", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
316
|
+
#end
|
|
317
|
+
|
|
318
|
+
#if !@instructions.nil? && @instructions !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
319
|
+
#invalid_properties.push('invalid value for "instructions", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.')
|
|
320
|
+
#end
|
|
321
|
+
|
|
322
|
+
invalid_properties
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
# Check to see if the all the properties in the model are valid
|
|
326
|
+
# @return true if the model is valid
|
|
327
|
+
def valid?
|
|
328
|
+
#return false if !@address_id.nil? && @address_id !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
329
|
+
#return false if !@district.nil? && @district !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
330
|
+
#return false if !@address1.nil? && @address1 !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
331
|
+
#return false if !@address2.nil? && @address2 !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
332
|
+
#return false if !@address3.nil? && @address3 !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
333
|
+
#return false if !@locality.nil? && @locality !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
334
|
+
#return false if !@administrative_area.nil? && @administrative_area !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
335
|
+
return false if @country.nil?
|
|
336
|
+
#return false if @country !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
337
|
+
#return false if !@postal_code.nil? && @postal_code !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
338
|
+
#return false if !@create_time.nil? && @create_time !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
339
|
+
#return false if !@last_used_time.nil? && @last_used_time !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
340
|
+
#return false if !@first_name.nil? && @first_name !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
341
|
+
#return false if !@middle_name.nil? && @middle_name !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
342
|
+
#return false if !@last_name.nil? && @last_name !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
343
|
+
#return false if !@email.nil? && @email !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
344
|
+
return false if @country_calling_code.nil?
|
|
345
|
+
#return false if @country_calling_code !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
346
|
+
return false if @phone_number.nil?
|
|
347
|
+
#return false if @phone_number !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
348
|
+
#return false if !@instructions.nil? && @instructions !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
349
|
+
true
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
# Custom attribute writer method with validation
|
|
353
|
+
# @param [Object] address_id Value to be assigned
|
|
354
|
+
def address_id=(address_id)
|
|
355
|
+
#if !address_id.nil? && address_id !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
356
|
+
#fail ArgumentError, 'invalid value for "address_id", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
357
|
+
#end
|
|
358
|
+
|
|
359
|
+
@address_id = address_id
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Custom attribute writer method with validation
|
|
363
|
+
# @param [Object] district Value to be assigned
|
|
364
|
+
def district=(district)
|
|
365
|
+
#if !district.nil? && district !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
366
|
+
#fail ArgumentError, 'invalid value for "district", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
367
|
+
#end
|
|
368
|
+
|
|
369
|
+
@district = district
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
# Custom attribute writer method with validation
|
|
373
|
+
# @param [Object] address1 Value to be assigned
|
|
374
|
+
def address1=(address1)
|
|
375
|
+
#if !address1.nil? && address1 !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
376
|
+
#fail ArgumentError, 'invalid value for "address1", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
377
|
+
#end
|
|
378
|
+
|
|
379
|
+
@address1 = address1
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
# Custom attribute writer method with validation
|
|
383
|
+
# @param [Object] address2 Value to be assigned
|
|
384
|
+
def address2=(address2)
|
|
385
|
+
#if !address2.nil? && address2 !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
386
|
+
#fail ArgumentError, 'invalid value for "address2", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
387
|
+
#end
|
|
388
|
+
|
|
389
|
+
@address2 = address2
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
# Custom attribute writer method with validation
|
|
393
|
+
# @param [Object] address3 Value to be assigned
|
|
394
|
+
def address3=(address3)
|
|
395
|
+
#if !address3.nil? && address3 !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
396
|
+
#fail ArgumentError, 'invalid value for "address3", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
397
|
+
#end
|
|
398
|
+
|
|
399
|
+
@address3 = address3
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
# Custom attribute writer method with validation
|
|
403
|
+
# @param [Object] locality Value to be assigned
|
|
404
|
+
def locality=(locality)
|
|
405
|
+
#if !locality.nil? && locality !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
406
|
+
#fail ArgumentError, 'invalid value for "locality", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
407
|
+
#end
|
|
408
|
+
|
|
409
|
+
@locality = locality
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
# Custom attribute writer method with validation
|
|
413
|
+
# @param [Object] administrative_area Value to be assigned
|
|
414
|
+
def administrative_area=(administrative_area)
|
|
415
|
+
#if !administrative_area.nil? && administrative_area !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
416
|
+
#fail ArgumentError, 'invalid value for "administrative_area", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
417
|
+
#end
|
|
418
|
+
|
|
419
|
+
@administrative_area = administrative_area
|
|
420
|
+
end
|
|
421
|
+
|
|
422
|
+
# Custom attribute writer method with validation
|
|
423
|
+
# @param [Object] country Value to be assigned
|
|
424
|
+
def country=(country)
|
|
425
|
+
#if country.nil?
|
|
426
|
+
#fail ArgumentError, 'country cannot be nil'
|
|
427
|
+
#end
|
|
428
|
+
|
|
429
|
+
#if country !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
430
|
+
#fail ArgumentError, 'invalid value for "country", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
431
|
+
#end
|
|
432
|
+
|
|
433
|
+
@country = country
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
# Custom attribute writer method with validation
|
|
437
|
+
# @param [Object] postal_code Value to be assigned
|
|
438
|
+
def postal_code=(postal_code)
|
|
439
|
+
#if !postal_code.nil? && postal_code !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
440
|
+
#fail ArgumentError, 'invalid value for "postal_code", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
441
|
+
#end
|
|
442
|
+
|
|
443
|
+
@postal_code = postal_code
|
|
444
|
+
end
|
|
445
|
+
|
|
446
|
+
# Custom attribute writer method with validation
|
|
447
|
+
# @param [Object] create_time Value to be assigned
|
|
448
|
+
def create_time=(create_time)
|
|
449
|
+
#if !create_time.nil? && create_time !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
450
|
+
#fail ArgumentError, 'invalid value for "create_time", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
451
|
+
#end
|
|
452
|
+
|
|
453
|
+
@create_time = create_time
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
# Custom attribute writer method with validation
|
|
457
|
+
# @param [Object] last_used_time Value to be assigned
|
|
458
|
+
def last_used_time=(last_used_time)
|
|
459
|
+
#if !last_used_time.nil? && last_used_time !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
460
|
+
#fail ArgumentError, 'invalid value for "last_used_time", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
461
|
+
#end
|
|
462
|
+
|
|
463
|
+
@last_used_time = last_used_time
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
# Custom attribute writer method with validation
|
|
467
|
+
# @param [Object] first_name Value to be assigned
|
|
468
|
+
def first_name=(first_name)
|
|
469
|
+
#if !first_name.nil? && first_name !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
470
|
+
#fail ArgumentError, 'invalid value for "first_name", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
471
|
+
#end
|
|
472
|
+
|
|
473
|
+
@first_name = first_name
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
# Custom attribute writer method with validation
|
|
477
|
+
# @param [Object] middle_name Value to be assigned
|
|
478
|
+
def middle_name=(middle_name)
|
|
479
|
+
#if !middle_name.nil? && middle_name !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
480
|
+
#fail ArgumentError, 'invalid value for "middle_name", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
481
|
+
#end
|
|
482
|
+
|
|
483
|
+
@middle_name = middle_name
|
|
484
|
+
end
|
|
485
|
+
|
|
486
|
+
# Custom attribute writer method with validation
|
|
487
|
+
# @param [Object] last_name Value to be assigned
|
|
488
|
+
def last_name=(last_name)
|
|
489
|
+
#if !last_name.nil? && last_name !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
490
|
+
#fail ArgumentError, 'invalid value for "last_name", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
491
|
+
#end
|
|
492
|
+
|
|
493
|
+
@last_name = last_name
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
# Custom attribute writer method with validation
|
|
497
|
+
# @param [Object] email Value to be assigned
|
|
498
|
+
def email=(email)
|
|
499
|
+
#if !email.nil? && email !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
500
|
+
#fail ArgumentError, 'invalid value for "email", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
501
|
+
#end
|
|
502
|
+
|
|
503
|
+
@email = email
|
|
504
|
+
end
|
|
505
|
+
|
|
506
|
+
# Custom attribute writer method with validation
|
|
507
|
+
# @param [Object] country_calling_code Value to be assigned
|
|
508
|
+
def country_calling_code=(country_calling_code)
|
|
509
|
+
#if country_calling_code.nil?
|
|
510
|
+
#fail ArgumentError, 'country_calling_code cannot be nil'
|
|
511
|
+
#end
|
|
512
|
+
|
|
513
|
+
#if country_calling_code !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
514
|
+
#fail ArgumentError, 'invalid value for "country_calling_code", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
515
|
+
#end
|
|
516
|
+
|
|
517
|
+
@country_calling_code = country_calling_code
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
# Custom attribute writer method with validation
|
|
521
|
+
# @param [Object] phone_number Value to be assigned
|
|
522
|
+
def phone_number=(phone_number)
|
|
523
|
+
#if phone_number.nil?
|
|
524
|
+
#fail ArgumentError, 'phone_number cannot be nil'
|
|
525
|
+
#end
|
|
526
|
+
|
|
527
|
+
#if phone_number !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
528
|
+
#fail ArgumentError, 'invalid value for "phone_number", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
529
|
+
#end
|
|
530
|
+
|
|
531
|
+
@phone_number = phone_number
|
|
532
|
+
end
|
|
533
|
+
|
|
534
|
+
# Custom attribute writer method with validation
|
|
535
|
+
# @param [Object] instructions Value to be assigned
|
|
536
|
+
def instructions=(instructions)
|
|
537
|
+
#if !instructions.nil? && instructions !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/)
|
|
538
|
+
#fail ArgumentError, 'invalid value for "instructions", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.'
|
|
539
|
+
#end
|
|
540
|
+
|
|
541
|
+
@instructions = instructions
|
|
542
|
+
end
|
|
543
|
+
|
|
544
|
+
# Checks equality by comparing each attribute.
|
|
545
|
+
# @param [Object] Object to be compared
|
|
546
|
+
def ==(o)
|
|
547
|
+
return true if self.equal?(o)
|
|
548
|
+
self.class == o.class &&
|
|
549
|
+
address_id == o.address_id &&
|
|
550
|
+
district == o.district &&
|
|
551
|
+
address1 == o.address1 &&
|
|
552
|
+
address2 == o.address2 &&
|
|
553
|
+
address3 == o.address3 &&
|
|
554
|
+
locality == o.locality &&
|
|
555
|
+
administrative_area == o.administrative_area &&
|
|
556
|
+
country == o.country &&
|
|
557
|
+
postal_code == o.postal_code &&
|
|
558
|
+
create_time == o.create_time &&
|
|
559
|
+
last_used_time == o.last_used_time &&
|
|
560
|
+
first_name == o.first_name &&
|
|
561
|
+
middle_name == o.middle_name &&
|
|
562
|
+
last_name == o.last_name &&
|
|
563
|
+
email == o.email &&
|
|
564
|
+
country_calling_code == o.country_calling_code &&
|
|
565
|
+
phone_number == o.phone_number &&
|
|
566
|
+
number_is_voice_only == o.number_is_voice_only &&
|
|
567
|
+
instructions == o.instructions
|
|
568
|
+
end
|
|
569
|
+
|
|
570
|
+
# @see the `==` method
|
|
571
|
+
# @param [Object] Object to be compared
|
|
572
|
+
def eql?(o)
|
|
573
|
+
self == o
|
|
574
|
+
end
|
|
575
|
+
|
|
576
|
+
# Calculates hash code according to all attributes.
|
|
577
|
+
# @return [Fixnum] Hash code
|
|
578
|
+
def hash
|
|
579
|
+
[address_id, district, address1, address2, address3, locality, administrative_area, country, postal_code, create_time, last_used_time, first_name, middle_name, last_name, email, country_calling_code, phone_number, number_is_voice_only, instructions].hash
|
|
580
|
+
end
|
|
581
|
+
|
|
582
|
+
# Builds the object from hash
|
|
583
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
584
|
+
# @return [Object] Returns the model itself
|
|
585
|
+
def build_from_hash(attributes)
|
|
586
|
+
return nil unless attributes.is_a?(Hash)
|
|
587
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
588
|
+
if type =~ /\AArray<(.*)>/i
|
|
589
|
+
# check to ensure the input is an array given that the the attribute
|
|
590
|
+
# is documented as an array but the input is not
|
|
591
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
592
|
+
self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
593
|
+
end
|
|
594
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
595
|
+
self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
596
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
597
|
+
end
|
|
598
|
+
|
|
599
|
+
self
|
|
600
|
+
end
|
|
601
|
+
|
|
602
|
+
# Deserializes the data based on type
|
|
603
|
+
# @param string type Data type
|
|
604
|
+
# @param string value Value to be deserialized
|
|
605
|
+
# @return [Object] Deserialized data
|
|
606
|
+
def _deserialize(type, value)
|
|
607
|
+
case type.to_sym
|
|
608
|
+
when :DateTime
|
|
609
|
+
DateTime.parse(value)
|
|
610
|
+
when :Date
|
|
611
|
+
Date.parse(value)
|
|
612
|
+
when :String
|
|
613
|
+
value.to_s
|
|
614
|
+
when :Integer
|
|
615
|
+
value.to_i
|
|
616
|
+
when :Float
|
|
617
|
+
value.to_f
|
|
618
|
+
when :BOOLEAN
|
|
619
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
620
|
+
true
|
|
621
|
+
else
|
|
622
|
+
false
|
|
623
|
+
end
|
|
624
|
+
when :Object
|
|
625
|
+
# generic object (usually a Hash), return directly
|
|
626
|
+
value
|
|
627
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
628
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
629
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
630
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
631
|
+
k_type = Regexp.last_match[:k_type]
|
|
632
|
+
v_type = Regexp.last_match[:v_type]
|
|
633
|
+
{}.tap do |hash|
|
|
634
|
+
value.each do |k, v|
|
|
635
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
636
|
+
end
|
|
637
|
+
end
|
|
638
|
+
else # model
|
|
639
|
+
temp_model = CyberSource.const_get(type).new
|
|
640
|
+
temp_model.build_from_hash(value)
|
|
641
|
+
end
|
|
642
|
+
end
|
|
643
|
+
|
|
644
|
+
# Returns the string representation of the object
|
|
645
|
+
# @return [String] String presentation of the object
|
|
646
|
+
def to_s
|
|
647
|
+
to_hash.to_s
|
|
648
|
+
end
|
|
649
|
+
|
|
650
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
651
|
+
# @return [Hash] Returns the object in the form of hash
|
|
652
|
+
def to_body
|
|
653
|
+
to_hash
|
|
654
|
+
end
|
|
655
|
+
|
|
656
|
+
# Returns the object in the form of hash
|
|
657
|
+
# @return [Hash] Returns the object in the form of hash
|
|
658
|
+
def to_hash
|
|
659
|
+
hash = {}
|
|
660
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
661
|
+
value = self.send(attr)
|
|
662
|
+
next if value.nil?
|
|
663
|
+
hash[param] = _to_hash(value)
|
|
664
|
+
end
|
|
665
|
+
hash
|
|
666
|
+
end
|
|
667
|
+
|
|
668
|
+
# Outputs non-array value in the form of hash
|
|
669
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
670
|
+
# @param [Object] value Any valid value
|
|
671
|
+
# @return [Hash] Returns the value in the form of hash
|
|
672
|
+
def _to_hash(value)
|
|
673
|
+
if value.is_a?(Array)
|
|
674
|
+
value.compact.map { |v| _to_hash(v) }
|
|
675
|
+
elsif value.is_a?(Hash)
|
|
676
|
+
{}.tap do |hash|
|
|
677
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
678
|
+
end
|
|
679
|
+
elsif value.respond_to? :to_hash
|
|
680
|
+
value.to_hash
|
|
681
|
+
else
|
|
682
|
+
value
|
|
683
|
+
end
|
|
684
|
+
end
|
|
685
|
+
end
|
|
686
|
+
end
|