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.
Files changed (94) hide show
  1. checksums.yaml +7 -0
  2. data/lib/lockstep_sdk/clients/activities_client.rb +119 -0
  3. data/lib/lockstep_sdk/clients/api_keys_client.rb +78 -0
  4. data/lib/lockstep_sdk/clients/app_enrollments_client.rb +121 -0
  5. data/lib/lockstep_sdk/clients/applications_client.rb +100 -0
  6. data/lib/lockstep_sdk/clients/attachments_client.rb +121 -0
  7. data/lib/lockstep_sdk/clients/code_definitions_client.rb +60 -0
  8. data/lib/lockstep_sdk/clients/companies_client.rb +123 -0
  9. data/lib/lockstep_sdk/clients/contacts_client.rb +90 -0
  10. data/lib/lockstep_sdk/clients/credit_memo_applied_client.rb +92 -0
  11. data/lib/lockstep_sdk/clients/currencies_client.rb +55 -0
  12. data/lib/lockstep_sdk/clients/custom_field_definitions_client.rb +94 -0
  13. data/lib/lockstep_sdk/clients/custom_field_values_client.rb +97 -0
  14. data/lib/lockstep_sdk/clients/definitions_client.rb +95 -0
  15. data/lib/lockstep_sdk/clients/emails_client.rb +108 -0
  16. data/lib/lockstep_sdk/clients/invoice_history_client.rb +56 -0
  17. data/lib/lockstep_sdk/clients/invoices_client.rb +126 -0
  18. data/lib/lockstep_sdk/clients/leads_client.rb +40 -0
  19. data/lib/lockstep_sdk/clients/notes_client.rb +84 -0
  20. data/lib/lockstep_sdk/clients/payment_applications_client.rb +92 -0
  21. data/lib/lockstep_sdk/clients/payments_client.rb +138 -0
  22. data/lib/lockstep_sdk/clients/provisioning_client.rb +56 -0
  23. data/lib/lockstep_sdk/clients/reports_client.rb +114 -0
  24. data/lib/lockstep_sdk/clients/status_client.rb +53 -0
  25. data/lib/lockstep_sdk/clients/sync_client.rb +97 -0
  26. data/lib/lockstep_sdk/clients/user_accounts_client.rb +127 -0
  27. data/lib/lockstep_sdk/clients/user_roles_client.rb +54 -0
  28. data/lib/lockstep_sdk/lockstep_api.rb +264 -0
  29. data/lib/lockstep_sdk/models/activity_model.rb +221 -0
  30. data/lib/lockstep_sdk/models/activity_stream_item_model.rb +104 -0
  31. data/lib/lockstep_sdk/models/activity_xref_model.rb +72 -0
  32. data/lib/lockstep_sdk/models/aging_model.rb +62 -0
  33. data/lib/lockstep_sdk/models/api_key_model.rb +116 -0
  34. data/lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb +110 -0
  35. data/lib/lockstep_sdk/models/app_enrollment_model.rb +151 -0
  36. data/lib/lockstep_sdk/models/application_model.rb +166 -0
  37. data/lib/lockstep_sdk/models/ar_aging_header_info_model.rb +86 -0
  38. data/lib/lockstep_sdk/models/ar_header_info_model.rb +170 -0
  39. data/lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb +140 -0
  40. data/lib/lockstep_sdk/models/attachment_header_info_model.rb +74 -0
  41. data/lib/lockstep_sdk/models/attachment_model.rb +122 -0
  42. data/lib/lockstep_sdk/models/bulk_currency_conversion_model.rb +56 -0
  43. data/lib/lockstep_sdk/models/cashflow_report_model.rb +74 -0
  44. data/lib/lockstep_sdk/models/code_definition_model.rb +99 -0
  45. data/lib/lockstep_sdk/models/company_model.rb +336 -0
  46. data/lib/lockstep_sdk/models/connector_info_model.rb +69 -0
  47. data/lib/lockstep_sdk/models/contact_model.rb +227 -0
  48. data/lib/lockstep_sdk/models/country_model.rb +116 -0
  49. data/lib/lockstep_sdk/models/credit_memo_applied_model.rb +150 -0
  50. data/lib/lockstep_sdk/models/credit_memo_invoice_model.rb +116 -0
  51. data/lib/lockstep_sdk/models/currency_model.rb +74 -0
  52. data/lib/lockstep_sdk/models/currency_rate_model.rb +68 -0
  53. data/lib/lockstep_sdk/models/custom_field_definition_model.rb +121 -0
  54. data/lib/lockstep_sdk/models/custom_field_value_model.rb +115 -0
  55. data/lib/lockstep_sdk/models/customer_details_model.rb +164 -0
  56. data/lib/lockstep_sdk/models/customer_details_payment_model.rb +104 -0
  57. data/lib/lockstep_sdk/models/customer_summary_model.rb +134 -0
  58. data/lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb +62 -0
  59. data/lib/lockstep_sdk/models/developer_account_submit_model.rb +62 -0
  60. data/lib/lockstep_sdk/models/email_model.rb +245 -0
  61. data/lib/lockstep_sdk/models/erp_info_data_model.rb +63 -0
  62. data/lib/lockstep_sdk/models/erp_info_model.rb +56 -0
  63. data/lib/lockstep_sdk/models/erp_model.rb +62 -0
  64. data/lib/lockstep_sdk/models/invite_data_model.rb +56 -0
  65. data/lib/lockstep_sdk/models/invite_model.rb +68 -0
  66. data/lib/lockstep_sdk/models/invite_submit_model.rb +50 -0
  67. data/lib/lockstep_sdk/models/invoice_address_model.rb +140 -0
  68. data/lib/lockstep_sdk/models/invoice_history_model.rb +238 -0
  69. data/lib/lockstep_sdk/models/invoice_line_model.rb +194 -0
  70. data/lib/lockstep_sdk/models/invoice_model.rb +325 -0
  71. data/lib/lockstep_sdk/models/invoice_payment_detail_model.rb +104 -0
  72. data/lib/lockstep_sdk/models/invoice_summary_model.rb +134 -0
  73. data/lib/lockstep_sdk/models/lead_model.rb +74 -0
  74. data/lib/lockstep_sdk/models/note_model.rb +121 -0
  75. data/lib/lockstep_sdk/models/payment_applied_model.rb +131 -0
  76. data/lib/lockstep_sdk/models/payment_detail_header_model.rb +80 -0
  77. data/lib/lockstep_sdk/models/payment_detail_model.rb +176 -0
  78. data/lib/lockstep_sdk/models/payment_model.rb +206 -0
  79. data/lib/lockstep_sdk/models/payment_summary_model.rb +128 -0
  80. data/lib/lockstep_sdk/models/provisioning_finalize_request_model.rb +74 -0
  81. data/lib/lockstep_sdk/models/provisioning_model.rb +74 -0
  82. data/lib/lockstep_sdk/models/provisioning_response_model.rb +86 -0
  83. data/lib/lockstep_sdk/models/risk_rate_model.rb +98 -0
  84. data/lib/lockstep_sdk/models/state_model.rb +62 -0
  85. data/lib/lockstep_sdk/models/status_model.rb +128 -0
  86. data/lib/lockstep_sdk/models/sync_entity_result_model.rb +74 -0
  87. data/lib/lockstep_sdk/models/sync_request_model.rb +98 -0
  88. data/lib/lockstep_sdk/models/sync_submit_model.rb +50 -0
  89. data/lib/lockstep_sdk/models/transfer_owner_model.rb +56 -0
  90. data/lib/lockstep_sdk/models/transfer_owner_submit_model.rb +50 -0
  91. data/lib/lockstep_sdk/models/user_account_model.rb +240 -0
  92. data/lib/lockstep_sdk/models/user_role_model.rb +86 -0
  93. data/lib/lockstep_sdk/version.rb +3 -0
  94. metadata +150 -0
