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,202 @@
|
|
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 DeletePlanResponse
|
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: - COMPLETED
|
21
|
+
attr_accessor :status
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'submit_time_utc' => :'submitTimeUtc',
|
27
|
+
:'status' => :'status'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute mapping from JSON key to ruby-style variable name.
|
32
|
+
def self.json_map
|
33
|
+
{
|
34
|
+
:'submit_time_utc' => :'submit_time_utc',
|
35
|
+
:'status' => :'status'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.swagger_types
|
41
|
+
{
|
42
|
+
:'submit_time_utc' => :'String',
|
43
|
+
:'status' => :'String'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Initializes the object
|
48
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
49
|
+
def initialize(attributes = {})
|
50
|
+
return unless attributes.is_a?(Hash)
|
51
|
+
|
52
|
+
# convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
54
|
+
|
55
|
+
if attributes.has_key?(:'submitTimeUtc')
|
56
|
+
self.submit_time_utc = attributes[:'submitTimeUtc']
|
57
|
+
end
|
58
|
+
|
59
|
+
if attributes.has_key?(:'status')
|
60
|
+
self.status = attributes[:'status']
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
65
|
+
# @return Array for valid properties with the reasons
|
66
|
+
def list_invalid_properties
|
67
|
+
invalid_properties = Array.new
|
68
|
+
invalid_properties
|
69
|
+
end
|
70
|
+
|
71
|
+
# Check to see if the all the properties in the model are valid
|
72
|
+
# @return true if the model is valid
|
73
|
+
def valid?
|
74
|
+
true
|
75
|
+
end
|
76
|
+
|
77
|
+
# Checks equality by comparing each attribute.
|
78
|
+
# @param [Object] Object to be compared
|
79
|
+
def ==(o)
|
80
|
+
return true if self.equal?(o)
|
81
|
+
self.class == o.class &&
|
82
|
+
submit_time_utc == o.submit_time_utc &&
|
83
|
+
status == o.status
|
84
|
+
end
|
85
|
+
|
86
|
+
# @see the `==` method
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def eql?(o)
|
89
|
+
self == o
|
90
|
+
end
|
91
|
+
|
92
|
+
# Calculates hash code according to all attributes.
|
93
|
+
# @return [Fixnum] Hash code
|
94
|
+
def hash
|
95
|
+
[submit_time_utc, status].hash
|
96
|
+
end
|
97
|
+
|
98
|
+
# Builds the object from hash
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
100
|
+
# @return [Object] Returns the model itself
|
101
|
+
def build_from_hash(attributes)
|
102
|
+
return nil unless attributes.is_a?(Hash)
|
103
|
+
self.class.swagger_types.each_pair do |key, type|
|
104
|
+
if type =~ /\AArray<(.*)>/i
|
105
|
+
# check to ensure the input is an array given that the the attribute
|
106
|
+
# is documented as an array but the input is not
|
107
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
108
|
+
self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
109
|
+
end
|
110
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
111
|
+
self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
112
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
113
|
+
end
|
114
|
+
|
115
|
+
self
|
116
|
+
end
|
117
|
+
|
118
|
+
# Deserializes the data based on type
|
119
|
+
# @param string type Data type
|
120
|
+
# @param string value Value to be deserialized
|
121
|
+
# @return [Object] Deserialized data
|
122
|
+
def _deserialize(type, value)
|
123
|
+
case type.to_sym
|
124
|
+
when :DateTime
|
125
|
+
DateTime.parse(value)
|
126
|
+
when :Date
|
127
|
+
Date.parse(value)
|
128
|
+
when :String
|
129
|
+
value.to_s
|
130
|
+
when :Integer
|
131
|
+
value.to_i
|
132
|
+
when :Float
|
133
|
+
value.to_f
|
134
|
+
when :BOOLEAN
|
135
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
136
|
+
true
|
137
|
+
else
|
138
|
+
false
|
139
|
+
end
|
140
|
+
when :Object
|
141
|
+
# generic object (usually a Hash), return directly
|
142
|
+
value
|
143
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
144
|
+
inner_type = Regexp.last_match[:inner_type]
|
145
|
+
value.map { |v| _deserialize(inner_type, v) }
|
146
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
147
|
+
k_type = Regexp.last_match[:k_type]
|
148
|
+
v_type = Regexp.last_match[:v_type]
|
149
|
+
{}.tap do |hash|
|
150
|
+
value.each do |k, v|
|
151
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
else # model
|
155
|
+
temp_model = CyberSource.const_get(type).new
|
156
|
+
temp_model.build_from_hash(value)
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
# Returns the string representation of the object
|
161
|
+
# @return [String] String presentation of the object
|
162
|
+
def to_s
|
163
|
+
to_hash.to_s
|
164
|
+
end
|
165
|
+
|
166
|
+
# to_body is an alias to to_hash (backward compatibility)
|
167
|
+
# @return [Hash] Returns the object in the form of hash
|
168
|
+
def to_body
|
169
|
+
to_hash
|
170
|
+
end
|
171
|
+
|
172
|
+
# Returns the object in the form of hash
|
173
|
+
# @return [Hash] Returns the object in the form of hash
|
174
|
+
def to_hash
|
175
|
+
hash = {}
|
176
|
+
self.class.attribute_map.each_pair do |attr, param|
|
177
|
+
value = self.send(attr)
|
178
|
+
next if value.nil?
|
179
|
+
hash[param] = _to_hash(value)
|
180
|
+
end
|
181
|
+
hash
|
182
|
+
end
|
183
|
+
|
184
|
+
# Outputs non-array value in the form of hash
|
185
|
+
# For object, use to_hash. Otherwise, just return the value
|
186
|
+
# @param [Object] value Any valid value
|
187
|
+
# @return [Hash] Returns the value in the form of hash
|
188
|
+
def _to_hash(value)
|
189
|
+
if value.is_a?(Array)
|
190
|
+
value.compact.map { |v| _to_hash(v) }
|
191
|
+
elsif value.is_a?(Hash)
|
192
|
+
{}.tap do |hash|
|
193
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
194
|
+
end
|
195
|
+
elsif value.respond_to? :to_hash
|
196
|
+
value.to_hash
|
197
|
+
else
|
198
|
+
value
|
199
|
+
end
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
data/lib/cybersource_rest_client/models/{inline_response_202_2.rb → get_all_plans_response.rb}
RENAMED
@@ -13,20 +13,24 @@ Swagger Codegen version: 2.2.3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module CyberSource
|
16
|
-
class
|
16
|
+
class GetAllPlansResponse
|
17
17
|
attr_accessor :_links
|
18
18
|
|
19
|
-
#
|
20
|
-
attr_accessor :
|
19
|
+
# 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.
|
20
|
+
attr_accessor :submit_time_utc
|
21
21
|
|
22
|
-
|
22
|
+
# total number of plans created
|
23
|
+
attr_accessor :total_count
|
24
|
+
|
25
|
+
attr_accessor :plans
|
23
26
|
|
24
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
28
|
def self.attribute_map
|
26
29
|
{
|
27
30
|
:'_links' => :'_links',
|
28
|
-
:'
|
29
|
-
:'
|
31
|
+
:'submit_time_utc' => :'submitTimeUtc',
|
32
|
+
:'total_count' => :'totalCount',
|
33
|
+
:'plans' => :'plans'
|
30
34
|
}
|
31
35
|
end
|
32
36
|
|
@@ -34,17 +38,19 @@ module CyberSource
|
|
34
38
|
def self.json_map
|
35
39
|
{
|
36
40
|
:'_links' => :'_links',
|
37
|
-
:'
|
38
|
-
:'
|
41
|
+
:'submit_time_utc' => :'submit_time_utc',
|
42
|
+
:'total_count' => :'total_count',
|
43
|
+
:'plans' => :'plans'
|
39
44
|
}
|
40
45
|
end
|
41
46
|
|
42
47
|
# Attribute type mapping.
|
43
48
|
def self.swagger_types
|
44
49
|
{
|
45
|
-
:'_links' => :'
|
46
|
-
:'
|
47
|
-
:'
|
50
|
+
:'_links' => :'GetAllPlansResponseLinks',
|
51
|
+
:'submit_time_utc' => :'String',
|
52
|
+
:'total_count' => :'Integer',
|
53
|
+
:'plans' => :'Array<GetAllPlansResponsePlans>'
|
48
54
|
}
|
49
55
|
end
|
50
56
|
|
@@ -60,12 +66,18 @@ module CyberSource
|
|
60
66
|
self._links = attributes[:'_links']
|
61
67
|
end
|
62
68
|
|
63
|
-
if attributes.has_key?(:'
|
64
|
-
self.
|
69
|
+
if attributes.has_key?(:'submitTimeUtc')
|
70
|
+
self.submit_time_utc = attributes[:'submitTimeUtc']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.has_key?(:'totalCount')
|
74
|
+
self.total_count = attributes[:'totalCount']
|
65
75
|
end
|
66
76
|
|
67
|
-
if attributes.has_key?(:'
|
68
|
-
|
77
|
+
if attributes.has_key?(:'plans')
|
78
|
+
if (value = attributes[:'plans']).is_a?(Array)
|
79
|
+
self.plans = value
|
80
|
+
end
|
69
81
|
end
|
70
82
|
end
|
71
83
|
|
@@ -88,8 +100,9 @@ module CyberSource
|
|
88
100
|
return true if self.equal?(o)
|
89
101
|
self.class == o.class &&
|
90
102
|
_links == o._links &&
|
91
|
-
|
92
|
-
|
103
|
+
submit_time_utc == o.submit_time_utc &&
|
104
|
+
total_count == o.total_count &&
|
105
|
+
plans == o.plans
|
93
106
|
end
|
94
107
|
|
95
108
|
# @see the `==` method
|
@@ -101,7 +114,7 @@ module CyberSource
|
|
101
114
|
# Calculates hash code according to all attributes.
|
102
115
|
# @return [Fixnum] Hash code
|
103
116
|
def hash
|
104
|
-
[_links,
|
117
|
+
[_links, submit_time_utc, total_count, plans].hash
|
105
118
|
end
|
106
119
|
|
107
120
|
# Builds the object from hash
|
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.2.3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module CyberSource
|
16
|
-
class
|
16
|
+
class GetAllPlansResponseOrderInformation
|
17
17
|
attr_accessor :amount_details
|
18
18
|
|
19
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -33,7 +33,7 @@ module CyberSource
|
|
33
33
|
# Attribute type mapping.
|
34
34
|
def self.swagger_types
|
35
35
|
{
|
36
|
-
:'amount_details' => :'
|
36
|
+
:'amount_details' => :'GetAllPlansResponseOrderInformationAmountDetails'
|
37
37
|
}
|
38
38
|
end
|
39
39
|
|
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.2.3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module CyberSource
|
16
|
-
class
|
16
|
+
class GetAllPlansResponseOrderInformationAmountDetails
|
17
17
|
# Currency used for the order. Use the three-character [ISO Standard Currency Codes.](http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf) #### Used by **Authorization** Required field. **Authorization Reversal** For an authorization reversal (`reversalInformation`) or a capture (`processingOptions.capture` is set to `true`), you must use the same currency that you used in your payment authorization request. #### PIN Debit Currency for the amount you requested for the PIN debit purchase. This value is returned for partial authorizations. The issuing bank can approve a partial amount if the balance on the debit card is less than the requested transaction amount. For the possible values, see the [ISO Standard Currency Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/currencies.pdf). Returned by PIN debit purchase. For PIN debit reversal requests, you must use the same currency that was used for the PIN debit purchase or PIN debit credit that you are reversing. For the possible values, see the [ISO Standard Currency Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/currencies.pdf). Required field for PIN Debit purchase and PIN Debit credit requests. Optional field for PIN Debit reversal requests. #### GPX This field is optional for reversing an authorization or credit. #### DCC for First Data Your local currency. For details, see the `currency` field description in [Dynamic Currency Conversion For First Data Using the SCMP API](http://apps.cybersource.com/library/documentation/dev_guides/DCC_FirstData_SCMP/DCC_FirstData_SCMP_API.pdf). #### Tax Calculation Required for international tax and value added tax only. Optional for U.S. and Canadian taxes. Your local currency.
|
18
18
|
attr_accessor :currency
|
19
19
|
|
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.2.3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module CyberSource
|
16
|
-
class
|
16
|
+
class GetAllPlansResponsePlanInformation
|
17
17
|
# Plan code
|
18
18
|
attr_accessor :code
|
19
19
|
|
@@ -61,8 +61,8 @@ module CyberSource
|
|
61
61
|
:'status' => :'String',
|
62
62
|
:'name' => :'String',
|
63
63
|
:'description' => :'String',
|
64
|
-
:'billing_period' => :'
|
65
|
-
:'billing_cycles' => :'
|
64
|
+
:'billing_period' => :'GetAllPlansResponsePlanInformationBillingPeriod',
|
65
|
+
:'billing_cycles' => :'GetAllPlansResponsePlanInformationBillingCycles'
|
66
66
|
}
|
67
67
|
end
|
68
68
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
|
15
15
|
module CyberSource
|
16
16
|
# Billing Frequency
|
17
|
-
class
|
17
|
+
class GetAllPlansResponsePlanInformationBillingPeriod
|
18
18
|
# Example: - If length=1 & unit=month then charge every month - If length=7 & unit=day then charge every 7th day
|
19
19
|
attr_accessor :length
|
20
20
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
|
15
15
|
module CyberSource
|
16
16
|
# Plan list.
|
17
|
-
class
|
17
|
+
class GetAllPlansResponsePlans
|
18
18
|
attr_accessor :_links
|
19
19
|
|
20
20
|
# An unique identification number generated by Cybersource to identify the submitted request. Returned by all services. It is also appended to the endpoint of the resource. On incremental authorizations, this value with be the same as the identification number returned in the original authorization response.
|
@@ -49,8 +49,8 @@ module CyberSource
|
|
49
49
|
{
|
50
50
|
:'_links' => :'PtsV2IncrementalAuthorizationPatch201ResponseLinks',
|
51
51
|
:'id' => :'String',
|
52
|
-
:'plan_information' => :'
|
53
|
-
:'order_information' => :'
|
52
|
+
:'plan_information' => :'GetAllPlansResponsePlanInformation',
|
53
|
+
:'order_information' => :'GetAllPlansResponseOrderInformation'
|
54
54
|
}
|
55
55
|
end
|
56
56
|
|
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.2.3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module CyberSource
|
16
|
-
class
|
16
|
+
class GetAllSubscriptionsResponse
|
17
17
|
attr_accessor :_links
|
18
18
|
|
19
19
|
# 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.
|
@@ -47,10 +47,10 @@ module CyberSource
|
|
47
47
|
# Attribute type mapping.
|
48
48
|
def self.swagger_types
|
49
49
|
{
|
50
|
-
:'_links' => :'
|
50
|
+
:'_links' => :'GetAllPlansResponseLinks',
|
51
51
|
:'submit_time_utc' => :'String',
|
52
52
|
:'total_count' => :'Integer',
|
53
|
-
:'subscriptions' => :'Array<
|
53
|
+
:'subscriptions' => :'Array<GetAllSubscriptionsResponseSubscriptions>'
|
54
54
|
}
|
55
55
|
end
|
56
56
|
|
@@ -0,0 +1,200 @@
|
|
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 GetAllSubscriptionsResponseOrderInformation
|
17
|
+
attr_accessor :amount_details
|
18
|
+
|
19
|
+
attr_accessor :bill_to
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'amount_details' => :'amountDetails',
|
25
|
+
:'bill_to' => :'billTo'
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
# Attribute mapping from JSON key to ruby-style variable name.
|
30
|
+
def self.json_map
|
31
|
+
{
|
32
|
+
:'amount_details' => :'amount_details',
|
33
|
+
:'bill_to' => :'bill_to'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.swagger_types
|
39
|
+
{
|
40
|
+
:'amount_details' => :'GetAllPlansResponseOrderInformationAmountDetails',
|
41
|
+
:'bill_to' => :'GetAllSubscriptionsResponseOrderInformationBillTo'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
return unless attributes.is_a?(Hash)
|
49
|
+
|
50
|
+
# convert string to symbol for hash key
|
51
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
52
|
+
|
53
|
+
if attributes.has_key?(:'amountDetails')
|
54
|
+
self.amount_details = attributes[:'amountDetails']
|
55
|
+
end
|
56
|
+
|
57
|
+
if attributes.has_key?(:'billTo')
|
58
|
+
self.bill_to = attributes[:'billTo']
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
63
|
+
# @return Array for valid properties with the reasons
|
64
|
+
def list_invalid_properties
|
65
|
+
invalid_properties = Array.new
|
66
|
+
invalid_properties
|
67
|
+
end
|
68
|
+
|
69
|
+
# Check to see if the all the properties in the model are valid
|
70
|
+
# @return true if the model is valid
|
71
|
+
def valid?
|
72
|
+
true
|
73
|
+
end
|
74
|
+
|
75
|
+
# Checks equality by comparing each attribute.
|
76
|
+
# @param [Object] Object to be compared
|
77
|
+
def ==(o)
|
78
|
+
return true if self.equal?(o)
|
79
|
+
self.class == o.class &&
|
80
|
+
amount_details == o.amount_details &&
|
81
|
+
bill_to == o.bill_to
|
82
|
+
end
|
83
|
+
|
84
|
+
# @see the `==` method
|
85
|
+
# @param [Object] Object to be compared
|
86
|
+
def eql?(o)
|
87
|
+
self == o
|
88
|
+
end
|
89
|
+
|
90
|
+
# Calculates hash code according to all attributes.
|
91
|
+
# @return [Fixnum] Hash code
|
92
|
+
def hash
|
93
|
+
[amount_details, bill_to].hash
|
94
|
+
end
|
95
|
+
|
96
|
+
# Builds the object from hash
|
97
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
98
|
+
# @return [Object] Returns the model itself
|
99
|
+
def build_from_hash(attributes)
|
100
|
+
return nil unless attributes.is_a?(Hash)
|
101
|
+
self.class.swagger_types.each_pair do |key, type|
|
102
|
+
if type =~ /\AArray<(.*)>/i
|
103
|
+
# check to ensure the input is an array given that the the attribute
|
104
|
+
# is documented as an array but the input is not
|
105
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
106
|
+
self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
107
|
+
end
|
108
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
109
|
+
self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
110
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
111
|
+
end
|
112
|
+
|
113
|
+
self
|
114
|
+
end
|
115
|
+
|
116
|
+
# Deserializes the data based on type
|
117
|
+
# @param string type Data type
|
118
|
+
# @param string value Value to be deserialized
|
119
|
+
# @return [Object] Deserialized data
|
120
|
+
def _deserialize(type, value)
|
121
|
+
case type.to_sym
|
122
|
+
when :DateTime
|
123
|
+
DateTime.parse(value)
|
124
|
+
when :Date
|
125
|
+
Date.parse(value)
|
126
|
+
when :String
|
127
|
+
value.to_s
|
128
|
+
when :Integer
|
129
|
+
value.to_i
|
130
|
+
when :Float
|
131
|
+
value.to_f
|
132
|
+
when :BOOLEAN
|
133
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
134
|
+
true
|
135
|
+
else
|
136
|
+
false
|
137
|
+
end
|
138
|
+
when :Object
|
139
|
+
# generic object (usually a Hash), return directly
|
140
|
+
value
|
141
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
142
|
+
inner_type = Regexp.last_match[:inner_type]
|
143
|
+
value.map { |v| _deserialize(inner_type, v) }
|
144
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
145
|
+
k_type = Regexp.last_match[:k_type]
|
146
|
+
v_type = Regexp.last_match[:v_type]
|
147
|
+
{}.tap do |hash|
|
148
|
+
value.each do |k, v|
|
149
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
else # model
|
153
|
+
temp_model = CyberSource.const_get(type).new
|
154
|
+
temp_model.build_from_hash(value)
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
# Returns the string representation of the object
|
159
|
+
# @return [String] String presentation of the object
|
160
|
+
def to_s
|
161
|
+
to_hash.to_s
|
162
|
+
end
|
163
|
+
|
164
|
+
# to_body is an alias to to_hash (backward compatibility)
|
165
|
+
# @return [Hash] Returns the object in the form of hash
|
166
|
+
def to_body
|
167
|
+
to_hash
|
168
|
+
end
|
169
|
+
|
170
|
+
# Returns the object in the form of hash
|
171
|
+
# @return [Hash] Returns the object in the form of hash
|
172
|
+
def to_hash
|
173
|
+
hash = {}
|
174
|
+
self.class.attribute_map.each_pair do |attr, param|
|
175
|
+
value = self.send(attr)
|
176
|
+
next if value.nil?
|
177
|
+
hash[param] = _to_hash(value)
|
178
|
+
end
|
179
|
+
hash
|
180
|
+
end
|
181
|
+
|
182
|
+
# Outputs non-array value in the form of hash
|
183
|
+
# For object, use to_hash. Otherwise, just return the value
|
184
|
+
# @param [Object] value Any valid value
|
185
|
+
# @return [Hash] Returns the value in the form of hash
|
186
|
+
def _to_hash(value)
|
187
|
+
if value.is_a?(Array)
|
188
|
+
value.compact.map { |v| _to_hash(v) }
|
189
|
+
elsif value.is_a?(Hash)
|
190
|
+
{}.tap do |hash|
|
191
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
192
|
+
end
|
193
|
+
elsif value.respond_to? :to_hash
|
194
|
+
value.to_hash
|
195
|
+
else
|
196
|
+
value
|
197
|
+
end
|
198
|
+
end
|
199
|
+
end
|
200
|
+
end
|
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.2.3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module CyberSource
|
16
|
-
class
|
16
|
+
class GetAllSubscriptionsResponsePaymentInformation
|
17
17
|
attr_accessor :customer
|
18
18
|
|
19
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -33,7 +33,7 @@ module CyberSource
|
|
33
33
|
# Attribute type mapping.
|
34
34
|
def self.swagger_types
|
35
35
|
{
|
36
|
-
:'customer' => :'
|
36
|
+
:'customer' => :'GetAllSubscriptionsResponsePaymentInformationCustomer'
|
37
37
|
}
|
38
38
|
end
|
39
39
|
|
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.2.3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module CyberSource
|
16
|
-
class
|
16
|
+
class GetAllSubscriptionsResponsePaymentInformationCustomer
|
17
17
|
# Unique identifier for the Customer token used in the transaction. When you include this value in your request, many of the fields that are normally required for an authorization or credit become optional.
|
18
18
|
attr_accessor :id
|
19
19
|
|