payrix 0.1.0
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 +7 -0
- data/lib/payrix.rb +19 -0
- data/lib/payrix/configuration.rb +33 -0
- data/lib/payrix/exceptions.rb +10 -0
- data/lib/payrix/exceptions/api_error.rb +6 -0
- data/lib/payrix/exceptions/base.rb +6 -0
- data/lib/payrix/exceptions/connection.rb +6 -0
- data/lib/payrix/exceptions/invalid_request.rb +6 -0
- data/lib/payrix/exceptions/invalid_response.rb +6 -0
- data/lib/payrix/http.rb +7 -0
- data/lib/payrix/http/request.rb +48 -0
- data/lib/payrix/http/request_params.rb +67 -0
- data/lib/payrix/http/response.rb +45 -0
- data/lib/payrix/resource.rb +106 -0
- data/lib/payrix/resource/account_verifications.rb +21 -0
- data/lib/payrix/resource/accounts.rb +20 -0
- data/lib/payrix/resource/adjustments.rb +22 -0
- data/lib/payrix/resource/aggregation_result_groups.rb +21 -0
- data/lib/payrix/resource/aggregation_results.rb +21 -0
- data/lib/payrix/resource/aggregations.rb +22 -0
- data/lib/payrix/resource/alert_actions.rb +19 -0
- data/lib/payrix/resource/alert_triggers.rb +19 -0
- data/lib/payrix/resource/alerts.rb +19 -0
- data/lib/payrix/resource/apikeys.rb +19 -0
- data/lib/payrix/resource/assessments.rb +24 -0
- data/lib/payrix/resource/auth_tokens.rb +19 -0
- data/lib/payrix/resource/base.rb +220 -0
- data/lib/payrix/resource/batches.rb +20 -0
- data/lib/payrix/resource/billing_events.rb +19 -0
- data/lib/payrix/resource/billing_modifiers.rb +19 -0
- data/lib/payrix/resource/billings.rb +21 -0
- data/lib/payrix/resource/chargeback_documents.rb +19 -0
- data/lib/payrix/resource/chargeback_message_results.rb +21 -0
- data/lib/payrix/resource/chargeback_messages.rb +22 -0
- data/lib/payrix/resource/chargeback_statuses.rb +21 -0
- data/lib/payrix/resource/chargebacks.rb +24 -0
- data/lib/payrix/resource/confirm_codes.rb +19 -0
- data/lib/payrix/resource/contacts.rb +21 -0
- data/lib/payrix/resource/credentials.rb +20 -0
- data/lib/payrix/resource/customers.rb +24 -0
- data/lib/payrix/resource/decision_actions.rb +20 -0
- data/lib/payrix/resource/decision_rules.rb +19 -0
- data/lib/payrix/resource/decisions.rb +23 -0
- data/lib/payrix/resource/disbursement_entries.rb +22 -0
- data/lib/payrix/resource/disbursement_results.rb +22 -0
- data/lib/payrix/resource/disbursements.rb +25 -0
- data/lib/payrix/resource/divisions.rb +19 -0
- data/lib/payrix/resource/entities.rb +25 -0
- data/lib/payrix/resource/entity_datas.rb +20 -0
- data/lib/payrix/resource/entity_debts.rb +21 -0
- data/lib/payrix/resource/entity_reserves.rb +20 -0
- data/lib/payrix/resource/entity_returns.rb +22 -0
- data/lib/payrix/resource/entries.rb +25 -0
- data/lib/payrix/resource/entry_origins.rb +21 -0
- data/lib/payrix/resource/fee_modifiers.rb +19 -0
- data/lib/payrix/resource/fee_rules.rb +19 -0
- data/lib/payrix/resource/fees.rb +22 -0
- data/lib/payrix/resource/fund_origins.rb +21 -0
- data/lib/payrix/resource/funds.rb +22 -0
- data/lib/payrix/resource/holds.rb +21 -0
- data/lib/payrix/resource/invoice_items.rb +19 -0
- data/lib/payrix/resource/invoice_line_items.rb +19 -0
- data/lib/payrix/resource/invoice_parameters.rb +19 -0
- data/lib/payrix/resource/invoice_results.rb +23 -0
- data/lib/payrix/resource/invoices.rb +21 -0
- data/lib/payrix/resource/iplists.rb +19 -0
- data/lib/payrix/resource/items.rb +20 -0
- data/lib/payrix/resource/logins.rb +23 -0
- data/lib/payrix/resource/mappings.rb +19 -0
- data/lib/payrix/resource/members.rb +22 -0
- data/lib/payrix/resource/merchant_results.rb +21 -0
- data/lib/payrix/resource/merchants.rb +21 -0
- data/lib/payrix/resource/message_threads.rb +21 -0
- data/lib/payrix/resource/messages.rb +20 -0
- data/lib/payrix/resource/mixin.rb +9 -0
- data/lib/payrix/resource/mixin/create_disabled.rb +11 -0
- data/lib/payrix/resource/mixin/delete_disabled.rb +11 -0
- data/lib/payrix/resource/mixin/update_disabled.rb +11 -0
- data/lib/payrix/resource/note_documents.rb +19 -0
- data/lib/payrix/resource/notes.rb +19 -0
- data/lib/payrix/resource/org_entities.rb +18 -0
- data/lib/payrix/resource/org_flow_actions.rb +18 -0
- data/lib/payrix/resource/org_flows.rb +18 -0
- data/lib/payrix/resource/orgs.rb +18 -0
- data/lib/payrix/resource/payment_update_groups.rb +21 -0
- data/lib/payrix/resource/payment_updates.rb +22 -0
- data/lib/payrix/resource/payout_flows.rb +20 -0
- data/lib/payrix/resource/payouts.rb +21 -0
- data/lib/payrix/resource/pending_entries.rb +25 -0
- data/lib/payrix/resource/plans.rb +20 -0
- data/lib/payrix/resource/profit_share_results.rb +21 -0
- data/lib/payrix/resource/profit_share_rules.rb +19 -0
- data/lib/payrix/resource/profit_shares.rb +20 -0
- data/lib/payrix/resource/refunds.rb +20 -0
- data/lib/payrix/resource/report_items.rb +19 -0
- data/lib/payrix/resource/report_results.rb +21 -0
- data/lib/payrix/resource/reports.rb +19 -0
- data/lib/payrix/resource/reserve_entries.rb +23 -0
- data/lib/payrix/resource/reserves.rb +21 -0
- data/lib/payrix/resource/secrets.rb +20 -0
- data/lib/payrix/resource/sessions.rb +20 -0
- data/lib/payrix/resource/statement_entries.rb +23 -0
- data/lib/payrix/resource/statements.rb +22 -0
- data/lib/payrix/resource/subscription_tokens.rb +18 -0
- data/lib/payrix/resource/subscriptions.rb +21 -0
- data/lib/payrix/resource/team_logins.rb +19 -0
- data/lib/payrix/resource/teams.rb +19 -0
- data/lib/payrix/resource/terminal_txn_datas.rb +20 -0
- data/lib/payrix/resource/terminal_txn_results.rb +22 -0
- data/lib/payrix/resource/terminal_txns.rb +29 -0
- data/lib/payrix/resource/terminals.rb +21 -0
- data/lib/payrix/resource/tokens.rb +20 -0
- data/lib/payrix/resource/txn_datas.rb +20 -0
- data/lib/payrix/resource/txn_metadatas.rb +21 -0
- data/lib/payrix/resource/txn_results.rb +22 -0
- data/lib/payrix/resource/txns.rb +34 -0
- data/lib/payrix/resource/vendors.rb +19 -0
- data/lib/payrix/version.rb +3 -0
- metadata +215 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: afdb540d04f68c91ca69128315e8726abd9a81d858de6b11cface26161558586
|
4
|
+
data.tar.gz: 4e489d656b531a9cb7d68f8ad859d854413b89d866cb5d1bd52471ff524e3715
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cbab4ee38c723c6c5f89b5e8bc2818633f229a59846dcb2afd28952ae586346957dcc3a887cad3f8630d43a02b750f0ad2ab14eb8a104dcc364c4bca14de7ceb
|
7
|
+
data.tar.gz: 1191c904d55c68a784ecfb9684d3822be6c414b5c98d2801683d17b298530da9b879074e4e8a95c1ce4753abecf35774f98cbbededaefafff267248708edbc4a
|
data/lib/payrix.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require "payrix/version"
|
2
|
+
require "payrix/configuration"
|
3
|
+
require "payrix/exceptions"
|
4
|
+
require "payrix/http"
|
5
|
+
require "payrix/resource"
|
6
|
+
|
7
|
+
module Payrix
|
8
|
+
class << self
|
9
|
+
attr_writer :configuration
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.configuration
|
13
|
+
@configuration ||= Configuration.new
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.configure
|
17
|
+
yield(configuration)
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'uri'
|
2
|
+
|
3
|
+
module Payrix
|
4
|
+
class Configuration
|
5
|
+
attr_reader :url
|
6
|
+
attr_accessor :api_key, :session_key, :exception_enabled
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
@url = 'https://api.payrix.com'
|
10
|
+
@api_key = ''
|
11
|
+
@session_key = ''
|
12
|
+
@exception_enabled = true
|
13
|
+
end
|
14
|
+
|
15
|
+
def exception_enabled=(v)
|
16
|
+
@exception_enabled = !!v
|
17
|
+
end
|
18
|
+
|
19
|
+
def set_test_mode(test)
|
20
|
+
host = URI.parse(url).host
|
21
|
+
|
22
|
+
if test == true
|
23
|
+
if !host.start_with?('test-')
|
24
|
+
@url = "https://test-#{host}"
|
25
|
+
end
|
26
|
+
else
|
27
|
+
if host.start_with?('test-')
|
28
|
+
@url = "https://#{host[5..-1]}"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module Payrix
|
2
|
+
module Exceptions
|
3
|
+
autoload :Base, 'payrix/exceptions/base'
|
4
|
+
autoload :ApiError, 'payrix/exceptions/api_error'
|
5
|
+
autoload :Connection, 'payrix/exceptions/connection'
|
6
|
+
autoload :InvalidRequest, 'payrix/exceptions/invalid_request'
|
7
|
+
autoload :InvalidResponse, 'payrix/exceptions/invalid_response'
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
data/lib/payrix/http.rb
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'singleton'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
require 'faraday'
|
5
|
+
require 'faraday_middleware'
|
6
|
+
|
7
|
+
module Payrix
|
8
|
+
module Http
|
9
|
+
class Request
|
10
|
+
include Singleton
|
11
|
+
|
12
|
+
def initialize
|
13
|
+
end
|
14
|
+
|
15
|
+
def send_http(method, base_url, endpoint, data = {}, headers = {}, timeout = 30)
|
16
|
+
conn = Faraday.new(url: base_url) do |conn|
|
17
|
+
conn.use FaradayMiddleware::FollowRedirects, limit: 3
|
18
|
+
|
19
|
+
conn.headers = headers
|
20
|
+
conn.options.timeout = timeout
|
21
|
+
conn.options.open_timeout = timeout
|
22
|
+
|
23
|
+
conn.request :json
|
24
|
+
conn.adapter Faraday.default_adapter
|
25
|
+
end
|
26
|
+
|
27
|
+
begin
|
28
|
+
response = conn.send(method.downcase.to_sym, endpoint, data)
|
29
|
+
|
30
|
+
body = response.body
|
31
|
+
status = response.status
|
32
|
+
|
33
|
+
raise Payrix::Exceptions::InvalidRequest.new("Invalid request, status code: #{status}") if status == 400 || status == 404
|
34
|
+
raise Payrix::Exceptions::Base.new(body) if status < 200 || status > 299
|
35
|
+
|
36
|
+
json = JSON.parse(body)
|
37
|
+
|
38
|
+
return json, status
|
39
|
+
rescue Faraday::ClientError => e
|
40
|
+
raise Payrix::Exceptions::Connection.new('')
|
41
|
+
rescue JSON::ParserError
|
42
|
+
raise Payrix::Exceptions::InvalidResponse.new('Invalid response object') if Payrix.configuration.exception_enabled
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
module Payrix
|
2
|
+
module Http
|
3
|
+
class RequestParams
|
4
|
+
def initialize(sort = '', expand = [], page = 1, totals = {})
|
5
|
+
self.sort = sort
|
6
|
+
self.expand = expand
|
7
|
+
self.page = page
|
8
|
+
self.totals = totals
|
9
|
+
end
|
10
|
+
|
11
|
+
def sort
|
12
|
+
@sort
|
13
|
+
end
|
14
|
+
|
15
|
+
def sort=(sort)
|
16
|
+
if sort.is_a?(Array) && sort.size == 2
|
17
|
+
@sort = "#{sort[0]}[sort]=#{sort[1]}"
|
18
|
+
else
|
19
|
+
@sort = sort
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def expand
|
24
|
+
@expand.map do |s|
|
25
|
+
fields = s.split(',').map { |field| "[#{field.strip}]" }
|
26
|
+
"expand#{fields.join}[]"
|
27
|
+
end.join('&')
|
28
|
+
end
|
29
|
+
|
30
|
+
def expand=(expand)
|
31
|
+
if expand.is_a?(Array)
|
32
|
+
@expand = expand
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# Retrieve the totals header string
|
37
|
+
def totals
|
38
|
+
@totals.map do |action, values|
|
39
|
+
if values.is_a?(Array) && !values.empty?
|
40
|
+
values.map do |value|
|
41
|
+
"#{action}[]=#{value}"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end.join('&')
|
45
|
+
end
|
46
|
+
|
47
|
+
# Set the totals hash
|
48
|
+
def totals=(totals)
|
49
|
+
if totals.is_a?(Hash)
|
50
|
+
@totals = totals
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def page
|
55
|
+
@page.nil? || @page == 0 ? "" : "page[number]=#{@page}"
|
56
|
+
end
|
57
|
+
|
58
|
+
def page=(page)
|
59
|
+
@page = page
|
60
|
+
end
|
61
|
+
|
62
|
+
def go_next_page
|
63
|
+
@page = @page.nil? || @page == 0 ? 1 : @page + 1
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module Payrix
|
2
|
+
module Http
|
3
|
+
class Response
|
4
|
+
attr_reader :status
|
5
|
+
|
6
|
+
def initialize(response = {}, status = '', cls)
|
7
|
+
@response = response
|
8
|
+
@status = status
|
9
|
+
@cls = cls
|
10
|
+
end
|
11
|
+
|
12
|
+
# Return the response as an array
|
13
|
+
def response
|
14
|
+
data = (@response['response'] && @response['response']['data']) || []
|
15
|
+
data.map { |v| @cls.new(v) }
|
16
|
+
end
|
17
|
+
|
18
|
+
def errors
|
19
|
+
@response['errors'] || (@response['response'] && @response['response']['errors']) || []
|
20
|
+
end
|
21
|
+
|
22
|
+
def has_errors?
|
23
|
+
!errors.empty?
|
24
|
+
end
|
25
|
+
|
26
|
+
def details
|
27
|
+
(@response['response'] && @response['response']['details']) || {}
|
28
|
+
end
|
29
|
+
|
30
|
+
def totals
|
31
|
+
(@response['response'] && @response['response']['details'] && @response['response']['details']['totals']) || {}
|
32
|
+
end
|
33
|
+
|
34
|
+
def has_more?
|
35
|
+
page = @response['response'] && @response['response']['details'] && @response['response']['details']['page']
|
36
|
+
|
37
|
+
!page.nil? &&
|
38
|
+
!page['current'].nil? &&
|
39
|
+
!page['last'].nil? &&
|
40
|
+
page['current'] < page['last']
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
module Payrix
|
2
|
+
module Resource
|
3
|
+
autoload :Mixin, 'payrix/resource/mixin'
|
4
|
+
|
5
|
+
autoload :Base, 'payrix/resource/base'
|
6
|
+
|
7
|
+
autoload :Accounts, 'payrix/resource/accounts'
|
8
|
+
autoload :AccountVerifications, 'payrix/resource/account_verifications'
|
9
|
+
autoload :Adjustments, 'payrix/resource/adjustments'
|
10
|
+
autoload :AggregationResultGroups, 'payrix/resource/aggregation_result_groups'
|
11
|
+
autoload :AggregationResults, 'payrix/resource/aggregation_results'
|
12
|
+
autoload :Aggregations, 'payrix/resource/aggregations'
|
13
|
+
autoload :AlertActions, 'payrix/resource/alert_actions'
|
14
|
+
autoload :Alerts, 'payrix/resource/alerts'
|
15
|
+
autoload :AlertTriggers, 'payrix/resource/alert_triggers'
|
16
|
+
autoload :Apikeys, 'payrix/resource/apikeys'
|
17
|
+
autoload :Assessments, 'payrix/resource/assessments'
|
18
|
+
autoload :AuthTokens, 'payrix/resource/auth_tokens'
|
19
|
+
autoload :Batches, 'payrix/resource/batches'
|
20
|
+
autoload :BillingEvents, 'payrix/resource/billing_events'
|
21
|
+
autoload :BillingModifiers, 'payrix/resource/billing_modifiers'
|
22
|
+
autoload :Billings, 'payrix/resource/billings'
|
23
|
+
autoload :ChargebackDocuments, 'payrix/resource/chargeback_documents'
|
24
|
+
autoload :ChargebackMessageResults, 'payrix/resource/chargeback_message_results'
|
25
|
+
autoload :ChargebackMessages, 'payrix/resource/chargeback_messages'
|
26
|
+
autoload :Chargebacks, 'payrix/resource/chargebacks'
|
27
|
+
autoload :ChargebackStatuses, 'payrix/resource/chargeback_statuses'
|
28
|
+
autoload :ConfirmCodes, 'payrix/resource/confirm_codes'
|
29
|
+
autoload :Contacts, 'payrix/resource/contacts'
|
30
|
+
autoload :Credentials, 'payrix/resource/credentials'
|
31
|
+
autoload :Customers, 'payrix/resource/customers'
|
32
|
+
autoload :DecisionActions, 'payrix/resource/decision_actions'
|
33
|
+
autoload :DecisionRules, 'payrix/resource/decision_rules'
|
34
|
+
autoload :Decisions, 'payrix/resource/decisions'
|
35
|
+
autoload :DisbursementEntries, 'payrix/resource/disbursement_entries'
|
36
|
+
autoload :Disbursements, 'payrix/resource/disbursements'
|
37
|
+
autoload :DisbursementResults, 'payrix/resource/disbursement_results'
|
38
|
+
autoload :Divisions, 'payrix/resource/divisions'
|
39
|
+
autoload :Entities, 'payrix/resource/entities'
|
40
|
+
autoload :EntityDatas, 'payrix/resource/entity_datas'
|
41
|
+
autoload :EntityDebts, 'payrix/resource/entity_debts'
|
42
|
+
autoload :EntityReserves, 'payrix/resource/entity_reserves'
|
43
|
+
autoload :EntityReturns, 'payrix/resource/entity_returns'
|
44
|
+
autoload :Entries, 'payrix/resource/entries'
|
45
|
+
autoload :EntryOrigins, 'payrix/resource/entry_origins'
|
46
|
+
autoload :FeeModifiers, 'payrix/resource/fee_modifiers'
|
47
|
+
autoload :FeeRules, 'payrix/resource/fee_rules'
|
48
|
+
autoload :Fees, 'payrix/resource/fees'
|
49
|
+
autoload :FundOrigins, 'payrix/resource/fund_origins'
|
50
|
+
autoload :Funds, 'payrix/resource/funds'
|
51
|
+
autoload :Holds, 'payrix/resource/holds'
|
52
|
+
autoload :InvoiceItems, 'payrix/resource/invoice_items'
|
53
|
+
autoload :InvoiceLineItems, 'payrix/resource/invoice_line_items'
|
54
|
+
autoload :InvoiceParameters, 'payrix/resource/invoice_parameters'
|
55
|
+
autoload :InvoiceResults, 'payrix/resource/invoice_results'
|
56
|
+
autoload :Invoices, 'payrix/resource/invoices'
|
57
|
+
autoload :Iplists, 'payrix/resource/iplists'
|
58
|
+
autoload :Items, 'payrix/resource/items'
|
59
|
+
autoload :Logins, 'payrix/resource/logins'
|
60
|
+
autoload :Messages, 'payrix/resource/messages'
|
61
|
+
autoload :MessageThreads, 'payrix/resource/message_threads'
|
62
|
+
autoload :Members, 'payrix/resource/members'
|
63
|
+
autoload :MerchantResults, 'payrix/resource/merchant_results'
|
64
|
+
autoload :Merchants, 'payrix/resource/merchants'
|
65
|
+
autoload :Mappings, 'payrix/resource/mappings'
|
66
|
+
autoload :Notes, 'payrix/resource/notes'
|
67
|
+
autoload :NoteDocuments, 'payrix/resource/note_documents'
|
68
|
+
autoload :OrgEntities, 'payrix/resource/org_entities'
|
69
|
+
autoload :OrgFlowActions, 'payrix/resource/org_flow_actions'
|
70
|
+
autoload :OrgFlows, 'payrix/resource/org_flows'
|
71
|
+
autoload :Orgs, 'payrix/resource/orgs'
|
72
|
+
autoload :PaymentUpdateGroups, 'payrix/resource/payment_update_groups'
|
73
|
+
autoload :PaymentUpdates, 'payrix/resource/payment_updates'
|
74
|
+
autoload :PayoutFlows, 'payrix/resource/payout_flows'
|
75
|
+
autoload :Payouts, 'payrix/resource/payouts'
|
76
|
+
autoload :PendingEntries, 'payrix/resource/pending_entries'
|
77
|
+
autoload :Plans, 'payrix/resource/plans'
|
78
|
+
autoload :ProfitShareResults, 'payrix/resource/profit_share_results'
|
79
|
+
autoload :ProfitShareRules, 'payrix/resource/profit_share_rules'
|
80
|
+
autoload :ProfitShares, 'payrix/resource/profit_shares'
|
81
|
+
autoload :Refunds, 'payrix/resource/refunds'
|
82
|
+
autoload :ReportItems, 'payrix/resource/report_items'
|
83
|
+
autoload :ReportResults, 'payrix/resource/report_results'
|
84
|
+
autoload :Reports, 'payrix/resource/reports'
|
85
|
+
autoload :ReserveEntries, 'payrix/resource/reserve_entries'
|
86
|
+
autoload :Reserves, 'payrix/resource/reserves'
|
87
|
+
autoload :Secrets, 'payrix/resource/secrets'
|
88
|
+
autoload :Sessions, 'payrix/resource/sessions'
|
89
|
+
autoload :StatementEntries, 'payrix/resource/statement_entries'
|
90
|
+
autoload :Statements, 'payrix/resource/statements'
|
91
|
+
autoload :Subscriptions, 'payrix/resource/subscriptions'
|
92
|
+
autoload :SubscriptionTokens, 'payrix/resource/subscription_tokens'
|
93
|
+
autoload :TeamLogins, 'payrix/resource/team_logins'
|
94
|
+
autoload :Teams, 'payrix/resource/teams'
|
95
|
+
autoload :Terminals, 'payrix/resource/terminals'
|
96
|
+
autoload :TerminalTxnDatas, 'payrix/resource/terminal_txn_datas'
|
97
|
+
autoload :TerminalTxnResults, 'payrix/resource/terminal_txn_results'
|
98
|
+
autoload :TerminalTxns, 'payrix/resource/terminal_txns'
|
99
|
+
autoload :Tokens, 'payrix/resource/tokens'
|
100
|
+
autoload :TxnDatas, 'payrix/resource/txn_datas'
|
101
|
+
autoload :TxnMetadatas, 'payrix/resource/txn_metadatas'
|
102
|
+
autoload :TxnResults, 'payrix/resource/txn_results'
|
103
|
+
autoload :Txns, 'payrix/resource/txns'
|
104
|
+
autoload :Vendors, 'payrix/resource/vendors'
|
105
|
+
end
|
106
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Payrix
|
2
|
+
module Resource
|
3
|
+
class AccountVerifications < Base
|
4
|
+
|
5
|
+
include Mixin::UpdateDisabled
|
6
|
+
include Mixin::DeleteDisabled
|
7
|
+
include Mixin::CreateDisabled
|
8
|
+
def initialize(params)
|
9
|
+
super(params, ATTRS)
|
10
|
+
|
11
|
+
@resource_name = 'accountVerifications'
|
12
|
+
end
|
13
|
+
|
14
|
+
ATTRS = [:id, :created, :modified, :creator, :modifier,
|
15
|
+
:account, :type]
|
16
|
+
|
17
|
+
attr_accessor *ATTRS
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Payrix
|
2
|
+
module Resource
|
3
|
+
class Accounts < Base
|
4
|
+
|
5
|
+
def initialize(params)
|
6
|
+
super(params, ATTRS)
|
7
|
+
|
8
|
+
@resource_name = 'accounts'
|
9
|
+
end
|
10
|
+
|
11
|
+
ATTRS = [:id, :created, :modified, :creator, :modifier,
|
12
|
+
:entity, :account, :token, :name, :description,
|
13
|
+
:primary, :status, :currency, :inactive, :frozen,
|
14
|
+
:expiration, :type, :reserved, :checkStage]
|
15
|
+
|
16
|
+
attr_accessor *ATTRS
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Payrix
|
2
|
+
module Resource
|
3
|
+
class Adjustments < Base
|
4
|
+
|
5
|
+
include Mixin::UpdateDisabled
|
6
|
+
include Mixin::DeleteDisabled
|
7
|
+
include Mixin::CreateDisabled
|
8
|
+
def initialize(params)
|
9
|
+
super(params, ATTRS)
|
10
|
+
|
11
|
+
@resource_name = 'adjustments'
|
12
|
+
end
|
13
|
+
|
14
|
+
ATTRS = [:id, :created, :modified, :creator, :modifier,
|
15
|
+
:login, :entity, :fromentity, :description, :amount,
|
16
|
+
:currency, :onentity]
|
17
|
+
|
18
|
+
attr_accessor *ATTRS
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|