payabli 3.0.20 → 3.0.22

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 (57) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +4 -4
  3. data/README.md +2 -7
  4. data/lib/payabli/applications/client.rb +9 -7
  5. data/lib/payabli/bill/client.rb +1 -1
  6. data/lib/payabli/billing/client.rb +2 -2
  7. data/lib/payabli/boarding/client.rb +11 -6
  8. data/lib/payabli/boarding_templates/client.rb +1 -1
  9. data/lib/payabli/case_management/client.rb +1 -1
  10. data/lib/payabli/client.rb +6 -1
  11. data/lib/payabli/export/client.rb +15 -15
  12. data/lib/payabli/invoice/client.rb +1 -1
  13. data/lib/payabli/notification/client.rb +1 -1
  14. data/lib/payabli/notificationlogs/client.rb +1 -1
  15. data/lib/payabli/organization/client.rb +13 -13
  16. data/lib/payabli/organizations/client.rb +214 -0
  17. data/lib/payabli/organizations/types/create_organization_organizations_request.rb +17 -0
  18. data/lib/payabli/organizations/types/list_organizations_organizations_request.rb +19 -0
  19. data/lib/payabli/organizations/types/update_organization_request.rb +27 -0
  20. data/lib/payabli/payout_subscription/client.rb +6 -3
  21. data/lib/payabli/paypoint/client.rb +1 -1
  22. data/lib/payabli/people/client.rb +2 -2
  23. data/lib/payabli/query/client.rb +21 -21
  24. data/lib/payabli/templates/client.rb +4 -4
  25. data/lib/payabli/types/bill_detail_response.rb +2 -0
  26. data/lib/payabli/types/bill_query_record_2.rb +2 -0
  27. data/lib/payabli/types/bill_response_data.rb +2 -0
  28. data/lib/payabli/types/business_address_create.rb +2 -2
  29. data/lib/payabli/types/create_organization_all_fields.rb +30 -0
  30. data/lib/payabli/types/create_organization_with_business_reference.rb +29 -0
  31. data/lib/payabli/types/create_organization_with_inline_business.rb +29 -0
  32. data/lib/payabli/types/get_basic_organization_response.rb +15 -0
  33. data/lib/payabli/types/instrument_response.rb +22 -0
  34. data/lib/payabli/types/methods_list_out.rb +4 -0
  35. data/lib/payabli/types/organization_query_record.rb +23 -21
  36. data/lib/payabli/types/organization_writable_fields.rb +28 -0
  37. data/lib/payabli/types/owners.rb +2 -0
  38. data/lib/payabli/types/payabli_credentials_pascal.rb +8 -2
  39. data/lib/payabli/types/payout_subscription_query_record.rb +2 -0
  40. data/lib/payabli/types/payout_subscription_query_record_pascal.rb +2 -0
  41. data/lib/payabli/types/paypoint_summary_response.rb +2 -0
  42. data/lib/payabli/types/people_search_address_response.rb +17 -0
  43. data/lib/payabli/types/people_search_result_response.rb +4 -0
  44. data/lib/payabli/types/query_batches_out_response_records_item.rb +4 -0
  45. data/lib/payabli/types/query_payout_transaction_records_item.rb +2 -0
  46. data/lib/payabli/types/submit_signer.rb +6 -5
  47. data/lib/payabli/types/transaction_out_query_record.rb +2 -0
  48. data/lib/payabli/types/transfer_out_detail_record.rb +2 -0
  49. data/lib/payabli/types/transfer_out_record.rb +2 -0
  50. data/lib/payabli/types/vendor_data_response.rb +2 -0
  51. data/lib/payabli/types/vendor_query_record.rb +2 -0
  52. data/lib/payabli/version.rb +1 -1
  53. data/lib/payabli/wallet/client.rb +2 -2
  54. data/lib/payabli.rb +14 -3
  55. data/reference.md +599 -223
  56. data/wiremock/wiremock-mappings.json +243 -123
  57. metadata +13 -2
@@ -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
@@ -11,7 +11,8 @@ module Payabli
11
11
  end
12
12
 
13
13
  # Creates a payout subscription to automatically send payouts to a vendor on a recurring schedule. See [Manage
14
- # payout subscriptions](/guides/pay-out-developer-payout-subscriptions-manage) for a step-by-step guide.
14
+ # payout subscriptions](/guides/pay-out-developer-payout-subscriptions-manage) for a step-by-step guide. Temporary
15
+ # API tokens can't call this endpoint, and a request made with one returns HTTP `401` with response code `9001`.
15
16
  #
16
17
  # @param request_options [Hash]
