lockstep_sdk 2023.3.18.0 → 2023.7.7.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.
@@ -0,0 +1,183 @@
1
+ #
2
+ # Lockstep Platform SDK for Ruby
3
+ #
4
+ # (c) 2021-2023 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 Lockstep Network <support@lockstep.io>
10
+ # @copyright 2021-2023 Lockstep, Inc.
11
+ # @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
12
+ #
13
+
14
+
15
+ require 'json'
16
+
17
+ module LockstepSdk
18
+
19
+ ##
20
+ # An Accounting Profile is a child of a Company Profile, and collectively,
21
+ # they comprise the identity and necessary information for an accounting team
22
+ # to work with trading partners, financial institutions, auditors, and others.
23
+ # You can use Accounting Profiles to define an accounting function by what
24
+ # the function does and how to interface with the function.
25
+ class AccountingProfileRequest
26
+
27
+ ##
28
+ # Initialize the AccountingProfileRequest using the provided prototype
29
+ def initialize(params = {})
30
+ @accounting_profile_id = params.dig(:accounting_profile_id)
31
+ @company_id = params.dig(:company_id)
32
+ @group_key = params.dig(:group_key)
33
+ @name = params.dig(:name)
34
+ @type = params.dig(:type)
35
+ @email_address = params.dig(:email_address)
36
+ @phone = params.dig(:phone)
37
+ @address1 = params.dig(:address1)
38
+ @address2 = params.dig(:address2)
39
+ @address3 = params.dig(:address3)
40
+ @city = params.dig(:city)
41
+ @region = params.dig(:region)
42
+ @postal_code = params.dig(:postal_code)
43
+ @country = params.dig(:country)
44
+ @created = params.dig(:created)
45
+ @created_user_id = params.dig(:created_user_id)
46
+ @modified = params.dig(:modified)
47
+ @modified_user_id = params.dig(:modified_user_id)
48
+ @notes = params.dig(:notes)
49
+ @attachments = params.dig(:attachments)
50
+ @custom_field_definitions = params.dig(:custom_field_definitions)
51
+ @custom_field_values = params.dig(:custom_field_values)
52
+ @primary_contact_id = params.dig(:primary_contact_id)
53
+ end
54
+
55
+ ##
56
+ # @return [Uuid] The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
57
+ attr_accessor :accounting_profile_id
58
+
59
+ ##
60
+ # @return [Uuid] The ID of the company profile to which this accounting profile belongs.
61
+ attr_accessor :company_id
62
+
63
+ ##
64
+ # @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).
65
+ attr_accessor :group_key
66
+
67
+ ##
68
+ # @return [String] The name of the accounting profile.
69
+ attr_accessor :name
70
+
71
+ ##
72
+ # @return [String] The type of the accounting profile. Some examples include 'AR', 'AP', 'AR+AP', 'General Accounting', 'Treasury', 'Payroll', 'Finance'
73
+ attr_accessor :type
74
+
75
+ ##
76
+ # @return [Email] The email address associated with the accounting profile.
77
+ attr_accessor :email_address
78
+
79
+ ##
80
+ # @return [String] The phone number associated with the accounting profile.
81
+ attr_accessor :phone
82
+
83
+ ##
84
+ # @return [String] The first line of the address.
85
+ attr_accessor :address1
86
+
87
+ ##
88
+ # @return [String] The second line of the address.
89
+ attr_accessor :address2
90
+
91
+ ##
92
+ # @return [String] The third line of the address.
93
+ attr_accessor :address3
94
+
95
+ ##
96
+ # @return [String] The city of the address.
97
+ attr_accessor :city
98
+
99
+ ##
100
+ # @return [String] The state/region of the address.
101
+ attr_accessor :region
102
+
103
+ ##
104
+ # @return [String] The postal/zip code of the address.
105
+ attr_accessor :postal_code
106
+
107
+ ##
108
+ # @return [String] The two character country code of the address.
109
+ attr_accessor :country
110
+
111
+ ##
112
+ # @return [Date-time] The date on which this record was created.
113
+ attr_accessor :created
114
+
115
+ ##
116
+ # @return [Uuid] The ID of the user who created this accounting profile.
117
+ attr_accessor :created_user_id
118
+
119
+ ##
120
+ # @return [Date-time] The date on which this record was last modified.
121
+ attr_accessor :modified
122
+
123
+ ##
124
+ # @return [Uuid] The ID of the user who last modified this accounting profile.
125
+ attr_accessor :modified_user_id
126
+
127
+ ##
128
+ # @return [NoteModel] A collection of notes linked to this record. To retrieve this collection, specify `Notes` in the `include` parameter when retrieving data. To create a note, use the [Create Note](https://developer.lockstep.io/reference/post_api-v1-notes) endpoint with the `TableKey` to `AccountingProfile` and the `ObjectKey` set to the `AccountingProfileId` for this record. For more information on extensibility, see [linking extensible metadata to objects](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
129
+ attr_accessor :notes
130
+
131
+ ##
132
+ # @return [AttachmentModel] A collection of attachments linked to this record. To retrieve this collection, specify `Attachments` in the `include` parameter when retrieving data. To create an attachment, use the [Upload Attachment](https://developer.lockstep.io/reference/post_api-v1-attachments) endpoint with the `TableKey` to `AccountingProfile` and the `ObjectKey` set to the `AccountingProfileId` for this record. For more information on extensibility, see [linking extensible metadata to objects](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
133
+ attr_accessor :attachments
134
+
135
+ ##
136
+ # @return [CustomFieldDefinitionModel] A collection of custom fields linked to this record. To retrieve this collection, specify `CustomFieldDefinitions` in the `include` parameter when retrieving data. To create a custom field, use the [Create Custom Field](https://developer.lockstep.io/reference/post_api-v1-customfieldvalues) endpoint with the `TableKey` to `AccountingProfile` and the `ObjectKey` set to the `AccountingProfileId` for this record. For more information on extensibility, see [linking extensible metadata to objects](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
137
+ attr_accessor :custom_field_definitions
138
+
139
+ ##
140
+ # @return [CustomFieldValueModel] A collection of custom fields linked to this record. To retrieve this collection, specify `CustomFieldValues` in the `include` parameter when retrieving data. To create a custom field, use the [Create Custom Field](https://developer.lockstep.io/reference/post_api-v1-customfieldvalues) endpoint with the `TableKey` to `AccountingProfile` and the `ObjectKey` set to the `AccountingProfileId` for this record. For more information on extensibility, see [linking extensible metadata to objects](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
141
+ attr_accessor :custom_field_values
142
+
143
+ ##
144
+ # @return [Uuid] The ID of the primary contact that is linked to this profile.
145
+ attr_accessor :primary_contact_id
146
+
147
+ ##
148
+ # @return [object] This object as a JSON key-value structure
149
+ def as_json(options={})
150
+ {
151
+ 'accountingProfileId' => @accounting_profile_id,
152
+ 'companyId' => @company_id,
153
+ 'groupKey' => @group_key,
154
+ 'name' => @name,
155
+ 'type' => @type,
156
+ 'emailAddress' => @email_address,
157
+ 'phone' => @phone,
158
+ 'address1' => @address1,
159
+ 'address2' => @address2,
160
+ 'address3' => @address3,
161
+ 'city' => @city,
162
+ 'region' => @region,
163
+ 'postalCode' => @postal_code,
164
+ 'country' => @country,
165
+ 'created' => @created,
166
+ 'createdUserId' => @created_user_id,
167
+ 'modified' => @modified,
168
+ 'modifiedUserId' => @modified_user_id,
169
+ 'notes' => @notes,
170
+ 'attachments' => @attachments,
171
+ 'customFieldDefinitions' => @custom_field_definitions,
172
+ 'customFieldValues' => @custom_field_values,
173
+ 'primaryContactId' => @primary_contact_id,
174
+ }
175
+ end
176
+
177
+ ##
178
+ # @return [String] This object converted to a JSON string
179
+ def to_json(*options)
180
+ "[#{as_json(*options).to_json(*options)}]"
181
+ end
182
+ end
183
+ end
@@ -29,6 +29,7 @@ module LockstepSdk
29
29
  @realm_id = params.dig(:realm_id)
