cybersource_rest_client 0.0.48 → 0.0.49

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 (106) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cybersource_rest_client/api/payments_api.rb +71 -0
  3. data/lib/cybersource_rest_client/api/push_funds_api.rb +131 -0
  4. data/lib/cybersource_rest_client/models/invoicingv2invoices_order_information_amount_details_tax_details.rb +2 -2
  5. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1.rb +262 -0
  6. data/lib/cybersource_rest_client/models/{pts_v2_payments_post201_response_risk_information_providers_provider_name.rb → pts_v2_payments_post201_response_1_order_information.rb} +14 -19
  7. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_order_information_bill_to.rb +344 -0
  8. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_order_information_ship_to.rb +318 -0
  9. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_payment_information.rb +201 -0
  10. data/lib/cybersource_rest_client/models/{pts_v2_payments_post201_response_risk_information_providers.rb → pts_v2_payments_post201_response_1_payment_information_bank.rb} +8 -10
  11. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_payment_information_bank_account.rb +184 -0
  12. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_payment_information_payment_type.rb +183 -0
  13. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_payment_information_payment_type_method.rb +184 -0
  14. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_processor_information.rb +238 -0
  15. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_processor_information_avs.rb +190 -0
  16. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_processor_information_seller_protection.rb +184 -0
  17. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +22 -4
  18. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_risk_information.rb +5 -2
  19. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response.rb +1 -1
  20. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_client_reference_information.rb +226 -0
  21. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_refund_amount_details.rb +17 -1
  22. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_aggregator_information.rb +215 -0
  23. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_aggregator_information_sub_merchant.rb +318 -0
  24. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_client_reference_information.rb +238 -0
  25. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_merchant_defined_information.rb +206 -0
  26. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_merchant_information.rb +225 -0
  27. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_merchant_information_merchant_descriptor.rb +270 -0
  28. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_order_information.rb +208 -0
  29. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_order_information_amount_details.rb +224 -0
  30. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_order_information_surcharge.rb +190 -0
  31. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_point_of_service_information.rb +236 -0
  32. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_information.rb +297 -0
  33. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_information_payouts_options.rb +206 -0
  34. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_information_recurring_options.rb +184 -0
  35. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_options.rb +183 -0
  36. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_options_funding_options.rb +183 -0
  37. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_options_funding_options_initiator.rb +190 -0
  38. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information.rb +384 -0
  39. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information_payment_information.rb +183 -0
  40. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information_payment_information_card.rb +281 -0
  41. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information_payment_information_card_customer.rb +190 -0
  42. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information_payment_information_card_instrument_identifier.rb +190 -0
  43. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information_payment_information_card_payment_instrument.rb +190 -0
  44. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information_personal_identification.rb +206 -0
  45. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_sender_information.rb +425 -0
  46. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_sender_information_account.rb +206 -0
  47. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_sender_information_payment_information.rb +183 -0
  48. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_sender_information_payment_information_card.rb +270 -0
  49. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_sender_information_personal_identification.rb +222 -0
  50. data/lib/cybersource_rest_client/models/ptsv2payments_device_information.rb +11 -1
  51. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information.rb +17 -1
  52. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_tax_details.rb +2 -2
  53. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to.rb +30 -4
  54. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb +21 -1
  55. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank.rb +20 -4
  56. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_payment_type.rb +2 -12
  57. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_payment_type_method.rb +15 -5
  58. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +12 -2
  59. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_buyer_information.rb +63 -4
  60. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_buyer_information_personal_identification.rb +190 -0
  61. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_bill_to.rb +65 -1
  62. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_client_reference_information.rb +297 -0
  63. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information.rb +2 -2
  64. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_bank.rb +14 -4
  65. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card.rb +36 -4
  66. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_e_wallet.rb +190 -0
  67. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_payment_type.rb +203 -0
  68. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_payment_type_method.rb +184 -0
  69. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information.rb +35 -4
  70. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information_refund_options.rb +184 -0
  71. data/lib/cybersource_rest_client/models/ptsv2paymentsidvoids_payment_information.rb +1 -1
  72. data/lib/cybersource_rest_client/models/ptsv2refreshpaymentstatusid_agreement_information.rb +184 -0
  73. data/lib/cybersource_rest_client/models/ptsv2refreshpaymentstatusid_client_reference_information.rb +206 -0
  74. data/lib/cybersource_rest_client/models/ptsv2refreshpaymentstatusid_payment_information.rb +192 -0
  75. data/lib/cybersource_rest_client/models/{tss_v2_transactions_post201_response__embedded_payment_information_customer.rb → ptsv2refreshpaymentstatusid_payment_information_customer.rb} +1 -1
  76. data/lib/cybersource_rest_client/models/ptsv2refreshpaymentstatusid_payment_information_payment_type.rb +193 -0
  77. data/lib/cybersource_rest_client/models/ptsv2refreshpaymentstatusid_processing_information.rb +186 -0
  78. data/lib/cybersource_rest_client/models/push_funds201_response.rb +301 -0
  79. data/lib/cybersource_rest_client/models/push_funds201_response__links.rb +210 -0
  80. data/lib/cybersource_rest_client/models/push_funds201_response__links_customer.rb +195 -0
  81. data/lib/cybersource_rest_client/models/push_funds201_response__links_instrument_identifier.rb +195 -0
  82. data/lib/cybersource_rest_client/models/push_funds201_response__links_payment_instrument.rb +195 -0
  83. data/lib/cybersource_rest_client/models/push_funds201_response__links_self.rb +195 -0
  84. data/lib/cybersource_rest_client/models/push_funds201_response_client_reference_information.rb +206 -0
  85. data/lib/cybersource_rest_client/models/push_funds201_response_error_information.rb +217 -0
  86. data/lib/cybersource_rest_client/models/push_funds201_response_error_information_details.rb +206 -0
  87. data/lib/cybersource_rest_client/models/push_funds201_response_merchant_information.rb +183 -0
  88. data/lib/cybersource_rest_client/models/push_funds201_response_merchant_information_merchant_descriptor.rb +222 -0
  89. data/lib/cybersource_rest_client/models/push_funds201_response_order_information.rb +183 -0
  90. data/lib/cybersource_rest_client/models/push_funds201_response_order_information_amount_details.rb +247 -0
  91. data/lib/cybersource_rest_client/models/push_funds201_response_processor_information.rb +264 -0
  92. data/lib/cybersource_rest_client/models/push_funds201_response_recipient_information.rb +183 -0
  93. data/lib/cybersource_rest_client/models/push_funds201_response_recipient_information_card.rb +206 -0
  94. data/lib/cybersource_rest_client/models/push_funds400_response.rb +247 -0
  95. data/lib/cybersource_rest_client/models/push_funds400_response_details.rb +194 -0
  96. data/lib/cybersource_rest_client/models/push_funds401_response.rb +226 -0
  97. data/lib/cybersource_rest_client/models/push_funds404_response.rb +226 -0
  98. data/lib/cybersource_rest_client/models/push_funds502_response.rb +236 -0
  99. data/lib/cybersource_rest_client/models/push_funds_request.rb +264 -0
  100. data/lib/cybersource_rest_client/models/refresh_payment_status_request.rb +210 -0
  101. data/lib/cybersource_rest_client/models/refund_capture_request.rb +1 -1
  102. data/lib/cybersource_rest_client/models/refund_payment_request.rb +1 -1
  103. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_payment_type.rb +1 -1
  104. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information.rb +1 -1
  105. data/lib/cybersource_rest_client.rb +77 -3
  106. metadata +79 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae3f8196cbbdd30fe85c9f0aa71b0e3e5ef445db059bb34eeb2017c7d52e396c