17
18
  # @param params [Payabli::PayoutSubscription::Types::RequestPayoutSchedule]
@@ -127,7 +128,8 @@ module Payabli
127
128
  end
128
129
 
129
130
  # Updates a payout subscription's details. See [Manage payout
130
- # subscriptions](/guides/pay-out-developer-payout-subscriptions-manage) for more information.
131
+ # subscriptions](/guides/pay-out-developer-payout-subscriptions-manage) for more information. Temporary API tokens
132
+ # can't call this endpoint, and a request made with one returns HTTP `401` with response code `9001`.
131
133
  #
132
134
  # @param request_options [Hash]
133
135
  # @param params [Payabli::PayoutSubscription::Types::UpdatePayoutSubscriptionBody]
@@ -175,7 +177,8 @@ module Payabli
175
177
  end
176
178
 
177
179
  # Deletes a payout subscription and prevents future payouts. See [Manage payout
178
- # subscriptions](/guides/pay-out-developer-payout-subscriptions-manage) for more information.
180
+ # subscriptions](/guides/pay-out-developer-payout-subscriptions-manage) for more information. Temporary API tokens
181
+ # can't call this endpoint, and a request made with one returns HTTP `401` with response code `9001`.
179
182
  #
180
183
  # @param request_options [Hash]
181
184
  # @param params [Hash]
@@ -144,7 +144,7 @@ module Payabli
144
144
  # @example
145
145
  # client.paypoint.migrate(
146
146
  # entry_point: "8cfec329267",
147
- # new_parent_organization_id: 123,
147
+ # new_parent_organization_id: 900123,
148
148
  # notification_request: {
149
149
  # notification_url: "https://webhook-test.yoursie.com",
150
150
  # web_header_parameters: [{
@@ -326,7 +326,7 @@ module Payabli
326
326
  # @example
327
327
  # client.people.search_people(
328
328
  # entry: "8cfec329267",
329
- # org_id: 123,
329
+ # org_id: 900123,
330
330
  # request: {
331
331
  # firstName: "Marcus",
332
332
  # lastName: "Delgado"
@@ -384,7 +384,7 @@ module Payabli
384
384
  # @example
385
385
  # client.people.search_people_unmasked(
386
386
  # entry: "8cfec329267",
387
- # org_id: 123,
387
+ # org_id: 900123,
388
388
  # request: {
389
389
  # firstName: "Marcus",
390
390
  # lastName: "Delgado"
@@ -89,7 +89,7 @@ module Payabli
89
89
  #
90
90
  # @example
91
91
  # client.query.list_batch_details_org(
92
- # org_id: 123,
92
+ # org_id: 900123,
93
93
  # from_record: 251,
94
94
  # limit_record: 0,
95
95
  # sort_by: "desc(field_name)"
@@ -205,7 +205,7 @@ module Payabli
205
205
  #
206
206
  # @example
207
207
  # client.query.list_batches_org(
208
- # org_id: 123,
208
+ # org_id: 900123,
209
209
  # from_record: 251,
210
210
  # limit_record: 0,
211
211
  # sort_by: "desc(field_name)"
@@ -321,7 +321,7 @@ module Payabli
321
321
  #
322
322
  # @example
323
323
  # client.query.list_batches_out_org(
324
- # org_id: 123,
324
+ # org_id: 900123,
325
325
  # from_record: 251,
326
326
  # limit_record: 0,
327
327
  # sort_by: "desc(field_name)"
@@ -437,7 +437,7 @@ module Payabli
437
437
  #
438
438
  # @example
439
439
  # client.query.list_chargebacks_org(
440
- # org_id: 123,
440
+ # org_id: 900123,
441
441
  # from_record: 251,
442
442
  # limit_record: 0,
443
443
  # sort_by: "desc(field_name)"
@@ -553,7 +553,7 @@ module Payabli
553
553
  #
554
554
  # @example
555
555
  # client.query.list_customers_org(
556
- # org_id: 123,
556
+ # org_id: 900123,
557
557
  # from_record: 251,
558
558
  # limit_record: 0,
559
559
  # sort_by: "desc(field_name)"
@@ -669,7 +669,7 @@ module Payabli
669
669
  #
670
670
  # @example
671
671
  # client.query.list_devices_org(
672
- # org_id: 123,
672
+ # org_id: 900123,
673
673
  # from_record: 0,
674
674
  # limit_record: 20,
675
675
  # sort_by: "desc(createdAt)"
@@ -781,7 +781,7 @@ module Payabli
781
781
  #
782
782
  # @example
783
783
  # client.query.list_notification_reports_org(