30
30
  @token_id = params.dig(:token_id)
31
31
  @token_secret = params.dig(:token_secret)
32
+ @redirect_uri = params.dig(:redirect_uri)
32
33
  end
33
34
 
34
35
  ##
@@ -36,7 +37,7 @@ module LockstepSdk
36
37
  attr_accessor :auth_code
37
38
 
38
39
  ##
39
- # @return [String] The OAuth authentication code.
40
+ # @return [String] The username for the web services account with access permissions.
40
41
  attr_accessor :username
41
42
 
42
43
  ##
@@ -55,6 +56,10 @@ module LockstepSdk
55
56
  # @return [String] The access token secret for the connector enrollment.
56
57
  attr_accessor :token_secret
57
58
 
59
+ ##
60
+ # @return [String] The OAuth redirect uri.
61
+ attr_accessor :redirect_uri
62
+
58
63
  ##
59
64
  # @return [object] This object as a JSON key-value structure
60
65
  def as_json(options={})
@@ -65,6 +70,7 @@ module LockstepSdk
65
70
  'realmId' => @realm_id,
66
71
  'tokenId' => @token_id,
67
72
  'tokenSecret' => @token_secret,
73
+ 'redirectUri' => @redirect_uri,
68
74
  }
69
75
  end
70
76
 
