1111

Ruby code posted
created at 19 Mar 15:25

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
  namespace :api, defaults: { format: :json } do
    namespace :v1 do
      resources :cards do
        collection do
          get  :get_info
          get  :get_balance
          put  :activate
          put  :block
          put  :unblock
          put  :set_pin
          put  :update_pin
        end
      end
      resources :users, only: [:update, :index, :show] do
        collection do
          get   'verify'                   => 'users#verify'
          get   'nearby_users'             => 'nearby#users'
          get   'current'
          get   'wallet'                   => 'wallets#show'
          get   'balance'                  => 'wallets#balance'
          get   'card'                     => 'wallets#card'
          get   'to_transactions'          => 'transactions#to_transactions'
          get   'to_pending_transactions'  => 'transactions#to_pending_transactions'

          get   'from_transactions'        => 'transactions#from_transactions'
          get   'from_pending_transactions'=> 'transactions#from_pending_transactions'

          put   'set_online'
          put   'set_offline'
          put   'balance'                  => 'users#balance_update'
          get   'transaction'              => 'users#transactions'
          put   'update_password'          => 'sessions#update_password'


          resources :transactions,         only: [:index, :show] do
            member do
              put   'accept'                 => 'transactions#accept'
              put   'decline_by_receiver'    => 'transactions#decline_by_receiver'
              put   'decline_by_sender'      => 'transactions#decline_by_sender'
              put   'complete'               => 'transactions#complete'
              get   'from_check_transaction' => 'transactions#from_transaction'
              get   'to_check_transaction'   => 'transactions#to_transaction'
            end
            collection do
              get   'all'                    => 'transactions#all'
              post  'deposit'                => 'transactions#deposit'
            end
          end
        end

        member do
          post  'transfer'                 => 'transactions#create'
          put   'verify_code'              => 'users#verify_code'
          put   'send_code'                => 'sms#send_verification_code'
        end
      end

      get     'nearby/stores'               => 'nearby#stores'
      get     'nearby/kiosks'               => 'nearby#kiosks'
      post    'sign_up'                     => 'users#create'
      put     'sign_in'                     => 'sessions#create'
      delete  'sign_out'                    => 'sessions#destroy'
      put     'forgot_your_password'        => 'sessions#forgot_your_password'
      put     'code_confirmation'           => 'sessions#code_confirmation'
      post    'pruebas'                     => 'sessions#pruebas'
      post    'auth/:provider/callback'    => 'authentications#create'


      ##################################################
      ###############        ECHO       ################
      post 'creatingToken'            => 'echo#creatingToken'
      post 'registerCardholder'       => 'echo#registerCardholder'
      post 'registerCardholder_v2'    => 'echo#registerCardholder_v2'
      post 'activateCard'             => 'echo#activateCard'
      post 'getCardholderProfile'     => 'echo#getCardholderProfile'
      post 'updateCardHoldersProfile' => 'echo#updateCardHoldersProfile'
      post 'getCardStatus'            => 'echo#getCardStatus'
      post 'getCardAccounts'          => 'echo#getCardAccounts'
      post 'creditFunds'              => 'echo#creditFunds'
      post 'debitFunds'               => 'echo#debitFunds'
      post 'getTransactionHistory'    => 'echo#getTransactionHistory'
      post 'voidCreateAccount'        => 'echo#voidCreateAccount'
      post 'getAccessToken'           => 'echo#getAccessToken'
      post 'modifyStatus'             => 'echo#modifyStatus'
      post 'verifyAccount'            => 'echo#verifyAccount'
      post 'addAchAccount'            => 'echo#addAchAccount'
      post 'createAchTransaction'     => 'echo#createAchTransaction'
      post 'cancelAchTransaction'     => 'echo#cancelAchTransaction'
      post 'getAchAccounts'           => 'echo#getAchAccounts'
      post 'getAchTransHistory'       => 'echo#getAchTransHistory'
      post 'modifyAchAccount'         => 'echo#modifyAchAccount'
      post 'removeAchAccount'         => 'echo#removeAchAccount'
      post 'getAccountOverview'       => 'echo#getAccountOverview'
      post 'getAuthHistory'           => 'echo#getAuthHistory'
      post 'getBalance'               => 'echo#getBalance'
      post 'getPaymentHistory'        => 'echo#getPaymentHistory'
      post 'reverseAccountTransfer'   => 'echo#reverseAccountTransfer'
      post 'reverseAdjustment'        => 'echo#reverseAdjustment'
      post 'createAccountTransfer'    => 'echo#createAccountTransfer'
      post 'createPayment'            => 'echo#createPayment'
      post 'reversePayment'           => 'echo#reversePayment'
      ##################################################

      namespace :prepay_nation do
        get   'invoice_by_correlation_id'      => 'general#get_invoice_by_correlation_id'
        get   'exchange_rate'                  => 'general#get_exchange_rate'
        get   'carrier_list2'                  => 'general#get_carrier_list2'
        get   'sku_list'                       => 'general#get_sku_list'
        get   'carrier_info_by_mobile_number'  => 'general#get_carrier_info_by_mobile_number'
        get   'sku_list_by_carrier'            => 'general#get_sku_list_by_carrier'
        post  'bill_pay'                       => 'payments#pay_bill'
        post  'purchase_pin'                   => 'pins#purchase'
        post  'purchase_rtr2'                  => 'rtrs#purchase_rtr2'
        post  'purchase_rtr_by_ani'            => 'rtrs#purchase_rtr_by_ani'
        post  'rtr_return'                     => 'rtrs#rtr_return'
        post  'activate_sim'                   => 'sims#activate_sim'
        post  'port_in_sim'                    => 'sims#port_in_sim'
        post  'check_sim_portin_status'        => 'sims#check_sim_portin_status'
      end

      namespace :offers do
        resources :credits
        resources :coupon_books
      end

      namespace :fineract do
        resources :products do
          collection do
            get :assigned
          end
        end
        resources :transactions do
          collection do
            post :withdrawal
            post :deposit
            post :send_payment
            post :transfer
            post :send_transfer
          end
        end
        resources :groups
        resources :centers
        resources :clients do
          collection do
            post :disassociate_clients
            post :associate_clients
          end
        end
        resources :accounts
      end


      ##################### Catalogs ###################
      get   'security_questions' => 'catalogs#security_questions'
      ##################################################

      resources :translations

      namespace :push_notification do
        resources :pub_nub do
          collection do
            get :accept
            get :completed
          end
        end
      end
      resources :massive_payments do
        collection do
          post :send_payment
        end
      end

      namespace :dwolla do
        resources :accounts
        resources :customers
      end
    end
  end
7.59 KB in 17 ms with coderay