784
- # org_id: 123,
784
+ # org_id: 900123,
785
785
  # from_record: 251,
786
786
  # limit_record: 0,
787
787
  # sort_by: "desc(field_name)"
@@ -891,7 +891,7 @@ module Payabli
891
891
  #
892
892
  # @example
893
893
  # client.query.list_notifications_org(
894
- # org_id: 123,
894
+ # org_id: 900123,
895
895
  # from_record: 251,
896
896
  # limit_record: 0,
897
897
  # sort_by: "desc(field_name)"
@@ -949,7 +949,7 @@ module Payabli
949
949
  #
950
950
  # @example
951
951
  # client.query.list_organizations(
952
- # org_id: 123,
952
+ # org_id: 900123,
953
953
  # from_record: 251,
954
954
  # limit_record: 0,
955
955
  # sort_by: "desc(field_name)"
@@ -1065,7 +1065,7 @@ module Payabli
1065
1065
  #
1066
1066
  # @example
1067
1067
  # client.query.list_payout_org(
1068
- # org_id: 123,
1068
+ # org_id: 900123,
1069
1069
  # from_record: 251,
1070
1070
  # limit_record: 0,
1071
1071
  # sort_by: "desc(field_name)"
@@ -1123,7 +1123,7 @@ module Payabli
1123
1123
  #
1124
1124
  # @example
1125
1125
  # client.query.list_paypoints(
1126
- # org_id: 123,
1126
+ # org_id: 900123,
1127
1127
  # from_record: 251,
1128
1128
  # limit_record: 0,
1129
1129
  # sort_by: "desc(field_name)"
@@ -1239,7 +1239,7 @@ module Payabli
1239
1239
  #
1240
1240
  # @example
1241
1241
  # client.query.list_settlements_org(
1242
- # org_id: 123,
1242
+ # org_id: 900123,
1243
1243
  # from_record: 251,
1244
1244
  # limit_record: 0,
1245
1245
  # sort_by: "desc(field_name)"
@@ -1355,7 +1355,7 @@ module Payabli
1355
1355
  #
1356
1356
  # @example
1357
1357
  # client.query.list_subscriptions_org(
1358
- # org_id: 123,
1358
+ # org_id: 900123,
1359
1359
  # from_record: 251,
1360
1360
  # limit_record: 0,
1361
1361
  # sort_by: "desc(field_name)"
@@ -1473,7 +1473,7 @@ module Payabli
1473
1473
  #
1474
1474
  # @example
1475
1475
  # client.query.list_payout_subscriptions_org(
1476
- # org_id: 123,
1476
+ # org_id: 900123,
1477
1477
  # from_record: 0,
1478
1478
  # limit_record: 20,
1479
1479
  # sort_by: "desc(field_name)"
@@ -1613,7 +1613,7 @@ module Payabli
1613
1613
  #
1614
1614
  # @example
1615
1615
  # client.query.list_transactions_org(
1616
- # org_id: 123,
1616
+ # org_id: 900123,
1617
1617
  # from_record: 251,
1618
1618
  # limit_record: 0,
1619
1619
  # sort_by: "desc(field_name)"
@@ -1785,7 +1785,7 @@ module Payabli
1785
1785
  #
1786
1786
  # @example
1787
1787
  # client.query.list_transfers_org(
1788
- # org_id: 123,
1788
+ # org_id: 900123,
1789
1789
  # from_record: 0,
1790
1790
  # limit_record: 20
1791
1791
  # )
@@ -1840,7 +1840,7 @@ module Payabli
1840
1840
  #
1841
1841
  # @example
1842
1842
  # client.query.list_transfers_out_org(
1843
- # org_id: 123,
1843
+ # org_id: 900123,
1844
1844
  # from_record: 0,
1845
1845
  # limit_record: 20
1846
1846
  # )
@@ -2004,7 +2004,7 @@ module Payabli
2004
2004
  #
2005
2005
  # @example
2006
2006
  # client.query.list_users_org(
2007
- # org_id: 123,
2007
+ # org_id: 900123,
2008
2008
  # from_record: 251,
2009
2009
  # limit_record: 0,
2010
2010
  # sort_by: "desc(field_name)"
@@ -2174,7 +2174,7 @@ module Payabli
2174
2174
  #
2175
2175
  # @example
2176
2176
  # client.query.list_vendors_org(
2177
- # org_id: 123,
2177
+ # org_id: 900123,
2178
2178
  # from_record: 251,
2179
2179
  # limit_record: 0,
2180
2180
  # sort_by: "desc(field_name)"
@@ -2343,7 +2343,7 @@ module Payabli
2343
2343
  #
2344
2344
  # @example