@@ -0,0 +1,77 @@
1
+ #
2
+ # Lockstep Platform SDK for Ruby
3
+ #
4
+ # (c) 2021-2023 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 Lockstep Network <support@lockstep.io>
10
+ # @copyright 2021-2023 Lockstep, Inc.
11
+ # @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
12
+ #
13
+
14
+
15
+ require 'json'
16
+
17
+ module LockstepSdk
18
+
19
+ ##
20
+ # An Attachment Link represents a single link between any nestable object and an attachment
21
+ class AttachmentLinkModel
22
+
23
+ ##
24
+ # Initialize the AttachmentLinkModel using the provided prototype
25
+ def initialize(params = {})
26
+ @group_key = params.dig(:group_key)
27
+ @attachment_id = params.dig(:attachment_id)
28
+ @object_key = params.dig(:object_key)
29
+ @table_key = params.dig(:table_key)
30
+ @created = params.dig(:created)
31
+ @created_user_id = params.dig(:created_user_id)
32
+ end
33
+
34
+ ##
35
+ # @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).
36
+ attr_accessor :group_key
37
+
38
+ ##
39
+ # @return [Uuid] The unique ID of an attachment record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
40
+ attr_accessor :attachment_id
41
+
42
+ ##
43
+ # @return [Uuid] An Attachment is connected to an existing item within the Lockstep Platform by the fields `TableKey` and `ObjectKey`. For example, an Attachment connected to Invoice 12345 would have a `TableKey` value of `Invoice` and an `ObjectKey` value of `12345`. The `ObjectKey` value contains the primary key of the record within the Lockstep Platform to which this Attachment is connected. For more information, see [linking metadata to an object](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
44
+ attr_accessor :object_key
45
+
46
+ ##
47
+ # @return [String] An Attachment is connected to an existing item within the Lockstep Platform by the fields `TableKey` and `ObjectKey`. For example, an Attachment connected to Invoice 12345 would have a `TableKey` value of `Invoice` and an `ObjectKey` value of `12345`. The `TableKey` value contains the name of the table within the Lockstep Platform to which this Attachment is connected. For more information, see [linking metadata to an object](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
48
+ attr_accessor :table_key
49
+
50
+ ##
51
+ # @return [Date-time] The date the Attachment Link was created.
52
+ attr_accessor :created
53
+
54
+ ##
55
+ # @return [Uuid] The unique ID of the [UserAccount](https://developer.lockstep.io/docs/useraccountmodel) of the user who created this Attachment Link.
56
+ attr_accessor :created_user_id
57
+
58
+ ##
59
+ # @return [object] This object as a JSON key-value structure
60
+ def as_json(options={})
61
+ {
62
+ 'groupKey' => @group_key,
63
+ 'attachmentId' => @attachment_id,
64
+ 'objectKey' => @object_key,
65
+ 'tableKey' => @table_key,
66
+ 'created' => @created,
67
+ 'createdUserId' => @created_user_id,
68
+ }
69
+ end
70
+
71
+ ##
72
+ # @return [String] This object converted to a JSON string
73
+ def to_json(*options)
74
+ "[#{as_json(*options).to_json(*options)}]"
75
+ end
76
+ end
77
+ end
@@ -31,6 +31,8 @@ module LockstepSdk
31
31
  ##
