Skip to content

Commit bc1406e

Browse files
authored
Merge pull request #77 from CyberSource/july-2022
Changes for next release
2 parents affff44 + 1ad6686 commit bc1406e

9 files changed

+77
-10
lines changed

cybersource_rest_client.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ require "cybersource_rest_client/version"
1717

1818
Gem::Specification.new do |s|
1919
s.name = "cybersource_rest_client"
20-
s.version = "0.0.44"
20+
s.version = "0.0.45"
2121
s.platform = Gem::Platform::RUBY
2222
s.authors = ["CyberSource"]
2323
s.email = ["[email protected]"]

docs/MitVoidRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**client_reference_information** | [**Ptsv2paymentsClientReferenceInformation**](Ptsv2paymentsClientReferenceInformation.md) | | [optional]
77
**payment_information** | [**Ptsv2paymentsidvoidsPaymentInformation**](Ptsv2paymentsidvoidsPaymentInformation.md) | | [optional]
8+
**order_information** | [**Ptsv2paymentsidvoidsOrderInformation**](Ptsv2paymentsidvoidsOrderInformation.md) | | [optional]
89

910

docs/PtsV2PaymentsRefundPost201ResponseProcessorInformation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ Name | Type | Description | Notes
99
**merchant_number** | **String** | Identifier that was assigned to you by your acquirer. This value must be printed on the receipt. #### Returned by Authorizations and Credits. This reply field is only supported by merchants who have installed client software on their POS terminals and use these processors: - American Express Direct - Credit Mutuel-CIC - FDC Nashville Global - OmniPay Direct - SIX | [optional]
1010
**response_code** | **String** | For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value. **Important** Do not use this field to evaluate the result of the authorization. #### PIN debit Response value that is returned by the processor or bank. **Important** Do not use this field to evaluate the results of the transaction request. Returned by PIN debit credit, PIN debit purchase, and PIN debit reversal. #### AIBMS If this value is `08`, you can accept the transaction if the customer provides you with identification. #### Atos This value is the response code sent from Atos and it might also include the response code from the bank. Format: `aa,bb` with the two values separated by a comma and where: - `aa` is the two-digit error message from Atos. - `bb` is the optional two-digit error message from the bank. #### Comercio Latino This value is the status code and the error or response code received from the processor separated by a colon. Format: [status code]:E[error code] or [status code]:R[response code] Example `2:R06` #### JCN Gateway Processor-defined detail error code. The associated response category code is in the `processorInformation.responseCategoryCode` field. String (3) | [optional]
1111
**ach_verification** | [**PtsV2PaymentsPost201ResponseProcessorInformationAchVerification**](PtsV2PaymentsPost201ResponseProcessorInformationAchVerification.md) | | [optional]
12+
**network_transaction_id** | **String** | Same value as `processorInformation.transactionId` | [optional]
1213

1314

