paymentsds-mpesa 0.1.0.pre.alpha.31 → 0.1.0.pre.alpha.32

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 (33) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/lib/paymentsds/mpesa/errors/constants.rb +51 -0
  4. data/lib/paymentsds/mpesa/errors/direct_debt_missing.rb +9 -0
  5. data/lib/paymentsds/mpesa/errors/duplicate_direct_debt.rb +9 -0
  6. data/lib/paymentsds/mpesa/errors/errors.rb +26 -0
  7. data/lib/paymentsds/mpesa/errors/inactive_account.rb +9 -0
  8. data/lib/paymentsds/mpesa/errors/initiator_authentication.rb +9 -0
  9. data/lib/paymentsds/mpesa/errors/insuficient_balance.rb +9 -0
  10. data/lib/paymentsds/mpesa/errors/invalid_amount.rb +9 -0
  11. data/lib/paymentsds/mpesa/errors/invalid_initiator_identifier.rb +9 -0
  12. data/lib/paymentsds/mpesa/errors/invalid_language_code.rb +9 -0
  13. data/lib/paymentsds/mpesa/errors/invalid_market.rb +9 -0
  14. data/lib/paymentsds/mpesa/errors/invalid_missing_properties.rb +9 -0
  15. data/lib/paymentsds/mpesa/errors/invalid_msisdn.rb +9 -0
  16. data/lib/paymentsds/mpesa/errors/invalid_receiver.rb +9 -0
  17. data/lib/paymentsds/mpesa/errors/invalid_reference.rb +9 -0
  18. data/lib/paymentsds/mpesa/errors/invalid_security_credential.rb +9 -0
  19. data/lib/paymentsds/mpesa/errors/invalid_shortcode.rb +9 -0
  20. data/lib/paymentsds/mpesa/errors/invalid_thirdparty_reference.rb +9 -0
  21. data/lib/paymentsds/mpesa/errors/invalid_transaction_id.rb +9 -0
  22. data/lib/paymentsds/mpesa/errors/invalid_transaction_reference.rb +9 -0
  23. data/lib/paymentsds/mpesa/errors/profile_problems.rb +9 -0
  24. data/lib/paymentsds/mpesa/errors/request_timeout.rb +9 -0
  25. data/lib/paymentsds/mpesa/errors/transaction_cancelled.rb +9 -0
  26. data/lib/paymentsds/mpesa/errors/transaction_failed.rb +9 -0
  27. data/lib/paymentsds/mpesa/errors/unavailabe_server.rb +9 -0
  28. data/lib/paymentsds/mpesa/errors/unknown.rb +9 -0
  29. data/lib/paymentsds/mpesa/errors/unknown_status.rb +9 -0
  30. data/lib/paymentsds/mpesa/errors/validation.rb +9 -0
  31. data/lib/paymentsds/mpesa/version.rb +1 -1
  32. data/publish.sh +6 -0
  33. metadata +30 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f911b96060e60656a509701471434cbf8ed2ece7db47b80805fe0b92271020d
4
- data.tar.gz: 6bce0fba1f4504da771bc69d9ffc0dd4c9a2f9d887037706ca0b173f7ab64156
3
+ metadata.gz: 698bacf39217bd0ec2d8a515ac12dcc503cf53460a1a2a924705c7c0dc6a04f4
4
+ data.tar.gz: 3a2658187038669829a88207df6f17dab61d42597cfe9b6a62c56f349de24ea2
5
5
  SHA512:
