cybersource_rest_client 0.0.73 → 0.0.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/lib/AuthenticationSDK/core/MerchantConfig.rb +2 -1
  3. data/lib/cybersource_rest_client/api/batches_api.rb +9 -9
  4. data/lib/cybersource_rest_client/api/bin_lookup_api.rb +5 -5
  5. data/lib/cybersource_rest_client/api/create_new_webhooks_api.rb +6 -6
  6. data/lib/cybersource_rest_client/api/decision_manager_api.rb +3 -3
  7. data/lib/cybersource_rest_client/api/device_de_association_api.rb +168 -0
  8. data/lib/cybersource_rest_client/api/device_search_api.rb +78 -5
  9. data/lib/cybersource_rest_client/api/manage_webhooks_api.rb +9 -9
  10. data/lib/cybersource_rest_client/api/merchant_boarding_api.rb +3 -3
  11. data/lib/cybersource_rest_client/api/payment_tokens_api.rb +96 -0
  12. data/lib/cybersource_rest_client/api/subscriptions_api.rb +5 -2
  13. data/lib/cybersource_rest_client/models/create_order_request.rb +269 -229
  14. data/lib/cybersource_rest_client/models/de_association_request_body.rb +190 -0
  15. data/lib/cybersource_rest_client/models/generate_capture_context_request.rb +1 -1
  16. data/lib/cybersource_rest_client/models/generate_unified_checkout_capture_context_request.rb +2 -2
  17. data/lib/cybersource_rest_client/models/get_subscription_response.rb +15 -5
  18. data/lib/cybersource_rest_client/models/get_subscription_response_reactivation_information.rb +213 -0
  19. data/lib/cybersource_rest_client/models/inline_response_200_10.rb +292 -0
  20. data/lib/cybersource_rest_client/models/{inline_response_200_9_records.rb → inline_response_200_10_records.rb} +3 -3
  21. data/lib/cybersource_rest_client/models/{inline_response_200_9_response_record.rb → inline_response_200_10_response_record.rb} +2 -2
  22. data/lib/cybersource_rest_client/models/{inline_response_200_9_response_record_additional_updates.rb → inline_response_200_10_response_record_additional_updates.rb} +1 -1
  23. data/lib/cybersource_rest_client/models/{inline_response_200_9_source_record.rb → inline_response_200_10_source_record.rb} +1 -1
  24. data/lib/cybersource_rest_client/models/inline_response_200_2.rb +253 -253
  25. data/lib/cybersource_rest_client/models/inline_response_200_5.rb +55 -10
  26. data/lib/cybersource_rest_client/models/inline_response_200_5_devices.rb +357 -0
  27. data/lib/cybersource_rest_client/models/inline_response_200_6.rb +10 -55
  28. data/lib/cybersource_rest_client/models/inline_response_200_7.rb +33 -37
  29. data/lib/cybersource_rest_client/models/{inline_response_200_6_devices.rb → inline_response_200_7_devices.rb} +2 -2
  30. data/lib/cybersource_rest_client/models/{inline_response_200_6_payment_processor_to_terminal_map.rb → inline_response_200_7_payment_processor_to_terminal_map.rb} +1 -1
  31. data/lib/cybersource_rest_client/models/inline_response_200_8.rb +47 -86
  32. data/lib/cybersource_rest_client/models/{inline_response_200_7__embedded.rb → inline_response_200_8__embedded.rb} +2 -2
  33. data/lib/cybersource_rest_client/models/{inline_response_200_7__embedded__links.rb → inline_response_200_8__embedded__links.rb} +2 -2
  34. data/lib/cybersource_rest_client/models/{inline_response_200_7__embedded__links_reports.rb → inline_response_200_8__embedded__links_reports.rb} +1 -1
  35. data/lib/cybersource_rest_client/models/{inline_response_200_7__embedded_batches.rb → inline_response_200_8__embedded_batches.rb} +3 -3
  36. data/lib/cybersource_rest_client/models/{inline_response_200_7__embedded_totals.rb → inline_response_200_8__embedded_totals.rb} +1 -1
  37. data/lib/cybersource_rest_client/models/inline_response_200_8__links.rb +16 -17
  38. data/lib/cybersource_rest_client/models/inline_response_200_9.rb +47 -49
  39. data/lib/cybersource_rest_client/models/inline_response_200_9__links.rb +201 -0
  40. data/lib/cybersource_rest_client/models/{inline_response_200_8__links_report.rb → inline_response_200_9__links_report.rb} +1 -1
  41. data/lib/cybersource_rest_client/models/{inline_response_200_8_billing.rb → inline_response_200_9_billing.rb} +1 -1
  42. data/lib/cybersource_rest_client/models/inline_response_201.rb +227 -218
  43. data/lib/cybersource_rest_client/models/inline_response_201_1.rb +218 -248
  44. data/lib/cybersource_rest_client/models/inline_response_201_2.rb +248 -281
  45. data/lib/cybersource_rest_client/models/{inline_response_201_1_payout_information.rb → inline_response_201_2_payout_information.rb} +216 -216
  46. data/lib/cybersource_rest_client/models/{inline_response_201_1_payout_information_pull_funds.rb → inline_response_201_2_payout_information_pull_funds.rb} +213 -213
  47. data/lib/cybersource_rest_client/models/{inline_response_201_1_payout_information_push_funds.rb → inline_response_201_2_payout_information_push_funds.rb} +417 -417
  48. data/lib/cybersource_rest_client/models/inline_response_201_3.rb +281 -222
  49. data/lib/cybersource_rest_client/models/{inline_response_201_2_integration_information.rb → inline_response_201_3_integration_information.rb} +192 -192
  50. data/lib/cybersource_rest_client/models/{inline_response_201_2_integration_information_tenant_configurations.rb → inline_response_201_3_integration_information_tenant_configurations.rb} +253 -253
  51. data/lib/cybersource_rest_client/models/{inline_response_201_2_organization_information.rb → inline_response_201_3_organization_information.rb} +217 -217
  52. data/lib/cybersource_rest_client/models/{inline_response_201_2_product_information_setups.rb → inline_response_201_3_product_information_setups.rb} +214 -214
  53. data/lib/cybersource_rest_client/models/{inline_response_201_2_registration_information.rb → inline_response_201_3_registration_information.rb} +222 -222
  54. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups.rb → inline_response_201_3_setups.rb} +219 -219
  55. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_commerce_solutions.rb → inline_response_201_3_setups_commerce_solutions.rb} +209 -209
  56. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_payments.rb → inline_response_201_3_setups_payments.rb} +369 -369
  57. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_payments_alternative_payment_methods.rb → inline_response_201_3_setups_payments_alternative_payment_methods.rb} +221 -221
  58. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_payments_alternative_payment_methods_configuration_status.rb → inline_response_201_3_setups_payments_alternative_payment_methods_configuration_status.rb} +200 -200
  59. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_payments_card_processing.rb → inline_response_201_3_setups_payments_card_processing.rb} +199 -199
  60. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_payments_card_processing_configuration_status.rb → inline_response_201_3_setups_payments_card_processing_configuration_status.rb} +255 -255
  61. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_payments_card_processing_subscription_status.rb → inline_response_201_3_setups_payments_card_processing_subscription_status.rb} +234 -234
  62. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_payments_digital_payments.rb → inline_response_201_3_setups_payments_digital_payments.rb} +189 -189
  63. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_risk.rb → inline_response_201_3_setups_risk.rb} +199 -199
  64. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_value_added_services.rb → inline_response_201_3_setups_value_added_services.rb} +209 -209
  65. data/lib/cybersource_rest_client/models/inline_response_201_4.rb +222 -312
  66. data/lib/cybersource_rest_client/models/{inline_response_201_3_key_information.rb → inline_response_201_4_key_information.rb} +300 -300
  67. data/lib/cybersource_rest_client/models/{inline_response_201_3_key_information_error_information.rb → inline_response_201_4_key_information_error_information.rb} +202 -202
  68. data/lib/cybersource_rest_client/models/{inline_response_201_3_key_information_error_information_details.rb → inline_response_201_4_key_information_error_information_details.rb} +201 -201
  69. data/lib/cybersource_rest_client/models/inline_response_201_5.rb +312 -277
  70. data/lib/cybersource_rest_client/models/inline_response_201_6.rb +277 -202
  71. data/lib/cybersource_rest_client/models/{inline_response_201_5_payloads.rb → inline_response_201_6_payloads.rb} +189 -189
  72. data/lib/cybersource_rest_client/models/{inline_response_201_5_payloads_test_payload.rb → inline_response_201_6_payloads_test_payload.rb} +190 -190
  73. data/lib/cybersource_rest_client/models/inline_response_201_7.rb +202 -0
  74. data/lib/cybersource_rest_client/models/inline_response_201_order_information.rb +189 -0
  75. data/lib/cybersource_rest_client/models/inline_response_201_order_information_ship_to.rb +315 -0
  76. data/lib/cybersource_rest_client/models/inline_response_201_payment_information.rb +199 -0
  77. data/lib/cybersource_rest_client/models/inline_response_201_payment_information_e_wallet.rb +196 -0
  78. data/lib/cybersource_rest_client/models/inline_response_201_payment_information_tokenized_payment_method.rb +213 -0
  79. data/lib/cybersource_rest_client/models/payments_products.rb +1 -1
  80. data/lib/cybersource_rest_client/models/payments_products_unified_checkout.rb +199 -0
  81. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_configuration_information.rb +189 -0
  82. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_configuration_information_configurations.rb +189 -0
  83. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_configuration_information_configurations_features.rb +189 -0
  84. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_configuration_information_configurations_features_paze.rb +213 -0
  85. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information.rb +225 -0
  86. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features.rb +189 -0
  87. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_paze_for_unified_checkout.rb +190 -0
  88. data/lib/cybersource_rest_client/models/post_device_search_request.rb +223 -0
  89. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_installment_information.rb +609 -609
  90. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_account_information_card.rb +269 -269
  91. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information.rb +364 -354
  92. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb +309 -309
  93. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_payment_method.rb +213 -0
  94. data/lib/cybersource_rest_client/models/pts_v2_retrieve_payment_token_get400_response.rb +252 -0
  95. data/lib/cybersource_rest_client/models/pts_v2_retrieve_payment_token_get502_response.rb +240 -0
  96. data/lib/cybersource_rest_client/models/ptsv2billingagreements_payment_information_card.rb +258 -258
  97. data/lib/cybersource_rest_client/models/ptsv2billingagreements_payment_information_tokenized_card.rb +275 -275
  98. data/lib/cybersource_rest_client/models/ptsv2intents_event_information.rb +212 -0
  99. data/lib/cybersource_rest_client/models/ptsv2intents_order_information_ship_to.rb +354 -332
  100. data/lib/cybersource_rest_client/models/ptsv2intents_payment_information.rb +220 -189
  101. data/lib/cybersource_rest_client/models/ptsv2intents_payment_information_e_wallet.rb +196 -0
  102. data/lib/cybersource_rest_client/models/ptsv2intents_payment_information_tokenized_payment_method.rb +241 -0
  103. data/lib/cybersource_rest_client/models/ptsv2intents_processing_information.rb +351 -219
  104. data/lib/cybersource_rest_client/models/ptsv2intents_recipient_information.rb +245 -0
  105. data/lib/cybersource_rest_client/models/ptsv2intents_sender_information.rb +277 -0
  106. data/lib/cybersource_rest_client/models/ptsv2intents_sender_information_account.rb +190 -0
  107. data/lib/cybersource_rest_client/models/ptsv2intents_travel_information.rb +211 -0
  108. data/lib/cybersource_rest_client/models/ptsv2intents_travel_information_agency.rb +245 -0
  109. data/lib/cybersource_rest_client/models/{inline_response_200_7__links.rb → ptsv2intentsid_payment_information.rb} +189 -200
  110. data/lib/cybersource_rest_client/models/ptsv2paymentreferences_order_information_amount_details.rb +417 -400
  111. data/lib/cybersource_rest_client/models/ptsv2paymentreferences_payment_information_card.rb +275 -275
  112. data/lib/cybersource_rest_client/models/ptsv2payments_installment_information.rb +433 -416
  113. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +668 -651
  114. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_line_items.rb +716 -699
  115. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb +356 -346
  116. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb +445 -445
  117. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +377 -377
  118. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_payment_method.rb +196 -0
  119. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_installment_information.rb +604 -604
  120. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card.rb +377 -377
  121. data/lib/cybersource_rest_client/models/ptsv2paymenttokens_payment_information.rb +199 -0
  122. data/lib/cybersource_rest_client/models/ptsv2paymenttokens_processing_information.rb +192 -0
  123. data/lib/cybersource_rest_client/models/ptsv2payouts_payment_information_card.rb +258 -258
  124. data/lib/cybersource_rest_client/models/request.rb +199 -0
  125. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_card.rb +241 -241
  126. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +258 -258
  127. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_tokenized_card.rb +351 -351
  128. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_card.rb +268 -268
  129. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_tokenized_card.rb +299 -299
  130. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_card.rb +259 -259
  131. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +259 -259
  132. data/lib/cybersource_rest_client/models/riskv1decisions_travel_information_legs.rb +16 -5
  133. data/lib/cybersource_rest_client/models/riskv1liststypeentries_payment_information_card.rb +224 -224
  134. data/lib/cybersource_rest_client/models/tms_bin_lookup_issuer_information.rb +264 -264
  135. data/lib/cybersource_rest_client/models/tms_bin_lookup_payment_account_information_card.rb +277 -277
  136. data/lib/cybersource_rest_client/models/tms_bin_lookup_payment_account_information_card_brands.rb +213 -213
  137. data/lib/cybersource_rest_client/models/tms_bin_lookup_payment_account_information_features.rb +430 -430
  138. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_brands.rb +201 -201
  139. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_card.rb +365 -365
  140. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information.rb +12 -1
  141. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_card.rb +218 -218
  142. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processor_information.rb +245 -234
  143. data/lib/cybersource_rest_client/models/update_order_request.rb +229 -229
  144. data/lib/cybersource_rest_client/models/upv1capturecontexts_capture_mandate.rb +12 -1
  145. data/lib/cybersource_rest_client/models/upv1capturecontexts_complete_mandate.rb +18 -7
  146. data/lib/cybersource_rest_client.rb +75 -39
  147. metadata +77 -41
  148. data/lib/cybersource_rest_client/api/device_de_association_v3_api.rb +0 -96