generator/cybersource-rest-spec.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14468,6 +14468,10 @@
1446814468
"description": "Raw results from the ACH verification service.\nFor details about this service and the possible values for the raw results, see \"ACH Verification\" and \"Verification Codes\" in the [Electronic Check Services Using the SCMP API](https://apps.cybersource.com/library/documentation/dev_guides/EChecks_SCMP_API/html/).\n"
1446914469
}
1447014470
}
14471+
},
14472+
"networkTransactionId": {
14473+
"type": "string",
14474+
"description": "Same value as `processorInformation.transactionId`"
1447114475
}
1447214476
}
1447314477
},
@@ -16865,6 +16869,10 @@
1686516869
"description": "Raw results from the ACH verification service.\nFor details about this service and the possible values for the raw results, see \"ACH Verification\" and \"Verification Codes\" in the [Electronic Check Services Using the SCMP API](https://apps.cybersource.com/library/documentation/dev_guides/EChecks_SCMP_API/html/).\n"
1686616870
}
1686716871
}
16872+
},
16873+
"networkTransactionId": {
16874+
"type": "string",
16875+
"description": "Same value as `processorInformation.transactionId`"
1686816876
}
1686916877
}
1687016878
},
@@ -19551,6 +19559,10 @@
1955119559
"description": "Raw results from the ACH verification service.\nFor details about this service and the possible values for the raw results, see \"ACH Verification\" and \"Verification Codes\" in the [Electronic Check Services Using the SCMP API](https://apps.cybersource.com/library/documentation/dev_guides/EChecks_SCMP_API/html/).\n"
1955219560
}
1955319561
}
19562+
},
19563+
"networkTransactionId": {
19564+
"type": "string",
19565+
"description": "Same value as `processorInformation.transactionId`"
1955419566
}
1955519567
}
1955619568
},
@@ -21521,6 +21533,26 @@
2152121533
}
2152221534
}
2152321535
}
21536+
},
21537+
"orderInformation": {
21538+
"type": "object",
21539+
"properties": {
21540+
"amountDetails": {
21541+
"type": "object",
21542+
"properties": {
21543+
"totalAmount": {
21544+
"type": "string",
21545+
"maxLength": 19,
21546+
"description": "Grand total for the order. This value cannot be negative. You can include a decimal point (.), but no other special characters.\nCyberSource truncates the amount to the correct number of decimal places.\n\n**Note** For CTV, FDCCompass, Paymentech processors, the maximum length for this field is 12.\n\n**Important** Some processors have specific requirements and limitations, such as maximum amounts and maximum field lengths. For details, see:\n- \"Authorization Information for Specific Processors\" in the [Credit Card Services Using the SCMP API Guide](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/).\n- \"Capture Information for Specific Processors\" in the [Credit Card Services Using the SCMP API Guide](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/).\n- \"Credit Information for Specific Processors\" in the [Credit Card Services Using the SCMP API Guide](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/).\n\nIf your processor supports zero amount authorizations, you can set this field to 0 for the authorization to check if the card is lost or stolen. For details, see \"Zero Amount Authorizations,\" \"Credit Information for Specific Processors\" in [Credit Card Services Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/)\n\n#### Card Present\nRequired to include either this field or `orderInformation.lineItems[].unitPrice` for the order.\n\n#### Invoicing\nRequired for creating a new invoice.\n\n#### PIN Debit\nAmount 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.\n\nRequired field for PIN Debit purchase and PIN Debit credit requests.\nOptional field for PIN Debit reversal requests.\n\n#### GPX\nThis field is optional for reversing an authorization or credit; however, for all other processors, these fields are required.\n\n#### DCC with a Third-Party Provider\nSet this field to the converted amount that was returned by the DCC provider. You must include either this field or the 1st line item in the order and the specific line-order amount in your request. For details, see `grand_total_amount` 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).\n\n#### FDMS South\nIf you accept IDR or CLP currencies, see the entry for FDMS South in \"Authorization Information for Specific Processors\" of the [Credit Card Services Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/)\n\n#### DCC for First Data\nNot used.\n"
21547+
},
21548+
"currency": {
21549+
"type": "string",
21550+
"maxLength": 3,
21551+
"description": "Currency used for the order. Use the three-character [ISO Standard Currency Codes.](http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf)\n\n#### Used by\n**Authorization**\nRequired field.\n\n**Authorization Reversal**\nFor 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.\n\n#### PIN Debit\nCurrency 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).\nReturned by PIN debit purchase.\n\nFor 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.\nFor the possible values, see the [ISO Standard Currency Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/currencies.pdf).\n\nRequired field for PIN Debit purchase and PIN Debit credit requests.\nOptional field for PIN Debit reversal requests.\n\n#### GPX\nThis field is optional for reversing an authorization or credit.\n\n#### DCC for First Data\nYour 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).\n\n#### Tax Calculation\nRequired for international tax and value added tax only.\nOptional for U.S. and Canadian taxes.\nYour local currency.\n"
21552+
}
21553+
}
21554+
}
21555+
}
2152421556
}
2152521557
},
2152621558
"example": {

generator/cybersource_ruby_sdk_gen.bat

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ REM Command to generate SDK
1414

1515
java -jar swagger-codegen-cli-2.2.3.jar generate -t cybersource-ruby-template -i cybersource-rest-spec.json -l ruby -o ../ -c %~dp0cybersource-ruby-config.json
1616

17-
powershell -Command "(Get-Content ..\lib\cybersource_rest_client\api\secure_file_share_api.rb) | ForEach-Object { $_ -replace 'select_header_content_type\(\[''application/json;charset=utf-8', 'select_header_content_type([''*/*' } | Set-Content ..\lib\cybersource_rest_client\api\secure_file_share_api.rb"
17+
powershell -Command "(Get-Content ..\lib\cybersource_rest_client\api\secure_file_share_api.rb) | ForEach-Object { $_ -replace 'select_header_content_type\(\[''\*_\/_\*;charset=utf-8', 'select_header_content_type([''*/*;charset=utf-8' } | Set-Content ..\lib\cybersource_rest_client\api\secure_file_share_api.rb"
18+
19+
powershell -Command "(Get-Content ..\docs\SecureFileShareApi.md) | ForEach-Object { $_ -replace '\*\*Content-Type\*\*: \*_\/_\*;charset=utf-8', '**Content-Type**: */*;charset=utf-8' } | Set-Content ..\docs\SecureFileShareApi.md"
1820

1921
REM to rename error__links to error_links
2022
powershell -Command "(Get-Content ..\lib\cybersource_rest_client.rb) | ForEach-Object { $_ -replace 'cybersource_rest_client/models/error__links', 'cybersource_rest_client/models/error_links' } | Set-Content ..\lib\cybersource_rest_client.rb"

lib/cybersource_rest_client/models/mit_void_request.rb

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,23 @@ class MitVoidRequest
1818

1919
attr_accessor :payment_information
2020

21+
attr_accessor :order_information
22+
2123
# Attribute mapping from ruby-style variable name to JSON key.
2224
def self.attribute_map
2325
{
2426
:'client_reference_information' => :'clientReferenceInformation',
25-
:'payment_information' => :'paymentInformation'
27+
:'payment_information' => :'paymentInformation',
28+
:'order_information' => :'orderInformation'
2629
}
2730
end
2831

2932
# Attribute type mapping.
3033
def self.swagger_types
3134
{
3235
:'client_reference_information' => :'Ptsv2paymentsClientReferenceInformation',
33-
:'payment_information' => :'Ptsv2paymentsidvoidsPaymentInformation'
36+
:'payment_information' => :'Ptsv2paymentsidvoidsPaymentInformation',
37+
:'order_information' => :'Ptsv2paymentsidvoidsOrderInformation'
3438
}
3539
end
3640

@@ -49,6 +53,10 @@ def initialize(attributes = {})
4953
if attributes.has_key?(:'paymentInformation')
5054
self.payment_information = attributes[:'paymentInformation']
5155
end
56+
57+
if attributes.has_key?(:'orderInformation')
58+
self.order_information = attributes[:'orderInformation']
59+
end
5260
end
5361

5462
# Show invalid properties with the reasons. Usually used together with valid?
@@ -70,7 +78,8 @@ def ==(o)
7078
return true if self.equal?(o)
7179
self.class == o.class &&
7280
client_reference_information == o.client_reference_information &&
73-
payment_information == o.payment_information
81+
payment_information == o.payment_information &&
82+
order_information == o.order_information
7483
end
7584

7685
# @see the `==` method
@@ -82,7 +91,7 @@ def eql?(o)
8291
# Calculates hash code according to all attributes.
8392
# @return [Fixnum] Hash code
8493
def hash
85-
[client_reference_information, payment_information].hash
94+
[client_reference_information, payment_information, order_information].hash
8695
end
8796

8897
# Builds the object from hash

lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ class PtsV2PaymentsRefundPost201ResponseProcessorInformation
3131

3232
attr_accessor :ach_verification
3333

34+
# Same value as `processorInformation.transactionId`
35+
attr_accessor :network_transaction_id
36+
3437
# Attribute mapping from ruby-style variable name to JSON key.
3538
def self.attribute_map
3639
{
@@ -39,7 +42,8 @@ def self.attribute_map
3942
:'forwarded_acquirer_code' => :'forwardedAcquirerCode',
4043
:'merchant_number' => :'merchantNumber',
4144
:'response_code' => :'responseCode',
42-
:'ach_verification' => :'achVerification'
45+
:'ach_verification' => :'achVerification',
46+
:'network_transaction_id' => :'networkTransactionId'
4347
}
4448
end
4549

@@ -51,7 +55,8 @@ def self.swagger_types
5155
:'forwarded_acquirer_code' => :'String',
5256
:'merchant_number' => :'String',
5357
:'response_code' => :'String',
54-
:'ach_verification' => :'PtsV2PaymentsPost201ResponseProcessorInformationAchVerification'
58+
:'ach_verification' => :'PtsV2PaymentsPost201ResponseProcessorInformationAchVerification',
59+
:'network_transaction_id' => :'String'
5560
}
5661
end
5762