@@ -0,0 +1,123 @@
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 'awrence'
19
+
20
+ class CompaniesClient
21
+
22
+ ##
23
+ # Initialize the CompaniesClient class with a lockstepsdk instance.
24
+ # @param lockstepsdk [LockstepApi] The Lockstep API client object for this connection
25
+ def initialize(lockstepsdk)
26
+ @lockstepsdk = lockstepsdk
27
+ end
28
+
29
+
30
+ ##
31
+ # Retrieves the Company specified by this unique identifier, optionally including nested data sets. A Company represents a customer, a vendor, or a company within the organization of the account holder. Companies can have parents and children, representing an organizational hierarchy of corporate entities. You can use Companies to track projects and financial data under this Company label.
32
+ #
33
+ # See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information.
34
+ #
35
+ # @param id [uuid] The unique Lockstep Platform ID number of this Company; NOT the customer's ERP key
36
+ # @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Attachments, Contacts, CustomFields, Invoices, Notes, Classification
37
+ def retrieve_company(id:, include_param:)
38
+ path = "/api/v1/Companies/#{id}"
39
+ params = {:include => include_param}
40
+ @lockstepsdk.request(:get, path, nil, params)
41
+ end
42
+
43
+ ##
44
+ # Updates a Company that matches the specified id with the requested information.
45
+ #
46
+ # The PATCH method allows you to change specific values on the object while leaving other values alone. As input you should supply a list of field names and new values. If you do not provide the name of a field, that field will remain unchanged. This allows you to ensure that you are only updating the specific fields desired. A Company represents a customer, a vendor, or a company within the organization of the account holder. Companies can have parents and children, representing an organizational hierarchy of corporate entities. You can use Companies to track projects and financial data under this Company label.
47
+ #
48
+ # See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information.
49
+ #
50
+ # @param id [uuid] The unique Lockstep Platform ID number of this Company; NOT the customer's ERP key
51
+ # @param body [object] A list of changes to apply to this Company
52
+ def update_company(id:, body:)
53
+ path = "/api/v1/Companies/#{id}"
54
+ @lockstepsdk.request(:patch, path, body.to_camelback_keys.to_json, nil)
55
+ end
56
+
57
+ ##
58
+ # Disable the Company referred to by this unique identifier.
59
+ #
60
+ # A Company represents a customer, a vendor, or a company within the organization of the account holder. Companies can have parents and children, representing an organizational hierarchy of corporate entities. You can use Companies to track projects and financial data under this Company label.
61
+ #
62
+ # See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information.
63
+ #
64
+ # @param id [uuid] The unique Lockstep Platform ID number of this Company; NOT the customer's ERP key
65
+ def disable_company(id:)
66
+ path = "/api/v1/Companies/#{id}"
67
+ @lockstepsdk.request(:delete, path, nil, nil)
68
+ end
69
+
70
+ ##
71
+ # Creates one or more Companies from a given model. A Company represents a customer, a vendor, or a company within the organization of the account holder. Companies can have parents and children, representing an organizational hierarchy of corporate entities. You can use Companies to track projects and financial data under this Company label.
72
+ #
73
+ # See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information.
74
+ #
75
+ # @param body [CompanyModel] The Companies to create
76
+ def create_companies(body:)
77
+ path = "/api/v1/Companies"
78
+ @lockstepsdk.request(:post, path, body, nil)
79
+ end
80
+
81
+ ##
82
+ # Queries Companies for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
83
+ #
84
+ # More information on querying can be found on the [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website. A Company represents a customer, a vendor, or a company within the organization of the account holder. Companies can have parents and children, representing an organizational hierarchy of corporate entities. You can use Companies to track projects and financial data under this Company label.
85
+ #
86
+ # See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information.
87
+ #
88
+ # @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
89
+ # @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Attachments, Contacts, CustomFields, Invoices, Notes, Classification
90
+ # @param order [string] The sort order for the results, in the [Searchlight order syntax](https://github.com/tspence/csharp-searchlight).
91
+ # @param page_size [int32] The page size for results (default 200, maximum of 10,000)
92
+ # @param page_number [int32] The page number for results (default 0)
93
+ def query_companies(filter:, include_param:, order:, page_size:, page_number:)
94
+ path = "/api/v1/Companies/query"
95
+ params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
96
+ @lockstepsdk.request(:get, path, nil, params)
97
+ end
98
+
99
+ ##
100
+ # Queries Customer Summaries for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
101
+ #
102
+ # More information on querying can be found on the [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website. The Customer Summary View represents a slightly different view of the data and includes some extra fields that might be useful. For more information, see the data format of the Customer Summary Model. See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information.
103
+ #
104
+ # @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
105
+ # @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. No collections are currently available but may be offered in the future
106
+ # @param order [string] The sort order for the results, in the [Searchlight order syntax](https://github.com/tspence/csharp-searchlight).
107
+ # @param page_size [int32] The page size for results (default 200, maximum of 10,000)
108
+ # @param page_number [int32] The page number for results (default 0)
109
+ def query_customer_summary(filter:, include_param:, order:, page_size:, page_number:)
110
+ path = "/api/v1/Companies/views/customer-summary"
111
+ params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
112
+ @lockstepsdk.request(:get, path, nil, params)
113
+ end
114
+
115
+ ##
116
+ # Retrieves the Customer Details specified by this unique identifier, optionally including nested data sets. The Customer Detail View represents a slightly different view of the data and includes some extra fields that might be useful. For more information, see the data format of the Customer Detail Model. See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information.
117
+ #
118
+ # @param id [uuid] The unique Lockstep Platform ID number of this Company; NOT the customer's ERP key
119
+ def retrieve_customer_detail(id:)
120
+ path = "/api/v1/Companies/views/customer-details/#{id}"
121
+ @lockstepsdk.request(:get, path, nil, nil)
122
+ end
123
+ end
@@ -0,0 +1,90 @@
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 'awrence'
19
+
20
+ class ContactsClient
21
+
22
+ ##
23
+ # Initialize the ContactsClient class with a lockstepsdk instance.
24
+ # @param lockstepsdk [LockstepApi] The Lockstep API client object for this connection
25
+ def initialize(lockstepsdk)
26
+ @lockstepsdk = lockstepsdk
27
+ end
28
+
29
+
30
+ ##
31
+ # Retrieves the Contact specified by this unique identifier, optionally including nested data sets. A Contact contains information about a person or role within a Company. You can use Contacts to track information about who is responsible for a specific project, who handles invoices, or information about which role at a particular customer or vendor you should speak with about invoices.
32
+ #
33
+ # @param id [uuid] The unique Lockstep Platform ID number of this Contact; NOT the customer's ERP key
34
+ # @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Attachments, CustomFields, Notes
35
+ def retrieve_contact(id:, include_param:)
36
+ path = "/api/v1/Contacts/#{id}"
37
+ params = {:include => include_param}
38
+ @lockstepsdk.request(:get, path, nil, params)
39
+ end
40
+
41
+ ##
42
+ # Updates a contact that matches the specified id with the requested information.
43
+ #
44
+ # The PATCH method allows you to change specific values on the object while leaving other values alone. As input you should supply a list of field names and new values. If you do not provide the name of a field, that field will remain unchanged. This allows you to ensure that you are only updating the specific fields desired. A Contact contains information about a person or role within a Company. You can use Contacts to track information about who is responsible for a specific project, who handles invoices, or information about which role at a particular customer or vendor you should speak with about invoices.
45
+ #
46
+ # @param id [uuid] The unique Lockstep Platform ID number of the Contact to update; NOT the customer's ERP key
47
+ # @param body [object] A list of changes to apply to this Contact
48
+ def update_contact(id:, body:)
49
+ path = "/api/v1/Contacts/#{id}"
50
+ @lockstepsdk.request(:patch, path, body.to_camelback_keys.to_json, nil)
51
+ end
52
+
53
+ ##
54
+ # Disable the Contact referred to by this unique identifier.
55
+ #
56
+ # A Contact contains information about a person or role within a Company. You can use Contacts to track information about who is responsible for a specific project, who handles invoices, or information about which role at a particular customer or vendor you should speak with about invoices.
57
+ #
58
+ # @param id [uuid] The unique Lockstep Platform ID number of the Contact to disable; NOT the customer's ERP key
59
+ def disable_contact(id:)
60
+ path = "/api/v1/Contacts/#{id}"
61
+ @lockstepsdk.request(:delete, path, nil, nil)
62
+ end
63
+
64
+ ##
65
+ # Creates one or more contacts from a given model.
66
+ #
67
+ # A Contact contains information about a person or role within a Company. You can use Contacts to track information about who is responsible for a specific project, who handles invoices, or information about which role at a particular customer or vendor you should speak with about invoices.
68
+ #
69
+ # @param body [ContactModel] The Contacts to create
70
+ def create_contacts(body:)
71
+ path = "/api/v1/Contacts"
72
+ @lockstepsdk.request(:post, path, body, nil)
73
+ end
74
+
75
+ ##
76
+ # Queries Contacts for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
77
+ #
78
+ # More information on querying can be found on the [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website. A Contact contains information about a person or role within a Company. You can use Contacts to track information about who is responsible for a specific project, who handles invoices, or information about which role at a particular customer or vendor you should speak with about invoices.
79
+ #
80
+ # @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
81
+ # @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Attachments, CustomFields, Notes
82
+ # @param order [string] The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
83
+ # @param page_size [int32] The page size for results (default 200). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
84
+ # @param page_number [int32] The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
85
+ def query_contacts(filter:, include_param:, order:, page_size:, page_number:)
86
+ path = "/api/v1/Contacts/query"
87
+ params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
88
+ @lockstepsdk.request(:get, path, nil, params)
89
+ end
90
+ end
@@ -0,0 +1,92 @@
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 'awrence'
19
+
20
+ class CreditMemoAppliedClient
21
+
22
+ ##
23
+ # Initialize the CreditMemoAppliedClient class with a lockstepsdk instance.
24
+ # @param lockstepsdk [LockstepApi] The Lockstep API client object for this connection
25
+ def initialize(lockstepsdk)
26
+ @lockstepsdk = lockstepsdk
27
+ end
28
+
29
+
30
+ ##
31
+ # Retrieves the Credit Memo Application specified by this unique identifier, optionally including nested data sets.
32
+ #
33
+ # Credit Memos reflect credits granted to a customer for various reasons, such as discounts or refunds. Credit Memos may be applied to Invoices as Payments. When a Credit Memo is applied as payment to an Invoice, Lockstep creates a Credit Memo Application record to track the amount from the Credit Memo that was applied as payment to the Invoice. You can examine Credit Memo Application records to track which Invoices were paid using this Credit.
34
+ #
35
+ # @param id [uuid] The unique Lockstep Platform ID number of this Credit Memo Application; NOT the customer's ERP key
36
+ # @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Attachments, CustomFields, Notes
37
+ def retrieve_credit_memo_application(id:, include_param:)
38
+ path = "/api/v1/CreditMemoApplied/#{id}"
39
+ params = {:include => include_param}
40
+ @lockstepsdk.request(:get, path, nil, params)
41
+ end
42
+
43
+ ##
44
+ # Updates an existing Credit memo Application with the information supplied to this PATCH call.
45
+ #
46
+ # The PATCH method allows you to change specific values on the object while leaving other values alone. As input you should supply a list of field names and new values. If you do not provide the name of a field, that field will remain unchanged. This allows you to ensure that you are only updating the specific fields desired. Credit Memos reflect credits granted to a customer for various reasons, such as discounts or refunds. Credit Memos may be applied to Invoices as Payments. When a Credit Memo is applied as payment to an Invoice, Lockstep creates a Credit Memo Application record to track the amount from the Credit Memo that was applied as payment to the Invoice. You can examine Credit Memo Application records to track which Invoices were paid using this Credit.
47
+ #
48
+ # @param id [uuid] The unique Lockstep Platform ID number of the Credit Memo Application to update; NOT the customer's ERP key
49
+ # @param body [object] A list of changes to apply to this Credit Memo Application
50
+ def update_credit_memo_application(id:, body:)
51
+ path = "/api/v1/CreditMemoApplied/#{id}"
52
+ @lockstepsdk.request(:patch, path, body.to_camelback_keys.to_json, nil)
53
+ end
54
+
55
+ ##
56
+ # Deletes the Credit Memo Application referred to by this unique identifier.
57
+ #
58
+ # Credit Memos reflect credits granted to a customer for various reasons, such as discounts or refunds. Credit Memos may be applied to Invoices as Payments. When a Credit Memo is applied as payment to an Invoice, Lockstep creates a Credit Memo Application record to track the amount from the Credit Memo that was applied as payment to the Invoice. You can examine Credit Memo Application records to track which Invoices were paid using this Credit.
59
+ #
60
+ # @param id [uuid] The unique Lockstep Platform ID number of the Credit Memo Application to delete; NOT the customer's ERP key
61
+ def delete_credit_memo_application(id:)
62
+ path = "/api/v1/CreditMemoApplied/#{id}"
63
+ @lockstepsdk.request(:delete, path, nil, nil)
64
+ end
65
+
66
+ ##
67
+ # Creates one or more Credit Memo Applications within this account and returns the records as created.
68
+ #
69
+ # Credit Memos reflect credits granted to a customer for various reasons, such as discounts or refunds. Credit Memos may be applied to Invoices as Payments. When a Credit Memo is applied as payment to an Invoice, Lockstep creates a Credit Memo Application record to track the amount from the Credit Memo that was applied as payment to the Invoice. You can examine Credit Memo Application records to track which Invoices were paid using this Credit.
70
+ #
71
+ # @param body [CreditMemoAppliedModel] The Credit Memo Applications to create
72
+ def create_credit_memo_applications(body:)
73
+ path = "/api/v1/CreditMemoApplied"
74
+ @lockstepsdk.request(:post, path, body, nil)
75
+ end
76
+
77
+ ##
78
+ # Queries Credit Memo Applications for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
79
+ #
80
+ # More information on querying can be found on the [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website. Credit Memos reflect credits granted to a customer for various reasons, such as discounts or refunds. Credit Memos may be applied to Invoices as Payments. When a Credit Memo is applied as payment to an Invoice, Lockstep creates a Credit Memo Application record to track the amount from the Credit Memo that was applied as payment to the Invoice. You can examine Credit Memo Application records to track which Invoices were paid using this Credit.
81
+ #
82
+ # @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
83
+ # @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Attachments, CustomFields, Notes
84
+ # @param order [string] The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
85
+ # @param page_size [int32] The page size for results (default 200). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
86
+ # @param page_number [int32] The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
87
+ def query_credit_memo_applications(filter:, include_param:, order:, page_size:, page_number:)
88
+ path = "/api/v1/CreditMemoApplied/query"
89
+ params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
90
+ @lockstepsdk.request(:get, path, nil, params)
91
+ end
92
+ end
@@ -0,0 +1,55 @@
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 'awrence'
19
+
20
+ class CurrenciesClient
21
+
22
+ ##
23
+ # Initialize the CurrenciesClient class with a lockstepsdk instance.
24
+ # @param lockstepsdk [LockstepApi] The Lockstep API client object for this connection
25
+ def initialize(lockstepsdk)
26
+ @lockstepsdk = lockstepsdk
27
+ end
28
+
29
+
30
+ ##
31
+ # Retrieve a currency conversation rate from one currency to another as of the specified date. Optionally, you can specify which currency data provider to use.
32
+ #
33
+ # The currency rate model contains all of the information used to make the API call, plus the rate to use for the conversion.
34
+ #
35
+ # @param source_currency [string] The ISO 4217 currency code of the origin currency. For a list of currency codes, call List Currencies.
36
+ # @param destination_currency [string] The ISO 4217 currency code of the target currency. For a list of currency codes, call List Currencies.
37
+ # @param date [date] The date for which we should cto use for this currency conversion.
38
+ # @param data_provider [string] Optionally, you can specify a data provider.
39
+ def retrieve_currency_rate(source_currency:, destination_currency:, date:, data_provider:)
40
+ path = "/api/v1/Currencies/#{sourceCurrency}/#{destinationCurrency}"
41
+ params = {:date => date, :dataProvider => data_provider}
42
+ @lockstepsdk.request(:get, path, nil, params)
43
+ end
44
+
45
+ ##
46
+ # Receives an array of dates and currencies and a destination currency and returns an array of the corresponding currency rates to the given destination currency (Limit X).
47
+ #
48
+ # @param destination_currency [string] The currency to convert to.
49
+ # @param body [BulkCurrencyConversionModel] A list of dates and source currencies.
50
+ def bulk_currency_data(destination_currency:, body:)
51
+ path = "/api/v1/Currencies/bulk"
52
+ params = {:destinationCurrency => destination_currency}
53
+ @lockstepsdk.request(:post, path, body, params)
54
+ end
55
+ end
@@ -0,0 +1,94 @@
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 'awrence'
19
+
20
+ class CustomFieldDefinitionsClient
21
+
22
+ ##
23
+ # Initialize the CustomFieldDefinitionsClient class with a lockstepsdk instance.
24
+ # @param lockstepsdk [LockstepApi] The Lockstep API client object for this connection
25
+ def initialize(lockstepsdk)
26
+ @lockstepsdk = lockstepsdk
27
+ end
28
+
29
+
30
+ ##
31
+ # Retrieves the Custom Field Definition specified by this unique identifier.
32
+ #
33
+ # A Custom Field represents metadata added to an object within the Lockstep Platform. Lockstep provides a core definition for each object. The core definition is intended to represent a level of compatibility that provides support across most accounting systems and products. When a user or developer requires information beyond this core definition, you can use Custom Fields to represent this information. See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
34
+ #
35
+ # @param id [uuid] The unique Lockstep Platform ID number of this Custom Field Definition
36
+ # @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. No additional data collections are currently defined on this object, but may be supported in the future.
37
+ def retrieve_field_definition(id:, include_param:)
38
+ path = "/api/v1/CustomFieldDefinitions/#{id}"
39
+ params = {:include => include_param}
40
+ @lockstepsdk.request(:get, path, nil, params)
41
+ end
42
+
43
+ ##
44
+ # Updates an existing Custom Field Definition with the information supplied to this PATCH call.
45
+ #
46
+ # The PATCH method allows you to change specific values on the object while leaving other values alone. As input you should supply a list of field names and new values. If you do not provide the name of a field, that field will remain unchanged. This allows you to ensure that you are only updating the specific fields desired.
47
+ #
48
+ # A Custom Field represents metadata added to an object within the Lockstep Platform. Lockstep provides a core definition for each object. The core definition is intended to represent a level of compatibility that provides support across most accounting systems and products. When a user or developer requires information beyond this core definition, you can use Custom Fields to represent this information. See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
49
+ #
50
+ # @param id [uuid] The unique Lockstep Platform ID number of the Custom Field Definition to update
51
+ # @param body [object] A list of changes to apply to this Custom Field Definition
52
+ def update_field_definition(id:, body:)
53
+ path = "/api/v1/CustomFieldDefinitions/#{id}"
54
+ @lockstepsdk.request(:patch, path, body.to_camelback_keys.to_json, nil)
55
+ end
56
+
57
+ ##
58
+ # Deletes the Custom Field Definition referred to by this unique identifier.
59
+ #
60
+ # A Custom Field represents metadata added to an object within the Lockstep Platform. Lockstep provides a core definition for each object. The core definition is intended to represent a level of compatibility that provides support across most accounting systems and products. When a user or developer requires information beyond this core definition, you can use Custom Fields to represent this information. See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
61
+ #
62
+ # @param id [uuid] The unique Lockstep Platform ID number of the Custom Field Definition to delete
63
+ def delete_field_definition(id:)
64
+ path = "/api/v1/CustomFieldDefinitions/#{id}"
65
+ @lockstepsdk.request(:delete, path, nil, nil)
66
+ end
67
+
68
+ ##
69
+ # Creates one or more Custom Field Definitions and returns the records as created. A Custom Field represents metadata added to an object within the Lockstep Platform. Lockstep provides a core definition for each object. The core definition is intended to represent a level of compatibility that provides support across most accounting systems and products. When a user or developer requires information beyond this core definition, you can use Custom Fields to represent this information. See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
70
+ #
71
+ # @param body [CustomFieldDefinitionModel] The Custom Field Definitions to create
72
+ def create_field_definitions(body:)
73
+ path = "/api/v1/CustomFieldDefinitions"
74
+ @lockstepsdk.request(:post, path, body, nil)
75
+ end
76
+
77
+ ##
78
+ # Queries Custom Field Definitions within the Lockstep platform using the specified filtering, sorting, nested fetch, and pagination rules requested.
79
+ #
80
+ # More information on querying can be found on the [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website.
81
+ #
82
+ # A Custom Field represents metadata added to an object within the Lockstep Platform. Lockstep provides a core definition for each object. The core definition is intended to represent a level of compatibility that provides support across most accounting systems and products. When a user or developer requires information beyond this core definition, you can use Custom Fields to represent this information. See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
83
+ #
84
+ # @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
85
+ # @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. No additional data collections are currently defined on this object, but may be supported in the future.
86
+ # @param order [string] The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
87
+ # @param page_size [int32] The page size for results (default 200). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
88
+ # @param page_number [int32] The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
89
+ def query_field_definitions(filter:, include_param:, order:, page_size:, page_number:)
90
+ path = "/api/v1/CustomFieldDefinitions/query"
91
+ params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
92
+ @lockstepsdk.request(:get, path, nil, params)
93
+ end
94
+ end
@@ -0,0 +1,97 @@
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 'awrence'
19
+
20
+ class CustomFieldValuesClient
21
+
22
+ ##
23
+ # Initialize the CustomFieldValuesClient class with a lockstepsdk instance.
24
+ # @param lockstepsdk [LockstepApi] The Lockstep API client object for this connection
25
+ def initialize(lockstepsdk)
26
+ @lockstepsdk = lockstepsdk
27
+ end
28
+
29
+
30
+ ##
31
+ # Retrieves all Custom Field Definitions.
32
+ #
33
+ # A Custom Field represents metadata added to an object within the Lockstep Platform. Lockstep provides a core definition for each object. The core definition is intended to represent a level of compatibility that provides support across most accounting systems and products. When a user or developer requires information beyond this core definition, you can use Custom Fields to represent this information. See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
34
+ #
35
+ # @param definition_id [uuid] The unique Lockstep Platform ID number of the Custom Field Definition for the Custom Field Value to retrieve.
36
+ # @param record_key [uuid] The unique Lockstep Platform ID number of the Lockstep Platform object the Custom Field Value is attached to.
37
+ # @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: CustomFieldDefinition
38
+ def retrieve_field(definition_id:, record_key:, include_param:)
39
+ path = "/api/v1/CustomFieldValues/#{definitionId}/#{recordKey}"
40
+ params = {:include => include_param}
41
+ @lockstepsdk.request(:get, path, nil, params)
42
+ end
43
+
44
+ ##
45
+ # Updates an existing Custom Field with the information supplied to this PATCH call.
46
+ #
47
+ # The PATCH method allows you to change specific values on the object while leaving other values alone. As input you should supply a list of field names and new values. If you do not provide the name of a field, that field will remain unchanged. This allows you to ensure that you are only updating the specific fields desired.
48
+ #
49
+ # A Custom Field represents metadata added to an object within the Lockstep Platform. Lockstep provides a core definition for each object. The core definition is intended to represent a level of compatibility that provides support across most accounting systems and products. When a user or developer requires information beyond this core definition, you can use Custom Fields to represent this information. See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
50
+ #
51
+ # @param definition_id [uuid] The unique Lockstep Platform ID number of the Custom Field Definition for the Custom Field Value to retrieve.
52
+ # @param record_key [uuid] The unique Lockstep Platform ID number of the Lockstep Platform object the Custom Field Value is attached to.
53
+ # @param body [object] A list of changes to apply to this Custom Field
54
+ def update_field(definition_id:, record_key:, body:)
55
+ path = "/api/v1/CustomFieldValues/#{definitionId}/#{recordKey}"
56
+ @lockstepsdk.request(:patch, path, body.to_camelback_keys.to_json, nil)
57
+ end
58
+
59
+ ##
60
+ # Deletes the Custom Field referred to by this unique identifier.
61
+ #
62
+ # A Custom Field represents metadata added to an object within the Lockstep Platform. Lockstep provides a core definition for each object. The core definition is intended to represent a level of compatibility that provides support across most accounting systems and products. When a user or developer requires information beyond this core definition, you can use Custom Fields to represent this information. See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
63
+ #
64
+ # @param definition_id [uuid] The unique Lockstep Platform ID number of the Custom Field Definition for the Custom Field Value to retrieve.
65
+ # @param record_key [uuid] The unique Lockstep Platform ID number of the Lockstep Platform object the Custom Field Value is attached to.
66
+ def delete_field(definition_id:, record_key:)
67
+ path = "/api/v1/CustomFieldValues/#{definitionId}/#{recordKey}"
68
+ @lockstepsdk.request(:delete, path, nil, nil)
69
+ end
70
+
71
+ ##
72
+ # Creates one or more Custom Fields and returns the records as created. A Custom Field represents metadata added to an object within the Lockstep Platform. Lockstep provides a core definition for each object. The core definition is intended to represent a level of compatibility that provides support across most accounting systems and products. When a user or developer requires information beyond this core definition, you can use Custom Fields to represent this information. See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
73
+ #
74
+ # @param body [CustomFieldValueModel] The Custom Fields to create
75
+ def create_fields(body:)
76
+ path = "/api/v1/CustomFieldValues"
77
+ @lockstepsdk.request(:post, path, body, nil)
78
+ end
79
+
80
+ ##
81
+ # Queries Custom Fields within the Lockstep platform using the specified filtering, sorting, nested fetch, and pagination rules requested.
82
+ #
83
+ # More information on querying can be found on the [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website.
84
+ #
85
+ # A Custom Field represents metadata added to an object within the Lockstep Platform. Lockstep provides a core definition for each object. The core definition is intended to represent a level of compatibility that provides support across most accounting systems and products. When a user or developer requires information beyond this core definition, you can use Custom Fields to represent this information. See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
86
+ #
87
+ # @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
88
+ # @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: CustomFieldDefinition
89
+ # @param order [string] The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
90
+ # @param page_size [int32] The page size for results (default 200). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
91
+ # @param page_number [int32] The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
92
+ def query_fields(filter:, include_param:, order:, page_size:, page_number:)
93
+ path = "/api/v1/CustomFieldValues/query"
94
+ params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
95
+ @lockstepsdk.request(:get, path, nil, params)
96
+ end
97
+ end