Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect string interpolations #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/cybersource_rest_client/models/body.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def valid?
def object=(object)
validator = EnumAttributeValidator.new('String', ['instrumentIdentifier'])
unless validator.valid?(object)
fail ArgumentError, 'invalid value for "object", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'object', must be one of #{validator.allowable_values}."
end
@object = object
end
Expand All @@ -156,7 +156,7 @@ def object=(object)
def state=(state)
validator = EnumAttributeValidator.new('String', ['ACTIVE', 'CLOSED'])
unless validator.valid?(state)
fail ArgumentError, 'invalid value for "state", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'state', must be one of #{validator.allowable_values}."
end
@state = state
end
Expand Down
4 changes: 2 additions & 2 deletions lib/cybersource_rest_client/models/body_2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def valid?
def object=(object)
validator = EnumAttributeValidator.new('String', ['paymentInstrument'])
unless validator.valid?(object)
fail ArgumentError, 'invalid value for "object", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'object', must be one of #{validator.allowable_values}."
end
@object = object
end
Expand All @@ -188,7 +188,7 @@ def object=(object)
def state=(state)
validator = EnumAttributeValidator.new('String', ['ACTIVE', 'CLOSED'])
unless validator.valid?(state)
fail ArgumentError, 'invalid value for "state", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'state', must be one of #{validator.allowable_values}."
end
@state = state
end
Expand Down
4 changes: 2 additions & 2 deletions lib/cybersource_rest_client/models/body_3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def valid?
def object=(object)
validator = EnumAttributeValidator.new('String', ['paymentInstrument'])
unless validator.valid?(object)
fail ArgumentError, 'invalid value for "object", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'object', must be one of #{validator.allowable_values}."
end
@object = object
end
Expand All @@ -188,7 +188,7 @@ def object=(object)
def state=(state)
validator = EnumAttributeValidator.new('String', ['ACTIVE', 'CLOSED'])
unless validator.valid?(state)
fail ArgumentError, 'invalid value for "state", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'state', must be one of #{validator.allowable_values}."
end
@state = state
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def id=(id)
def status=(status)
validator = EnumAttributeValidator.new('String', ['PENDING'])
unless validator.valid?(status)
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
end
@status = status
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def id=(id)
def status=(status)
validator = EnumAttributeValidator.new('String', ['PENDING'])
unless validator.valid?(status)
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
end
@status = status
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def valid?
def status=(status)
validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST'])
unless validator.valid?(status)
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
end
@status = status
end
Expand All @@ -135,7 +135,7 @@ def status=(status)
def reason=(reason)
validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'EXCEEDS_AUTH_AMOUNT', 'AUTH_ALREADY_REVERSED', 'TRANSACTION_ALREADY_SETTLED', 'MISSING_AUTH', 'TRANSACTION_ALREADY_REVERSED_OR_SETTLED'])
unless validator.valid?(reason)
fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'reason', must be one of #{validator.allowable_values}."
end
@reason = reason
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def id=(id)
def status=(status)
validator = EnumAttributeValidator.new('String', ['AUTHORIZED', 'PARTIAL_AUTHORIZED', 'AUTHORIZED_PENDING_REVIEW', 'DECLINED', 'INVALID_REQUEST', 'PENDING'])
unless validator.valid?(status)
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
end
@status = status
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def valid?
def reason=(reason)
validator = EnumAttributeValidator.new('String', ['AVS_FAILED', 'CONTACT_PROCESSOR', 'CV_FAILED', 'EXPIRED_CARD', 'PROCESSOR_DECLINED', 'INSUFFICIENT_FUND', 'STOLEN_LOST_CARD', 'ISSUER_UNAVAILABLE', 'UNAUTHORIZED_CARD', 'CVN_NOT_MATCH', 'EXCEEDS_CREDIT_LIMIT', 'INVALID_CVN', 'PAYMENT_REFUSED', 'INVALID_ACCOUNT', 'GENERAL_DECLINE'])
unless validator.valid?(reason)
fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'reason', must be one of #{validator.allowable_values}."
end
@reason = reason
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def valid?
def reason=(reason)
validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA'])
unless validator.valid?(reason)
fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'reason', must be one of #{validator.allowable_values}."
end
@reason = reason
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def currency=(currency)
def balance_sign=(balance_sign)
validator = EnumAttributeValidator.new('String', ['+', '-'])
unless validator.valid?(balance_sign)
fail ArgumentError, 'invalid value for "balance_sign", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'balance_sign', must be one of #{validator.allowable_values}."
end
@balance_sign = balance_sign
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def valid?
def status=(status)
validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST'])
unless validator.valid?(status)
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
end
@status = status
end
Expand All @@ -135,7 +135,7 @@ def status=(status)
def reason=(reason)
validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_CARD', 'CARD_TYPE_NOT_ACCEPTED', 'INVALID_MERCHANT_CONFIGURATION', 'PROCESSOR_UNAVAILABLE', 'INVALID_AMOUNT', 'INVALID_CARD_TYPE', 'DEBIT_CARD_USEAGE_EXCEEDD_LIMIT'])
unless validator.valid?(reason)
fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'reason', must be one of #{validator.allowable_values}."
end
@reason = reason
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def valid?
def status=(status)
validator = EnumAttributeValidator.new('String', ['SERVER_ERROR'])
unless validator.valid?(status)
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
end
@status = status
end
Expand All @@ -125,7 +125,7 @@ def status=(status)
def reason=(reason)
validator = EnumAttributeValidator.new('String', ['SYSTEM_ERROR', 'SERVER_TIMEOUT', 'SERVICE_TIMEOUT', 'PROCESSOR_TIMEOUT'])
unless validator.valid?(reason)
fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'reason', must be one of #{validator.allowable_values}."
end
@reason = reason
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def id=(id)
def status=(status)
validator = EnumAttributeValidator.new('String', ['PENDING'])
unless validator.valid?(status)
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
end
@status = status
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def valid?
def status=(status)
validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST'])
unless validator.valid?(status)
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
end
@status = status
end
Expand All @@ -135,7 +135,7 @@ def status=(status)
def reason=(reason)
validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_CARD', 'INVALID_MERCHANT_CONFIGURATION', 'CAPTURE_ALREADY_VOIDED', 'ACCOUNT_NOT_ALLOWED_CREDIT'])
unless validator.valid?(reason)
fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'reason', must be one of #{validator.allowable_values}."
end
@reason = reason
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def id=(id)
def status=(status)
validator = EnumAttributeValidator.new('String', ['REVERSED'])
unless validator.valid?(status)
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
end
@status = status
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def valid?
def status=(status)
validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST'])
unless validator.valid?(status)
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
end
@status = status
end
Expand All @@ -135,7 +135,7 @@ def status=(status)
def reason=(reason)
validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'AUTH_ALREADY_REVERSED', 'MISSING_AUTH', 'TRANSACTION_ALREADY_REVERSED_OR_SETTLED'])
unless validator.valid?(reason)
fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'reason', must be one of #{validator.allowable_values}."
end
@reason = reason
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def id=(id)
def status=(status)
validator = EnumAttributeValidator.new('String', ['VOIDED'])
unless validator.valid?(status)
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
end
@status = status
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def valid?
def status=(status)
validator = EnumAttributeValidator.new('String', ['INVALID_REQUEST'])
unless validator.valid?(status)
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
end
@status = status
end
Expand All @@ -135,7 +135,7 @@ def status=(status)
def reason=(reason)
validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'NOT_VOIDABLE'])
unless validator.valid?(reason)
fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'reason', must be one of #{validator.allowable_values}."
end
@reason = reason
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def id=(id)
def status=(status)
validator = EnumAttributeValidator.new('String', ['ACCEPTED', 'DECLINED'])
unless validator.valid?(status)
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
end
@status = status
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def valid?
def reason=(reason)
validator = EnumAttributeValidator.new('String', ['EXPIRED_CARD', 'PROCESSOR_DECLINED', 'STOLEN_LOST_CARD', 'UNAUTHORIZED_CARD', 'CVN_NOT_MATCH', 'INVALID_CVN', 'BLACKLISTED_CUSTOMER', 'INVALID_ACCOUNT', 'GENERAL_DECLINE', 'RISK_CONTROL_DECLINE', 'PROCESSOR_RISK_CONTROL_DECLINE'])
unless validator.valid?(reason)
fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'reason', must be one of #{validator.allowable_values}."
end
@reason = reason
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def valid?
def reason=(reason)
validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA'])
unless validator.valid?(reason)
fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'reason', must be one of #{validator.allowable_values}."
end
@reason = reason
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def valid?
def reason=(reason)
validator = EnumAttributeValidator.new('String', ['SUCCESS', 'CONTACT_PROCESSOR'])
unless validator.valid?(reason)
fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'reason', must be one of #{validator.allowable_values}."
end
@reason = reason
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def valid?
def reason=(reason)
validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA', 'DUPLICATE_REQUEST', 'INVALID_MERCHANT_CONFIGURATION', 'INVALID_AMOUNT', 'DEBIT_CARD_USEAGE_EXCEEDD_LIMIT'])
unless validator.valid?(reason)
fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'reason', must be one of #{validator.allowable_values}."
end
@reason = reason
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def valid?
def status=(status)
validator = EnumAttributeValidator.new('String', ['SERVER_ERROR'])
unless validator.valid?(status)
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
end
@status = status
end
Expand All @@ -125,7 +125,7 @@ def status=(status)
def reason=(reason)
validator = EnumAttributeValidator.new('String', ['SYSTEM_ERROR', 'SERVER_TIMEOUT', 'SERVICE_TIMEOUT', 'PROCESSOR_TIMEOUT'])
unless validator.valid?(reason)
fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'reason', must be one of #{validator.allowable_values}."
end
@reason = reason
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def valid?
def type=(type)
validator = EnumAttributeValidator.new('String', ['ssn', 'driverlicense'])
unless validator.valid?(type)
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
end
@type = type
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def valid?
def type=(type)
validator = EnumAttributeValidator.new('String', ['alternate', 'local', 'national', 'vat'])
unless validator.valid?(type)
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
end
@type = type
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def phone_number=(phone_number)
def phone_type=(phone_type)
validator = EnumAttributeValidator.new('String', ['day', 'home', 'night', 'work'])
unless validator.valid?(phone_type)
fail ArgumentError, 'invalid value for "phone_type", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'phone_type', must be one of #{validator.allowable_values}."
end
@phone_type = phone_type
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def valid?
def type=(type)
validator = EnumAttributeValidator.new('String', ['customer', 'merchant'])
unless validator.valid?(type)
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
end
@type = type
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def phone_number=(phone_number)
def phone_type=(phone_type)
validator = EnumAttributeValidator.new('String', ['day', 'home', 'night', 'work'])
unless validator.valid?(phone_type)
fail ArgumentError, 'invalid value for "phone_type", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'phone_type', must be one of #{validator.allowable_values}."
end
@phone_type = phone_type
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def valid?
def type=(type)
validator = EnumAttributeValidator.new('String', ['PURCHASES', 'REFUNDS', 'FEES', 'CHARGEBACKS'])
unless validator.valid?(type)
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
end
@type = type
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def valid?
def report_mime_type=(report_mime_type)
validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv'])
unless validator.valid?(report_mime_type)
fail ArgumentError, 'invalid value for "report_mime_type", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'report_mime_type', must be one of #{validator.allowable_values}."
end
@report_mime_type = report_mime_type
end
Expand All @@ -210,7 +210,7 @@ def report_mime_type=(report_mime_type)
def report_frequency=(report_frequency)
validator = EnumAttributeValidator.new('String', ['DAILY', 'WEEKLY', 'MONTHLY'])
unless validator.valid?(report_frequency)
fail ArgumentError, 'invalid value for "report_frequency", must be one of #{validator.allowable_values}.'
fail ArgumentError, "invalid value for 'report_frequency', must be one of #{validator.allowable_values}."
end
@report_frequency = report_frequency
end
Expand Down
Loading