4
- data.tar.gz: 6a78ec9b9d605586871749ba391b51ff0df6ec04253281f39ad787cfbb7bccaf
3
+ metadata.gz: a13a9f1cb0a01e2b9127e54b845ab8906e639b4ace7e656f8b63213866bb5755
4
+ data.tar.gz: d4e2b107ea5613c9ba2bc79a8758cb900b29ac2fb4ee187e40ee1c10c155d234
5
5
  SHA512:
6
- metadata.gz: c245093d3223982617f582df35e412b1841dfa8e46f3195412c2225836844bb012337c2ee8c1e6789cb269eaa4d06f9dae16df02a388da772ca223007cfde79c
7
- data.tar.gz: ea5906bbaa0570dfcd8f31b2b45724a75ea31c7a8a9583edc7457a6abecb9f0ecf00935f4fc641524522d1916e281a48b60cb8d0ebf4654f3b5ef3a9b02cc1dd
6
+ metadata.gz: 65719f0ba829413995b7a8ec337f10fd762ab241da4c745da798475fa585cb06c6e6bc1e7095beed95f9a46c4f2a1a5b54a2cffc510986ae85d08734143383fc
7
+ data.tar.gz: 61d1c39212b5ec195ac1a9c203709d3b5ce34d7bb6607335a48c344c200e3f7d504cf3a1cfe2d2e1cf08d84b212bc3b45ab87287e277d0d64a9af29af98e0f6c
@@ -156,5 +156,76 @@ module CyberSource
156
156
  end