6
- metadata.gz: 2f44c1fa5e5e0170a49406157eb7ae7c6440499cef384dc143ea86da156044fda8c89b93a209fd453512a2ab78af00d3ac9682f2f4d616e88b252e5b343663cf
7
- data.tar.gz: 57eff61c070b0ee0859317f00fdb218d32266d7441cb7d73279d0a49a8c6a8637e0f64b4d81175189d396ed0bac4722b4d951e4f1202f283e8a2052ae53adfd8
6
+ metadata.gz: dc9b3150e581a24ffb48d84a346399d71781430eade8e0df7c2b217b51c79e8b990dbe785253f4d48774266d7a697966fd051d2704beab4394c8d7cbc3d4989c
7
+ data.tar.gz: 9080abb4e22cab13b3ff779fe0b6d1a4b0bd15a7859290a52ebbcc2b5a4a173fd5554a0a440952dbc5d9b1b31d57471ac9c445f3c180c868a46d4300bdca28be
data/.gitignore CHANGED
@@ -10,4 +10,4 @@
10
10
  /Gemfile.lock
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
-
13
+ *.gem
@@ -0,0 +1,51 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ INS0 = "INS-0"
4
+ INS18 = "INS-18"
5
+ INS19 = "INS-19"
6
+ INS20 = "INS-20"
7
+ INS21 = "INS-21"
8
+ INS22 = "INS-22"
9
+ INS23 = "INS-23"
10
+ INS24 = "INS-24"
11
+ INS25 = "INS-25"
12
+ INS993 = "INS-993"
13
+ INS994 = "INS-994"
14
+ INS995 = "INS-995"
15
+ INS996 = "INS-996"
16
+ INS997 = "INS-997"
17
+ INS998 = "INS-998"
18
+ INS2001 = "INS-2001"
19
+ INS2002 = "INS-2002"
20
+ INS2051 = "INS-2051"
21
+ INS2057 = "INS-2057"
22
+
23
+ DIRECT_DEBT = "DIRECT_DEBT"
24
+ DUPLICATE_TRANSACTION = "DUPLICATE_TRANSACTION"
25
+ INSUFICIENT_BALANCE = "INSUFICIENT_BALANCE"
26
+ INVALID_AMOUNT = "INVALID_AMOUNT"
27
+ INVALID_MISSING_PROPERTIES = "INVALID_MISSING_PROPERTIES"
28
+ INVALID_RECEIVER = "INVALID_RECEIVER"
29
+ INVALID_REFERENCE = "INVALID_REFERENCE"
30
+ INVALID_SECURITY_CREDENTIAL = "INVALID_SECURITY_CREDENTIAL"
31
+ INVALID_SHORTCODE = "INVALID_SHORTCODE"
32
+ INVALID_THIRDPARTY_REFERENCE = "INVALID_THIRDPARTY_REFERENCE"
33
+ INVALID_TRANSACTION_ID = "INVALID_TRANSACTION_ID"
34
+ INVALID_TRANSACTION_REFERENCE = "INVALID_TRANSACTION_INVALID_TRANSACTION_REFERENCE"
35
+ REQUEST_TIMEOUT = "REQUEST_TIMEOUT"
36
+ TRANSACTION_CANCELLED = "TRANSACTION_CANCELLED"
37
+ TRANSACTION_FAILED = "TRANSACTION_FAILED"
38
+ UNAVAILABLE_SERVER = "UNAVAILABLE_SERVER"
39
+ UNKNOWN_STATUS = "UNKNOWN_STATUS"
40
+ UNKNOWN = "UNKNOWN"
41
+ VALIDATION = "VALIDATION"
42
+ INVALID_INITIATOR_IDENTIFIER = "INVALID_INITIATOR_IDENTIFIER"
43
+ INVALID_LANGUAGE_CODE = "INVALID_LANGUAGE_CODE"
44
+ INVALID_MARKET = "INVALID_MARKET"
45
+ INVALID_MSISDN = "INVALID_MSISDN"
46
+ PROFILE_PROBLEMS = "PROFILE_PROBLEMS"
47
+ INACTIVE_ACCOUNT = "INACTIVE_ACCOUNT"
48
+ INITIATOR_AUTHENTICATION = "INITIATOR_AUTHENTICATION"
49
+ PROFILE_PROBLEMS = "PROFILE_PROBLEMS"
50
+ end
51
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class DirectDebtMissingError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::DIRECT_DEBT)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class DuplicateDirectDebtError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::DUPLICATE_TRANSACTION)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,26 @@
1
+ require_relative "constants"
2
+ require_relative "direct_debt_missing"
3
+ require_relative "duplicate_direct_debt"
4
+ require_relative "inactive_account"
5
+ require_relative "initiator_authentication"
6
+ require_relative "insuficient_balance"
7
+ require_relative "invalid_initiator_identifier"
8
+ require_relative "invalid_market"
9
+ require_relative "invalid_language_code"
10
+ require_relative "invalid_msisdn"
11
+ require_relative "profile_problems"
12
+ require_relative "invalid_amount"
13
+ require_relative "invalid_missing_properties"
14
+ require_relative "invalid_receiver"
15
+ require_relative "invalid_reference"
16
+ require_relative "invalid_security_credential"
17
+ require_relative "invalid_shortcode"
18
+ require_relative "invalid_thirdparty_reference"
19
+ require_relative "invalid_transaction_id"
20
+ require_relative "invalid_transaction_reference"
21
+ require_relative "request_timeout"
22
+ require_relative "transaction_cancelled"
23
+ require_relative "transaction_failed"
24
+ require_relative "unavailable_server"
25
+ require_relative "unknown_status"
26
+ require_relative "unknown"
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InactiveAccountError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INACTIVE_ACCOUNT)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InitiatorAuthenticationError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INITIATOR_AUTHENTICATION)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InsuficientBalanceError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INSUFICIENT_BALANCE)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidAmountError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_AMOUNT)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidInitiatorIdentifierError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_INITIATOR_IDENTIFIER)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidLanguageCodeError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_LANGUAGE_CODE)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidMarketError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_MARKET)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidMissingPropertiesError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_MISSING_PROPERTIES)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidMSISDNError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_MSISDN)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidReceiverError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_RECEIVER)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidReferenceError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_REFERENCE)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidSecurityCredentialError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_SECURITY_CREDENTIAL)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidShortcodeError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_SHORTCODE)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidThirdPartyReferenceError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_THIRDPARTY_REFERENCE)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class TransactionIdError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_TRANSACTION_ID)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidTransactionReferenceError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_TRANSACTION_REFERENCE)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class ProfileProblemsError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::PROFILE_PROBLEMS)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class ProfileProblemsError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::PROFILE_PROBLEMS)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class TransactionCancelledError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::TRANSACTION_CANCELLED)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class TransactionFailedError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::TRANSACTION_FAILED)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class UnavailableServerError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::UNAVAILABLE_SERVER)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class UnknownError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::UNKNOWN)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class UnknownStatusError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::UNKNOWN_STATUS)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class ValidationError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::VALIDATION)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Paymentsds
4
4
  module MPesa