2345
2345
  # client.query.list_vcards_transactions_org(
2346
- # org_id: 123,
2346
+ # org_id: 900123,
2347
2347
  # from_record: 0,
2348
2348
  # limit_record: 20,
2349
2349
  # sort_by: "desc(CreatedOn)"
@@ -2400,7 +2400,7 @@ module Payabli
2400
2400
  #
2401
2401
  # @example
2402
2402
  # client.query.list_vcards_org(
2403
- # org_id: 123,
2403
+ # org_id: 900123,
2404
2404
  # from_record: 251,
2405
2405
  # limit_record: 0,
2406
2406
  # sort_by: "desc(field_name)"
@@ -28,7 +28,7 @@ module Payabli
28
28
  # @option params [Integer] :template_id
29
29
  #
30
30
  # @example
31
- # client.templates.delete_template(template_id: 80)
31
+ # client.templates.delete_template(template_id: 900022)
32
32
  #
33
33
  # @return [Payabli::Types::PayabliApiResponseTemplateId]
34
34
  def delete_template(request_options: {}, **params)
@@ -76,7 +76,7 @@ module Payabli
76
76
  #
77
77
  # @example
78
78
  # client.templates.getlink_template(
79
- # template_id: 80,
79
+ # template_id: 900022,
80
80
  # ignore_empty: true
81
81
  # )
82
82
  #
@@ -123,7 +123,7 @@ module Payabli
123
123
  # @option params [Integer] :template_id
124
124
  #
125
125
  # @example
126
- # client.templates.get_template(template_id: 80)
126
+ # client.templates.get_template(template_id: 900022)
127
127
  #
128
128
  # @return [Payabli::Types::TemplateQueryRecord]
129
129
  def get_template(request_options: {}, **params)
@@ -175,7 +175,7 @@ module Payabli
175
175
  #
176
176
  # @example
177
177
  # client.templates.list_templates(
178
- # org_id: 123,
178
+ # org_id: 900123,
179
179
  # from_record: 251,
180
180
  # limit_record: 0,
181
181
  # sort_by: "desc(field_name)"
@@ -49,6 +49,8 @@ module Payabli
49
49
 
50
50
  field :status, -> { Integer }, optional: true, nullable: false, api_name: "Status"
51
51
 
52
+ field :status_label, -> { String }, optional: true, nullable: false, api_name: "StatusLabel"
53
+
52
54
  field :status_text, -> { String }, optional: true, nullable: false, api_name: "StatusText"
53
55
 
54
56
  field :total_amount, -> { Integer }, optional: true, nullable: false, api_name: "TotalAmount"
@@ -69,6 +69,8 @@ module Payabli
69
69
 
70
70
  field :status, -> { Integer }, optional: false, nullable: true, api_name: "Status"
71
71
 
72
+ field :status_label, -> { String }, optional: false, nullable: true, api_name: "StatusLabel"
73
+
72
74
  field :terms, -> { Payabli::Types::Terms }, optional: false, nullable: true, api_name: "Terms"
73
75
 
74
76
  field :total_amount, -> { Integer }, optional: false, nullable: true, api_name: "TotalAmount"
@@ -47,6 +47,8 @@ module Payabli
47
47
 
48
48
  field :status, -> { Integer }, optional: true, nullable: false, api_name: "Status"
49
49
 
50
+ field :status_label, -> { String }, optional: true, nullable: false, api_name: "StatusLabel"
51
+
50
52
  field :created_at, -> { String }, optional: true, nullable: false, api_name: "CreatedAt"
51
53
 
52
54
  field :end_date, -> { String }, optional: false, nullable: true, api_name: "EndDate"
@@ -4,6 +4,8 @@ module Payabli
4
4
  module Types
5
5
  # An address sent when creating a business. `country` is required.
6
6
  class BusinessAddressCreate < Internal::Types::Model
7
+ field :country, -> { String }, optional: false, nullable: false
8
+
7
9
  field :type, -> { Payabli::Types::AddressType }, optional: true, nullable: false
8
10
 
9
11
  field :location, -> { Payabli::Types::BusinessAddressLocation }, optional: true, nullable: false
@@ -18,8 +20,6 @@ module Payabli
18
20
 
19
21
  field :postal_code, -> { String }, optional: true, nullable: false, api_name: "postalCode"
20
22
 
21
- field :country, -> { String }, optional: true, nullable: false
22
-
23
23
  field :floor, -> { String }, optional: true, nullable: false
24
24
 
25
25
  field :suite_apart_number, -> { String }, optional: true, nullable: false, api_name: "suiteApartNumber"
@@ -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