157
157
  return data, status_code, headers
158
158
  end
159
+ # Check a Payment Status
160
+ # Checks and updates the payment status
161
+ # @param id The payment id whose status needs to be checked and updated.
162
+ # @param refresh_payment_status_request
163
+ # @param [Hash] opts the optional parameters
164
+ # @return [PtsV2PaymentsPost201Response1]
165
+ def refresh_payment_status(id, refresh_payment_status_request, opts = {})
166
+ data, status_code, headers = refresh_payment_status_with_http_info(id, refresh_payment_status_request, opts)
167
+ return data, status_code, headers
168
+ end
169
+
170
+ # Check a Payment Status
171
+ # Checks and updates the payment status
172
+ # @param id The payment id whose status needs to be checked and updated.
173
+ # @param refresh_payment_status_request
174
+ # @param [Hash] opts the optional parameters
175
+ # @return [Array<(PtsV2PaymentsPost201Response1, Fixnum, Hash)>] PtsV2PaymentsPost201Response1 data, response status code and response headers
176
+ def refresh_payment_status_with_http_info(id, refresh_payment_status_request, opts = {})
177
+
178
+ if @api_client.config.debugging
179
+ begin
180
+ raise
181
+ @api_client.config.logger.debug 'Calling API: PaymentsApi.refresh_payment_status ...'
182
+ rescue
183
+ puts 'Cannot write to log'
184
+ end
185
+ end
186
+ # verify the required parameter 'id' is set
187
+ if @api_client.config.client_side_validation && id.nil?
188
+ fail ArgumentError, "Missing the required parameter 'id' when calling PaymentsApi.refresh_payment_status"
189
+ end
190
+ # verify the required parameter 'refresh_payment_status_request' is set
191
+ if @api_client.config.client_side_validation && refresh_payment_status_request.nil?
192
+ fail ArgumentError, "Missing the required parameter 'refresh_payment_status_request' when calling PaymentsApi.refresh_payment_status"
193
+ end
194
+ # resource path
195
+ local_var_path = 'pts/v2/refresh-payment-status/{id}'.sub('{' + 'id' + '}', id.to_s)
196
+
197
+ # query parameters
198
+ query_params = {}
199
+
200
+ # header parameters
201
+ header_params = {}
202
+ # HTTP header 'Accept' (if needed)
203
+ header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
204
+ # HTTP header 'Content-Type'
205
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
206
+
207
+ # form parameters
208
+ form_params = {}
209
+
210
+ # http body (model)
211
+ post_body = @api_client.object_to_http_body(refresh_payment_status_request)
212
+ auth_names = []
213
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
214
+ :header_params => header_params,
215
+ :query_params => query_params,
216
+ :form_params => form_params,
217
+ :body => post_body,
218
+ :auth_names => auth_names,
219
+ :return_type => 'PtsV2PaymentsPost201Response1')
220
+ if @api_client.config.debugging
221
+ begin
222
+ raise
223
+ @api_client.config.logger.debug "API called: PaymentsApi#refresh_payment_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
224
+ rescue
225
+ puts 'Cannot write to log'
226
+ end
227
+ end
228
+ return data, status_code, headers
229
+ end
159
230
  end