5
- VERSION = '0.1.0.pre.alpha.31'
5
+ VERSION = '0.1.0.pre.alpha.32'
6
6
  end
7
7
  end
@@ -0,0 +1,6 @@
1
+ #!/bin/env bash
2
+
3
+ rm -rf *.gem
4
+ gem build paymentsds-mpesa.gemspec
5
+ gem push *.gem
6
+ gem install paymentsds-mpesa --pre
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paymentsds-mpesa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.alpha.31
4
+ version: 0.1.0.pre.alpha.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edson Michaque
@@ -129,12 +129,41 @@ files:
129
129
  - lib/paymentsds/mpesa/constants.rb
130
130
  - lib/paymentsds/mpesa/environment.rb
131
131
  - lib/paymentsds/mpesa/error_type.rb
132
+ - lib/paymentsds/mpesa/errors/constants.rb
133
+ - lib/paymentsds/mpesa/errors/direct_debt_missing.rb
134
+ - lib/paymentsds/mpesa/errors/duplicate_direct_debt.rb
135
+ - lib/paymentsds/mpesa/errors/errors.rb
136
+ - lib/paymentsds/mpesa/errors/inactive_account.rb
137
+ - lib/paymentsds/mpesa/errors/initiator_authentication.rb
138
+ - lib/paymentsds/mpesa/errors/insuficient_balance.rb
139
+ - lib/paymentsds/mpesa/errors/invalid_amount.rb
140
+ - lib/paymentsds/mpesa/errors/invalid_initiator_identifier.rb
141
+ - lib/paymentsds/mpesa/errors/invalid_language_code.rb
142
+ - lib/paymentsds/mpesa/errors/invalid_market.rb
143
+ - lib/paymentsds/mpesa/errors/invalid_missing_properties.rb
144
+ - lib/paymentsds/mpesa/errors/invalid_msisdn.rb
145
+ - lib/paymentsds/mpesa/errors/invalid_receiver.rb
146
+ - lib/paymentsds/mpesa/errors/invalid_reference.rb
147
+ - lib/paymentsds/mpesa/errors/invalid_security_credential.rb
148
+ - lib/paymentsds/mpesa/errors/invalid_shortcode.rb
149
+ - lib/paymentsds/mpesa/errors/invalid_thirdparty_reference.rb
150
+ - lib/paymentsds/mpesa/errors/invalid_transaction_id.rb
151
+ - lib/paymentsds/mpesa/errors/invalid_transaction_reference.rb
152
+ - lib/paymentsds/mpesa/errors/profile_problems.rb
153
+ - lib/paymentsds/mpesa/errors/request_timeout.rb
154
+ - lib/paymentsds/mpesa/errors/transaction_cancelled.rb
155
+ - lib/paymentsds/mpesa/errors/transaction_failed.rb
156
+ - lib/paymentsds/mpesa/errors/unavailabe_server.rb
157
+ - lib/paymentsds/mpesa/errors/unknown.rb
158
+ - lib/paymentsds/mpesa/errors/unknown_status.rb
159
+ - lib/paymentsds/mpesa/errors/validation.rb
132
160
  - lib/paymentsds/mpesa/operation.rb
133
161
  - lib/paymentsds/mpesa/patterns.rb
134
162
  - lib/paymentsds/mpesa/result.rb
135
163
  - lib/paymentsds/mpesa/service.rb
136
164
  - lib/paymentsds/mpesa/version.rb
137
165
  - paymentsds-mpesa.gemspec
166
+ - publish.sh
138
167
  homepage: https://github.com/paymentsds/mpesa-ruby-sdk
139
168
  licenses:
140
169
  - Apache-2.0