32
32
  # Initialize the BatchSyncModel using the provided prototype
33
33
  def initialize(params = {})
34
+ @app_enrollment_id = params.dig(:app_enrollment_id)
35
+ @is_full_sync = params.dig(:is_full_sync)
34
36
  @companies = params.dig(:companies)
35
37
  @contacts = params.dig(:contacts)
36
38
  @credit_memo_applications = params.dig(:credit_memo_applications)
@@ -45,6 +47,14 @@ module LockstepSdk
45
47
  @base_currencies = params.dig(:base_currencies)
46
48
  end
47
49
 
50
+ ##
51
+ # @return [Uuid] The optional existing app enrollment to associate with the data in this batch.
52
+ attr_accessor :app_enrollment_id
53
+
54
+ ##
55
+ # @return [Boolean] True if this is a full sync, false if this is a partial sync. Defaults to false.
56
+ attr_accessor :is_full_sync
57
+
48
58
  ##
49
59
  # @return [CompanySyncModel] A list of Company records to merge with your Lockstep Platform data
50
60
  attr_accessor :companies
@@ -97,6 +107,8 @@ module LockstepSdk
97
107
  # @return [object] This object as a JSON key-value structure
98
108
  def as_json(options={})
99
109
  {
110
+ 'appEnrollmentId' => @app_enrollment_id,
111
+ 'isFullSync' => @is_full_sync,
100
112
  'companies' => @companies,
101
113
  'contacts' => @contacts,
102
114
  'creditMemoApplications' => @credit_memo_applications,
@@ -68,7 +68,11 @@ module LockstepSdk
68
68
  @state_tax_id = params.dig(:state_tax_id)
69
69
  @state_of_incorporation = params.dig(:state_of_incorporation)
70
70
  @linked_in_url_slug = params.dig(:linked_in_url_slug)
71
+ @is_verified = params.dig(:is_verified)
72
+ @last_verified_date = params.dig(:last_verified_date)
71
73
  @view_box_settings = params.dig(:view_box_settings)
74
+ @service_fabric_org_id = params.dig(:service_fabric_org_id)
75
+ @service_fabric_company_id = params.dig(:service_fabric_company_id)
72
76
  @notes = params.dig(:notes)
73
77
  @attachments = params.dig(:attachments)
74
78
  @contacts = params.dig(:contacts)
@@ -242,10 +246,26 @@ module LockstepSdk
242
246
  # @return [String] Linkedin Url
243
247
  attr_accessor :linked_in_url_slug
244
248
 
249
+ ##
250
+ # @return [Boolean] This flag indicates whether the company is verified.
251
+ attr_accessor :is_verified
252
+
253
+ ##
254
+ # @return [Date-time] The date this company was last verified.
255
+ attr_accessor :last_verified_date
256
+
245
257
  ##
246
258
  # @return [ViewBoxSettingsModel] View box settings for the company logo.
247
259
  attr_accessor :view_box_settings
248
260
 
261
+ ##
262
+ # @return [Uuid] The unique ID of the Service Fabric organisation to which this record belongs.
263
+ attr_accessor :service_fabric_org_id
264
+
265
+ ##
266
+ # @return [Uuid] The unique ID of this record within Service Fabric.
267
+ attr_accessor :service_fabric_company_id
268
+
249
269
  ##
250
270
  # @return [NoteModel] A collection of notes linked to this record. To retrieve this collection, specify `Notes` in the `include` parameter when retrieving data. To create a note, use the [Create Note](https://developer.lockstep.io/reference/post_api-v1-notes) endpoint with the `TableKey` to `Company` and the `ObjectKey` set to the `CompanyId` for this record. For more information on extensibility, see [linking extensible metadata to objects](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
251
271
  attr_accessor :notes
@@ -319,7 +339,11 @@ module LockstepSdk
319
339
  'stateTaxId' => @state_tax_id,
320
340
  'stateOfIncorporation' => @state_of_incorporation,
321
341
  'linkedInUrlSlug' => @linked_in_url_slug,
342
+ 'isVerified' => @is_verified,
343
+ 'lastVerifiedDate' => @last_verified_date,
322
344
  'viewBoxSettings' => @view_box_settings,
345
+ 'serviceFabricOrgId' => @service_fabric_org_id,
346
+ 'serviceFabricCompanyId' => @service_fabric_company_id,
323
347
  'notes' => @notes,
324
348
  'attachments' => @attachments,
325
349
  'contacts' => @contacts,
@@ -65,6 +65,10 @@ module LockstepSdk
65
65
  @exclude_from_aging = params.dig(:exclude_from_aging)
66
66
  @preferred_delivery_method = params.dig(:preferred_delivery_method)
67
67
  @currency_rate = params.dig(:currency_rate)
68
+ @base_currency_total_amount = params.dig(:base_currency_total_amount)
69
+ @base_currency_sales_tax_amount = params.dig(:base_currency_sales_tax_amount)
70
+ @base_currency_discount_amount = params.dig(:base_currency_discount_amount)
71
+ @base_currency_outstanding_balance_amount = params.dig(:base_currency_outstanding_balance_amount)
68
72
  @addresses = params.dig(:addresses)
69
73
  @lines = params.dig(:lines)
70
74
  @payments = params.dig(:payments)
@@ -135,19 +139,19 @@ module LockstepSdk
135
139
  attr_accessor :currency_code
136
140
 
137
141
  ##
138
- # @return [Double] The total value of this invoice, inclusive of all taxes and line items.
142
+ # @return [Double] The total value of this invoice, inclusive of all taxes and line items in it's tendered currency.
139
143
  attr_accessor :total_amount
140
144
 
141
145
  ##
142
- # @return [Double] The total sales (or transactional) tax calculated for this invoice.
146
+ # @return [Double] The total sales (or transactional) tax calculated for this invoice in it's tendered currency.
143
147
  attr_accessor :sales_tax_amount
144
148
 
145
149
  ##
146
- # @return [Double] The total discounts given by the seller to the buyer on this invoice.
150
+ # @return [Double] The total discounts given by the seller to the buyer on this invoice in it's tendered currency.
147
151
  attr_accessor :discount_amount
148
152
 
149
153
  ##
150
- # @return [Double] The remaining balance value of this invoice.
154
+ # @return [Double] The remaining balance value of this invoice in it's tendered currency.
151
155
  attr_accessor :outstanding_balance_amount
152
156
 
153
157
  ##
@@ -226,6 +230,22 @@ module LockstepSdk
226
230
  # @return [Double] The Currency Rate used to get from the account's base currency to the invoice amount.
227
231
  attr_accessor :currency_rate
228
232
 
233
+ ##
234
+ # @return [Double] The total value of this invoice, inclusive of all taxes and line items in the group's base currency.
235
+ attr_accessor :base_currency_total_amount
236
+
237
+ ##
238
+ # @return [Double] The total sales (or transactional) tax calculated for this invoice in the group's base currency.
239
+ attr_accessor :base_currency_sales_tax_amount
240
+
241
+ ##
242
+ # @return [Double] The total discounts given by the seller to the buyer on this invoice in the group's base currency.
243
+ attr_accessor :base_currency_discount_amount
244
+
245
+ ##
246
+ # @return [Double] The remaining balance value of this invoice in the group's base currency.
247
+ attr_accessor :base_currency_outstanding_balance_amount
248
+
229
249
  ##
230
250
  # @return [InvoiceAddressModel] All addresses connected to this invoice. To retrieve this collection, specify `Addresses` in the "Include" parameter for your query.
231
251
  attr_accessor :addresses
@@ -311,6 +331,10 @@ module LockstepSdk
311
331
  'excludeFromAging' => @exclude_from_aging,
312
332
  'preferredDeliveryMethod' => @preferred_delivery_method,
313
333
  'currencyRate' => @currency_rate,
334
+ 'baseCurrencyTotalAmount' => @base_currency_total_amount,
335
+ 'baseCurrencySalesTaxAmount' => @base_currency_sales_tax_amount,
336
+ 'baseCurrencyDiscountAmount' => @base_currency_discount_amount,
337
+ 'baseCurrencyOutstandingBalanceAmount' => @base_currency_outstanding_balance_amount,
314
338
  'addresses' => @addresses,
315
339
  'lines' => @lines,
316
340
  'payments' => @payments,
@@ -21,14 +21,18 @@ module LockstepSdk
21
21
  ##
22
22
  # Initialize the InvoiceSummaryModelInvoiceSummaryTotalsModelSummaryFetchResult using the provided prototype
23
23
  def initialize(params = {})
24
+ @records = params.dig(:records)
24
25
  @total_count = params.dig(:total_count)
25
26
  @page_size = params.dig(:page_size)
26
27
  @page_number = params.dig(:page_number)
27
- @records = params.dig(:records)
28
28
  @summary = params.dig(:summary)
29
29
  @aging_summary = params.dig(:aging_summary)
30
30
  end
31
31
 
32
+ ##
33
+ # @return [InvoiceSummaryModel]
34
+ attr_accessor :records
35
+
32
36
  ##
33
37
  # @return [Int32]
34
38
  attr_accessor :total_count
@@ -41,10 +45,6 @@ module LockstepSdk
41
45
  # @return [Int32]
42
46
  attr_accessor :page_number
43
47
 
44
- ##
45
- # @return [InvoiceSummaryModel]
46
- attr_accessor :records
47
-
48
48
  ##
49
49
  # @return [InvoiceSummaryTotalsModel] The totals for an Invoice Summary
50
50
  attr_accessor :summary
@@ -57,10 +57,10 @@ module LockstepSdk
57
57
  # @return [object] This object as a JSON key-value structure
58
58
  def as_json(options={})
59
59
  {
60
+ 'records' => @records,
60
61
  'totalCount' => @total_count,
61
62
  'pageSize' => @page_size,
62
63
  'pageNumber' => @page_number,
63
- 'records' => @records,
64
64
  'summary' => @summary,
65
65
  'agingSummary' => @aging_summary,
66
66
  }
@@ -86,6 +86,10 @@ module LockstepSdk
86
86
  @in_dispute = params.dig(:in_dispute)
87
87
  @preferred_delivery_method = params.dig(:preferred_delivery_method)
88
88
  @currency_rate = params.dig(:currency_rate)
89
+ @base_currency_total_amount = params.dig(:base_currency_total_amount)
90
+ @base_currency_sales_tax_amount = params.dig(:base_currency_sales_tax_amount)
91
+ @base_currency_discount_amount = params.dig(:base_currency_discount_amount)
92
+ @base_currency_outstanding_balance_amount = params.dig(:base_currency_outstanding_balance_amount)
89
93
  end
90
94
 
91
95
  ##
@@ -137,19 +141,19 @@ module LockstepSdk
137
141
  attr_accessor :currency_code
138
142
 
139
143
  ##
140
- # @return [Double] The total value of this invoice, inclusive of all taxes and line items.
144
+ # @return [Double] The total value of this invoice, inclusive of all taxes and line items in the invoice currency.
141
145
  attr_accessor :total_amount
142
146
 
143
147
  ##
144
- # @return [Double] The total sales (or transactional) tax calculated for this invoice.
148
+ # @return [Double] The total sales (or transactional) tax calculated for this invoice in the invoice currency.
145
149
  attr_accessor :sales_tax_amount
146
150
 
147
151
  ##
148
- # @return [Double] The total discounts given by the seller to the buyer on this invoice.
152
+ # @return [Double] The total discounts given by the seller to the buyer on this invoice in the invoice currency.
149
153
  attr_accessor :discount_amount
150
154
 
151
155
  ##
152
- # @return [Double] The remaining balance value of this invoice.
156
+ # @return [Double] The remaining balance value of this invoice in the invoice currency.
153
157
  attr_accessor :outstanding_balance_amount
154
158
 
155
159
  ##
@@ -308,6 +312,22 @@ module LockstepSdk
308
312
  # @return [Double] The Currency Rate used to get from the account's base currency to the invoice amount.
309
313
  attr_accessor :currency_rate
310
314
 
315
+ ##
316
+ # @return [Double] The total value of this invoice, inclusive of all taxes and line items in the erp's base currency.
317
+ attr_accessor :base_currency_total_amount
318
+
319
+ ##
320
+ # @return [Double] The total sales (or transactional) tax calculated for this invoice in the erp's base currency.
321
+ attr_accessor :base_currency_sales_tax_amount
322
+
323
+ ##
324
+ # @return [Double] The total discounts given by the seller to the buyer on this invoice in the erp's base currency.
325
+ attr_accessor :base_currency_discount_amount
326
+
327
+ ##
328
+ # @return [Double] The remaining balance value of this invoice in the erp's base currency.
329
+ attr_accessor :base_currency_outstanding_balance_amount
330
+
311
331
  ##
312
332
  # @return [object] This object as a JSON key-value structure
313
333
  def as_json(options={})
@@ -367,6 +387,10 @@ module LockstepSdk
367
387
  'inDispute' => @in_dispute,
368
388
  'preferredDeliveryMethod' => @preferred_delivery_method,
369
389
  'currencyRate' => @currency_rate,
390
+ 'baseCurrencyTotalAmount' => @base_currency_total_amount,
391
+ 'baseCurrencySalesTaxAmount' => @base_currency_sales_tax_amount,
392
+ 'baseCurrencyDiscountAmount' => @base_currency_discount_amount,
393
+ 'baseCurrencyOutstandingBalanceAmount' => @base_currency_outstanding_balance_amount,
370
394
  }
