Skip to content

Commit 2880093

Browse files
Added error codes for funding sources errors
1 parent 762e68a commit 2880093

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

lib/shipengine/exceptions/error_code.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,17 @@ def self.get_by_str(str_key)
247247
## ShipEngine only allows you to have one webhook of each type. If you would
248248
## like to replace a webhook with a new one please delete the old one fir.
249249
# #/
250-
WEBHOOK_EVENT_TYPE_CONFLICT: 'webhook_event_type_conflict'
250+
WEBHOOK_EVENT_TYPE_CONFLICT: 'webhook_event_type_conflict',
251+
252+
##
253+
## Funding source isnt properly configured and can't be used.
254+
# #/
255+
FUNDING_SOURCE_MISSING_CONFIGURATION: 'funding_source_missing_configuration',
256+
257+
##
258+
## There was an unexpected problem with a funding source.
259+
# #/
260+
FUNDING_SOURCE_ERROR: 'funding_source_error'
251261
}.freeze
252262
end
253263
end

lib/shipengine/exceptions/error_type.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ def self.get_by_str(str_key)
4242
# that has not yet been assigned a specific error_type. If you receive
4343
# persistent system errors, then please contact our support or check our API
4444
# status page to see if there's a known issue.
45-
SYSTEM: 'system'
45+
SYSTEM: 'system',
46+
# General wallet error type.
47+
WALLET: 'wallet',
48+
# General funding sources error type.
49+
FUNDING_SOURCES: 'funding_sources'
4650
}.freeze
4751
end
4852
end

0 commit comments

Comments
 (0)