@@ -86,6 +91,10 @@ def initialize(attributes = {})
8691
if attributes.has_key?(:'achVerification')
8792
self.ach_verification = attributes[:'achVerification']
8893
end
94+
95+
if attributes.has_key?(:'networkTransactionId')
96+
self.network_transaction_id = attributes[:'networkTransactionId']
97+
end
8998
end
9099

91100
# Show invalid properties with the reasons. Usually used together with valid?
@@ -141,7 +150,8 @@ def ==(o)
141150
forwarded_acquirer_code == o.forwarded_acquirer_code &&
142151
merchant_number == o.merchant_number &&
143152
response_code == o.response_code &&
144-
ach_verification == o.ach_verification
153+
ach_verification == o.ach_verification &&
154+
network_transaction_id == o.network_transaction_id
145155
end
146156

147157
# @see the `==` method
@@ -153,7 +163,7 @@ def eql?(o)
153163
# Calculates hash code according to all attributes.
154164
# @return [Fixnum] Hash code
155165
def hash
156-
[approval_code, transaction_id, forwarded_acquirer_code, merchant_number, response_code, ach_verification].hash
166+
[approval_code, transaction_id, forwarded_acquirer_code, merchant_number, response_code, ach_verification, network_transaction_id].hash
157167
end
158168

159169
# Builds the object from hash

spec/models/mit_void_request_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,10 @@
4444
end
4545
end
4646

47+
describe 'test attribute "order_information"' do
48+
it 'should work' do
49+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50+
end
51+
end
52+
4753
end

spec/models/pts_v2_payments_refund_post201_response_processor_information_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,10 @@
6868
end
6969
end
7070

71+
describe 'test attribute "network_transaction_id"' do
72+
it 'should work' do
73+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74+
end
75+
end
76+
7177
end

0 commit comments

Comments
 (0)