payabli 3.0.20 → 3.0.21
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 +4 -4
- data/.fern/metadata.json +3 -3
- data/lib/payabli/client.rb +6 -1
- data/lib/payabli/organization/client.rb +5 -5
- data/lib/payabli/organizations/client.rb +214 -0
- data/lib/payabli/organizations/types/create_organization_organizations_request.rb +17 -0
- data/lib/payabli/organizations/types/list_organizations_organizations_request.rb +19 -0
- data/lib/payabli/organizations/types/update_organization_request.rb +27 -0
- data/lib/payabli/types/create_organization_all_fields.rb +30 -0
- data/lib/payabli/types/create_organization_with_business_reference.rb +29 -0
- data/lib/payabli/types/create_organization_with_inline_business.rb +29 -0
- data/lib/payabli/types/get_basic_organization_response.rb +15 -0
- data/lib/payabli/types/instrument_response.rb +22 -0
- data/lib/payabli/types/methods_list_out.rb +4 -0
- data/lib/payabli/types/organization_query_record.rb +23 -21
- data/lib/payabli/types/organization_writable_fields.rb +28 -0
- data/lib/payabli/types/payabli_credentials_pascal.rb +2 -2
- data/lib/payabli/types/paypoint_summary_response.rb +2 -0
- data/lib/payabli/version.rb +1 -1
- data/lib/payabli.rb +12 -2
- data/reference.md +380 -9
- data/wiremock/wiremock-mappings.json +128 -8
- metadata +12 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2b9d1a78405c90c6e78e7839c20fa6ff6b8c9fb7cefd57f61e5b69a40c9f7b26
|
|
4
|
+
data.tar.gz: 56e91f8ec3f5594019010c5e5af425d21e909c30fc14ae87232900e54be7c7ca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7dab90d11617dcaf5d91573a48e13a4add97437fba831ad029af35a6056af5e3783f127938bb4d7ddf2459f03d7571eddaf0a439eaa5d10b187ff0ae0ca98a11
|
|
7
|
+
data.tar.gz: c4c946e7d74e2eeccf16fa544c91a8fb6b176708457ab89add56525910160bf7a8d30849f7521a2a2935c715448e849d90b8602d44498543f13d0efb0bcde16c
|
data/.fern/metadata.json
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
"rubocopVariableNumberStyle": "snake_case",
|
|
8
8
|
"respectOptionalRequestBody": true
|
|
9
9
|
},
|
|
10
|
-
"originGitCommit": "
|
|
10
|
+
"originGitCommit": "794e4e445022509f2199080b61dd748f2c6ea9e6",
|
|
11
11
|
"originGitCommitIsDirty": true,
|
|
12
12
|
"invokedBy": "ci",
|
|
13
|
-
"requestedVersion": "3.0.
|
|
13
|
+
"requestedVersion": "3.0.21",
|
|
14
14
|
"ciProvider": "github",
|
|
15
|
-
"sdkVersion": "3.0.
|
|
15
|
+
"sdkVersion": "3.0.21"
|
|
16
16
|
}
|
data/lib/payabli/client.rb
CHANGED
|
@@ -32,7 +32,7 @@ module Payabli
|
|
|
32
32
|
@raw_client = Payabli::Internal::Http::RawClient.new(
|
|
33
33
|
base_url: base_url || Payabli::Environment::SANDBOX,
|
|
34
34
|
headers: {
|
|
35
|
-
"User-Agent" => "payabli/3.0.
|
|
35
|
+
"User-Agent" => "payabli/3.0.21",
|
|
36
36
|
"X-Fern-Language" => "Ruby"
|
|
37
37
|
},
|
|
38
38
|
auth_provider: Payabli::Internal::RoutingAuthProvider.new(
|
|
@@ -158,6 +158,11 @@ module Payabli
|
|
|
158
158
|
@paypoints ||= Payabli::Paypoints::Client.new(client: @raw_client)
|
|
159
159
|
end
|
|
160
160
|
|
|
161
|
+
# @return [Payabli::Organizations::Client]
|
|
162
|
+
def organizations
|
|
163
|
+
@organizations ||= Payabli::Organizations::Client.new(client: @raw_client)
|
|
164
|
+
end
|
|
165
|
+
|
|
161
166
|
# @return [Payabli::PaymentMethods::Client]
|
|
162
167
|
def payment_methods
|
|
163
168
|
@payment_methods ||= Payabli::PaymentMethods::Client.new(client: @raw_client)
|
|
@@ -209,9 +209,9 @@ module Payabli
|
|
|
209
209
|
# @option params [String] :entry
|
|
210
210
|
#
|
|
211
211
|
# @example
|
|
212
|
-
# client.organization.get_basic_organization(entry: "
|
|
212
|
+
# client.organization.get_basic_organization(entry: "pilgrim-planner")
|
|
213
213
|
#
|
|
214
|
-
# @return [Payabli::Types::
|
|
214
|
+
# @return [Payabli::Types::GetBasicOrganizationResponse]
|
|
215
215
|
def get_basic_organization(request_options: {}, **params)
|
|
216
216
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
217
217
|
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
@@ -229,7 +229,7 @@ module Payabli
|
|
|
229
229
|
end
|
|
230
230
|
code = response.code.to_i
|
|
231
231
|
if code.between?(200, 299)
|
|
232
|
-
Payabli::Types::
|
|
232
|
+
Payabli::Types::GetBasicOrganizationResponse.load(response.body)
|
|
233
233
|
else
|
|
234
234
|
error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
|
|
235
235
|
raise error_class.new(response.body, code: code)
|
|
@@ -250,7 +250,7 @@ module Payabli
|
|
|
250
250
|
# @example
|
|
251
251
|
# client.organization.get_basic_organization_by_id(org_id: 123)
|
|
252
252
|
#
|
|
253
|
-
# @return [Payabli::Types::
|
|
253
|
+
# @return [Payabli::Types::GetBasicOrganizationResponse]
|
|
254
254
|
def get_basic_organization_by_id(request_options: {}, **params)
|
|
255
255
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
256
256
|
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
@@ -268,7 +268,7 @@ module Payabli
|
|
|
268
268
|
end
|
|
269
269
|
code = response.code.to_i
|
|
270
270
|
if code.between?(200, 299)
|
|
271
|
-
Payabli::Types::
|
|
271
|
+
Payabli::Types::GetBasicOrganizationResponse.load(response.body)
|
|
272
272
|
else
|
|
273
273
|
error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
|
|
274
274
|
raise error_class.new(response.body, code: code)
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Organizations
|
|
5
|
+
class Client
|
|
6
|
+
# @param client [Payabli::Internal::Http::RawClient]
|
|
7
|
+
#
|
|
8
|
+
# @return [void]
|
|
9
|
+
def initialize(client:)
|
|
10
|
+
@client = client
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Lists organizations with optional filtering and pagination. Only
|
|
14
|
+
# organizations are returned. Other paypoints never appear in this list.
|
|
15
|
+
#
|
|
16
|
+
# @param request_options [Hash]
|
|
17
|
+
# @param params [Hash]
|
|
18
|
+
# @option request_options [String] :base_url
|
|
19
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
20
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
21
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
22
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
23
|
+
# @option params [String, nil] :business_reference
|
|
24
|
+
# @option params [String, nil] :status
|
|
25
|
+
# @option params [String, nil] :search
|
|
26
|
+
# @option params [Integer, nil] :limit
|
|
27
|
+
# @option params [Integer, nil] :page
|
|
28
|
+
#
|
|
29
|
+
# @example
|
|
30
|
+
# client.organizations.list_organizations(business_reference: "6e2b9d14-7a3c-4f58-b1e6-0c9d3a5f8e27")
|
|
31
|
+
#
|
|
32
|
+
# @return [Payabli::Types::ListPaypointsEnvelope]
|
|
33
|
+
def list_organizations(request_options: {}, **params)
|
|
34
|
+
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
35
|
+
query_params = {}
|
|
36
|
+
query_params["businessReference"] = params[:business_reference] if params.key?(:business_reference)
|
|
37
|
+
query_params["status"] = params[:status] if params.key?(:status)
|
|
38
|
+
query_params["search"] = params[:search] if params.key?(:search)
|
|
39
|
+
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
40
|
+
query_params["page"] = params[:page] if params.key?(:page)
|
|
41
|
+
|
|
42
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }])
|
|
43
|
+
request = Payabli::Internal::JSON::Request.new(
|
|
44
|
+
base_url: request_options[:base_url],
|
|
45
|
+
method: "GET",
|
|
46
|
+
path: "v2/organizations",
|
|
47
|
+
headers: headers,
|
|
48
|
+
query: query_params,
|
|
49
|
+
request_options: request_options
|
|
50
|
+
)
|
|
51
|
+
begin
|
|
52
|
+
response = @client.send(request)
|
|
53
|
+
rescue Net::HTTPRequestTimeout
|
|
54
|
+
raise Payabli::Errors::TimeoutError
|
|
55
|
+
end
|
|
56
|
+
code = response.code.to_i
|
|
57
|
+
if code.between?(200, 299)
|
|
58
|
+
Payabli::Types::ListPaypointsEnvelope.load(response.body)
|
|
59
|
+
else
|
|
60
|
+
error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
|
|
61
|
+
raise error_class.new(response.body, code: code)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Creates an organization. Provide exactly one of `business` (to create
|
|
66
|
+
# the business inline, recommended) or `businessReference` (an existing
|
|
67
|
+
# business). In intelligent boarding, an organization is a kind of paypoint, so the
|
|
68
|
+
# request takes the paypoint create fields except `paypointType`. Payabli
|
|
69
|
+
# sets the organization type itself. An organization isn't underwritten,
|
|
70
|
+
# so only the fields needed to create the records are required. New
|
|
71
|
+
# organizations start in `pending`. If you don't set
|
|
72
|
+
# `parentPaypointReference`, the organization nests under the
|
|
73
|
+
# organization your credential belongs to. Returns `409` if an
|
|
74
|
+
# organization with the same `externalId` already exists.
|
|
75
|
+
#
|
|
76
|
+
# @param request_options [Hash]
|
|
77
|
+
# @param params [Payabli::Organizations::Types::CreateOrganizationOrganizationsRequest]
|
|
78
|
+
# @option request_options [String] :base_url
|
|
79
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
80
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
81
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
82
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
83
|
+
#
|
|
84
|
+
# @example
|
|
85
|
+
# client.organizations.create_organization(
|
|
86
|
+
# doing_business_as: "PropertyManager Pro",
|
|
87
|
+
# description: "Property management software partner",
|
|
88
|
+
# website: "https://example.com",
|
|
89
|
+
# customer_service_phone: "3055551212",
|
|
90
|
+
# customer_service_email: "support@example.com",
|
|
91
|
+
# timezone: "America/New_York",
|
|
92
|
+
# external_id: "pmp-org-001",
|
|
93
|
+
# business: {
|
|
94
|
+
# legal_name: "PropertyManager Pro LLC",
|
|
95
|
+
# legal_structure: "llc",
|
|
96
|
+
# external_id: "pmp-biz-001"
|
|
97
|
+
# }
|
|
98
|
+
# )
|
|
99
|
+
#
|
|
100
|
+
# @return [Payabli::Types::PaypointCreatedEnvelope]
|
|
101
|
+
def create_organization(request_options: {}, **params)
|
|
102
|
+
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
103
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }])
|
|
104
|
+
request = Payabli::Internal::JSON::Request.new(
|
|
105
|
+
base_url: request_options[:base_url],
|
|
106
|
+
method: "POST",
|
|
107
|
+
path: "v2/organizations",
|
|
108
|
+
headers: headers,
|
|
109
|
+
body: Payabli::Organizations::Types::CreateOrganizationOrganizationsRequest.new(params).to_h,
|
|
110
|
+
request_options: request_options
|
|
111
|
+
)
|
|
112
|
+
begin
|
|
113
|
+
response = @client.send(request)
|
|
114
|
+
rescue Net::HTTPRequestTimeout
|
|
115
|
+
raise Payabli::Errors::TimeoutError
|
|
116
|
+
end
|
|
117
|
+
code = response.code.to_i
|
|
118
|
+
if code.between?(200, 299)
|
|
119
|
+
Payabli::Types::PaypointCreatedEnvelope.load(response.body)
|
|
120
|
+
else
|
|
121
|
+
error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
|
|
122
|
+
raise error_class.new(response.body, code: code)
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Retrieves an organization by reference.
|
|
127
|
+
#
|
|
128
|
+
# @param request_options [Hash]
|
|
129
|
+
# @param params [Hash]
|
|
130
|
+
# @option request_options [String] :base_url
|
|
131
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
132
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
133
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
134
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
135
|
+
# @option params [String] :organization_reference
|
|
136
|
+
#
|
|
137
|
+
# @example
|
|
138
|
+
# client.organizations.get_organization(organization_reference: "a8806f02-23b3-4f6d-bba3-42e1b94326ea")
|
|
139
|
+
#
|
|
140
|
+
# @return [Payabli::Types::PaypointDetailEnvelope]
|
|
141
|
+
def get_organization(request_options: {}, **params)
|
|
142
|
+
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
143
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }])
|
|
144
|
+
request = Payabli::Internal::JSON::Request.new(
|
|
145
|
+
base_url: request_options[:base_url],
|
|
146
|
+
method: "GET",
|
|
147
|
+
path: "v2/organizations/#{URI.encode_uri_component(params[:organization_reference].to_s)}",
|
|
148
|
+
headers: headers,
|
|
149
|
+
request_options: request_options
|
|
150
|
+
)
|
|
151
|
+
begin
|
|
152
|
+
response = @client.send(request)
|
|
153
|
+
rescue Net::HTTPRequestTimeout
|
|
154
|
+
raise Payabli::Errors::TimeoutError
|
|
155
|
+
end
|
|
156
|
+
code = response.code.to_i
|
|
157
|
+
if code.between?(200, 299)
|
|
158
|
+
Payabli::Types::PaypointDetailEnvelope.load(response.body)
|
|
159
|
+
else
|
|
160
|
+
error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
|
|
161
|
+
raise error_class.new(response.body, code: code)
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Applies a partial update to an organization. Send only the fields you want to change. You can't change an
|
|
166
|
+
# organization's type. If you send `paypointType`, the request ignores it and doesn't return an error.
|
|
167
|
+
#
|
|
168
|
+
# @param request_options [Hash]
|
|
169
|
+
# @param params [Payabli::Organizations::Types::UpdateOrganizationRequest]
|
|
170
|
+
# @option request_options [String] :base_url
|
|
171
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
172
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
173
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
174
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
175
|
+
# @option params [String] :organization_reference
|
|
176
|
+
#
|
|
177
|
+
# @example
|
|
178
|
+
# client.organizations.update_organization(
|
|
179
|
+
# organization_reference: "a8806f02-23b3-4f6d-bba3-42e1b94326ea",
|
|
180
|
+
# description: "Updated description"
|
|
181
|
+
# )
|
|
182
|
+
#
|
|
183
|
+
# @return [Payabli::Types::PaypointUpdatedEnvelope]
|
|
184
|
+
def update_organization(request_options: {}, **params)
|
|
185
|
+
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
186
|
+
request_data = Payabli::Organizations::Types::UpdateOrganizationRequest.new(params).to_h
|
|
187
|
+
non_body_param_names = %w[organizationReference]
|
|
188
|
+
body = request_data.except(*non_body_param_names)
|
|
189
|
+
|
|
190
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }])
|
|
191
|
+
request = Payabli::Internal::JSON::Request.new(
|
|
192
|
+
base_url: request_options[:base_url],
|
|
193
|
+
method: "PATCH",
|
|
194
|
+
path: "v2/organizations/#{URI.encode_uri_component(params[:organization_reference].to_s)}",
|
|
195
|
+
headers: headers,
|
|
196
|
+
body: body,
|
|
197
|
+
request_options: request_options
|
|
198
|
+
)
|
|
199
|
+
begin
|
|
200
|
+
response = @client.send(request)
|
|
201
|
+
rescue Net::HTTPRequestTimeout
|
|
202
|
+
raise Payabli::Errors::TimeoutError
|
|
203
|
+
end
|
|
204
|
+
code = response.code.to_i
|
|
205
|
+
if code.between?(200, 299)
|
|
206
|
+
Payabli::Types::PaypointUpdatedEnvelope.load(response.body)
|
|
207
|
+
else
|
|
208
|
+
error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
|
|
209
|
+
raise error_class.new(response.body, code: code)
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Organizations
|
|
5
|
+
module Types
|
|
6
|
+
class CreateOrganizationOrganizationsRequest < Internal::Types::Model
|
|
7
|
+
extend Payabli::Internal::Types::Union
|
|
8
|
+
|
|
9
|
+
member -> { Payabli::Types::CreateOrganizationWithInlineBusiness }
|
|
10
|
+
|
|
11
|
+
member -> { Payabli::Types::CreateOrganizationWithBusinessReference }
|
|
12
|
+
|
|
13
|
+
member -> { Payabli::Types::CreateOrganizationAllFields }
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Organizations
|
|
5
|
+
module Types
|
|
6
|
+
class ListOrganizationsOrganizationsRequest < Internal::Types::Model
|
|
7
|
+
field :business_reference, -> { String }, optional: true, nullable: false, api_name: "businessReference"
|
|
8
|
+
|
|
9
|
+
field :status, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :search, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :limit, -> { Integer }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :page, -> { Integer }, optional: true, nullable: false
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Organizations
|
|
5
|
+
module Types
|
|
6
|
+
class UpdateOrganizationRequest < Internal::Types::Model
|
|
7
|
+
field :organization_reference, -> { String }, optional: false, nullable: false, api_name: "organizationReference"
|
|
8
|
+
|
|
9
|
+
field :doing_business_as, -> { String }, optional: true, nullable: false, api_name: "doingBusinessAs"
|
|
10
|
+
|
|
11
|
+
field :description, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :website, -> { String }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :customer_service_phone, -> { String }, optional: true, nullable: false, api_name: "customerServicePhone"
|
|
16
|
+
|
|
17
|
+
field :customer_service_email, -> { String }, optional: true, nullable: false, api_name: "customerServiceEmail"
|
|
18
|
+
|
|
19
|
+
field :timezone, -> { String }, optional: true, nullable: false
|
|
20
|
+
|
|
21
|
+
field :external_id, -> { String }, optional: true, nullable: false, api_name: "externalId"
|
|
22
|
+
|
|
23
|
+
field :custom_data, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false, api_name: "customData"
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Types
|
|
5
|
+
# All fields accepted when creating an organization. Provide exactly one of `business` or `businessReference`.
|
|
6
|
+
class CreateOrganizationAllFields < Internal::Types::Model
|
|
7
|
+
field :parent_paypoint_reference, -> { String }, optional: true, nullable: false, api_name: "parentPaypointReference"
|
|
8
|
+
|
|
9
|
+
field :doing_business_as, -> { String }, optional: false, nullable: false, api_name: "doingBusinessAs"
|
|
10
|
+
|
|
11
|
+
field :description, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :website, -> { String }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :customer_service_phone, -> { String }, optional: true, nullable: false, api_name: "customerServicePhone"
|
|
16
|
+
|
|
17
|
+
field :customer_service_email, -> { String }, optional: true, nullable: false, api_name: "customerServiceEmail"
|
|
18
|
+
|
|
19
|
+
field :timezone, -> { String }, optional: true, nullable: false
|
|
20
|
+
|
|
21
|
+
field :external_id, -> { String }, optional: true, nullable: false, api_name: "externalId"
|
|
22
|
+
|
|
23
|
+
field :custom_data, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false, api_name: "customData"
|
|
24
|
+
|
|
25
|
+
field :business, -> { Payabli::Types::CreateBusinessRequest }, optional: true, nullable: false
|
|
26
|
+
|
|
27
|
+
field :business_reference, -> { String }, optional: true, nullable: false, api_name: "businessReference"
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Types
|
|
5
|
+
# Create an organization under an existing business. Provide `businessReference` plus `doingBusinessAs`. All other
|
|
6
|
+
# fields are optional.
|
|
7
|
+
class CreateOrganizationWithBusinessReference < Internal::Types::Model
|
|
8
|
+
field :parent_paypoint_reference, -> { String }, optional: true, nullable: false, api_name: "parentPaypointReference"
|
|
9
|
+
|
|
10
|
+
field :doing_business_as, -> { String }, optional: false, nullable: false, api_name: "doingBusinessAs"
|
|
11
|
+
|
|
12
|
+
field :description, -> { String }, optional: true, nullable: false
|
|
13
|
+
|
|
14
|
+
field :website, -> { String }, optional: true, nullable: false
|
|
15
|
+
|
|
16
|
+
field :customer_service_phone, -> { String }, optional: true, nullable: false, api_name: "customerServicePhone"
|
|
17
|
+
|
|
18
|
+
field :customer_service_email, -> { String }, optional: true, nullable: false, api_name: "customerServiceEmail"
|
|
19
|
+
|
|
20
|
+
field :timezone, -> { String }, optional: true, nullable: false
|
|
21
|
+
|
|
22
|
+
field :external_id, -> { String }, optional: true, nullable: false, api_name: "externalId"
|
|
23
|
+
|
|
24
|
+
field :custom_data, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false, api_name: "customData"
|
|
25
|
+
|
|
26
|
+
field :business_reference, -> { String }, optional: false, nullable: false, api_name: "businessReference"
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Types
|
|
5
|
+
# Create an organization and its business together. Provide `business` plus `doingBusinessAs`. All other fields are
|
|
6
|
+
# optional.
|
|
7
|
+
class CreateOrganizationWithInlineBusiness < Internal::Types::Model
|
|
8
|
+
field :parent_paypoint_reference, -> { String }, optional: true, nullable: false, api_name: "parentPaypointReference"
|
|
9
|
+
|
|
10
|
+
field :doing_business_as, -> { String }, optional: false, nullable: false, api_name: "doingBusinessAs"
|
|
11
|
+
|
|
12
|
+
field :description, -> { String }, optional: true, nullable: false
|
|
13
|
+
|
|
14
|
+
field :website, -> { String }, optional: true, nullable: false
|
|
15
|
+
|
|
16
|
+
field :customer_service_phone, -> { String }, optional: true, nullable: false, api_name: "customerServicePhone"
|
|
17
|
+
|
|
18
|
+
field :customer_service_email, -> { String }, optional: true, nullable: false, api_name: "customerServiceEmail"
|
|
19
|
+
|
|
20
|
+
field :timezone, -> { String }, optional: true, nullable: false
|
|
21
|
+
|
|
22
|
+
field :external_id, -> { String }, optional: true, nullable: false, api_name: "externalId"
|
|
23
|
+
|
|
24
|
+
field :custom_data, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false, api_name: "customData"
|
|
25
|
+
|
|
26
|
+
field :business, -> { Payabli::Types::CreateBusinessRequest }, optional: false, nullable: false
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Types
|
|
5
|
+
class GetBasicOrganizationResponse < Internal::Types::Model
|
|
6
|
+
field :is_success, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isSuccess"
|
|
7
|
+
|
|
8
|
+
field :pageidentifier, -> { String }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :response_data, -> { Payabli::Types::OrganizationQueryRecord }, optional: true, nullable: false, api_name: "responseData"
|
|
11
|
+
|
|
12
|
+
field :response_text, -> { String }, optional: false, nullable: false, api_name: "responseText"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Types
|
|
5
|
+
# The organization's billing information. Fields that aren't set return `null`.
|
|
6
|
+
class InstrumentResponse < Internal::Types::Model
|
|
7
|
+
field :ach_account, -> { String }, optional: false, nullable: true, api_name: "achAccount"
|
|
8
|
+
|
|
9
|
+
field :ach_routing, -> { String }, optional: false, nullable: true, api_name: "achRouting"
|
|
10
|
+
|
|
11
|
+
field :billing_address, -> { String }, optional: false, nullable: true, api_name: "billingAddress"
|
|
12
|
+
|
|
13
|
+
field :billing_city, -> { String }, optional: false, nullable: true, api_name: "billingCity"
|
|
14
|
+
|
|
15
|
+
field :billing_country, -> { String }, optional: false, nullable: true, api_name: "billingCountry"
|
|
16
|
+
|
|
17
|
+
field :billing_state, -> { String }, optional: false, nullable: true, api_name: "billingState"
|
|
18
|
+
|
|
19
|
+
field :billing_zip, -> { String }, optional: false, nullable: true, api_name: "billingZip"
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -8,7 +8,11 @@ module Payabli
|
|
|
8
8
|
|
|
9
9
|
field :check, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
10
10
|
|
|
11
|
+
field :rtp, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
12
|
+
|
|
11
13
|
field :vcard, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :wire, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
12
16
|
end
|
|
13
17
|
end
|
|
14
18
|
end
|
|
@@ -3,56 +3,58 @@
|
|
|
3
3
|
module Payabli
|
|
4
4
|
module Types
|
|
5
5
|
class OrganizationQueryRecord < Internal::Types::Model
|
|
6
|
-
field :
|
|
6
|
+
field :billing_info, -> { Payabli::Types::InstrumentResponse }, optional: true, nullable: false, api_name: "BillingInfo"
|
|
7
7
|
|
|
8
|
-
field :
|
|
9
|
-
|
|
10
|
-
field :contacts, -> { Internal::Types::Array[Payabli::Types::Contacts] }, optional: true, nullable: false
|
|
8
|
+
field :contacts, -> { Internal::Types::Array[Payabli::Types::ContactsResponse] }, optional: true, nullable: false, api_name: "Contacts"
|
|
11
9
|
|
|
12
10
|
field :created_at, -> { String }, optional: true, nullable: false, api_name: "createdAt"
|
|
13
11
|
|
|
14
|
-
field :has_billing, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "
|
|
12
|
+
field :has_billing, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "HasBilling"
|
|
15
13
|
|
|
16
|
-
field :has_residual, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "
|
|
14
|
+
field :has_residual, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "HasResidual"
|
|
17
15
|
|
|
18
16
|
field :id_org, -> { Integer }, optional: true, nullable: false, api_name: "idOrg"
|
|
19
17
|
|
|
20
18
|
field :is_root, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isRoot"
|
|
21
19
|
|
|
22
|
-
field :org_address, -> { String }, optional: true, nullable: false, api_name: "
|
|
20
|
+
field :org_address, -> { String }, optional: true, nullable: false, api_name: "OrgAddress"
|
|
21
|
+
|
|
22
|
+
field :org_city, -> { String }, optional: true, nullable: false, api_name: "OrgCity"
|
|
23
23
|
|
|
24
|
-
field :
|
|
24
|
+
field :org_country, -> { String }, optional: true, nullable: false, api_name: "OrgCountry"
|
|
25
25
|
|
|
26
|
-
field :
|
|
26
|
+
field :org_entry_name, -> { String }, optional: true, nullable: false, api_name: "OrgEntryName"
|
|
27
27
|
|
|
28
|
-
field :
|
|
28
|
+
field :org_favicon, -> { String }, optional: true, nullable: false, api_name: "OrgFavicon"
|
|
29
29
|
|
|
30
|
-
field :org_id, -> { String }, optional: true, nullable: false, api_name: "
|
|
30
|
+
field :org_id, -> { String }, optional: true, nullable: false, api_name: "OrgId"
|
|
31
31
|
|
|
32
|
-
field :org_logo, -> {
|
|
32
|
+
field :org_logo, -> { String }, optional: true, nullable: false, api_name: "OrgLogo"
|
|
33
33
|
|
|
34
|
-
field :org_name, -> { String }, optional: true, nullable: false, api_name: "
|
|
34
|
+
field :org_name, -> { String }, optional: true, nullable: false, api_name: "OrgName"
|
|
35
35
|
|
|
36
|
-
field :org_parent_id, -> { Integer }, optional: true, nullable: false, api_name: "
|
|
36
|
+
field :org_parent_id, -> { Integer }, optional: true, nullable: false, api_name: "OrgParentId"
|
|
37
37
|
|
|
38
|
-
field :org_parent_name, -> { String }, optional: true, nullable: false, api_name: "
|
|
38
|
+
field :org_parent_name, -> { String }, optional: true, nullable: false, api_name: "OrgParentName"
|
|
39
39
|
|
|
40
|
-
field :org_state, -> { String }, optional: true, nullable: false, api_name: "
|
|
40
|
+
field :org_state, -> { String }, optional: true, nullable: false, api_name: "OrgState"
|
|
41
41
|
|
|
42
|
-
field :org_timezone, -> { Integer }, optional: true, nullable: false, api_name: "
|
|
42
|
+
field :org_timezone, -> { Integer }, optional: true, nullable: false, api_name: "OrgTimezone"
|
|
43
43
|
|
|
44
|
-
field :org_type, -> { Integer }, optional: true, nullable: false, api_name: "
|
|
44
|
+
field :org_type, -> { Integer }, optional: true, nullable: false, api_name: "OrgType"
|
|
45
45
|
|
|
46
|
-
field :org_website, -> { String }, optional: true, nullable: false, api_name: "
|
|
46
|
+
field :org_website, -> { String }, optional: true, nullable: false, api_name: "OrgWebsite"
|
|
47
47
|
|
|
48
|
-
field :org_zip, -> { String }, optional: true, nullable: false, api_name: "
|
|
48
|
+
field :org_zip, -> { String }, optional: true, nullable: false, api_name: "OrgZip"
|
|
49
49
|
|
|
50
50
|
field :recipient_email_notification, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "recipientEmailNotification"
|
|
51
51
|
|
|
52
|
-
field :reply_to_email, -> { String }, optional: true, nullable: false, api_name: "
|
|
52
|
+
field :reply_to_email, -> { String }, optional: true, nullable: false, api_name: "ReplyToEmail"
|
|
53
53
|
|
|
54
54
|
field :resumable, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
55
55
|
|
|
56
|
+
field :services, -> { Internal::Types::Array[Payabli::Types::OrganizationQueryRecordServicesItem] }, optional: true, nullable: false, api_name: "Services"
|
|
57
|
+
|
|
56
58
|
field :summary, -> { Payabli::Types::SummaryOrg }, optional: true, nullable: false
|
|
57
59
|
|
|
58
60
|
field :users, -> { Internal::Types::Array[Payabli::Types::UserQueryRecord] }, optional: true, nullable: false
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Types
|
|
5
|
+
# Fields you can set when you create an organization. Payabli sets the organization type, so the request has no
|
|
6
|
+
# `paypointType`. Of these shared fields, only `doingBusinessAs` is required. Set `description`, `website`,
|
|
7
|
+
# `customerServicePhone`, `customerServiceEmail`, and `timezone` when you have them.
|
|
8
|
+
class OrganizationWritableFields < Internal::Types::Model
|
|
9
|
+
field :parent_paypoint_reference, -> { String }, optional: true, nullable: false, api_name: "parentPaypointReference"
|
|
10
|
+
|
|
11
|
+
field :doing_business_as, -> { String }, optional: false, nullable: false, api_name: "doingBusinessAs"
|
|
12
|
+
|
|
13
|
+
field :description, -> { String }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :website, -> { String }, optional: true, nullable: false
|
|
16
|
+
|
|
17
|
+
field :customer_service_phone, -> { String }, optional: true, nullable: false, api_name: "customerServicePhone"
|
|
18
|
+
|
|
19
|
+
field :customer_service_email, -> { String }, optional: true, nullable: false, api_name: "customerServiceEmail"
|
|
20
|
+
|
|
21
|
+
field :timezone, -> { String }, optional: true, nullable: false
|
|
22
|
+
|
|
23
|
+
field :external_id, -> { String }, optional: true, nullable: false, api_name: "externalId"
|
|
24
|
+
|
|
25
|
+
field :custom_data, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false, api_name: "customData"
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -7,9 +7,9 @@ module Payabli
|
|
|
7
7
|
|
|
8
8
|
field :mode, -> { Integer }, optional: true, nullable: false, api_name: "Mode"
|
|
9
9
|
|
|
10
|
-
field :
|
|
10
|
+
field :minticket, -> { Integer }, optional: true, nullable: false, api_name: "Minticket"
|
|
11
11
|
|
|
12
|
-
field :
|
|
12
|
+
field :maxticket, -> { Integer }, optional: true, nullable: false, api_name: "Maxticket"
|
|
13
13
|
|
|
14
14
|
field :cfee_fix, -> { Integer }, optional: true, nullable: false, api_name: "CfeeFix"
|
|
15
15
|
|
|
@@ -26,6 +26,8 @@ module Payabli
|
|
|
26
26
|
|
|
27
27
|
field :customer_service_email, -> { String }, optional: true, nullable: false, api_name: "customerServiceEmail"
|
|
28
28
|
|
|
29
|
+
field :external_id, -> { String }, optional: true, nullable: false, api_name: "externalId"
|
|
30
|
+
|
|
29
31
|
field :entry_name, -> { String }, optional: false, nullable: false, api_name: "entryName"
|
|
30
32
|
|
|
31
33
|
field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
|
data/lib/payabli/version.rb
CHANGED