lockstep_sdk 2022.4.32.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/lockstep_sdk/clients/activities_client.rb +119 -0
- data/lib/lockstep_sdk/clients/api_keys_client.rb +78 -0
- data/lib/lockstep_sdk/clients/app_enrollments_client.rb +121 -0
- data/lib/lockstep_sdk/clients/applications_client.rb +100 -0
- data/lib/lockstep_sdk/clients/attachments_client.rb +121 -0
- data/lib/lockstep_sdk/clients/code_definitions_client.rb +60 -0
- data/lib/lockstep_sdk/clients/companies_client.rb +123 -0
- data/lib/lockstep_sdk/clients/contacts_client.rb +90 -0
- data/lib/lockstep_sdk/clients/credit_memo_applied_client.rb +92 -0
- data/lib/lockstep_sdk/clients/currencies_client.rb +55 -0
- data/lib/lockstep_sdk/clients/custom_field_definitions_client.rb +94 -0
- data/lib/lockstep_sdk/clients/custom_field_values_client.rb +97 -0
- data/lib/lockstep_sdk/clients/definitions_client.rb +95 -0
- data/lib/lockstep_sdk/clients/emails_client.rb +108 -0
- data/lib/lockstep_sdk/clients/invoice_history_client.rb +56 -0
- data/lib/lockstep_sdk/clients/invoices_client.rb +126 -0
- data/lib/lockstep_sdk/clients/leads_client.rb +40 -0
- data/lib/lockstep_sdk/clients/notes_client.rb +84 -0
- data/lib/lockstep_sdk/clients/payment_applications_client.rb +92 -0
- data/lib/lockstep_sdk/clients/payments_client.rb +138 -0
- data/lib/lockstep_sdk/clients/provisioning_client.rb +56 -0
- data/lib/lockstep_sdk/clients/reports_client.rb +114 -0
- data/lib/lockstep_sdk/clients/status_client.rb +53 -0
- data/lib/lockstep_sdk/clients/sync_client.rb +97 -0
- data/lib/lockstep_sdk/clients/user_accounts_client.rb +127 -0
- data/lib/lockstep_sdk/clients/user_roles_client.rb +54 -0
- data/lib/lockstep_sdk/lockstep_api.rb +264 -0
- data/lib/lockstep_sdk/models/activity_model.rb +221 -0
- data/lib/lockstep_sdk/models/activity_stream_item_model.rb +104 -0
- data/lib/lockstep_sdk/models/activity_xref_model.rb +72 -0
- data/lib/lockstep_sdk/models/aging_model.rb +62 -0
- data/lib/lockstep_sdk/models/api_key_model.rb +116 -0
- data/lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb +110 -0
- data/lib/lockstep_sdk/models/app_enrollment_model.rb +151 -0
- data/lib/lockstep_sdk/models/application_model.rb +166 -0
- data/lib/lockstep_sdk/models/ar_aging_header_info_model.rb +86 -0
- data/lib/lockstep_sdk/models/ar_header_info_model.rb +170 -0
- data/lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb +140 -0
- data/lib/lockstep_sdk/models/attachment_header_info_model.rb +74 -0
- data/lib/lockstep_sdk/models/attachment_model.rb +122 -0
- data/lib/lockstep_sdk/models/bulk_currency_conversion_model.rb +56 -0
- data/lib/lockstep_sdk/models/cashflow_report_model.rb +74 -0
- data/lib/lockstep_sdk/models/code_definition_model.rb +99 -0
- data/lib/lockstep_sdk/models/company_model.rb +336 -0
- data/lib/lockstep_sdk/models/connector_info_model.rb +69 -0
- data/lib/lockstep_sdk/models/contact_model.rb +227 -0
- data/lib/lockstep_sdk/models/country_model.rb +116 -0
- data/lib/lockstep_sdk/models/credit_memo_applied_model.rb +150 -0
- data/lib/lockstep_sdk/models/credit_memo_invoice_model.rb +116 -0
- data/lib/lockstep_sdk/models/currency_model.rb +74 -0
- data/lib/lockstep_sdk/models/currency_rate_model.rb +68 -0
- data/lib/lockstep_sdk/models/custom_field_definition_model.rb +121 -0
- data/lib/lockstep_sdk/models/custom_field_value_model.rb +115 -0
- data/lib/lockstep_sdk/models/customer_details_model.rb +164 -0
- data/lib/lockstep_sdk/models/customer_details_payment_model.rb +104 -0
- data/lib/lockstep_sdk/models/customer_summary_model.rb +134 -0
- data/lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb +62 -0
- data/lib/lockstep_sdk/models/developer_account_submit_model.rb +62 -0
- data/lib/lockstep_sdk/models/email_model.rb +245 -0
- data/lib/lockstep_sdk/models/erp_info_data_model.rb +63 -0
- data/lib/lockstep_sdk/models/erp_info_model.rb +56 -0
- data/lib/lockstep_sdk/models/erp_model.rb +62 -0
- data/lib/lockstep_sdk/models/invite_data_model.rb +56 -0
- data/lib/lockstep_sdk/models/invite_model.rb +68 -0
- data/lib/lockstep_sdk/models/invite_submit_model.rb +50 -0
- data/lib/lockstep_sdk/models/invoice_address_model.rb +140 -0
- data/lib/lockstep_sdk/models/invoice_history_model.rb +238 -0
- data/lib/lockstep_sdk/models/invoice_line_model.rb +194 -0
- data/lib/lockstep_sdk/models/invoice_model.rb +325 -0
- data/lib/lockstep_sdk/models/invoice_payment_detail_model.rb +104 -0
- data/lib/lockstep_sdk/models/invoice_summary_model.rb +134 -0
- data/lib/lockstep_sdk/models/lead_model.rb +74 -0
- data/lib/lockstep_sdk/models/note_model.rb +121 -0
- data/lib/lockstep_sdk/models/payment_applied_model.rb +131 -0
- data/lib/lockstep_sdk/models/payment_detail_header_model.rb +80 -0
- data/lib/lockstep_sdk/models/payment_detail_model.rb +176 -0
- data/lib/lockstep_sdk/models/payment_model.rb +206 -0
- data/lib/lockstep_sdk/models/payment_summary_model.rb +128 -0
- data/lib/lockstep_sdk/models/provisioning_finalize_request_model.rb +74 -0
- data/lib/lockstep_sdk/models/provisioning_model.rb +74 -0
- data/lib/lockstep_sdk/models/provisioning_response_model.rb +86 -0
- data/lib/lockstep_sdk/models/risk_rate_model.rb +98 -0
- data/lib/lockstep_sdk/models/state_model.rb +62 -0
- data/lib/lockstep_sdk/models/status_model.rb +128 -0
- data/lib/lockstep_sdk/models/sync_entity_result_model.rb +74 -0
- data/lib/lockstep_sdk/models/sync_request_model.rb +98 -0
- data/lib/lockstep_sdk/models/sync_submit_model.rb +50 -0
- data/lib/lockstep_sdk/models/transfer_owner_model.rb +56 -0
- data/lib/lockstep_sdk/models/transfer_owner_submit_model.rb +50 -0
- data/lib/lockstep_sdk/models/user_account_model.rb +240 -0
- data/lib/lockstep_sdk/models/user_role_model.rb +86 -0
- data/lib/lockstep_sdk/version.rb +3 -0
- metadata +150 -0
@@ -0,0 +1,227 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Software Development Kit for Ruby
|
3
|
+
#
|
4
|
+
# (c) 2021-2022 Lockstep, Inc.
|
5
|
+
#
|
6
|
+
# For the full copyright and license information, please view the LICENSE
|
7
|
+
# file that was distributed with this source code.
|
8
|
+
#
|
9
|
+
# @author Ted Spence <tspence@lockstep.io>
|
10
|
+
# @author Manish Narayan B S <manish.n@lockstep.io>
|
11
|
+
# @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
12
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
13
|
+
# @version 2022.4
|
14
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
15
|
+
#
|
16
|
+
|
17
|
+
|
18
|
+
require 'json'
|
19
|
+
|
20
|
+
module LockstepSdk
|
21
|
+
|
22
|
+
##
|
23
|
+
# A Contact contains information about a person or role within a Company.
|
24
|
+
# You can use Contacts to track information about who is responsible for a specific project,
|
25
|
+
# who handles invoices, or information about which role at a particular customer or
|
26
|
+
# vendor you should speak with about invoices.
|
27
|
+
class ContactModel
|
28
|
+
|
29
|
+
##
|
30
|
+
# Initialize the ContactModel using the provided prototype
|
31
|
+
def initialize(params = {})
|
32
|
+
@contact_id = params.dig(:contact_id)
|
33
|
+
@company_id = params.dig(:company_id)
|
34
|
+
@group_key = params.dig(:group_key)
|
35
|
+
@erp_key = params.dig(:erp_key)
|
36
|
+
@contact_name = params.dig(:contact_name)
|
37
|
+
@contact_code = params.dig(:contact_code)
|
38
|
+
@title = params.dig(:title)
|
39
|
+
@role_code = params.dig(:role_code)
|
40
|
+
@email_address = params.dig(:email_address)
|
41
|
+
@phone = params.dig(:phone)
|
42
|
+
@fax = params.dig(:fax)
|
43
|
+
@address1 = params.dig(:address1)
|
44
|
+
@address2 = params.dig(:address2)
|
45
|
+
@address3 = params.dig(:address3)
|
46
|
+
@city = params.dig(:city)
|
47
|
+
@state_region = params.dig(:state_region)
|
48
|
+
@postal_code = params.dig(:postal_code)
|
49
|
+
@country_code = params.dig(:country_code)
|
50
|
+
@is_active = params.dig(:is_active)
|
51
|
+
@webpage_url = params.dig(:webpage_url)
|
52
|
+
@picture_url = params.dig(:picture_url)
|
53
|
+
@created = params.dig(:created)
|
54
|
+
@created_user_id = params.dig(:created_user_id)
|
55
|
+
@modified = params.dig(:modified)
|
56
|
+
@modified_user_id = params.dig(:modified_user_id)
|
57
|
+
@app_enrollment_id = params.dig(:app_enrollment_id)
|
58
|
+
@notes = params.dig(:notes)
|
59
|
+
@attachments = params.dig(:attachments)
|
60
|
+
@custom_field_definitions = params.dig(:custom_field_definitions)
|
61
|
+
@custom_field_values = params.dig(:custom_field_values)
|
62
|
+
end
|
63
|
+
|
64
|
+
##
|
65
|
+
# @return [Uuid] The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform. For the ID of this record in its originating financial system, see `ErpKey`.
|
66
|
+
attr_accessor :contact_id
|
67
|
+
|
68
|
+
##
|
69
|
+
# @return [Uuid] The ID of the company to which this contact belongs.
|
70
|
+
attr_accessor :company_id
|
71
|
+
|
72
|
+
##
|
73
|
+
# @return [Uuid] The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
74
|
+
attr_accessor :group_key
|
75
|
+
|
76
|
+
##
|
77
|
+
# @return [String] The unique ID of this record as it was known in its originating financial system. If this company record was imported from a financial system, it will have the value `ErpKey` set to the original primary key number of the record as it was known in the originating financial system. If this record was not imported, this value will be `null`. For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
78
|
+
attr_accessor :erp_key
|
79
|
+
|
80
|
+
##
|
81
|
+
# @return [String] The name of the contact.
|
82
|
+
attr_accessor :contact_name
|
83
|
+
|
84
|
+
##
|
85
|
+
# @return [String] A friendly human-readable code that describes this Contact.
|
86
|
+
attr_accessor :contact_code
|
87
|
+
|
88
|
+
##
|
89
|
+
# @return [String] The title of the contact.
|
90
|
+
attr_accessor :title
|
91
|
+
|
92
|
+
##
|
93
|
+
# @return [String] The role code for the contact.
|
94
|
+
attr_accessor :role_code
|
95
|
+
|
96
|
+
##
|
97
|
+
# @return [Email] The email address of the contact.
|
98
|
+
attr_accessor :email_address
|
99
|
+
|
100
|
+
##
|
101
|
+
# @return [String] The phone number of the contact.
|
102
|
+
attr_accessor :phone
|
103
|
+
|
104
|
+
##
|
105
|
+
# @return [String] The fax number of the contact.
|
106
|
+
attr_accessor :fax
|
107
|
+
|
108
|
+
##
|
109
|
+
# @return [String] The first line of the address.
|
110
|
+
attr_accessor :address1
|
111
|
+
|
112
|
+
##
|
113
|
+
# @return [String] The second line of the address.
|
114
|
+
attr_accessor :address2
|
115
|
+
|
116
|
+
##
|
117
|
+
# @return [String] The third line of the address.
|
118
|
+
attr_accessor :address3
|
119
|
+
|
120
|
+
##
|
121
|
+
# @return [String] The city of the address.
|
122
|
+
attr_accessor :city
|
123
|
+
|
124
|
+
##
|
125
|
+
# @return [String] The state/region of the address.
|
126
|
+
attr_accessor :state_region
|
127
|
+
|
128
|
+
##
|
129
|
+
# @return [String] The postal/zip code of the address.
|
130
|
+
attr_accessor :postal_code
|
131
|
+
|
132
|
+
##
|
133
|
+
# @return [String] The two character country code of the address. This will be validated by the /api/v1/countries data set
|
134
|
+
attr_accessor :country_code
|
135
|
+
|
136
|
+
##
|
137
|
+
# @return [Boolean] Flag indicating if the contact is active.
|
138
|
+
attr_accessor :is_active
|
139
|
+
|
140
|
+
##
|
141
|
+
# @return [Uri] The webpage url of the contact.
|
142
|
+
attr_accessor :webpage_url
|
143
|
+
|
144
|
+
##
|
145
|
+
# @return [Uri] The picture/avatar url of the contact.
|
146
|
+
attr_accessor :picture_url
|
147
|
+
|
148
|
+
##
|
149
|
+
# @return [Date-time] The date on which this record was created.
|
150
|
+
attr_accessor :created
|
151
|
+
|
152
|
+
##
|
153
|
+
# @return [Uuid] The ID of the user who created this contact.
|
154
|
+
attr_accessor :created_user_id
|
155
|
+
|
156
|
+
##
|
157
|
+
# @return [Date-time] The date on which this record was last modified.
|
158
|
+
attr_accessor :modified
|
159
|
+
|
160
|
+
##
|
161
|
+
# @return [Uuid] The ID of the user who last modified this contact.
|
162
|
+
attr_accessor :modified_user_id
|
163
|
+
|
164
|
+
##
|
165
|
+
# @return [Uuid] AppEnrollmentId for this record; used for mapping purposes.
|
166
|
+
attr_accessor :app_enrollment_id
|
167
|
+
|
168
|
+
##
|
169
|
+
# @return [NoteModel] All notes attached to this company. To retrieve this collection, specify `Notes` in the "Include" parameter for your query.
|
170
|
+
attr_accessor :notes
|
171
|
+
|
172
|
+
##
|
173
|
+
# @return [AttachmentModel] All attachments attached to this company. To retrieve this collection, specify `Attachments` in the "Include" parameter for your query.
|
174
|
+
attr_accessor :attachments
|
175
|
+
|
176
|
+
##
|
177
|
+
# @return [CustomFieldDefinitionModel] All definitions attached to this contact. To retrieve this collection, specify `CustomFieldValues` in the "Include" parameter for your query.
|
178
|
+
attr_accessor :custom_field_definitions
|
179
|
+
|
180
|
+
##
|
181
|
+
# @return [CustomFieldValueModel] All values attached to this contact. To retrieve this collection, specify `Attachments` in the "Include" parameter for your query.
|
182
|
+
attr_accessor :custom_field_values
|
183
|
+
|
184
|
+
##
|
185
|
+
# @return [object] This object as a JSON key-value structure
|
186
|
+
def as_json(options={})
|
187
|
+
{
|
188
|
+
'contactId' => @contact_id,
|
189
|
+
'companyId' => @company_id,
|
190
|
+
'groupKey' => @group_key,
|
191
|
+
'erpKey' => @erp_key,
|
192
|
+
'contactName' => @contact_name,
|
193
|
+
'contactCode' => @contact_code,
|
194
|
+
'title' => @title,
|
195
|
+
'roleCode' => @role_code,
|
196
|
+
'emailAddress' => @email_address,
|
197
|
+
'phone' => @phone,
|
198
|
+
'fax' => @fax,
|
199
|
+
'address1' => @address1,
|
200
|
+
'address2' => @address2,
|
201
|
+
'address3' => @address3,
|
202
|
+
'city' => @city,
|
203
|
+
'stateRegion' => @state_region,
|
204
|
+
'postalCode' => @postal_code,
|
205
|
+
'countryCode' => @country_code,
|
206
|
+
'isActive' => @is_active,
|
207
|
+
'webpageUrl' => @webpage_url,
|
208
|
+
'pictureUrl' => @picture_url,
|
209
|
+
'created' => @created,
|
210
|
+
'createdUserId' => @created_user_id,
|
211
|
+
'modified' => @modified,
|
212
|
+
'modifiedUserId' => @modified_user_id,
|
213
|
+
'appEnrollmentId' => @app_enrollment_id,
|
214
|
+
'notes' => @notes,
|
215
|
+
'attachments' => @attachments,
|
216
|
+
'customFieldDefinitions' => @custom_field_definitions,
|
217
|
+
'customFieldValues' => @custom_field_values,
|
218
|
+
}
|
219
|
+
end
|
220
|
+
|
221
|
+
##
|
222
|
+
# @return [String] This object converted to a JSON string
|
223
|
+
def to_json(*options)
|
224
|
+
"[#{as_json(*options).to_json(*options)}]"
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
@@ -0,0 +1,116 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Software Development Kit for Ruby
|
3
|
+
#
|
4
|
+
# (c) 2021-2022 Lockstep, Inc.
|
5
|
+
#
|
6
|
+
# For the full copyright and license information, please view the LICENSE
|
7
|
+
# file that was distributed with this source code.
|
8
|
+
#
|
9
|
+
# @author Ted Spence <tspence@lockstep.io>
|
10
|
+
# @author Manish Narayan B S <manish.n@lockstep.io>
|
11
|
+
# @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
12
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
13
|
+
# @version 2022.4
|
14
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
15
|
+
#
|
16
|
+
|
17
|
+
|
18
|
+
require 'json'
|
19
|
+
|
20
|
+
module LockstepSdk
|
21
|
+
|
22
|
+
##
|
23
|
+
# Country model for ISO-3166
|
24
|
+
class CountryModel
|
25
|
+
|
26
|
+
##
|
27
|
+
# Initialize the CountryModel using the provided prototype
|
28
|
+
def initialize(params = {})
|
29
|
+
@name = params.dig(:name)
|
30
|
+
@alpha2 = params.dig(:alpha2)
|
31
|
+
@alpha3 = params.dig(:alpha3)
|
32
|
+
@country_code = params.dig(:country_code)
|
33
|
+
@region = params.dig(:region)
|
34
|
+
@sub_region = params.dig(:sub_region)
|
35
|
+
@intermediate_region = params.dig(:intermediate_region)
|
36
|
+
@region_code = params.dig(:region_code)
|
37
|
+
@sub_region_code = params.dig(:sub_region_code)
|
38
|
+
@intermediate_region_code = params.dig(:intermediate_region_code)
|
39
|
+
@french_name = params.dig(:french_name)
|
40
|
+
@aliases = params.dig(:aliases)
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# @return [String] Name of the country
|
45
|
+
attr_accessor :name
|
46
|
+
|
47
|
+
##
|
48
|
+
# @return [String] 2 letter alphabetic code for the given country
|
49
|
+
attr_accessor :alpha2
|
50
|
+
|
51
|
+
##
|
52
|
+
# @return [String] 3 letter alphabetic code for the given country
|
53
|
+
attr_accessor :alpha3
|
54
|
+
|
55
|
+
##
|
56
|
+
# @return [Int32] Unique 3 digit number for the given country
|
57
|
+
attr_accessor :country_code
|
58
|
+
|
59
|
+
##
|
60
|
+
# @return [String] Region of the country
|
61
|
+
attr_accessor :region
|
62
|
+
|
63
|
+
##
|
64
|
+
# @return [String] Subregion of the country
|
65
|
+
attr_accessor :sub_region
|
66
|
+
|
67
|
+
##
|
68
|
+
# @return [String] Intermediate region of the country
|
69
|
+
attr_accessor :intermediate_region
|
70
|
+
|
71
|
+
##
|
72
|
+
# @return [Int32] Numeric code for a region
|
73
|
+
attr_accessor :region_code
|
74
|
+
|
75
|
+
##
|
76
|
+
# @return [Int32] Numeric code for a subregion
|
77
|
+
attr_accessor :sub_region_code
|
78
|
+
|
79
|
+
##
|
80
|
+
# @return [Int32] Numeric code for an intermediate region
|
81
|
+
attr_accessor :intermediate_region_code
|
82
|
+
|
83
|
+
##
|
84
|
+
# @return [String] French name of the country
|
85
|
+
attr_accessor :french_name
|
86
|
+
|
87
|
+
##
|
88
|
+
# @return [String] A different name for a country
|
89
|
+
attr_accessor :aliases
|
90
|
+
|
91
|
+
##
|
92
|
+
# @return [object] This object as a JSON key-value structure
|
93
|
+
def as_json(options={})
|
94
|
+
{
|
95
|
+
'name' => @name,
|
96
|
+
'alpha2' => @alpha2,
|
97
|
+
'alpha3' => @alpha3,
|
98
|
+
'countryCode' => @country_code,
|
99
|
+
'region' => @region,
|
100
|
+
'subRegion' => @sub_region,
|
101
|
+
'intermediateRegion' => @intermediate_region,
|
102
|
+
'regionCode' => @region_code,
|
103
|
+
'subRegionCode' => @sub_region_code,
|
104
|
+
'intermediateRegionCode' => @intermediate_region_code,
|
105
|
+
'frenchName' => @french_name,
|
106
|
+
'aliases' => @aliases,
|
107
|
+
}
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# @return [String] This object converted to a JSON string
|
112
|
+
def to_json(*options)
|
113
|
+
"[#{as_json(*options).to_json(*options)}]"
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
@@ -0,0 +1,150 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Software Development Kit for Ruby
|
3
|
+
#
|
4
|
+
# (c) 2021-2022 Lockstep, Inc.
|
5
|
+
#
|
6
|
+
# For the full copyright and license information, please view the LICENSE
|
7
|
+
# file that was distributed with this source code.
|
8
|
+
#
|
9
|
+
# @author Ted Spence <tspence@lockstep.io>
|
10
|
+
# @author Manish Narayan B S <manish.n@lockstep.io>
|
11
|
+
# @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
12
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
13
|
+
# @version 2022.4
|
14
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
15
|
+
#
|
16
|
+
|
17
|
+
|
18
|
+
require 'json'
|
19
|
+
|
20
|
+
module LockstepSdk
|
21
|
+
|
22
|
+
##
|
23
|
+
# Credit Memos reflect credits granted to a customer for various reasons, such as discounts or refunds.
|
24
|
+
# Credit Memos may be applied to Invoices as Payments. When a Credit Memo is applied as payment to an Invoice,
|
25
|
+
# Lockstep creates a Credit Memo Application record to track the amount from the Credit Memo that was applied
|
26
|
+
# as payment to the Invoice. You can examine Credit Memo Application records to track which Invoices were paid
|
27
|
+
# using this Credit.
|
28
|
+
class CreditMemoAppliedModel
|
29
|
+
|
30
|
+
##
|
31
|
+
# Initialize the CreditMemoAppliedModel using the provided prototype
|
32
|
+
def initialize(params = {})
|
33
|
+
@credit_memo_applied_id = params.dig(:credit_memo_applied_id)
|
34
|
+
@group_key = params.dig(:group_key)
|
35
|
+
@invoice_id = params.dig(:invoice_id)
|
36
|
+
@credit_memo_invoice_id = params.dig(:credit_memo_invoice_id)
|
37
|
+
@erp_key = params.dig(:erp_key)
|
38
|
+
@entry_number = params.dig(:entry_number)
|
39
|
+
@apply_to_invoice_date = params.dig(:apply_to_invoice_date)
|
40
|
+
@credit_memo_applied_amount = params.dig(:credit_memo_applied_amount)
|
41
|
+
@created = params.dig(:created)
|
42
|
+
@created_user_id = params.dig(:created_user_id)
|
43
|
+
@modified = params.dig(:modified)
|
44
|
+
@modified_user_id = params.dig(:modified_user_id)
|
45
|
+
@app_enrollment_id = params.dig(:app_enrollment_id)
|
46
|
+
@attachments = params.dig(:attachments)
|
47
|
+
@notes = params.dig(:notes)
|
48
|
+
@custom_field_definitions = params.dig(:custom_field_definitions)
|
49
|
+
@custom_field_values = params.dig(:custom_field_values)
|
50
|
+
end
|
51
|
+
|
52
|
+
##
|
53
|
+
# @return [Uuid] The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform. For the ID of this record in its originating financial system, see `ErpKey`.
|
54
|
+
attr_accessor :credit_memo_applied_id
|
55
|
+
|
56
|
+
##
|
57
|
+
# @return [Uuid] The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
58
|
+
attr_accessor :group_key
|
59
|
+
|
60
|
+
##
|
61
|
+
# @return [Uuid] The id of the invoice
|
62
|
+
attr_accessor :invoice_id
|
63
|
+
|
64
|
+
##
|
65
|
+
# @return [Uuid] The id of the credit memo invoice
|
66
|
+
attr_accessor :credit_memo_invoice_id
|
67
|
+
|
68
|
+
##
|
69
|
+
# @return [String] The unique ID of this record as it was known in its originating financial system. If this company record was imported from a financial system, it will have the value `ErpKey` set to the original primary key number of the record as it was known in the originating financial system. If this record was not imported, this value will be `null`. For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
70
|
+
attr_accessor :erp_key
|
71
|
+
|
72
|
+
##
|
73
|
+
# @return [Int32] Reference number for the applied credit memo.
|
74
|
+
attr_accessor :entry_number
|
75
|
+
|
76
|
+
##
|
77
|
+
# @return [Date-time] Date payment applied to credit memo.
|
78
|
+
attr_accessor :apply_to_invoice_date
|
79
|
+
|
80
|
+
##
|
81
|
+
# @return [Double] Amount applied to credit memo.
|
82
|
+
attr_accessor :credit_memo_applied_amount
|
83
|
+
|
84
|
+
##
|
85
|
+
# @return [Date-time] Date credit memo applied record was created.
|
86
|
+
attr_accessor :created
|
87
|
+
|
88
|
+
##
|
89
|
+
# @return [Uuid] The id of the user who created this applied credit memo.
|
90
|
+
attr_accessor :created_user_id
|
91
|
+
|
92
|
+
##
|
93
|
+
# @return [Date-time] Date credit memo applied record was modified.
|
94
|
+
attr_accessor :modified
|
95
|
+
|
96
|
+
##
|
97
|
+
# @return [Uuid] The id of the user who modified this applied credit memo.
|
98
|
+
attr_accessor :modified_user_id
|
99
|
+
|
100
|
+
##
|
101
|
+
# @return [Uuid] AppEnrollmentId for this record; used for mapping purposes.
|
102
|
+
attr_accessor :app_enrollment_id
|
103
|
+
|
104
|
+
##
|
105
|
+
# @return [AttachmentModel] All attachments attached to applied Credit Memo. To retrieve this collection, specify `Attachments` in the "Include" parameter for your query.
|
106
|
+
attr_accessor :attachments
|
107
|
+
|
108
|
+
##
|
109
|
+
# @return [NoteModel] All notes attached to this applied Credit Memo. To retrieve this collection, specify `Notes` in the "Include" parameter for your query.
|
110
|
+
attr_accessor :notes
|
111
|
+
|
112
|
+
##
|
113
|
+
# @return [CustomFieldDefinitionModel] All definitions attached to this applied Credit Memo. To retrieve this collection, specify `CustomFieldValues` in the "Include" parameter for your query.
|
114
|
+
attr_accessor :custom_field_definitions
|
115
|
+
|
116
|
+
##
|
117
|
+
# @return [CustomFieldValueModel] All values attached to this Credit Memo. To retrieve this collection, specify `CustomFieldValues` in the "Include" parameter for your query.
|
118
|
+
attr_accessor :custom_field_values
|
119
|
+
|
120
|
+
##
|
121
|
+
# @return [object] This object as a JSON key-value structure
|
122
|
+
def as_json(options={})
|
123
|
+
{
|
124
|
+
'creditMemoAppliedId' => @credit_memo_applied_id,
|
125
|
+
'groupKey' => @group_key,
|
126
|
+
'invoiceId' => @invoice_id,
|
127
|
+
'creditMemoInvoiceId' => @credit_memo_invoice_id,
|
128
|
+
'erpKey' => @erp_key,
|
129
|
+
'entryNumber' => @entry_number,
|
130
|
+
'applyToInvoiceDate' => @apply_to_invoice_date,
|
131
|
+
'creditMemoAppliedAmount' => @credit_memo_applied_amount,
|
132
|
+
'created' => @created,
|
133
|
+
'createdUserId' => @created_user_id,
|
134
|
+
'modified' => @modified,
|
135
|
+
'modifiedUserId' => @modified_user_id,
|
136
|
+
'appEnrollmentId' => @app_enrollment_id,
|
137
|
+
'attachments' => @attachments,
|
138
|
+
'notes' => @notes,
|
139
|
+
'customFieldDefinitions' => @custom_field_definitions,
|
140
|
+
'customFieldValues' => @custom_field_values,
|
141
|
+
}
|
142
|
+
end
|
143
|
+
|
144
|
+
##
|
145
|
+
# @return [String] This object converted to a JSON string
|
146
|
+
def to_json(*options)
|
147
|
+
"[#{as_json(*options).to_json(*options)}]"
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
@@ -0,0 +1,116 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Software Development Kit for Ruby
|
3
|
+
#
|
4
|
+
# (c) 2021-2022 Lockstep, Inc.
|
5
|
+
#
|
6
|
+
# For the full copyright and license information, please view the LICENSE
|
7
|
+
# file that was distributed with this source code.
|
8
|
+
#
|
9
|
+
# @author Ted Spence <tspence@lockstep.io>
|
10
|
+
# @author Manish Narayan B S <manish.n@lockstep.io>
|
11
|
+
# @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
12
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
13
|
+
# @version 2022.4
|
14
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
15
|
+
#
|
16
|
+
|
17
|
+
|
18
|
+
require 'json'
|
19
|
+
|
20
|
+
module LockstepSdk
|
21
|
+
|
22
|
+
##
|
23
|
+
# Contains information about a credit memo invoice
|
24
|
+
class CreditMemoInvoiceModel
|
25
|
+
|
26
|
+
##
|
27
|
+
# Initialize the CreditMemoInvoiceModel using the provided prototype
|
28
|
+
def initialize(params = {})
|
29
|
+
@group_key = params.dig(:group_key)
|
30
|
+
@credit_memo_applied_id = params.dig(:credit_memo_applied_id)
|
31
|
+
@invoice_id = params.dig(:invoice_id)
|
32
|
+
@credit_memo_invoice_id = params.dig(:credit_memo_invoice_id)
|
33
|
+
@apply_to_invoice_date = params.dig(:apply_to_invoice_date)
|
34
|
+
@credit_memo_applied_amount = params.dig(:credit_memo_applied_amount)
|
35
|
+
@reference_code = params.dig(:reference_code)
|
36
|
+
@company_id = params.dig(:company_id)
|
37
|
+
@customer_id = params.dig(:customer_id)
|
38
|
+
@invoice_status_code = params.dig(:invoice_status_code)
|
39
|
+
@total_amount = params.dig(:total_amount)
|
40
|
+
@outstanding_balance_amount = params.dig(:outstanding_balance_amount)
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# @return [Uuid] The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
45
|
+
attr_accessor :group_key
|
46
|
+
|
47
|
+
##
|
48
|
+
# @return [Uuid] The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
|
49
|
+
attr_accessor :credit_memo_applied_id
|
50
|
+
|
51
|
+
##
|
52
|
+
# @return [Uuid] The id of the invoice
|
53
|
+
attr_accessor :invoice_id
|
54
|
+
|
55
|
+
##
|
56
|
+
# @return [Uuid] The id of the credit memo invoice
|
57
|
+
attr_accessor :credit_memo_invoice_id
|
58
|
+
|
59
|
+
##
|
60
|
+
# @return [Date] Date invoice applied to credit memo.
|
61
|
+
attr_accessor :apply_to_invoice_date
|
62
|
+
|
63
|
+
##
|
64
|
+
# @return [Double] Amount applied to credit memo.
|
65
|
+
attr_accessor :credit_memo_applied_amount
|
66
|
+
|
67
|
+
##
|
68
|
+
# @return [String] An additional reference code that is sometimes used to identify this invoice. The meaning of this field is specific to the ERP or accounting system used by the user.
|
69
|
+
attr_accessor :reference_code
|
70
|
+
|
71
|
+
##
|
72
|
+
# @return [Uuid] The ID number of the company that created this invoice.
|
73
|
+
attr_accessor :company_id
|
74
|
+
|
75
|
+
##
|
76
|
+
# @return [Uuid] The ID number of the counterparty for the invoice, for example, a customer or vendor.
|
77
|
+
attr_accessor :customer_id
|
78
|
+
|
79
|
+
##
|
80
|
+
# @return [String] A code identifying the status of this invoice.
|
81
|
+
attr_accessor :invoice_status_code
|
82
|
+
|
83
|
+
##
|
84
|
+
# @return [Double] The total value of this invoice, inclusive of all taxes and line items.
|
85
|
+
attr_accessor :total_amount
|
86
|
+
|
87
|
+
##
|
88
|
+
# @return [Double] The remaining balance value of this invoice.
|
89
|
+
attr_accessor :outstanding_balance_amount
|
90
|
+
|
91
|
+
##
|
92
|
+
# @return [object] This object as a JSON key-value structure
|
93
|
+
def as_json(options={})
|
94
|
+
{
|
95
|
+
'groupKey' => @group_key,
|
96
|
+
'creditMemoAppliedId' => @credit_memo_applied_id,
|
97
|
+
'invoiceId' => @invoice_id,
|
98
|
+
'creditMemoInvoiceId' => @credit_memo_invoice_id,
|
99
|
+
'applyToInvoiceDate' => @apply_to_invoice_date,
|
100
|
+
'creditMemoAppliedAmount' => @credit_memo_applied_amount,
|
101
|
+
'referenceCode' => @reference_code,
|
102
|
+
'companyId' => @company_id,
|
103
|
+
'customerId' => @customer_id,
|
104
|
+
'invoiceStatusCode' => @invoice_status_code,
|
105
|
+
'totalAmount' => @total_amount,
|
106
|
+
'outstandingBalanceAmount' => @outstanding_balance_amount,
|
107
|
+
}
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# @return [String] This object converted to a JSON string
|
112
|
+
def to_json(*options)
|
113
|
+
"[#{as_json(*options).to_json(*options)}]"
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Software Development Kit for Ruby
|
3
|
+
#
|
4
|
+
# (c) 2021-2022 Lockstep, Inc.
|
5
|
+
#
|
6
|
+
# For the full copyright and license information, please view the LICENSE
|
7
|
+
# file that was distributed with this source code.
|
8
|
+
#
|
9
|
+
# @author Ted Spence <tspence@lockstep.io>
|
10
|
+
# @author Manish Narayan B S <manish.n@lockstep.io>
|
11
|
+
# @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
12
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
13
|
+
# @version 2022.4
|
14
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
15
|
+
#
|
16
|
+
|
17
|
+
|
18
|
+
require 'json'
|
19
|
+
|
20
|
+
module LockstepSdk
|
21
|
+
|
22
|
+
##
|
23
|
+
# Represents an ISO-4217 currency code definition
|
24
|
+
class CurrencyModel
|
25
|
+
|
26
|
+
##
|
27
|
+
# Initialize the CurrencyModel using the provided prototype
|
28
|
+
def initialize(params = {})
|
29
|
+
@alpha_code = params.dig(:alpha_code)
|
30
|
+
@numeric_code = params.dig(:numeric_code)
|
31
|
+
@currency_name = params.dig(:currency_name)
|
32
|
+
@minor_unit = params.dig(:minor_unit)
|
33
|
+
@symbol = params.dig(:symbol)
|
34
|
+
end
|
35
|
+
|
36
|
+
##
|
37
|
+
# @return [String] Alphabetic code for the given currency
|
38
|
+
attr_accessor :alpha_code
|
39
|
+
|
40
|
+
##
|
41
|
+
# @return [String] Numeric code for the given currency
|
42
|
+
attr_accessor :numeric_code
|
43
|
+
|
44
|
+
##
|
45
|
+
# @return [String] Name of currency
|
46
|
+
attr_accessor :currency_name
|
47
|
+
|
48
|
+
##
|
49
|
+
# @return [Int32] Number of places after the decimal for this currency
|
50
|
+
attr_accessor :minor_unit
|
51
|
+
|
52
|
+
##
|
53
|
+
# @return [String] Symbol for the given currency
|
54
|
+
attr_accessor :symbol
|
55
|
+
|
56
|
+
##
|
57
|
+
# @return [object] This object as a JSON key-value structure
|
58
|
+
def as_json(options={})
|
59
|
+
{
|
60
|
+
'alphaCode' => @alpha_code,
|
61
|
+
'numericCode' => @numeric_code,
|
62
|
+
'currencyName' => @currency_name,
|
63
|
+
'minorUnit' => @minor_unit,
|
64
|
+
'symbol' => @symbol,
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
##
|
69
|
+
# @return [String] This object converted to a JSON string
|
70
|
+
def to_json(*options)
|
71
|
+
"[#{as_json(*options).to_json(*options)}]"
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|