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
@@ -0,0 +1,183 @@
|
|
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 PaymentInstrumentsLinks
|
17
|
+
attr_accessor :_self
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'_self' => :'self'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.swagger_types
|
28
|
+
{
|
29
|
+
:'_self' => :'TmsV1InstrumentIdentifiersPaymentInstrumentsGet200ResponseEmbeddedLinksSelf'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Initializes the object
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
35
|
+
def initialize(attributes = {})
|
36
|
+
return unless attributes.is_a?(Hash)
|
37
|
+
|
38
|
+
# convert string to symbol for hash key
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
40
|
+
|
41
|
+
if attributes.has_key?(:'self')
|
42
|
+
self._self = attributes[:'self']
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
47
|
+
# @return Array for valid properties with the reasons
|
48
|
+
def list_invalid_properties
|
49
|
+
invalid_properties = Array.new
|
50
|
+
invalid_properties
|
51
|
+
end
|
52
|
+
|
53
|
+
# Check to see if the all the properties in the model are valid
|
54
|
+
# @return true if the model is valid
|
55
|
+
def valid?
|
56
|
+
true
|
57
|
+
end
|
58
|
+
|
59
|
+
# Checks equality by comparing each attribute.
|
60
|
+
# @param [Object] Object to be compared
|
61
|
+
def ==(o)
|
62
|
+
return true if self.equal?(o)
|
63
|
+
self.class == o.class &&
|
64
|
+
_self == o._self
|
65
|
+
end
|
66
|
+
|
67
|
+
# @see the `==` method
|
68
|
+
# @param [Object] Object to be compared
|
69
|
+
def eql?(o)
|
70
|
+
self == o
|
71
|
+
end
|
72
|
+
|
73
|
+
# Calculates hash code according to all attributes.
|
74
|
+
# @return [Fixnum] Hash code
|
75
|
+
def hash
|
76
|
+
[_self].hash
|
77
|
+
end
|
78
|
+
|
79
|
+
# Builds the object from hash
|
80
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
81
|
+
# @return [Object] Returns the model itself
|
82
|
+
def build_from_hash(attributes)
|
83
|
+
return nil unless attributes.is_a?(Hash)
|
84
|
+
self.class.swagger_types.each_pair do |key, type|
|
85
|
+
if type =~ /\AArray<(.*)>/i
|
86
|
+
# check to ensure the input is an array given that the the attribute
|
87
|
+
# is documented as an array but the input is not
|
88
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
89
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
90
|
+
end
|
91
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
92
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
93
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
94
|
+
end
|
95
|
+
|
96
|
+
self
|
97
|
+
end
|
98
|
+
|
99
|
+
# Deserializes the data based on type
|
100
|
+
# @param string type Data type
|
101
|
+
# @param string value Value to be deserialized
|
102
|
+
# @return [Object] Deserialized data
|
103
|
+
def _deserialize(type, value)
|
104
|
+
case type.to_sym
|
105
|
+
when :DateTime
|
106
|
+
DateTime.parse(value)
|
107
|
+
when :Date
|
108
|
+
Date.parse(value)
|
109
|
+
when :String
|
110
|
+
value.to_s
|
111
|
+
when :Integer
|
112
|
+
value.to_i
|
113
|
+
when :Float
|
114
|
+
value.to_f
|
115
|
+
when :BOOLEAN
|
116
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
117
|
+
true
|
118
|
+
else
|
119
|
+
false
|
120
|
+
end
|
121
|
+
when :Object
|
122
|
+
# generic object (usually a Hash), return directly
|
123
|
+
value
|
124
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
125
|
+
inner_type = Regexp.last_match[:inner_type]
|
126
|
+
value.map { |v| _deserialize(inner_type, v) }
|
127
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
128
|
+
k_type = Regexp.last_match[:k_type]
|
129
|
+
v_type = Regexp.last_match[:v_type]
|
130
|
+
{}.tap do |hash|
|
131
|
+
value.each do |k, v|
|
132
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
133
|
+
end
|
134
|
+
end
|
135
|
+
else # model
|
136
|
+
temp_model = CyberSource.const_get(type).new
|
137
|
+
temp_model.build_from_hash(value)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
# Returns the string representation of the object
|
142
|
+
# @return [String] String presentation of the object
|
143
|
+
def to_s
|
144
|
+
to_hash.to_s
|
145
|
+
end
|
146
|
+
|
147
|
+
# to_body is an alias to to_hash (backward compatibility)
|
148
|
+
# @return [Hash] Returns the object in the form of hash
|
149
|
+
def to_body
|
150
|
+
to_hash
|
151
|
+
end
|
152
|
+
|
153
|
+
# Returns the object in the form of hash
|
154
|
+
# @return [Hash] Returns the object in the form of hash
|
155
|
+
def to_hash
|
156
|
+
hash = {}
|
157
|
+
self.class.attribute_map.each_pair do |attr, param|
|
158
|
+
value = self.send(attr)
|
159
|
+
next if value.nil?
|
160
|
+
hash[param] = _to_hash(value)
|
161
|
+
end
|
162
|
+
hash
|
163
|
+
end
|
164
|
+
|
165
|
+
# Outputs non-array value in the form of hash
|
166
|
+
# For object, use to_hash. Otherwise, just return the value
|
167
|
+
# @param [Object] value Any valid value
|
168
|
+
# @return [Hash] Returns the value in the form of hash
|
169
|
+
def _to_hash(value)
|
170
|
+
if value.is_a?(Array)
|
171
|
+
value.compact.map { |v| _to_hash(v) }
|
172
|
+
elsif value.is_a?(Hash)
|
173
|
+
{}.tap do |hash|
|
174
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
175
|
+
end
|
176
|
+
elsif value.respond_to? :to_hash
|
177
|
+
value.to_hash
|
178
|
+
else
|
179
|
+
value
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
183
|
+
end
|
@@ -17,7 +17,7 @@ module CyberSource
|
|
17
17
|
# Customer's identification number. **Important**: Contact your TeleCheck representative to learn whether this field is required or optional.
|
18
18
|
attr_accessor :id
|
19
19
|
|
20
|
-
# Type of personal identification.
|
20
|
+
# Type of personal identification. **Important**: Contact your TeleCheck representative to learn whether this field is required or optional. Valid values: - driver license
|
21
21
|
attr_accessor :type
|
22
22
|
|
23
23
|
attr_accessor :issued_by
|
@@ -0,0 +1,392 @@
|
|
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 PredefinedSubscriptionRequestBean
|
17
|
+
# Valid Report Definition Name
|
18
|
+
attr_accessor :report_definition_name
|
19
|
+
|
20
|
+
# The subscription type for which report definition is required. Valid values are CLASSIC and STANDARD. Valid Values: - CLASSIC - STANDARD
|
21
|
+
attr_accessor :subscription_type
|
22
|
+
|
23
|
+
attr_accessor :report_name
|
24
|
+
|
25
|
+
# Report Format Valid Values: - application/xml - text/csv
|
26
|
+
attr_accessor :report_mime_type
|
27
|
+
|
28
|
+
# 'The frequency for which subscription is created. For Standard we can have DAILY, WEEKLY and MONTHLY. But for Classic we will have only DAILY.' Valid Values: - 'DAILY' - 'WEEKLY' - 'MONTHLY' - 'USER_DEFINED'
|
29
|
+
attr_accessor :report_frequency
|
30
|
+
|
31
|
+
# If the reportFrequency is User-defined, reportInterval should be in **ISO 8601 time format** Please refer the following link to know more about ISO 8601 format.[Rfc Time Format](https://en.wikipedia.org/wiki/ISO_8601#Durations) **Example time format for 2 hours and 30 Mins:** - PT2H30M **NOTE: Do not document reportInterval field in developer center**
|
32
|
+
attr_accessor :report_interval
|
33
|
+
|
34
|
+
# By Default the timezone for Standard subscription is PST. And for Classic subscription it will be GMT. If user provides any other time zone apart from PST for Standard subscription api should error out.
|
35
|
+
attr_accessor :timezone
|
36
|
+
|
37
|
+
# The hour at which the report generation should start. It should be in hhmm format. By Default it will be 0000. The format is 24 hours format.
|
38
|
+
attr_accessor :start_time
|
39
|
+
|
40
|
+
# This is the start day if the frequency is WEEKLY or MONTHLY. The value varies from 1-7 for WEEKLY and 1-31 for MONTHLY. For WEEKLY 1 means Sunday and 7 means Saturday. By default the value is 1.
|
41
|
+
attr_accessor :start_day
|
42
|
+
|
43
|
+
# The status for subscription which is either created or updated. By default it is ACTIVE. Valid Values: - ACTIVE - INACTIVE
|
44
|
+
attr_accessor :subscription_status
|
45
|
+
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
47
|
+
def self.attribute_map
|
48
|
+
{
|
49
|
+
:'report_definition_name' => :'reportDefinitionName',
|
50
|
+
:'subscription_type' => :'subscriptionType',
|
51
|
+
:'report_name' => :'reportName',
|
52
|
+
:'report_mime_type' => :'reportMimeType',
|
53
|
+
:'report_frequency' => :'reportFrequency',
|
54
|
+
:'report_interval' => :'reportInterval',
|
55
|
+
:'timezone' => :'timezone',
|
56
|
+
:'start_time' => :'startTime',
|
57
|
+
:'start_day' => :'startDay',
|
58
|
+
:'subscription_status' => :'subscriptionStatus'
|
59
|
+
}
|
60
|
+
end
|
61
|
+
|
62
|
+
# Attribute type mapping.
|
63
|
+
def self.swagger_types
|
64
|
+
{
|
65
|
+
:'report_definition_name' => :'String',
|
66
|
+
:'subscription_type' => :'String',
|
67
|
+
:'report_name' => :'String',
|
68
|
+
:'report_mime_type' => :'String',
|
69
|
+
:'report_frequency' => :'String',
|
70
|
+
:'report_interval' => :'String',
|
71
|
+
:'timezone' => :'String',
|
72
|
+
:'start_time' => :'String',
|
73
|
+
:'start_day' => :'Integer',
|
74
|
+
:'subscription_status' => :'String'
|
75
|
+
}
|
76
|
+
end
|
77
|
+
|
78
|
+
# Initializes the object
|
79
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
80
|
+
def initialize(attributes = {})
|
81
|
+
return unless attributes.is_a?(Hash)
|
82
|
+
|
83
|
+
# convert string to symbol for hash key
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
85
|
+
|
86
|
+
if attributes.has_key?(:'reportDefinitionName')
|
87
|
+
self.report_definition_name = attributes[:'reportDefinitionName']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.has_key?(:'subscriptionType')
|
91
|
+
self.subscription_type = attributes[:'subscriptionType']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.has_key?(:'reportName')
|
95
|
+
self.report_name = attributes[:'reportName']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.has_key?(:'reportMimeType')
|
99
|
+
self.report_mime_type = attributes[:'reportMimeType']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.has_key?(:'reportFrequency')
|
103
|
+
self.report_frequency = attributes[:'reportFrequency']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.has_key?(:'reportInterval')
|
107
|
+
self.report_interval = attributes[:'reportInterval']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.has_key?(:'timezone')
|
111
|
+
self.timezone = attributes[:'timezone']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.has_key?(:'startTime')
|
115
|
+
self.start_time = attributes[:'startTime']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.has_key?(:'startDay')
|
119
|
+
self.start_day = attributes[:'startDay']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.has_key?(:'subscriptionStatus')
|
123
|
+
self.subscription_status = attributes[:'subscriptionStatus']
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
128
|
+
# @return Array for valid properties with the reasons
|
129
|
+
def list_invalid_properties
|
130
|
+
invalid_properties = Array.new
|
131
|
+
if @report_definition_name.nil?
|
132
|
+
invalid_properties.push('invalid value for "report_definition_name", report_definition_name cannot be nil.')
|
133
|
+
end
|
134
|
+
|
135
|
+
if @report_definition_name.to_s.length > 80
|
136
|
+
invalid_properties.push('invalid value for "report_definition_name", the character length must be smaller than or equal to 80.')
|
137
|
+
end
|
138
|
+
|
139
|
+
if @report_definition_name.to_s.length < 1
|
140
|
+
invalid_properties.push('invalid value for "report_definition_name", the character length must be great than or equal to 1.')
|
141
|
+
end
|
142
|
+
|
143
|
+
#if @report_definition_name !~ Regexp.new(/[a-zA-Z]+/)
|
144
|
+
#invalid_properties.push('invalid value for "report_definition_name", must conform to the pattern /[a-zA-Z]+/.')
|
145
|
+
#end
|
146
|
+
|
147
|
+
if @subscription_type.nil?
|
148
|
+
invalid_properties.push('invalid value for "subscription_type", subscription_type cannot be nil.')
|
149
|
+
end
|
150
|
+
|
151
|
+
if !@report_name.nil? && @report_name.to_s.length > 128
|
152
|
+
invalid_properties.push('invalid value for "report_name", the character length must be smaller than or equal to 128.')
|
153
|
+
end
|
154
|
+
|
155
|
+
if !@report_name.nil? && @report_name.to_s.length < 1
|
156
|
+
invalid_properties.push('invalid value for "report_name", the character length must be great than or equal to 1.')
|
157
|
+
end
|
158
|
+
|
159
|
+
#if !@report_name.nil? && @report_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/)
|
160
|
+
#invalid_properties.push('invalid value for "report_name", must conform to the pattern /[a-zA-Z0-9-_ ]+/.')
|
161
|
+
#end
|
162
|
+
|
163
|
+
#if !@report_interval.nil? && @report_interval !~ Regexp.new(/^PT((([1-9]|1[0-9]|2[0-3])H(([1-9]|[1-4][0-9]|5[0-9])M)?)|((([1-9]|1[0-9]|2[0-3])H)?([1-9]|[1-4][0-9]|5[0-9])M))$/)
|
164
|
+
#invalid_properties.push('invalid value for "report_interval", must conform to the pattern /^PT((([1-9]|1[0-9]|2[0-3])H(([1-9]|[1-4][0-9]|5[0-9])M)?)|((([1-9]|1[0-9]|2[0-3])H)?([1-9]|[1-4][0-9]|5[0-9])M))$/.')
|
165
|
+
#end
|
166
|
+
|
167
|
+
if !@start_day.nil? && @start_day > 31
|
168
|
+
invalid_properties.push('invalid value for "start_day", must be smaller than or equal to 31.')
|
169
|
+
end
|
170
|
+
|
171
|
+
if !@start_day.nil? && @start_day < 1
|
172
|
+
invalid_properties.push('invalid value for "start_day", must be greater than or equal to 1.')
|
173
|
+
end
|
174
|
+
|
175
|
+
invalid_properties
|
176
|
+
end
|
177
|
+
|
178
|
+
# Check to see if the all the properties in the model are valid
|
179
|
+
# @return true if the model is valid
|
180
|
+
def valid?
|
181
|
+
return false if @report_definition_name.nil?
|
182
|
+
return false if @report_definition_name.to_s.length > 80
|
183
|
+
return false if @report_definition_name.to_s.length < 1
|
184
|
+
#return false if @report_definition_name !~ Regexp.new(/[a-zA-Z]+/)
|
185
|
+
return false if @subscription_type.nil?
|
186
|
+
return false if !@report_name.nil? && @report_name.to_s.length > 128
|
187
|
+
return false if !@report_name.nil? && @report_name.to_s.length < 1
|
188
|
+
#return false if !@report_name.nil? && @report_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/)
|
189
|
+
#return false if !@report_interval.nil? && @report_interval !~ Regexp.new(/^PT((([1-9]|1[0-9]|2[0-3])H(([1-9]|[1-4][0-9]|5[0-9])M)?)|((([1-9]|1[0-9]|2[0-3])H)?([1-9]|[1-4][0-9]|5[0-9])M))$/)
|
190
|
+
return false if !@start_day.nil? && @start_day > 31
|
191
|
+
return false if !@start_day.nil? && @start_day < 1
|
192
|
+
true
|
193
|
+
end
|
194
|
+
|
195
|
+
# Custom attribute writer method with validation
|
196
|
+
# @param [Object] report_definition_name Value to be assigned
|
197
|
+
def report_definition_name=(report_definition_name)
|
198
|
+
if report_definition_name.nil?
|
199
|
+
fail ArgumentError, 'report_definition_name cannot be nil'
|
200
|
+
end
|
201
|
+
|
202
|
+
if report_definition_name.to_s.length > 80
|
203
|
+
fail ArgumentError, 'invalid value for "report_definition_name", the character length must be smaller than or equal to 80.'
|
204
|
+
end
|
205
|
+
|
206
|
+
if report_definition_name.to_s.length < 1
|
207
|
+
fail ArgumentError, 'invalid value for "report_definition_name", the character length must be great than or equal to 1.'
|
208
|
+
end
|
209
|
+
|
210
|
+
#if report_definition_name !~ Regexp.new(/[a-zA-Z]+/)
|
211
|
+
#fail ArgumentError, 'invalid value for "report_definition_name", must conform to the pattern /[a-zA-Z]+/.'
|
212
|
+
#end
|
213
|
+
|
214
|
+
@report_definition_name = report_definition_name
|
215
|
+
end
|
216
|
+
|
217
|
+
# Custom attribute writer method with validation
|
218
|
+
# @param [Object] report_name Value to be assigned
|
219
|
+
def report_name=(report_name)
|
220
|
+
if !report_name.nil? && report_name.to_s.length > 128
|
221
|
+
fail ArgumentError, 'invalid value for "report_name", the character length must be smaller than or equal to 128.'
|
222
|
+
end
|
223
|
+
|
224
|
+
if !report_name.nil? && report_name.to_s.length < 1
|
225
|
+
fail ArgumentError, 'invalid value for "report_name", the character length must be great than or equal to 1.'
|
226
|
+
end
|
227
|
+
|
228
|
+
#if !report_name.nil? && report_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/)
|
229
|
+
#fail ArgumentError, 'invalid value for "report_name", must conform to the pattern /[a-zA-Z0-9-_ ]+/.'
|
230
|
+
#end
|
231
|
+
|
232
|
+
@report_name = report_name
|
233
|
+
end
|
234
|
+
|
235
|
+
# Custom attribute writer method with validation
|
236
|
+
# @param [Object] report_interval Value to be assigned
|
237
|
+
def report_interval=(report_interval)
|
238
|
+
#if !report_interval.nil? && report_interval !~ Regexp.new(/^PT((([1-9]|1[0-9]|2[0-3])H(([1-9]|[1-4][0-9]|5[0-9])M)?)|((([1-9]|1[0-9]|2[0-3])H)?([1-9]|[1-4][0-9]|5[0-9])M))$/)
|
239
|
+
#fail ArgumentError, 'invalid value for "report_interval", must conform to the pattern /^PT((([1-9]|1[0-9]|2[0-3])H(([1-9]|[1-4][0-9]|5[0-9])M)?)|((([1-9]|1[0-9]|2[0-3])H)?([1-9]|[1-4][0-9]|5[0-9])M))$/.'
|
240
|
+
#end
|
241
|
+
|
242
|
+
@report_interval = report_interval
|
243
|
+
end
|
244
|
+
|
245
|
+
# Custom attribute writer method with validation
|
246
|
+
# @param [Object] start_day Value to be assigned
|
247
|
+
def start_day=(start_day)
|
248
|
+
if !start_day.nil? && start_day > 31
|
249
|
+
fail ArgumentError, 'invalid value for "start_day", must be smaller than or equal to 31.'
|
250
|
+
end
|
251
|
+
|
252
|
+
if !start_day.nil? && start_day < 1
|
253
|
+
fail ArgumentError, 'invalid value for "start_day", must be greater than or equal to 1.'
|
254
|
+
end
|
255
|
+
|
256
|
+
@start_day = start_day
|
257
|
+
end
|
258
|
+
|
259
|
+
# Checks equality by comparing each attribute.
|
260
|
+
# @param [Object] Object to be compared
|
261
|
+
def ==(o)
|
262
|
+
return true if self.equal?(o)
|
263
|
+
self.class == o.class &&
|
264
|
+
report_definition_name == o.report_definition_name &&
|
265
|
+
subscription_type == o.subscription_type &&
|
266
|
+
report_name == o.report_name &&
|
267
|
+
report_mime_type == o.report_mime_type &&
|
268
|
+
report_frequency == o.report_frequency &&
|
269
|
+
report_interval == o.report_interval &&
|
270
|
+
timezone == o.timezone &&
|
271
|
+
start_time == o.start_time &&
|
272
|
+
start_day == o.start_day &&
|
273
|
+
subscription_status == o.subscription_status
|
274
|
+
end
|
275
|
+
|
276
|
+
# @see the `==` method
|
277
|
+
# @param [Object] Object to be compared
|
278
|
+
def eql?(o)
|
279
|
+
self == o
|
280
|
+
end
|
281
|
+
|
282
|
+
# Calculates hash code according to all attributes.
|
283
|
+
# @return [Fixnum] Hash code
|
284
|
+
def hash
|
285
|
+
[report_definition_name, subscription_type, report_name, report_mime_type, report_frequency, report_interval, timezone, start_time, start_day, subscription_status].hash
|
286
|
+
end
|
287
|
+
|
288
|
+
# Builds the object from hash
|
289
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
290
|
+
# @return [Object] Returns the model itself
|
291
|
+
def build_from_hash(attributes)
|
292
|
+
return nil unless attributes.is_a?(Hash)
|
293
|
+
self.class.swagger_types.each_pair do |key, type|
|
294
|
+
if type =~ /\AArray<(.*)>/i
|
295
|
+
# check to ensure the input is an array given that the the attribute
|
296
|
+
# is documented as an array but the input is not
|
297
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
298
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
299
|
+
end
|
300
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
301
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
302
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
303
|
+
end
|
304
|
+
|
305
|
+
self
|
306
|
+
end
|
307
|
+
|
308
|
+
# Deserializes the data based on type
|
309
|
+
# @param string type Data type
|
310
|
+
# @param string value Value to be deserialized
|
311
|
+
# @return [Object] Deserialized data
|
312
|
+
def _deserialize(type, value)
|
313
|
+
case type.to_sym
|
314
|
+
when :DateTime
|
315
|
+
DateTime.parse(value)
|
316
|
+
when :Date
|
317
|
+
Date.parse(value)
|
318
|
+
when :String
|
319
|
+
value.to_s
|
320
|
+
when :Integer
|
321
|
+
value.to_i
|
322
|
+
when :Float
|
323
|
+
value.to_f
|
324
|
+
when :BOOLEAN
|
325
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
326
|
+
true
|
327
|
+
else
|
328
|
+
false
|
329
|
+
end
|
330
|
+
when :Object
|
331
|
+
# generic object (usually a Hash), return directly
|
332
|
+
value
|
333
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
334
|
+
inner_type = Regexp.last_match[:inner_type]
|
335
|
+
value.map { |v| _deserialize(inner_type, v) }
|
336
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
337
|
+
k_type = Regexp.last_match[:k_type]
|
338
|
+
v_type = Regexp.last_match[:v_type]
|
339
|
+
{}.tap do |hash|
|
340
|
+
value.each do |k, v|
|
341
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
342
|
+
end
|
343
|
+
end
|
344
|
+
else # model
|
345
|
+
temp_model = CyberSource.const_get(type).new
|
346
|
+
temp_model.build_from_hash(value)
|
347
|
+
end
|
348
|
+
end
|
349
|
+
|
350
|
+
# Returns the string representation of the object
|
351
|
+
# @return [String] String presentation of the object
|
352
|
+
def to_s
|
353
|
+
to_hash.to_s
|
354
|
+
end
|
355
|
+
|
356
|
+
# to_body is an alias to to_hash (backward compatibility)
|
357
|
+
# @return [Hash] Returns the object in the form of hash
|
358
|
+
def to_body
|
359
|
+
to_hash
|
360
|
+
end
|
361
|
+
|
362
|
+
# Returns the object in the form of hash
|
363
|
+
# @return [Hash] Returns the object in the form of hash
|
364
|
+
def to_hash
|
365
|
+
hash = {}
|
366
|
+
self.class.attribute_map.each_pair do |attr, param|
|
367
|
+
value = self.send(attr)
|
368
|
+
next if value.nil?
|
369
|
+
hash[param] = _to_hash(value)
|
370
|
+
end
|
371
|
+
hash
|
372
|
+
end
|
373
|
+
|
374
|
+
# Outputs non-array value in the form of hash
|
375
|
+
# For object, use to_hash. Otherwise, just return the value
|
376
|
+
# @param [Object] value Any valid value
|
377
|
+
# @return [Hash] Returns the value in the form of hash
|
378
|
+
def _to_hash(value)
|
379
|
+
if value.is_a?(Array)
|
380
|
+
value.compact.map { |v| _to_hash(v) }
|
381
|
+
elsif value.is_a?(Hash)
|
382
|
+
{}.tap do |hash|
|
383
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
384
|
+
end
|
385
|
+
elsif value.respond_to? :to_hash
|
386
|
+
value.to_hash
|
387
|
+
else
|
388
|
+
value
|
389
|
+
end
|
390
|
+
end
|
391
|
+
end
|
392
|
+
end
|