371
395
  end
372
396
 
@@ -51,6 +51,9 @@ module LockstepSdk
51
51
  @is_voided = params.dig(:is_voided)
52
52
  @in_dispute = params.dig(:in_dispute)
53
53
  @currency_rate = params.dig(:currency_rate)
54
+ @base_currency_payment_amount = params.dig(:base_currency_payment_amount)
55
+ @base_currency_unapplied_amount = params.dig(:base_currency_unapplied_amount)
56
+ @service_fabric_status = params.dig(:service_fabric_status)
54
57
  @applications = params.dig(:applications)
55
58
  @notes = params.dig(:notes)
56
59
  @attachments = params.dig(:attachments)
@@ -99,11 +102,11 @@ module LockstepSdk
99
102
  attr_accessor :post_date
100
103
 
101
104
  ##
102
- # @return [Double] Total amount of this payment.
105
+ # @return [Double] Total amount of this payment in it's received currency.
103
106
  attr_accessor :payment_amount
104
107
 
105
108
  ##
106
- # @return [Double] Unapplied balance of this payment. If this amount is nonzero, the field `IsOpen` will be true.
109
+ # @return [Double] Unapplied balance of this payment in it's received currency. If this amount is nonzero, the field `IsOpen` will be true.
107
110
  attr_accessor :unapplied_amount
