cybersource_rest_client 0.0.53 → 0.0.55
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/AuthenticationSDK/authentication/http/GetSignatureParameter.rb +2 -2
- data/lib/AuthenticationSDK/authentication/http/HttpSignatureHeader.rb +6 -6
- data/lib/AuthenticationSDK/core/MerchantConfig.rb +6 -0
- data/lib/AuthenticationSDK/util/Cache.rb +15 -1
- data/lib/AuthenticationSDK/util/Constants.rb +1 -1
- data/lib/AuthenticationSDK/util/JWEUtility.rb +14 -0
- data/lib/cybersource_rest_client/api/batches_api.rb +12 -12
- data/lib/cybersource_rest_client/api/billing_agreements_api.rb +231 -0
- data/lib/cybersource_rest_client/api/decision_manager_api.rb +142 -0
- data/lib/cybersource_rest_client/api/invoice_settings_api.rb +2 -2
- data/lib/cybersource_rest_client/api/invoices_api.rb +6 -6
- data/lib/cybersource_rest_client/api/keymanagement_api.rb +3 -3
- data/lib/cybersource_rest_client/api/payments_api.rb +2 -2
- data/lib/cybersource_rest_client/api/plans_api.rb +32 -32
- data/lib/cybersource_rest_client/api/subscriptions_api.rb +32 -32
- data/lib/cybersource_rest_client/api/void_api.rb +2 -2
- data/lib/cybersource_rest_client/models/access_token_response.rb +244 -244
- data/lib/cybersource_rest_client/models/activate_deactivate_plan_response.rb +239 -0
- data/lib/cybersource_rest_client/models/{inline_response_200_9.rb → activate_subscription_response.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_9_subscription_information.rb → activate_subscription_response_subscription_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/bad_request_error.rb +192 -192
- data/lib/cybersource_rest_client/models/{inline_response_202_1.rb → cancel_subscription_response.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_202_subscription_information.rb → cancel_subscription_response_subscription_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/case_management_actions_request.rb +200 -0
- data/lib/cybersource_rest_client/models/case_management_comments_request.rb +206 -0
- data/lib/cybersource_rest_client/models/create_access_token_request.rb +254 -254
- data/lib/cybersource_rest_client/models/{inline_response_200_14.rb → create_billing_agreement.rb} +65 -88
- data/lib/cybersource_rest_client/models/create_bundled_decision_manager_case_request.rb +15 -5
- data/lib/cybersource_rest_client/models/create_plan_response.rb +239 -0
- data/lib/cybersource_rest_client/models/{inline_response_201_plan_information.rb → create_plan_response_plan_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/create_subscription_request.rb +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_201_1.rb → create_subscription_response.rb} +3 -3
- data/lib/cybersource_rest_client/models/{inline_response_201_1__links.rb → create_subscription_response__links.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_201_1_subscription_information.rb → create_subscription_response_subscription_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/delete_plan_response.rb +202 -0
- data/lib/cybersource_rest_client/models/{inline_response_202_2.rb → get_all_plans_response.rb} +31 -18
- data/lib/cybersource_rest_client/models/{inline_response_200__links.rb → get_all_plans_response__links.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_order_information.rb → get_all_plans_response_order_information.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_order_information_amount_details.rb → get_all_plans_response_order_information_amount_details.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_plan_information.rb → get_all_plans_response_plan_information.rb} +3 -3
- data/lib/cybersource_rest_client/models/{inline_response_200_plan_information_billing_cycles.rb → get_all_plans_response_plan_information_billing_cycles.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_plan_information_billing_period.rb → get_all_plans_response_plan_information_billing_period.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_plans.rb → get_all_plans_response_plans.rb} +3 -3
- data/lib/cybersource_rest_client/models/{inline_response_200_6.rb → get_all_subscriptions_response.rb} +3 -3
- data/lib/cybersource_rest_client/models/{inline_response_200_6__links.rb → get_all_subscriptions_response__links.rb} +1 -1
- data/lib/cybersource_rest_client/models/get_all_subscriptions_response_order_information.rb +200 -0
- data/lib/cybersource_rest_client/models/{inline_response_200_6_order_information_bill_to.rb → get_all_subscriptions_response_order_information_bill_to.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_6_payment_information.rb → get_all_subscriptions_response_payment_information.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_6_payment_information_customer.rb → get_all_subscriptions_response_payment_information_customer.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_6_plan_information.rb → get_all_subscriptions_response_plan_information.rb} +3 -3
- data/lib/cybersource_rest_client/models/{inline_response_200_6_plan_information_billing_cycles.rb → get_all_subscriptions_response_plan_information_billing_cycles.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_6_subscription_information.rb → get_all_subscriptions_response_subscription_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_6_subscriptions.rb → get_all_subscriptions_response_subscriptions.rb} +6 -6
- data/lib/cybersource_rest_client/models/{inline_response_200_5.rb → get_plan_code_response.rb} +1 -1
- data/lib/cybersource_rest_client/models/get_plan_response.rb +238 -0
- data/lib/cybersource_rest_client/models/{inline_response_200_10.rb → get_subscription_code_response.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_7.rb → get_subscription_response.rb} +6 -6
- data/lib/cybersource_rest_client/models/inline_response_200.rb +30 -25
- data/lib/cybersource_rest_client/models/inline_response_200_1.rb +50 -40
- data/lib/cybersource_rest_client/models/{inline_response_200_11_keys.rb → inline_response_200_1_keys.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_200_2.rb +67 -17
- data/lib/cybersource_rest_client/models/{inline_response_200_12__embedded.rb → inline_response_200_2__embedded.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_12__embedded__links.rb → inline_response_200_2__embedded__links.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_12__embedded__links_reports.rb → inline_response_200_2__embedded__links_reports.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_12__embedded_batches.rb → inline_response_200_2__embedded_batches.rb} +3 -3
- data/lib/cybersource_rest_client/models/{inline_response_200_12__embedded_totals.rb → inline_response_200_2__embedded_totals.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_12__links.rb → inline_response_200_2__links.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_200_3.rb +81 -29
- data/lib/cybersource_rest_client/models/{inline_response_200_13__links.rb → inline_response_200_3__links.rb} +3 -3
- data/lib/cybersource_rest_client/models/{inline_response_202_2__links_status.rb → inline_response_200_3__links_report.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_13_billing.rb → inline_response_200_3_billing.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_200_4.rb +96 -42
- data/lib/cybersource_rest_client/models/{inline_response_200_14_records.rb → inline_response_200_4_records.rb} +3 -3
- data/lib/cybersource_rest_client/models/{inline_response_200_14_response_record.rb → inline_response_200_4_response_record.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_14_response_record_additional_updates.rb → inline_response_200_4_response_record_additional_updates.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_14_source_record.rb → inline_response_200_4_source_record.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_200__embedded.rb +201 -0
- data/lib/cybersource_rest_client/models/inline_response_200__embedded_capture.rb +202 -0
- data/lib/cybersource_rest_client/models/inline_response_200__embedded_capture__links.rb +191 -0
- data/lib/cybersource_rest_client/models/inline_response_200__embedded_capture__links_self.rb +203 -0
- data/lib/cybersource_rest_client/models/inline_response_200__embedded_reversal.rb +202 -0
- data/lib/cybersource_rest_client/models/inline_response_200__embedded_reversal__links.rb +191 -0
- data/lib/cybersource_rest_client/models/inline_response_200__embedded_reversal__links_self.rb +203 -0
- data/lib/cybersource_rest_client/models/inline_response_201.rb +7 -27
- data/lib/cybersource_rest_client/models/inline_response_202.rb +17 -45
- data/lib/cybersource_rest_client/models/{inline_response_202_2__links.rb → inline_response_202__links.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_13__links_report.rb → inline_response_202__links_status.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_400_1.rb +3 -3
- data/lib/cybersource_rest_client/models/inline_response_400_2.rb +1 -1
- data/lib/cybersource_rest_client/models/inline_response_400_3.rb +37 -60
- data/lib/cybersource_rest_client/models/inline_response_400_4.rb +61 -37
- data/lib/cybersource_rest_client/models/{inline_response_400_3_fields.rb → inline_response_400_4_fields.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_400_5.rb +10 -11
- data/lib/cybersource_rest_client/models/inline_response_400_6.rb +35 -75
- data/lib/cybersource_rest_client/models/inline_response_400_7.rb +276 -0
- data/lib/cybersource_rest_client/models/{inline_response_400_6_details.rb → inline_response_400_7_details.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_403_1.rb +236 -0
- data/lib/cybersource_rest_client/models/inline_response_422.rb +236 -0
- data/lib/cybersource_rest_client/models/inline_response_500_1.rb +20 -8
- data/lib/cybersource_rest_client/models/inline_response_500_2.rb +224 -0
- data/lib/cybersource_rest_client/models/inline_response_502.rb +13 -12
- data/lib/cybersource_rest_client/models/inline_response_502_1.rb +235 -0
- data/lib/cybersource_rest_client/models/inline_response_503.rb +236 -0
- data/lib/cybersource_rest_client/models/{inline_response_200_12.rb → intimate_billing_agreement.rb} +37 -59
- data/lib/cybersource_rest_client/models/invoicing_v2_invoices_all_get200_response.rb +1 -1
- data/lib/cybersource_rest_client/models/modify_billing_agreement.rb +270 -0
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_1.rb +239 -0
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_1_installment_information.rb +197 -0
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_1_processor_information.rb +214 -0
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_aggregator_information.rb +207 -0
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_consumer_authentication_information.rb +242 -0
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_device_information.rb +231 -0
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_installment_information.rb +327 -0
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_merchant_information.rb +235 -0
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_merchant_information_merchant_descriptor.rb +242 -0
- data/lib/cybersource_rest_client/models/{inline_response_200_6_order_information.rb → ptsv2billingagreements_order_information.rb} +3 -3
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_order_information_bill_to.rb +401 -0
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_payment_information.rb +200 -0
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_payment_information_card.rb +259 -0
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_payment_information_tokenized_card.rb +276 -0
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_processing_information.rb +210 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information.rb +12 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options.rb +16 -5
- data/lib/cybersource_rest_client/models/rbsv1plans_plan_information.rb +1 -1
- data/lib/cybersource_rest_client/models/rbsv1plansid_plan_information.rb +1 -1
- data/lib/cybersource_rest_client/models/rbsv1subscriptions_plan_information.rb +1 -1
- data/lib/cybersource_rest_client/models/resource_not_found_error.rb +192 -192
- data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_consumer_authentication_information.rb +1 -1
- data/lib/cybersource_rest_client/models/riskv1authenticationsetups_token_information.rb +22 -5
- data/lib/cybersource_rest_client/models/riskv1decisions_order_information.rb +12 -1
- data/lib/cybersource_rest_client/models/riskv1decisions_processing_information.rb +1 -1
- data/lib/cybersource_rest_client/models/riskv1decisions_token_information.rb +197 -0
- data/lib/cybersource_rest_client/models/riskv1decisionsidactions_decision_information.rb +208 -0
- data/lib/cybersource_rest_client/models/riskv1decisionsidactions_processing_information.rb +193 -0
- data/lib/cybersource_rest_client/models/suspend_subscription_response.rb +239 -0
- data/lib/cybersource_rest_client/models/{inline_response_202_1_subscription_information.rb → suspend_subscription_response_subscription_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/unauthorized_client_error.rb +192 -192
- data/lib/cybersource_rest_client/models/update_plan_request.rb +1 -1
- data/lib/cybersource_rest_client/models/update_plan_response.rb +239 -0
- data/lib/cybersource_rest_client/models/{inline_response_200_3_plan_information.rb → update_plan_response_plan_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_8.rb → update_subscription_response.rb} +3 -3
- data/lib/cybersource_rest_client/models/validate_request.rb +15 -5
- data/lib/cybersource_rest_client/utilities/jwe_utility.rb +12 -0
- data/lib/cybersource_rest_client.rb +95 -54
- metadata +112 -57
- data/lib/cybersource_rest_client/models/inline_response_200_11.rb +0 -248
- data/lib/cybersource_rest_client/models/inline_response_200_13.rb +0 -291
@@ -0,0 +1,235 @@
|
|
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 InlineResponse5021
|
17
|
+
# Time of request in UTC. Format: `YYYY-MM-DDThh:mm:ssZ` **Example** `2016-08-11T22:47:57Z` equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The `T` separates the date and the time. The `Z` indicates UTC. Returned by Cybersource for all services.
|
18
|
+
attr_accessor :submit_time_utc
|
19
|
+
|
20
|
+
# The status of the submitted transaction. Possible values: - SERVER_ERROR
|
21
|
+
attr_accessor :status
|
22
|
+
|
23
|
+
# The reason of the status. Possible values: - SYSTEM_ERROR - SERVER_TIMEOUT - SERVICE_TIMEOUT
|
24
|
+
attr_accessor :reason
|
25
|
+
|
26
|
+
# The detail message related to the status and reason listed above.
|
27
|
+
attr_accessor :message
|
28
|
+
|
29
|
+
# HTTP status code of the submitted request. Possible values: - 500
|
30
|
+
attr_accessor :status_code
|
31
|
+
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
+
def self.attribute_map
|
34
|
+
{
|
35
|
+
:'submit_time_utc' => :'submitTimeUtc',
|
36
|
+
:'status' => :'status',
|
37
|
+
:'reason' => :'reason',
|
38
|
+
:'message' => :'message',
|
39
|
+
:'status_code' => :'statusCode'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute mapping from JSON key to ruby-style variable name.
|
44
|
+
def self.json_map
|
45
|
+
{
|
46
|
+
:'submit_time_utc' => :'submit_time_utc',
|
47
|
+
:'status' => :'status',
|
48
|
+
:'reason' => :'reason',
|
49
|
+
:'message' => :'message',
|
50
|
+
:'status_code' => :'status_code'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Attribute type mapping.
|
55
|
+
def self.swagger_types
|
56
|
+
{
|
57
|
+
:'submit_time_utc' => :'String',
|
58
|
+
:'status' => :'String',
|
59
|
+
:'reason' => :'String',
|
60
|
+
:'message' => :'String',
|
61
|
+
:'status_code' => :'String'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# Initializes the object
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
67
|
+
def initialize(attributes = {})
|
68
|
+
return unless attributes.is_a?(Hash)
|
69
|
+
|
70
|
+
# convert string to symbol for hash key
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
72
|
+
|
73
|
+
if attributes.has_key?(:'submitTimeUtc')
|
74
|
+
self.submit_time_utc = attributes[:'submitTimeUtc']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'status')
|
78
|
+
self.status = attributes[:'status']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.has_key?(:'reason')
|
82
|
+
self.reason = attributes[:'reason']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.has_key?(:'message')
|
86
|
+
self.message = attributes[:'message']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.has_key?(:'statusCode')
|
90
|
+
self.status_code = attributes[:'statusCode']
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
95
|
+
# @return Array for valid properties with the reasons
|
96
|
+
def list_invalid_properties
|
97
|
+
invalid_properties = Array.new
|
98
|
+
invalid_properties
|
99
|
+
end
|
100
|
+
|
101
|
+
# Check to see if the all the properties in the model are valid
|
102
|
+
# @return true if the model is valid
|
103
|
+
def valid?
|
104
|
+
true
|
105
|
+
end
|
106
|
+
|
107
|
+
# Checks equality by comparing each attribute.
|
108
|
+
# @param [Object] Object to be compared
|
109
|
+
def ==(o)
|
110
|
+
return true if self.equal?(o)
|
111
|
+
self.class == o.class &&
|
112
|
+
submit_time_utc == o.submit_time_utc &&
|
113
|
+
status == o.status &&
|
114
|
+
reason == o.reason &&
|
115
|
+
message == o.message &&
|
116
|
+
status_code == o.status_code
|
117
|
+
end
|
118
|
+
|
119
|
+
# @see the `==` method
|
120
|
+
# @param [Object] Object to be compared
|
121
|
+
def eql?(o)
|
122
|
+
self == o
|
123
|
+
end
|
124
|
+
|
125
|
+
# Calculates hash code according to all attributes.
|
126
|
+
# @return [Fixnum] Hash code
|
127
|
+
def hash
|
128
|
+
[submit_time_utc, status, reason, message, status_code].hash
|
129
|
+
end
|
130
|
+
|
131
|
+
# Builds the object from hash
|
132
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
133
|
+
# @return [Object] Returns the model itself
|
134
|
+
def build_from_hash(attributes)
|
135
|
+
return nil unless attributes.is_a?(Hash)
|
136
|
+
self.class.swagger_types.each_pair do |key, type|
|
137
|
+
if type =~ /\AArray<(.*)>/i
|
138
|
+
# check to ensure the input is an array given that the the attribute
|
139
|
+
# is documented as an array but the input is not
|
140
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
141
|
+
self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
142
|
+
end
|
143
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
144
|
+
self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
145
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
146
|
+
end
|
147
|
+
|
148
|
+
self
|
149
|
+
end
|
150
|
+
|
151
|
+
# Deserializes the data based on type
|
152
|
+
# @param string type Data type
|
153
|
+
# @param string value Value to be deserialized
|
154
|
+
# @return [Object] Deserialized data
|
155
|
+
def _deserialize(type, value)
|
156
|
+
case type.to_sym
|
157
|
+
when :DateTime
|
158
|
+
DateTime.parse(value)
|
159
|
+
when :Date
|
160
|
+
Date.parse(value)
|
161
|
+
when :String
|
162
|
+
value.to_s
|
163
|
+
when :Integer
|
164
|
+
value.to_i
|
165
|
+
when :Float
|
166
|
+
value.to_f
|
167
|
+
when :BOOLEAN
|
168
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
169
|
+
true
|
170
|
+
else
|
171
|
+
false
|
172
|
+
end
|
173
|
+
when :Object
|
174
|
+
# generic object (usually a Hash), return directly
|
175
|
+
value
|
176
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
177
|
+
inner_type = Regexp.last_match[:inner_type]
|
178
|
+
value.map { |v| _deserialize(inner_type, v) }
|
179
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
180
|
+
k_type = Regexp.last_match[:k_type]
|
181
|
+
v_type = Regexp.last_match[:v_type]
|
182
|
+
{}.tap do |hash|
|
183
|
+
value.each do |k, v|
|
184
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
else # model
|
188
|
+
temp_model = CyberSource.const_get(type).new
|
189
|
+
temp_model.build_from_hash(value)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the string representation of the object
|
194
|
+
# @return [String] String presentation of the object
|
195
|
+
def to_s
|
196
|
+
to_hash.to_s
|
197
|
+
end
|
198
|
+
|
199
|
+
# to_body is an alias to to_hash (backward compatibility)
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
201
|
+
def to_body
|
202
|
+
to_hash
|
203
|
+
end
|
204
|
+
|
205
|
+
# Returns the object in the form of hash
|
206
|
+
# @return [Hash] Returns the object in the form of hash
|
207
|
+
def to_hash
|
208
|
+
hash = {}
|
209
|
+
self.class.attribute_map.each_pair do |attr, param|
|
210
|
+
value = self.send(attr)
|
211
|
+
next if value.nil?
|
212
|
+
hash[param] = _to_hash(value)
|
213
|
+
end
|
214
|
+
hash
|
215
|
+
end
|
216
|
+
|
217
|
+
# Outputs non-array value in the form of hash
|
218
|
+
# For object, use to_hash. Otherwise, just return the value
|
219
|
+
# @param [Object] value Any valid value
|
220
|
+
# @return [Hash] Returns the value in the form of hash
|
221
|
+
def _to_hash(value)
|
222
|
+
if value.is_a?(Array)
|
223
|
+
value.compact.map { |v| _to_hash(v) }
|
224
|
+
elsif value.is_a?(Hash)
|
225
|
+
{}.tap do |hash|
|
226
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
227
|
+
end
|
228
|
+
elsif value.respond_to? :to_hash
|
229
|
+
value.to_hash
|
230
|
+
else
|
231
|
+
value
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
235
|
+
end
|
@@ -0,0 +1,236 @@
|
|
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 InlineResponse503
|
17
|
+
# Time of request in UTC. Format: `YYYY-MM-DDThh:mm:ssZ` **Example** `2016-08-11T22:47:57Z` equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The `T` separates the date and the time. The `Z` indicates UTC. Returned by Cybersource for all services.
|
18
|
+
attr_accessor :submit_time_utc
|
19
|
+
|
20
|
+
# The status of the submitted transaction. Possible values: - `SERVER_ERROR`
|
21
|
+
attr_accessor :status
|
22
|
+
|
23
|
+
# The reason of the status. Possible Values: - `INTERNAL_SERVICE_ERROR`
|
24
|
+
attr_accessor :reason
|
25
|
+
|
26
|
+
# Service is unavailable.
|
27
|
+
attr_accessor :message
|
28
|
+
|
29
|
+
attr_accessor :details
|
30
|
+
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'submit_time_utc' => :'submitTimeUtc',
|
35
|
+
:'status' => :'status',
|
36
|
+
:'reason' => :'reason',
|
37
|
+
:'message' => :'message',
|
38
|
+
:'details' => :'details'
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
# Attribute mapping from JSON key to ruby-style variable name.
|
43
|
+
def self.json_map
|
44
|
+
{
|
45
|
+
:'submit_time_utc' => :'submit_time_utc',
|
46
|
+
:'status' => :'status',
|
47
|
+
:'reason' => :'reason',
|
48
|
+
:'message' => :'message',
|
49
|
+
:'details' => :'details'
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# Attribute type mapping.
|
54
|
+
def self.swagger_types
|
55
|
+
{
|
56
|
+
:'submit_time_utc' => :'String',
|
57
|
+
:'status' => :'String',
|
58
|
+
:'reason' => :'String',
|
59
|
+
:'message' => :'String',
|
60
|
+
:'details' => :'Array<PtsV2PaymentsPost201ResponseErrorInformationDetails>'
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# Initializes the object
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
66
|
+
def initialize(attributes = {})
|
67
|
+
return unless attributes.is_a?(Hash)
|
68
|
+
|
69
|
+
# convert string to symbol for hash key
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
71
|
+
|
72
|
+
if attributes.has_key?(:'submitTimeUtc')
|
73
|
+
self.submit_time_utc = attributes[:'submitTimeUtc']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.has_key?(:'status')
|
77
|
+
self.status = attributes[:'status']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.has_key?(:'reason')
|
81
|
+
self.reason = attributes[:'reason']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.has_key?(:'message')
|
85
|
+
self.message = attributes[:'message']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.has_key?(:'details')
|
89
|
+
if (value = attributes[:'details']).is_a?(Array)
|
90
|
+
self.details = value
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
96
|
+
# @return Array for valid properties with the reasons
|
97
|
+
def list_invalid_properties
|
98
|
+
invalid_properties = Array.new
|
99
|
+
invalid_properties
|
100
|
+
end
|
101
|
+
|
102
|
+
# Check to see if the all the properties in the model are valid
|
103
|
+
# @return true if the model is valid
|
104
|
+
def valid?
|
105
|
+
true
|
106
|
+
end
|
107
|
+
|
108
|
+
# Checks equality by comparing each attribute.
|
109
|
+
# @param [Object] Object to be compared
|
110
|
+
def ==(o)
|
111
|
+
return true if self.equal?(o)
|
112
|
+
self.class == o.class &&
|
113
|
+
submit_time_utc == o.submit_time_utc &&
|
114
|
+
status == o.status &&
|
115
|
+
reason == o.reason &&
|
116
|
+
message == o.message &&
|
117
|
+
details == o.details
|
118
|
+
end
|
119
|
+
|
120
|
+
# @see the `==` method
|
121
|
+
# @param [Object] Object to be compared
|
122
|
+
def eql?(o)
|
123
|
+
self == o
|
124
|
+
end
|
125
|
+
|
126
|
+
# Calculates hash code according to all attributes.
|
127
|
+
# @return [Fixnum] Hash code
|
128
|
+
def hash
|
129
|
+
[submit_time_utc, status, reason, message, details].hash
|
130
|
+
end
|
131
|
+
|
132
|
+
# Builds the object from hash
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
134
|
+
# @return [Object] Returns the model itself
|
135
|
+
def build_from_hash(attributes)
|
136
|
+
return nil unless attributes.is_a?(Hash)
|
137
|
+
self.class.swagger_types.each_pair do |key, type|
|
138
|
+
if type =~ /\AArray<(.*)>/i
|
139
|
+
# check to ensure the input is an array given that the the attribute
|
140
|
+
# is documented as an array but the input is not
|
141
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
142
|
+
self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
143
|
+
end
|
144
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
145
|
+
self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
146
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
147
|
+
end
|
148
|
+
|
149
|
+
self
|
150
|
+
end
|
151
|
+
|
152
|
+
# Deserializes the data based on type
|
153
|
+
# @param string type Data type
|
154
|
+
# @param string value Value to be deserialized
|
155
|
+
# @return [Object] Deserialized data
|
156
|
+
def _deserialize(type, value)
|
157
|
+
case type.to_sym
|
158
|
+
when :DateTime
|
159
|
+
DateTime.parse(value)
|
160
|
+
when :Date
|
161
|
+
Date.parse(value)
|
162
|
+
when :String
|
163
|
+
value.to_s
|
164
|
+
when :Integer
|
165
|
+
value.to_i
|
166
|
+
when :Float
|
167
|
+
value.to_f
|
168
|
+
when :BOOLEAN
|
169
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
170
|
+
true
|
171
|
+
else
|
172
|
+
false
|
173
|
+
end
|
174
|
+
when :Object
|
175
|
+
# generic object (usually a Hash), return directly
|
176
|
+
value
|
177
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
178
|
+
inner_type = Regexp.last_match[:inner_type]
|
179
|
+
value.map { |v| _deserialize(inner_type, v) }
|
180
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
181
|
+
k_type = Regexp.last_match[:k_type]
|
182
|
+
v_type = Regexp.last_match[:v_type]
|
183
|
+
{}.tap do |hash|
|
184
|
+
value.each do |k, v|
|
185
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
else # model
|
189
|
+
temp_model = CyberSource.const_get(type).new
|
190
|
+
temp_model.build_from_hash(value)
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the string representation of the object
|
195
|
+
# @return [String] String presentation of the object
|
196
|
+
def to_s
|
197
|
+
to_hash.to_s
|
198
|
+
end
|
199
|
+
|
200
|
+
# to_body is an alias to to_hash (backward compatibility)
|
201
|
+
# @return [Hash] Returns the object in the form of hash
|
202
|
+
def to_body
|
203
|
+
to_hash
|
204
|
+
end
|
205
|
+
|
206
|
+
# Returns the object in the form of hash
|
207
|
+
# @return [Hash] Returns the object in the form of hash
|
208
|
+
def to_hash
|
209
|
+
hash = {}
|
210
|
+
self.class.attribute_map.each_pair do |attr, param|
|
211
|
+
value = self.send(attr)
|
212
|
+
next if value.nil?
|
213
|
+
hash[param] = _to_hash(value)
|
214
|
+
end
|
215
|
+
hash
|
216
|
+
end
|
217
|
+
|
218
|
+
# Outputs non-array value in the form of hash
|
219
|
+
# For object, use to_hash. Otherwise, just return the value
|
220
|
+
# @param [Object] value Any valid value
|
221
|
+
# @return [Hash] Returns the value in the form of hash
|
222
|
+
def _to_hash(value)
|
223
|
+
if value.is_a?(Array)
|
224
|
+
value.compact.map { |v| _to_hash(v) }
|
225
|
+
elsif value.is_a?(Hash)
|
226
|
+
{}.tap do |hash|
|
227
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
228
|
+
end
|
229
|
+
elsif value.respond_to? :to_hash
|
230
|
+
value.to_hash
|
231
|
+
else
|
232
|
+
value
|
233
|
+
end
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
data/lib/cybersource_rest_client/models/{inline_response_200_12.rb → intimate_billing_agreement.rb}
RENAMED
@@ -13,57 +13,47 @@ Swagger Codegen version: 2.2.3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module CyberSource
|
16
|
-
class
|
17
|
-
attr_accessor :
|
16
|
+
class IntimateBillingAgreement
|
17
|
+
attr_accessor :client_reference_information
|
18
18
|
|
19
|
-
attr_accessor :
|
19
|
+
attr_accessor :installment_information
|
20
20
|
|
21
|
-
attr_accessor :
|
21
|
+
attr_accessor :merchant_information
|
22
22
|
|
23
|
-
attr_accessor :
|
23
|
+
attr_accessor :order_information
|
24
24
|
|
25
|
-
attr_accessor :
|
26
|
-
|
27
|
-
attr_accessor :total
|
28
|
-
|
29
|
-
attr_accessor :_embedded
|
25
|
+
attr_accessor :payment_information
|
30
26
|
|
31
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
28
|
def self.attribute_map
|
33
29
|
{
|
34
|
-
:'
|
35
|
-
:'
|
36
|
-
:'
|
37
|
-
:'
|
38
|
-
:'
|
39
|
-
:'total' => :'total',
|
40
|
-
:'_embedded' => :'_embedded'
|
30
|
+
:'client_reference_information' => :'clientReferenceInformation',
|
31
|
+
:'installment_information' => :'installmentInformation',
|
32
|
+
:'merchant_information' => :'merchantInformation',
|
33
|
+
:'order_information' => :'orderInformation',
|
34
|
+
:'payment_information' => :'paymentInformation'
|
41
35
|
}
|
42
36
|
end
|
43
37
|
|
44
38
|
# Attribute mapping from JSON key to ruby-style variable name.
|
45
39
|
def self.json_map
|
46
40
|
{
|
47
|
-
:'
|
48
|
-
:'
|
49
|
-
:'
|
50
|
-
:'
|
51
|
-
:'
|
52
|
-
:'total' => :'total',
|
53
|
-
:'_embedded' => :'_embedded'
|
41
|
+
:'client_reference_information' => :'client_reference_information',
|
42
|
+
:'installment_information' => :'installment_information',
|
43
|
+
:'merchant_information' => :'merchant_information',
|
44
|
+
:'order_information' => :'order_information',
|
45
|
+
:'payment_information' => :'payment_information'
|
54
46
|
}
|
55
47
|
end
|
56
48
|
|
57
49
|
# Attribute type mapping.
|
58
50
|
def self.swagger_types
|
59
51
|
{
|
60
|
-
:'
|
61
|
-
:'
|
62
|
-
:'
|
63
|
-
:'
|
64
|
-
:'
|
65
|
-
:'total' => :'Integer',
|
66
|
-
:'_embedded' => :'InlineResponse20012Embedded'
|
52
|
+
:'client_reference_information' => :'Ptsv2paymentsClientReferenceInformation',
|
53
|
+
:'installment_information' => :'Ptsv2billingagreementsInstallmentInformation',
|
54
|
+
:'merchant_information' => :'Ptsv2billingagreementsMerchantInformation',
|
55
|
+
:'order_information' => :'Ptsv2billingagreementsOrderInformation',
|
56
|
+
:'payment_information' => :'Ptsv2billingagreementsPaymentInformation'
|
67
57
|
}
|
68
58
|
end
|
69
59
|
|
@@ -75,34 +65,24 @@ module CyberSource
|
|
75
65
|
# convert string to symbol for hash key
|
76
66
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
77
67
|
|
78
|
-
if attributes.has_key?(:'
|
79
|
-
|
80
|
-
self._links = value
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
if attributes.has_key?(:'object')
|
85
|
-
self.object = attributes[:'object']
|
86
|
-
end
|
87
|
-
|
88
|
-
if attributes.has_key?(:'offset')
|
89
|
-
self.offset = attributes[:'offset']
|
68
|
+
if attributes.has_key?(:'clientReferenceInformation')
|
69
|
+
self.client_reference_information = attributes[:'clientReferenceInformation']
|
90
70
|
end
|
91
71
|
|
92
|
-
if attributes.has_key?(:'
|
93
|
-
self.
|
72
|
+
if attributes.has_key?(:'installmentInformation')
|
73
|
+
self.installment_information = attributes[:'installmentInformation']
|
94
74
|
end
|
95
75
|
|
96
|
-
if attributes.has_key?(:'
|
97
|
-
self.
|
76
|
+
if attributes.has_key?(:'merchantInformation')
|
77
|
+
self.merchant_information = attributes[:'merchantInformation']
|
98
78
|
end
|
99
79
|
|
100
|
-
if attributes.has_key?(:'
|
101
|
-
self.
|
80
|
+
if attributes.has_key?(:'orderInformation')
|
81
|
+
self.order_information = attributes[:'orderInformation']
|
102
82
|
end
|
103
83
|
|
104
|
-
if attributes.has_key?(:'
|
105
|
-
self.
|
84
|
+
if attributes.has_key?(:'paymentInformation')
|
85
|
+
self.payment_information = attributes[:'paymentInformation']
|
106
86
|
end
|
107
87
|
end
|
108
88
|
|
@@ -124,13 +104,11 @@ module CyberSource
|
|
124
104
|
def ==(o)
|
125
105
|
return true if self.equal?(o)
|
126
106
|
self.class == o.class &&
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
total == o.total &&
|
133
|
-
_embedded == o._embedded
|
107
|
+
client_reference_information == o.client_reference_information &&
|
108
|
+
installment_information == o.installment_information &&
|
109
|
+
merchant_information == o.merchant_information &&
|
110
|
+
order_information == o.order_information &&
|
111
|
+
payment_information == o.payment_information
|
134
112
|
end
|
135
113
|
|
136
114
|
# @see the `==` method
|
@@ -142,7 +120,7 @@ module CyberSource
|
|
142
120
|
# Calculates hash code according to all attributes.
|
143
121
|
# @return [Fixnum] Hash code
|
144
122
|
def hash
|
145
|
-
[
|
123
|
+
[client_reference_information, installment_information, merchant_information, order_information, payment_information].hash
|
146
124
|
end
|
147
125
|
|
148
126
|
# Builds the object from hash
|
@@ -46,7 +46,7 @@ module CyberSource
|
|
46
46
|
# Attribute type mapping.
|
47
47
|
def self.swagger_types
|
48
48
|
{
|
49
|
-
:'_links' => :'
|
49
|
+
:'_links' => :'GetAllPlansResponseLinks',
|
50
50
|
:'submit_time_utc' => :'String',
|
51
51
|
:'total_invoices' => :'Integer',
|
52
52
|
:'invoices' => :'Array<InvoicingV2InvoicesAllGet200ResponseInvoices>'
|