@@ -1,234 +1,234 @@
1
- =begin
2
- #CyberSource Merged Spec
3
-
4
- #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
-
6
- OpenAPI spec version: 0.0.1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.38
10
- =end
11
-
12
- require 'date'
13
-
14
- module CyberSource
15
- class InlineResponse2012SetupsPaymentsCardProcessingSubscriptionStatus
16
- # 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.
17
- attr_accessor :submit_time_utc
18
-
19
- # Possible values: - SUCCESS - FAILURE - PARTIAL - PENDING
20
- attr_accessor :status
21
-
22
- # Possible values: - DEPENDENT_PRODUCT_NOT_CONTRACTED - DEPENDENT_FEATURE_NOT_CHOSEN - MISSING_DATA - INVALID_DATA - DUPLICATE_FIELD
23
- attr_accessor :reason
24
-
25
- attr_accessor :details
26
-
27
- attr_accessor :message
28
-
29
- # Attribute mapping from ruby-style variable name to JSON key.
30
- def self.attribute_map
31
- {
32
- :'submit_time_utc' => :'submitTimeUtc',
33
- :'status' => :'status',
34
- :'reason' => :'reason',
35
- :'details' => :'details',
36
- :'message' => :'message'
37
- }
38
- end
39
-
40
- # Attribute mapping from JSON key to ruby-style variable name.
41
- def self.json_map
42
- {
43
- :'submit_time_utc' => :'submit_time_utc',
44
- :'status' => :'status',
45
- :'reason' => :'reason',
46
- :'details' => :'details',
47
- :'message' => :'message'
48
- }
49
- end
50
-
51
- # Attribute type mapping.
52
- def self.swagger_types
53
- {
54
- :'submit_time_utc' => :'String',
55
- :'status' => :'String',
56
- :'reason' => :'String',
57
- :'details' => :'Array<Hash<String, String>>',
58
- :'message' => :'String'
59
- }
60
- end
61
-
62
- # Initializes the object
63
- # @param [Hash] attributes Model attributes in the form of hash
64
- def initialize(attributes = {})
65
- return unless attributes.is_a?(Hash)
66
-
67
- # convert string to symbol for hash key
68
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
69
-
70
- if attributes.has_key?(:'submitTimeUtc')
71
- self.submit_time_utc = attributes[:'submitTimeUtc']
72
- end
73
-
74
- if attributes.has_key?(:'status')
75
- self.status = attributes[:'status']
76
- end
77
-
78
- if attributes.has_key?(:'reason')
79
- self.reason = attributes[:'reason']
80
- end
81
-
82
- if attributes.has_key?(:'details')
83
- if (value = attributes[:'details']).is_a?(Array)
84
- self.details = value
85
- end
86
- end
87
-
88
- if attributes.has_key?(:'message')
89
- self.message = attributes[:'message']
90
- end
91
- end
92
-
93
- # Show invalid properties with the reasons. Usually used together with valid?
94
- # @return Array for valid properties with the reasons
95
- def list_invalid_properties
96
- invalid_properties = Array.new
97
- invalid_properties
98
- end
99
-
100
- # Check to see if the all the properties in the model are valid
101
- # @return true if the model is valid
102
- def valid?
103
- true
104
- end
105
-
106
- # Checks equality by comparing each attribute.
107
- # @param [Object] Object to be compared
108
- def ==(o)
109
- return true if self.equal?(o)
110
- self.class == o.class &&
111
- submit_time_utc == o.submit_time_utc &&
112
- status == o.status &&
113
- reason == o.reason &&
114
- details == o.details &&
115
- message == o.message
116
- end
117
-
118
- # @see the `==` method
119
- # @param [Object] Object to be compared
120
- def eql?(o)
121
- self == o
122
- end
123
-
124
- # Calculates hash code according to all attributes.
125
- # @return [Fixnum] Hash code
126
- def hash
127
- [submit_time_utc, status, reason, details, message].hash
128
- end
129
-
130
- # Builds the object from hash
131
- # @param [Hash] attributes Model attributes in the form of hash
132
- # @return [Object] Returns the model itself
133
- def build_from_hash(attributes)
134
- return nil unless attributes.is_a?(Hash)
135
- self.class.swagger_types.each_pair do |key, type|
136
- if type =~ /\AArray<(.*)>/i
137
- # check to ensure the input is an array given that the the attribute
138
- # is documented as an array but the input is not
139
- if attributes[self.class.attribute_map[key]].is_a?(Array)
140
- self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
141
- end
142
- elsif !attributes[self.class.attribute_map[key]].nil?
143
- self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
144
- end # or else data not found in attributes(hash), not an issue as the data can be optional
145
- end
146
-
147
- self
148
- end
149
-
150
- # Deserializes the data based on type
151
- # @param string type Data type
152
- # @param string value Value to be deserialized
153
- # @return [Object] Deserialized data
154
- def _deserialize(type, value)
155
- case type.to_sym
156
- when :DateTime
157
- DateTime.parse(value)
158
- when :Date
159
- Date.parse(value)
160
- when :String
161
- value.to_s
162
- when :Integer
163
- value.to_i
164
- when :Float
165
- value.to_f
166
- when :BOOLEAN
167
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
- true
169
- else
170
- false
171
- end
172
- when :Object
173
- # generic object (usually a Hash), return directly
174
- value
175
- when /\AArray<(?<inner_type>.+)>\z/
176
- inner_type = Regexp.last_match[:inner_type]
177
- value.map { |v| _deserialize(inner_type, v) }
178
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
- k_type = Regexp.last_match[:k_type]
180
- v_type = Regexp.last_match[:v_type]
181
- {}.tap do |hash|
182
- value.each do |k, v|
183
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
- end
185
- end
186
- else # model
187
- temp_model = CyberSource.const_get(type).new
188
- temp_model.build_from_hash(value)
189
- end
190
- end
191
-
192
- # Returns the string representation of the object
193
- # @return [String] String presentation of the object
194
- def to_s
195
- to_hash.to_s
196
- end
197
-
198
- # to_body is an alias to to_hash (backward compatibility)
199
- # @return [Hash] Returns the object in the form of hash
200
- def to_body
201
- to_hash
202
- end
203
-
204
- # Returns the object in the form of hash
205
- # @return [Hash] Returns the object in the form of hash
206
- def to_hash
207
- hash = {}
208
- self.class.attribute_map.each_pair do |attr, param|
209
- value = self.send(attr)
210
- next if value.nil?
211
- hash[param] = _to_hash(value)
212
- end
213
- hash
214
- end
215
-
216
- # Outputs non-array value in the form of hash
217
- # For object, use to_hash. Otherwise, just return the value
218
- # @param [Object] value Any valid value
219
- # @return [Hash] Returns the value in the form of hash
220
- def _to_hash(value)
221
- if value.is_a?(Array)
222
- value.compact.map { |v| _to_hash(v) }
223
- elsif value.is_a?(Hash)
224
- {}.tap do |hash|
225
- value.each { |k, v| hash[k] = _to_hash(v) }
226
- end
227
- elsif value.respond_to? :to_hash
228
- value.to_hash
229
- else
230
- value
231
- end
232
- end
233
- end
234
- end
1
+ =begin
2
+ #CyberSource Merged Spec
3
+
4
+ #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
+
6
+ OpenAPI spec version: 0.0.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.38
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module CyberSource
15
+ class InlineResponse2013SetupsPaymentsCardProcessingSubscriptionStatus
16
+ # 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.
17
+ attr_accessor :submit_time_utc
18
+
19
+ # Possible values: - SUCCESS - FAILURE - PARTIAL - PENDING
20
+ attr_accessor :status
21
+
22
+ # Possible values: - DEPENDENT_PRODUCT_NOT_CONTRACTED - DEPENDENT_FEATURE_NOT_CHOSEN - MISSING_DATA - INVALID_DATA - DUPLICATE_FIELD
23
+ attr_accessor :reason
24
+
25
+ attr_accessor :details
26
+
27
+ attr_accessor :message
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'submit_time_utc' => :'submitTimeUtc',
33
+ :'status' => :'status',
34
+ :'reason' => :'reason',
35
+ :'details' => :'details',
36
+ :'message' => :'message'
37
+ }
38
+ end
39
+
40
+ # Attribute mapping from JSON key to ruby-style variable name.
41
+ def self.json_map
42
+ {
43
+ :'submit_time_utc' => :'submit_time_utc',
44
+ :'status' => :'status',
45
+ :'reason' => :'reason',
46
+ :'details' => :'details',
47
+ :'message' => :'message'
48
+ }
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.swagger_types
53
+ {
54
+ :'submit_time_utc' => :'String',
55
+ :'status' => :'String',
56
+ :'reason' => :'String',
57
+ :'details' => :'Array<Hash<String, String>>',
58
+ :'message' => :'String'
59
+ }
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ return unless attributes.is_a?(Hash)
66
+
67
+ # convert string to symbol for hash key
68
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
69
+
70
+ if attributes.has_key?(:'submitTimeUtc')
71
+ self.submit_time_utc = attributes[:'submitTimeUtc']
72
+ end
73
+
74
+ if attributes.has_key?(:'status')
75
+ self.status = attributes[:'status']
76
+ end
77
+
78
+ if attributes.has_key?(:'reason')
79
+ self.reason = attributes[:'reason']
80
+ end
81
+
82
+ if attributes.has_key?(:'details')
83
+ if (value = attributes[:'details']).is_a?(Array)
84
+ self.details = value
85
+ end
86
+ end
87
+
88
+ if attributes.has_key?(:'message')
89
+ self.message = attributes[:'message']
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ invalid_properties = Array.new
97
+ invalid_properties
98
+ end
99
+
100
+ # Check to see if the all the properties in the model are valid
101
+ # @return true if the model is valid
102
+ def valid?
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ submit_time_utc == o.submit_time_utc &&
112
+ status == o.status &&
113
+ reason == o.reason &&
114
+ details == o.details &&
115
+ message == o.message
116
+ end
117
+
118
+ # @see the `==` method
119
+ # @param [Object] Object to be compared
120
+ def eql?(o)
121
+ self == o
122
+ end
123
+
124
+ # Calculates hash code according to all attributes.
125
+ # @return [Fixnum] Hash code
126
+ def hash
127
+ [submit_time_utc, status, reason, details, message].hash
128
+ end
129
+
130
+ # Builds the object from hash
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ # @return [Object] Returns the model itself
133
+ def build_from_hash(attributes)
134
+ return nil unless attributes.is_a?(Hash)
135
+ self.class.swagger_types.each_pair do |key, type|
136
+ if type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
140
+ self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
141
+ end
142
+ elsif !attributes[self.class.attribute_map[key]].nil?
143
+ self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
144
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
145
+ end
146
+
147
+ self
148
+ end
149
+
150
+ # Deserializes the data based on type
151
+ # @param string type Data type
152
+ # @param string value Value to be deserialized
153
+ # @return [Object] Deserialized data
154
+ def _deserialize(type, value)
155
+ case type.to_sym
156
+ when :DateTime
157
+ DateTime.parse(value)
158
+ when :Date
159
+ Date.parse(value)
160
+ when :String
161
+ value.to_s
162
+ when :Integer
163
+ value.to_i
164
+ when :Float
165
+ value.to_f
166
+ when :BOOLEAN
167
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
+ true
169
+ else
170
+ false
171
+ end
172
+ when :Object
173
+ # generic object (usually a Hash), return directly
174
+ value
175
+ when /\AArray<(?<inner_type>.+)>\z/
176
+ inner_type = Regexp.last_match[:inner_type]
177
+ value.map { |v| _deserialize(inner_type, v) }
178
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
+ k_type = Regexp.last_match[:k_type]
180
+ v_type = Regexp.last_match[:v_type]
181
+ {}.tap do |hash|
182
+ value.each do |k, v|
183
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
+ end
185
+ end
186
+ else # model
187
+ temp_model = CyberSource.const_get(type).new
188
+ temp_model.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ next if value.nil?
211
+ hash[param] = _to_hash(value)
212
+ end
213
+ hash
214
+ end
215
+
216
+ # Outputs non-array value in the form of hash
217
+ # For object, use to_hash. Otherwise, just return the value
218
+ # @param [Object] value Any valid value
219
+ # @return [Hash] Returns the value in the form of hash
220
+ def _to_hash(value)
221
+ if value.is_a?(Array)
222
+ value.compact.map { |v| _to_hash(v) }
223
+ elsif value.is_a?(Hash)
224
+ {}.tap do |hash|
225
+ value.each { |k, v| hash[k] = _to_hash(v) }
226
+ end
227
+ elsif value.respond_to? :to_hash
228
+ value.to_hash
229
+ else
230
+ value
231
+ end
232
+ end
233
+ end
234
+ end