108
111
 
109
112
  ##
@@ -146,6 +149,18 @@ module LockstepSdk
146
149
  # @return [Double] The Currency Rate used to get from the account's base currency to the payment amount.
147
150
  attr_accessor :currency_rate
148
151
 
152
+ ##
153
+ # @return [Double] Total amount of this payment in the group's base currency.
154
+ attr_accessor :base_currency_payment_amount
155
+
156
+ ##
157
+ # @return [Double] Unapplied balance of this payment in the group's base currency. If this amount is nonzero, the field `IsOpen` will be true.
158
+ attr_accessor :base_currency_unapplied_amount
159
+
160
+ ##
161
+ # @return [String] The status of this payment within Service Fabric. "UNAUTHORISED" "PENDING" "PAID" "PAID_OFFLINE" "FAILED" "CANCELLED" "REJECTED" "REFUNDED" "PARTIALLY" "PARTIALLY_REFUNDED"
162
+ attr_accessor :service_fabric_status
163
+
149
164
  ##
150
165
  # @return [PaymentAppliedModel] All applications this payment is associated with. To retrieve this collection, specify `Applications` in the "Include" parameter for your query.
151
166
  attr_accessor :applications
@@ -192,6 +207,9 @@ module LockstepSdk
192
207
  'isVoided' => @is_voided,