160
231
  end
@@ -0,0 +1,131 @@
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 'uri'
14
+
15
+ module CyberSource
16
+ class PushFundsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default, config)
20
+ @api_client = api_client
21
+ @api_client.set_configuration(config)
22
+ end
23
+ # Process a Push Funds Transfer
24
+ # Receive funds using an Original Credit Transaction (OCT).
25
+ # @param push_funds_request
26
+ # @param content_type
27
+ # @param x_requestid
28
+ # @param v_c_merchant_id
29
+ # @param v_c_permissions
30
+ # @param v_c_correlation_id
31
+ # @param v_c_organization_id
32
+ # @param [Hash] opts the optional parameters
33
+ # @return [PushFunds201Response]
34
+ def create_push_funds_transfer(push_funds_request, content_type, x_requestid, v_c_merchant_id, v_c_permissions, v_c_correlation_id, v_c_organization_id, opts = {})
35
+ data, status_code, headers = create_push_funds_transfer_with_http_info(push_funds_request, content_type, x_requestid, v_c_merchant_id, v_c_permissions, v_c_correlation_id, v_c_organization_id, opts)
36
+ return data, status_code, headers
37
+ end
38
+
39
+ # Process a Push Funds Transfer
40
+ # Receive funds using an Original Credit Transaction (OCT).
41
+ # @param push_funds_request
42
+ # @param content_type
43
+ # @param x_requestid
44
+ # @param v_c_merchant_id
45
+ # @param v_c_permissions
46
+ # @param v_c_correlation_id
47
+ # @param v_c_organization_id
48
+ # @param [Hash] opts the optional parameters
49
+ # @return [Array<(PushFunds201Response, Fixnum, Hash)>] PushFunds201Response data, response status code and response headers
50
+ def create_push_funds_transfer_with_http_info(push_funds_request, content_type, x_requestid, v_c_merchant_id, v_c_permissions, v_c_correlation_id, v_c_organization_id, opts = {})
51
+
52
+ if @api_client.config.debugging
53
+ begin
54
+ raise
55
+ @api_client.config.logger.debug 'Calling API: PushFundsApi.create_push_funds_transfer ...'
56
+ rescue
57
+ puts 'Cannot write to log'
58
+ end
59
+ end
60
+ # verify the required parameter 'push_funds_request' is set
61
+ if @api_client.config.client_side_validation && push_funds_request.nil?
62
+ fail ArgumentError, "Missing the required parameter 'push_funds_request' when calling PushFundsApi.create_push_funds_transfer"
63
+ end
64
+ # verify the required parameter 'content_type' is set
65
+ if @api_client.config.client_side_validation && content_type.nil?
66
+ fail ArgumentError, "Missing the required parameter 'content_type' when calling PushFundsApi.create_push_funds_transfer"
67
+ end
68
+ # verify the required parameter 'x_requestid' is set
69
+ if @api_client.config.client_side_validation && x_requestid.nil?
70
+ fail ArgumentError, "Missing the required parameter 'x_requestid' when calling PushFundsApi.create_push_funds_transfer"
71
+ end
72
+ # verify the required parameter 'v_c_merchant_id' is set
73
+ if @api_client.config.client_side_validation && v_c_merchant_id.nil?
74
+ fail ArgumentError, "Missing the required parameter 'v_c_merchant_id' when calling PushFundsApi.create_push_funds_transfer"
75
+ end
76
+ # verify the required parameter 'v_c_permissions' is set
77
+ if @api_client.config.client_side_validation && v_c_permissions.nil?
78
+ fail ArgumentError, "Missing the required parameter 'v_c_permissions' when calling PushFundsApi.create_push_funds_transfer"
79
+ end
80
+ # verify the required parameter 'v_c_correlation_id' is set
81
+ if @api_client.config.client_side_validation && v_c_correlation_id.nil?
82
+ fail ArgumentError, "Missing the required parameter 'v_c_correlation_id' when calling PushFundsApi.create_push_funds_transfer"
83
+ end
84
+ # verify the required parameter 'v_c_organization_id' is set
85
+ if @api_client.config.client_side_validation && v_c_organization_id.nil?
86
+ fail ArgumentError, "Missing the required parameter 'v_c_organization_id' when calling PushFundsApi.create_push_funds_transfer"
87
+ end
88
+ # resource path
89
+ local_var_path = 'pts/v1/push-funds-transfer'
90
+
91
+ # query parameters
92
+ query_params = {}
93
+
94
+ # header parameters
95
+ header_params = {}
96
+ # HTTP header 'Accept' (if needed)
97
+ header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
98
+ # HTTP header 'Content-Type'
99
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
100
+ header_params[:'Content-Type'] = content_type
101
+ header_params[:'x-requestid'] = x_requestid
102
+ header_params[:'v-c-merchant-id'] = v_c_merchant_id
103
+ header_params[:'v-c-permissions'] = v_c_permissions
104
+ header_params[:'v-c-correlation-id'] = v_c_correlation_id
105
+ header_params[:'v-c-organization-id'] = v_c_organization_id
106
+
107
+ # form parameters
108
+ form_params = {}
109
+
110
+ # http body (model)
111
+ post_body = @api_client.object_to_http_body(push_funds_request)
112
+ auth_names = []
113
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
114
+ :header_params => header_params,
115
+ :query_params => query_params,
116
+ :form_params => form_params,
117
+ :body => post_body,
118
+ :auth_names => auth_names,
119
+ :return_type => 'PushFunds201Response')
120
+ if @api_client.config.debugging
121
+ begin
122
+ raise
123
+ @api_client.config.logger.debug "API called: PushFundsApi#create_push_funds_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
124
+ rescue
125
+ puts 'Cannot write to log'
126
+ end
127
+ end
128
+ return data, status_code, headers
129
+ end
130
+ end
131
+ end
@@ -15,10 +15,10 @@ require 'date'
15
15
  module CyberSource
