orchard-api-client-anm 0.1.10 → 0.1.11

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b863d46441447a38bd375939be58694361aa9d2693accd46257300cd437a077d
4
- data.tar.gz: c0325ea8724cffd613ab59ad8701aee496b9b457c41e5f6962929e6e3faf52b9
3
+ metadata.gz: 5de005f678a0cb16e186f6190abc82538de134eb7b2574789a1b29b34237e52a
4
+ data.tar.gz: '058b93525314505e2a69d7ae336ea224e3ffe409cd0357669308572e7e9022f0'
5
5
  SHA512:
6
- metadata.gz: 9fdff9fd96e0c69cf541be12685d189a92186dc6f613aefe454e13c9d5ad137ada45efd0a8ee1e383fa3f7614c349438157670e1a62715287572089b1a577b6e
7
- data.tar.gz: 5d821dde0aabdbbbeb0b6bb712bc1a5b7c367cde320cc1c4c943173a8aff4d1bedc4e3546d6ee29928e6d8d66c1b7db11d4049348ac84956e7417513d8977000
6
+ metadata.gz: 511d5464e39d037db0c8e75b3c5fc0420c577d7bdf3076a66e412fd7f7aeed95cc398fabb8a2fa1e5d9364a9a1078b0772b013f4df021a60698fc303111706e5
7
+ data.tar.gz: 21412934cde75503d21f3c88f499df6716d686d8bccd0ec20eeaeb102d31ddff747206f994128fbaaa5ee952852b13e5eb7d8393a7615737735cc616ee1a770e
data/README.md CHANGED
@@ -15,16 +15,16 @@ If bundler is not being used to manage dependencies, install the gem by executin
15
15
  ```ruby
16
16
  #load the gem class
17
17
  require 'orchard'
18
-
18
+
19
19
  #Create a client object with the secret token, client token, and the url
20
20
  params = {
21
21
  secret_token: ENV['SECRET_TOKEN'],
22
22
  client_token: ENV['CLIENT_TOKEN'],
23
23
  url: ENV['ORCHARD_URL']
24
24
  }
25
-
25
+
26
26
  client = Orchard::ApiClient.new(params)
27
-
27
+
28
28
  #Use client object for various api functions
29
29
 
30
30
  #optional configuration configurations
@@ -33,13 +33,13 @@ If bundler is not being used to manage dependencies, install the gem by executin
33
33
  }
34
34
 
35
35
  #Send payment request
36
-
36
+
37
37
  randval_one = rand(999).to_s.center(3, rand(9).to_s)
38
38
  strtm = Time.new.strftime("%d%H%M%L")
39
39
  processing_id = strtm + randval_one
40
40
  trans_type = allowed_parameters['CTM(client to merchant)' / 'MTC(merchant to client)']
41
41
  nw = allowed_parameters['MTN','VOD','AIR']
42
-
42
+
43
43
  payment_request_payload = {
44
44
  customer_number: '0550000000',
45
45
  reference: 'AppsNmobile Pay',
@@ -52,7 +52,7 @@ If bundler is not being used to manage dependencies, install the gem by executin
52
52
  client_id: ENV['SERVICE_ID'],
53
53
  voucher_code: ''
54
54
  }
55
-
55
+
56
56
  response = client.send_payment_request(payment_request_payload, request_configurations)
57
57
 
58
58
  #Send Sms
@@ -64,5 +64,5 @@ If bundler is not being used to manage dependencies, install the gem by executin
64
64
  service_id: ENV['SERVICE_ID']
65
65
  }
66
66
 
67
- response = client.send_sms(sms_payload)
67
+ response = client.send_sms(sms_payload, request_configurations)
68
68
  ```
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orchard
4
+ module API
5
+ class SendThirdPartyRequest < Orchard::API::Base
6
+ def call
7
+ @endpoint = Orchard::API::Constants::THIRD_PARTY_REQUEST
8
+ make_request(:post)
9
+ end
10
+ end
11
+ end
12
+ end
@@ -41,6 +41,10 @@ module Orchard
41
41
  Orchard::API::CustomerDebitDeactivation.call(payload_with_client_data(payload), request_configurations)
42
42
  end
43
43
 
44
+ def send_third_party_request(payload, request_configurations = {})
45
+ Orchard::API::SendThirdPartyRequest.call(payload_with_client_data(payload), request_configurations)
46
+ end
47
+
44
48
  private
45
49
 
46
50
  def create_connection
@@ -11,6 +11,7 @@ module Orchard
11
11
  CUSTOMER_DEBIT_INFORMATION_ENDPOINT = "/get_cust_recur_debit_info"
12
12
  CUSTOMER_DEBIT_ACTIVATION_ENDPOINT = "/cust_recur_debit_activation"
13
13
  CUSTOMER_DEBIT_DEACTIVATION_ENDPOINT = "/cancel_cust_auto_debit_subscrip"
14
+ THIRD_PARTY_REQUEST = "/third_party_request"
14
15
  end
15
16
  end
16
17
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Orchard
4
- VERSION = "0.1.10"
4
+ VERSION = "0.1.11"
5
5
  end
data/lib/orchard.rb CHANGED
@@ -13,5 +13,6 @@ require_relative "orchard/api/check_wallet_balance"
13
13
  require_relative "orchard/api/customer_debit_information"
14
14
  require_relative "orchard/api/customer_debit_activation"
15
15
  require_relative "orchard/api/customer_debit_deactivation"
16
+ require_relative "orchard/api/send_third_party_request"
16
17
 
17
18
  require_relative "orchard/api_client"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orchard-api-client-anm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sydney Dapilah
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-21 00:00:00.000000000 Z
11
+ date: 2023-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -91,6 +91,7 @@ files:
91
91
  - lib/orchard/api/customer_debit_information.rb
92
92
  - lib/orchard/api/send_payment_request.rb
93
93
  - lib/orchard/api/send_sms.rb
94
+ - lib/orchard/api/send_third_party_request.rb
94
95
  - lib/orchard/api/service_lookup_request.rb
95
96
  - lib/orchard/api_client.rb
96
97
  - lib/orchard/constants.rb
@@ -104,7 +105,7 @@ metadata:
104
105
  allowed_push_host: https://rubygems.org
105
106
  homepage_uri: https://appsnmobilesolutions.com/services/orchard/
106
107
  source_code_uri: https://github.com/appsnmobile-solutions/orchard_api_client_gem
107
- post_install_message:
108
+ post_install_message:
108
109
  rdoc_options: []
109
110
  require_paths:
110
111
  - lib
@@ -119,8 +120,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
120
  - !ruby/object:Gem::Version
120
121
  version: '0'
121
122
  requirements: []
122
- rubygems_version: 3.3.7
123
- signing_key:
123
+ rubygems_version: 3.0.9
124
+ signing_key:
124
125
  specification_version: 4
125
126
  summary: Orchard API client
126
127
  test_files: []