193
208
  'inDispute' => @in_dispute,
194
209
  'currencyRate' => @currency_rate,
210
+ 'baseCurrencyPaymentAmount' => @base_currency_payment_amount,
211
+ 'baseCurrencyUnappliedAmount' => @base_currency_unapplied_amount,
212
+ 'serviceFabricStatus' => @service_fabric_status,
195
213
  'applications' => @applications,
196
214
  'notes' => @notes,
197
215
  'attachments' => @attachments,
@@ -21,14 +21,18 @@ module LockstepSdk
21
21
  ##
22
22
  # Initialize the PaymentSummaryModelPaymentSummaryTotalsModelSummaryFetchResult using the provided prototype
23
23
  def initialize(params = {})
24
+ @records = params.dig(:records)
24
25
  @total_count = params.dig(:total_count)
25
26
  @page_size = params.dig(:page_size)
26
27
  @page_number = params.dig(:page_number)
27
- @records = params.dig(:records)
28
28
  @summary = params.dig(:summary)
29
29
  @aging_summary = params.dig(:aging_summary)
30
30
  end
31
31
 
32
+ ##
33
+ # @return [PaymentSummaryModel]
34
+ attr_accessor :records
35
+
32
36
  ##
33
37
  # @return [Int32]
34
38
  attr_accessor :total_count
@@ -41,10 +45,6 @@ module LockstepSdk
41
45
  # @return [Int32]
42
46
  attr_accessor :page_number
43
47
 
44
- ##
45
- # @return [PaymentSummaryModel]
46
- attr_accessor :records
47
-
48
48
  ##
49
49
  # @return [PaymentSummaryTotalsModel] The totals for a Payment Summary
50
50
  attr_accessor :summary
@@ -57,10 +57,10 @@ module LockstepSdk
57
57
  # @return [object] This object as a JSON key-value structure
58
58
  def as_json(options={})
59
59
  {
60
+ 'records' => @records,
60
61
  'totalCount' => @total_count,
61
62
  'pageSize' => @page_size,
62
63
  'pageNumber' => @page_number,
63
- 'records' => @records,
64
64
  'summary' => @summary,
65
65
  'agingSummary' => @aging_summary,
66
66
  }