16
16
  # Contains all of the tax-related fields for the invoice.
17
17
  class Invoicingv2invoicesOrderInformationAmountDetailsTaxDetails
18
- # Indicates the type of tax data for the _taxDetails_ object. Possible values: - `alternate` - `local` - `national` - `vat` - `other` For processor-specific details, see the `alternate_tax_amount`, `local_tax`, `national_tax` or `vat_tax_amount` field descriptions in [Level II and Level III Processing Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html/)
18
+ # Indicates the type of tax data for the _taxDetails_ object. Possible values: - `alternate` - `local` - `national` - `vat` - `other` - `green` For processor-specific details, see the `alternate_tax_amount`, `local_tax`, `national_tax` or `vat_tax_amount` field descriptions in [Level II and Level III Processing Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html/)
19
19
  attr_accessor :type
20
20
 
21
- # Indicates the amount of tax based on the `type` field as described in the table below: | type | type description | | ------------- |:-------------:| | `alternate` | Total amount of alternate tax for the order. | | `local` | Sales tax for the order. | | `national` | National tax for the order. | | `vat` | Total amount of value added tax (VAT) included in the order. | | `other` | Other tax. |
21
+ # Indicates the amount of tax based on the `type` field as described in the table below: | type | type description | | ------------- |:-------------:| | `alternate` | Total amount of alternate tax for the order. | | `local` | Sales tax for the order. | | `national` | National tax for the order. | | `vat` | Total amount of value added tax (VAT) included in the order. | | `other` | Other tax. | | `green` | Green tax amount for Korean Processing. |
22
22
  attr_accessor :amount
23
23
 
24
24
  # Rate of VAT or other tax for the order. Example 0.040 (=4%) Valid range: 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated) For processor-specific details, see the `alternate_tax_amount`, `vat_rate`, `vat_tax_rate`, `local_tax`, `national_tax`, `vat_tax_amount` or `other_tax#_rate` field descriptions in the [Level II and Level III Processing Using the SCMP API Guide.](https://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html/)
@@ -0,0 +1,262 @@
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 PtsV2PaymentsPost201Response1
17
+ # 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.
18
+ attr_accessor :id
19
+
20
+ # The status of the submitted transaction. Possible values: - AUTHORIZED - PARTIAL_AUTHORIZED - AUTHORIZED_PENDING_REVIEW - AUTHORIZED_RISK_DECLINED - PENDING_AUTHENTICATION - PENDING_REVIEW - DECLINED - INVALID_REQUEST
21
+ attr_accessor :status
22
+
23
+ # 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.
24
+ attr_accessor :submit_time_utc
25
+
26
+ attr_accessor :processor_information
27
+
28
+ # Reference number for the transaction. Depending on how your Cybersource account is configured, this value could either be provided in the API request or generated by CyberSource. The actual value used in the request to the processor is provided back to you by Cybersource in the response.
29
+ attr_accessor :reconciliation_id
30
+
31
+ attr_accessor :payment_information
32
+
33
+ attr_accessor :order_information
34
+
35
+ attr_accessor :client_reference_information
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'id' => :'id',
41
+ :'status' => :'status',
42
+ :'submit_time_utc' => :'submitTimeUtc',
43
+ :'processor_information' => :'processorInformation',
44
+ :'reconciliation_id' => :'reconciliationId',
45
+ :'payment_information' => :'paymentInformation',
46
+ :'order_information' => :'orderInformation',
47
+ :'client_reference_information' => :'clientReferenceInformation'
48
+ }
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.swagger_types
53
+ {
54
+ :'id' => :'String',
55
+ :'status' => :'String',
56
+ :'submit_time_utc' => :'String',
57
+ :'processor_information' => :'PtsV2PaymentsPost201Response1ProcessorInformation',
58
+ :'reconciliation_id' => :'String',
59
+ :'payment_information' => :'PtsV2PaymentsPost201Response1PaymentInformation',
60
+ :'order_information' => :'PtsV2PaymentsPost201Response1OrderInformation',
61
+ :'client_reference_information' => :'PtsV2IncrementalAuthorizationPatch201ResponseClientReferenceInformation'
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?(:'id')
74
+ self.id = attributes[:'id']
75
+ end
76
+
77
+ if attributes.has_key?(:'status')
78
+ self.status = attributes[:'status']
79
+ end
80
+
81
+ if attributes.has_key?(:'submitTimeUtc')
82
+ self.submit_time_utc = attributes[:'submitTimeUtc']
83
+ end
84
+
85
+ if attributes.has_key?(:'processorInformation')
86
+ self.processor_information = attributes[:'processorInformation']
87
+ end
88
+
89
+ if attributes.has_key?(:'reconciliationId')
90
+ self.reconciliation_id = attributes[:'reconciliationId']
91
+ end
92
+
93
+ if attributes.has_key?(:'paymentInformation')
94
+ self.payment_information = attributes[:'paymentInformation']
95
+ end
96
+
97
+ if attributes.has_key?(:'orderInformation')
98
+ self.order_information = attributes[:'orderInformation']
99
+ end
100
+
101
+ if attributes.has_key?(:'clientReferenceInformation')
102
+ self.client_reference_information = attributes[:'clientReferenceInformation']
103
+ end
104
+ end
105
+
106
+ # Show invalid properties with the reasons. Usually used together with valid?
107
+ # @return Array for valid properties with the reasons
108
+ def list_invalid_properties
109
+ invalid_properties = Array.new
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ true
117
+ end
118
+
119
+ # Custom attribute writer method with validation
120
+ # @param [Object] id Value to be assigned
121
+ def id=(id)
122
+ @id = id
123
+ end
124
+
125
+ # Custom attribute writer method with validation
126
+ # @param [Object] reconciliation_id Value to be assigned
127
+ def reconciliation_id=(reconciliation_id)
128
+ @reconciliation_id = reconciliation_id
129
+ end
130
+
131
+ # Checks equality by comparing each attribute.
132
+ # @param [Object] Object to be compared
133
+ def ==(o)
134
+ return true if self.equal?(o)
135
+ self.class == o.class &&
136
+ id == o.id &&
137
+ status == o.status &&
138
+ submit_time_utc == o.submit_time_utc &&
139
+ processor_information == o.processor_information &&
140
+ reconciliation_id == o.reconciliation_id &&
141
+ payment_information == o.payment_information &&
142
+ order_information == o.order_information &&
143
+ client_reference_information == o.client_reference_information
144
+ end
145
+
146
+ # @see the `==` method
147
+ # @param [Object] Object to be compared
148
+ def eql?(o)
149
+ self == o
150
+ end
151
+
152
+ # Calculates hash code according to all attributes.
153
+ # @return [Fixnum] Hash code
154
+ def hash
155
+ [id, status, submit_time_utc, processor_information, reconciliation_id, payment_information, order_information, client_reference_information].hash
156
+ end
157
+
158
+ # Builds the object from hash
159
+ # @param [Hash] attributes Model attributes in the form of hash
160
+ # @return [Object] Returns the model itself
161
+ def build_from_hash(attributes)
162
+ return nil unless attributes.is_a?(Hash)
163
+ self.class.swagger_types.each_pair do |key, type|
164
+ if type =~ /\AArray<(.*)>/i
165
+ # check to ensure the input is an array given that the the attribute
166
+ # is documented as an array but the input is not
167
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
168
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
169
+ end
170
+ elsif !attributes[self.class.attribute_map[key]].nil?
171
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
172
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
173
+ end
174
+
175
+ self
176
+ end
177
+
178
+ # Deserializes the data based on type
179
+ # @param string type Data type
180
+ # @param string value Value to be deserialized
181
+ # @return [Object] Deserialized data
182
+ def _deserialize(type, value)
183
+ case type.to_sym
184
+ when :DateTime
185
+ DateTime.parse(value)
186
+ when :Date
187
+ Date.parse(value)
188
+ when :String
189
+ value.to_s
190
+ when :Integer
191
+ value.to_i
192
+ when :Float
193
+ value.to_f
194
+ when :BOOLEAN
195
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
196
+ true
197
+ else
198
+ false
199
+ end
200
+ when :Object
201
+ # generic object (usually a Hash), return directly
202
+ value
203
+ when /\AArray<(?<inner_type>.+)>\z/
204
+ inner_type = Regexp.last_match[:inner_type]
205
+ value.map { |v| _deserialize(inner_type, v) }
206
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
207
+ k_type = Regexp.last_match[:k_type]
208
+ v_type = Regexp.last_match[:v_type]
209
+ {}.tap do |hash|
210
+ value.each do |k, v|
211
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
212
+ end
213
+ end
214
+ else # model
215
+ temp_model = CyberSource.const_get(type).new
216
+ temp_model.build_from_hash(value)
217
+ end
218
+ end
219
+
220
+ # Returns the string representation of the object
221
+ # @return [String] String presentation of the object
222
+ def to_s
223
+ to_hash.to_s
224
+ end
225
+
226
+ # to_body is an alias to to_hash (backward compatibility)
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_body
229
+ to_hash
230
+ end
231
+
232
+ # Returns the object in the form of hash
233
+ # @return [Hash] Returns the object in the form of hash
234
+ def to_hash
235
+ hash = {}
236
+ self.class.attribute_map.each_pair do |attr, param|
237
+ value = self.send(attr)
238
+ next if value.nil?
239
+ hash[param] = _to_hash(value)
240
+ end
241
+ hash
242
+ end
243
+
244
+ # Outputs non-array value in the form of hash
245
+ # For object, use to_hash. Otherwise, just return the value
246
+ # @param [Object] value Any valid value
247
+ # @return [Hash] Returns the value in the form of hash
248
+ def _to_hash(value)
249
+ if value.is_a?(Array)
250
+ value.compact.map { |v| _to_hash(v) }
251
+ elsif value.is_a?(Hash)
252
+ {}.tap do |hash|
253
+ value.each { |k, v| hash[k] = _to_hash(v) }
254
+ end
255
+ elsif value.respond_to? :to_hash
256
+ value.to_hash
257
+ else
258
+ value
259
+ end
260
+ end
261
+ end
262
+ end
@@ -13,25 +13,24 @@ Swagger Codegen version: 2.2.3
13
13
  require 'date'
14
14
 
15
15
  module CyberSource
16
- # Name of the 3rd party provider, for example, Emailage. For all possible values, see the `decision_provider_#_name` field description in the _Decision Manager Using the SCMP API Developer Guide_ on the [CyberSource Business Center.](https://ebc2.cybersource.com/ebc2/) Click **Decision Manager** > **Documentation** > **Guides** > _Decision Manager Using the SCMP API Developer Guide_ (PDF link).
17
- class PtsV2PaymentsPost201ResponseRiskInformationProvidersProviderName
18
- attr_accessor :field_name
16
+ class PtsV2PaymentsPost201Response1OrderInformation
17
+ attr_accessor :bill_to
19
18
 
20
- attr_accessor :field_value
19
+ attr_accessor :ship_to
21
20
 
22
21
  # Attribute mapping from ruby-style variable name to JSON key.
23
22
  def self.attribute_map
24
23
  {
25
- :'field_name' => :'fieldName',
26
- :'field_value' => :'fieldValue'
24
+ :'bill_to' => :'billTo',
25
+ :'ship_to' => :'shipTo'
27
26
  }
28
27
  end
29
28
 
30
29
  # Attribute type mapping.
31
30
  def self.swagger_types
32
31
  {
33
- :'field_name' => :'Array<String>',
34
- :'field_value' => :'Array<String>'
32
+ :'bill_to' => :'PtsV2PaymentsPost201Response1OrderInformationBillTo',
33
+ :'ship_to' => :'PtsV2PaymentsPost201Response1OrderInformationShipTo'
35
34
  }
36
35
  end
37
36
 
@@ -43,16 +42,12 @@ module CyberSource
43
42
  # convert string to symbol for hash key
44
43
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
45
44
 
46
- if attributes.has_key?(:'fieldName')
47
- if (value = attributes[:'fieldName']).is_a?(Array)
48
- self.field_name = value
49
- end
45
+ if attributes.has_key?(:'billTo')
46
+ self.bill_to = attributes[:'billTo']
50
47
  end
51
48
 
52
- if attributes.has_key?(:'fieldValue')
53
- if (value = attributes[:'fieldValue']).is_a?(Array)
54
- self.field_value = value
55
- end
49
+ if attributes.has_key?(:'shipTo')
50
+ self.ship_to = attributes[:'shipTo']
56
51
  end
57
52
  end
58
53
 
@@ -74,8 +69,8 @@ module CyberSource
74
69
  def ==(o)
75
70
  return true if self.equal?(o)
76
71
  self.class == o.class &&
77
- field_name == o.field_name &&
78
- field_value == o.field_value
72
+ bill_to == o.bill_to &&
73
+ ship_to == o.ship_to
79
74
  end
80
75
 
81
76
  # @see the `==` method
@@ -87,7 +82,7 @@ module CyberSource
87
82
  # Calculates hash code according to all attributes.
88
83
  # @return [Fixnum] Hash code
89
84
  def hash
90
- [field_name, field_value].hash
85
+ [bill_to, ship_to].hash
91
86
  end
92
87
 
93
88
  # Builds the object from hash