Skip to content

Commit

Permalink
Merge pull request #28 from merge-api/fern-bot/07-26-2024-0604PM
Browse files Browse the repository at this point in the history
July Merge API Sync
  • Loading branch information
rmkonnur authored Jul 26, 2024
2 parents df53960 + 7bac7e3 commit bcb482b
Show file tree
Hide file tree
Showing 87 changed files with 1,586 additions and 294 deletions.
14 changes: 7 additions & 7 deletions lib/merge_ruby_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
require_relative "environment"
require_relative "types_export"
require_relative "requests"
require_relative "merge_ruby_client/filestorage/client"
require_relative "merge_ruby_client/ats/client"
require_relative "merge_ruby_client/crm/client"
require_relative "merge_ruby_client/filestorage/client"
require_relative "merge_ruby_client/hris/client"
require_relative "merge_ruby_client/ticketing/client"
require_relative "merge_ruby_client/accounting/client"

module Merge
class Client
# @return [Merge::Filestorage::Client]
attr_reader :filestorage
# @return [Merge::Ats::Client]
attr_reader :ats
# @return [Merge::Crm::Client]
attr_reader :crm
# @return [Merge::Filestorage::Client]
attr_reader :filestorage
# @return [Merge::Hris::Client]
attr_reader :hris
# @return [Merge::Ticketing::Client]
Expand All @@ -42,22 +42,22 @@ def initialize(api_key:, base_url: nil, environment: Merge::Environment::PRODUCT
api_key: api_key,
account_token: account_token
)
@filestorage = Merge::Filestorage::Client.new(request_client: @request_client)
@ats = Merge::Ats::Client.new(request_client: @request_client)
@crm = Merge::Crm::Client.new(request_client: @request_client)
@filestorage = Merge::Filestorage::Client.new(request_client: @request_client)
@hris = Merge::Hris::Client.new(request_client: @request_client)
@ticketing = Merge::Ticketing::Client.new(request_client: @request_client)
@accounting = Merge::Accounting::Client.new(request_client: @request_client)
end
end

class AsyncClient
# @return [Merge::Filestorage::AsyncClient]
attr_reader :filestorage
# @return [Merge::Ats::AsyncClient]
attr_reader :ats
# @return [Merge::Crm::AsyncClient]
attr_reader :crm
# @return [Merge::Filestorage::AsyncClient]
attr_reader :filestorage
# @return [Merge::Hris::AsyncClient]
attr_reader :hris
# @return [Merge::Ticketing::AsyncClient]
Expand All @@ -82,9 +82,9 @@ def initialize(api_key:, base_url: nil, environment: Merge::Environment::PRODUCT
api_key: api_key,
account_token: account_token
)
@filestorage = Merge::Filestorage::AsyncClient.new(request_client: @async_request_client)
@ats = Merge::Ats::AsyncClient.new(request_client: @async_request_client)
@crm = Merge::Crm::AsyncClient.new(request_client: @async_request_client)
@filestorage = Merge::Filestorage::AsyncClient.new(request_client: @async_request_client)
@hris = Merge::Hris::AsyncClient.new(request_client: @async_request_client)
@ticketing = Merge::Ticketing::AsyncClient.new(request_client: @async_request_client)
@accounting = Merge::Accounting::AsyncClient.new(request_client: @async_request_client)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class CreditNoteLineItem
# platform.
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
# @return [Merge::Accounting::CreditNoteLineItem]
def initialize(id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, item: OMIT, name: OMIT,
description: OMIT, quantity: OMIT, memo: OMIT, unit_price: OMIT, total_line_amount: OMIT, tracking_category: OMIT, tracking_categories: OMIT, account: OMIT, company: OMIT, remote_was_deleted: OMIT, additional_properties: nil)
def initialize(tracking_categories:, id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, item: OMIT, name: OMIT,
description: OMIT, quantity: OMIT, memo: OMIT, unit_price: OMIT, total_line_amount: OMIT, tracking_category: OMIT, account: OMIT, company: OMIT, remote_was_deleted: OMIT, additional_properties: nil)
@id = id if id != OMIT
@remote_id = remote_id if remote_id != OMIT
@created_at = created_at if created_at != OMIT
Expand All @@ -83,7 +83,7 @@ def initialize(id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, i
@unit_price = unit_price if unit_price != OMIT
@total_line_amount = total_line_amount if total_line_amount != OMIT
@tracking_category = tracking_category if tracking_category != OMIT
@tracking_categories = tracking_categories if tracking_categories != OMIT
@tracking_categories = tracking_categories
@account = account if account != OMIT
@company = company if company != OMIT
@remote_was_deleted = remote_was_deleted if remote_was_deleted != OMIT
Expand Down Expand Up @@ -190,7 +190,7 @@ def self.validate_raw(obj:)
obj.unit_price&.is_a?(String) != false || raise("Passed value for field obj.unit_price is not the expected type, validation failed.")
obj.total_line_amount&.is_a?(String) != false || raise("Passed value for field obj.total_line_amount is not the expected type, validation failed.")
obj.tracking_category&.is_a?(String) != false || raise("Passed value for field obj.tracking_category is not the expected type, validation failed.")
obj.tracking_categories&.is_a?(Array) != false || raise("Passed value for field obj.tracking_categories is not the expected type, validation failed.")
obj.tracking_categories.is_a?(Array) != false || raise("Passed value for field obj.tracking_categories is not the expected type, validation failed.")
obj.account&.is_a?(String) != false || raise("Passed value for field obj.account is not the expected type, validation failed.")
obj.company.nil? || Merge::Accounting::CreditNoteLineItemCompany.validate_raw(obj: obj.company)
obj.remote_was_deleted&.is_a?(Boolean) != false || raise("Passed value for field obj.remote_was_deleted is not the expected type, validation failed.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,8 @@ class PurchaseOrderLineItem
# platform.
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
# @return [Merge::Accounting::PurchaseOrderLineItem]
def initialize(id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, description: OMIT,
unit_price: OMIT, quantity: OMIT, item: OMIT, account: OMIT, tracking_category: OMIT, tracking_categories: OMIT, tax_amount: OMIT, total_line_amount: OMIT, currency: OMIT, exchange_rate: OMIT, company: OMIT, remote_was_deleted: OMIT, additional_properties: nil)
def initialize(tracking_categories:, id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, description: OMIT,
unit_price: OMIT, quantity: OMIT, item: OMIT, account: OMIT, tracking_category: OMIT, tax_amount: OMIT, total_line_amount: OMIT, currency: OMIT, exchange_rate: OMIT, company: OMIT, remote_was_deleted: OMIT, additional_properties: nil)
@id = id if id != OMIT
@remote_id = remote_id if remote_id != OMIT
@created_at = created_at if created_at != OMIT
Expand All @@ -703,7 +703,7 @@ def initialize(id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, d
@item = item if item != OMIT
@account = account if account != OMIT
@tracking_category = tracking_category if tracking_category != OMIT
@tracking_categories = tracking_categories if tracking_categories != OMIT
@tracking_categories = tracking_categories
@tax_amount = tax_amount if tax_amount != OMIT
@total_line_amount = total_line_amount if total_line_amount != OMIT
@currency = currency if currency != OMIT
Expand Down Expand Up @@ -809,7 +809,7 @@ def self.validate_raw(obj:)
obj.item.nil? || Merge::Accounting::PurchaseOrderLineItemItem.validate_raw(obj: obj.item)
obj.account&.is_a?(String) != false || raise("Passed value for field obj.account is not the expected type, validation failed.")
obj.tracking_category&.is_a?(String) != false || raise("Passed value for field obj.tracking_category is not the expected type, validation failed.")
obj.tracking_categories&.is_a?(Array) != false || raise("Passed value for field obj.tracking_categories is not the expected type, validation failed.")
obj.tracking_categories.is_a?(Array) != false || raise("Passed value for field obj.tracking_categories is not the expected type, validation failed.")
obj.tax_amount&.is_a?(String) != false || raise("Passed value for field obj.tax_amount is not the expected type, validation failed.")
obj.total_line_amount&.is_a?(String) != false || raise("Passed value for field obj.total_line_amount is not the expected type, validation failed.")
obj.currency&.is_a?(Merge::Accounting::CurrencyEnum) != false || raise("Passed value for field obj.currency is not the expected type, validation failed.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -682,16 +682,16 @@ class PurchaseOrderLineItemRequest
# @param linked_account_params [Hash{String => Object}]
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
# @return [Merge::Accounting::PurchaseOrderLineItemRequest]
def initialize(remote_id: OMIT, description: OMIT, unit_price: OMIT, quantity: OMIT, item: OMIT, account: OMIT,
tracking_category: OMIT, tracking_categories: OMIT, tax_amount: OMIT, total_line_amount: OMIT, currency: OMIT, exchange_rate: OMIT, company: OMIT, integration_params: OMIT, linked_account_params: OMIT, additional_properties: nil)
def initialize(tracking_categories:, remote_id: OMIT, description: OMIT, unit_price: OMIT, quantity: OMIT, item: OMIT, account: OMIT,
tracking_category: OMIT, tax_amount: OMIT, total_line_amount: OMIT, currency: OMIT, exchange_rate: OMIT, company: OMIT, integration_params: OMIT, linked_account_params: OMIT, additional_properties: nil)
@remote_id = remote_id if remote_id != OMIT
@description = description if description != OMIT
@unit_price = unit_price if unit_price != OMIT
@quantity = quantity if quantity != OMIT
@item = item if item != OMIT
@account = account if account != OMIT
@tracking_category = tracking_category if tracking_category != OMIT
@tracking_categories = tracking_categories if tracking_categories != OMIT
@tracking_categories = tracking_categories
@tax_amount = tax_amount if tax_amount != OMIT
@total_line_amount = total_line_amount if total_line_amount != OMIT
@currency = currency if currency != OMIT
Expand Down Expand Up @@ -789,7 +789,7 @@ def self.validate_raw(obj:)
obj.item.nil? || Merge::Accounting::PurchaseOrderLineItemRequestItem.validate_raw(obj: obj.item)
obj.account&.is_a?(String) != false || raise("Passed value for field obj.account is not the expected type, validation failed.")
obj.tracking_category&.is_a?(String) != false || raise("Passed value for field obj.tracking_category is not the expected type, validation failed.")
obj.tracking_categories&.is_a?(Array) != false || raise("Passed value for field obj.tracking_categories is not the expected type, validation failed.")
obj.tracking_categories.is_a?(Array) != false || raise("Passed value for field obj.tracking_categories is not the expected type, validation failed.")
obj.tax_amount&.is_a?(String) != false || raise("Passed value for field obj.tax_amount is not the expected type, validation failed.")
obj.total_line_amount&.is_a?(String) != false || raise("Passed value for field obj.total_line_amount is not the expected type, validation failed.")
obj.currency&.is_a?(Merge::Accounting::CurrencyEnum) != false || raise("Passed value for field obj.currency is not the expected type, validation failed.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,8 @@ class TransactionLineItem
# platform.
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
# @return [Merge::Accounting::TransactionLineItem]
def initialize(id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, memo: OMIT, unit_price: OMIT,
quantity: OMIT, item: OMIT, account: OMIT, tracking_category: OMIT, tracking_categories: OMIT, total_line_amount: OMIT, tax_rate: OMIT, currency: OMIT, exchange_rate: OMIT, company: OMIT, remote_was_deleted: OMIT, additional_properties: nil)
def initialize(tracking_categories:, id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, memo: OMIT, unit_price: OMIT,
quantity: OMIT, item: OMIT, account: OMIT, tracking_category: OMIT, total_line_amount: OMIT, tax_rate: OMIT, currency: OMIT, exchange_rate: OMIT, company: OMIT, remote_was_deleted: OMIT, additional_properties: nil)
@id = id if id != OMIT
@remote_id = remote_id if remote_id != OMIT
@created_at = created_at if created_at != OMIT
Expand All @@ -703,7 +703,7 @@ def initialize(id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, m
@item = item if item != OMIT
@account = account if account != OMIT
@tracking_category = tracking_category if tracking_category != OMIT
@tracking_categories = tracking_categories if tracking_categories != OMIT
@tracking_categories = tracking_categories
@total_line_amount = total_line_amount if total_line_amount != OMIT
@tax_rate = tax_rate if tax_rate != OMIT
@currency = currency if currency != OMIT
Expand Down Expand Up @@ -809,7 +809,7 @@ def self.validate_raw(obj:)
obj.item.nil? || Merge::Accounting::TransactionLineItemItem.validate_raw(obj: obj.item)
obj.account&.is_a?(String) != false || raise("Passed value for field obj.account is not the expected type, validation failed.")
obj.tracking_category&.is_a?(String) != false || raise("Passed value for field obj.tracking_category is not the expected type, validation failed.")
obj.tracking_categories&.is_a?(Array) != false || raise("Passed value for field obj.tracking_categories is not the expected type, validation failed.")
obj.tracking_categories.is_a?(Array) != false || raise("Passed value for field obj.tracking_categories is not the expected type, validation failed.")
obj.total_line_amount&.is_a?(String) != false || raise("Passed value for field obj.total_line_amount is not the expected type, validation failed.")
obj.tax_rate&.is_a?(String) != false || raise("Passed value for field obj.tax_rate is not the expected type, validation failed.")
obj.currency&.is_a?(Merge::Accounting::CurrencyEnum) != false || raise("Passed value for field obj.currency is not the expected type, validation failed.")
Expand Down
8 changes: 4 additions & 4 deletions lib/merge_ruby_client/accounting/types/vendor_credit_line.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ class VendorCreditLine
# platform.
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
# @return [Merge::Accounting::VendorCreditLine]
def initialize(id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, net_amount: OMIT,
tracking_category: OMIT, tracking_categories: OMIT, description: OMIT, account: OMIT, company: OMIT, exchange_rate: OMIT, remote_was_deleted: OMIT, additional_properties: nil)
def initialize(tracking_categories:, id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, net_amount: OMIT,
tracking_category: OMIT, description: OMIT, account: OMIT, company: OMIT, exchange_rate: OMIT, remote_was_deleted: OMIT, additional_properties: nil)
@id = id if id != OMIT
@remote_id = remote_id if remote_id != OMIT
@created_at = created_at if created_at != OMIT
@modified_at = modified_at if modified_at != OMIT
@net_amount = net_amount if net_amount != OMIT
@tracking_category = tracking_category if tracking_category != OMIT
@tracking_categories = tracking_categories if tracking_categories != OMIT
@tracking_categories = tracking_categories
@description = description if description != OMIT
@account = account if account != OMIT
@company = company if company != OMIT
Expand Down Expand Up @@ -156,7 +156,7 @@ def self.validate_raw(obj:)
obj.modified_at&.is_a?(DateTime) != false || raise("Passed value for field obj.modified_at is not the expected type, validation failed.")
obj.net_amount&.is_a?(Float) != false || raise("Passed value for field obj.net_amount is not the expected type, validation failed.")
obj.tracking_category&.is_a?(String) != false || raise("Passed value for field obj.tracking_category is not the expected type, validation failed.")
obj.tracking_categories&.is_a?(Array) != false || raise("Passed value for field obj.tracking_categories is not the expected type, validation failed.")
obj.tracking_categories.is_a?(Array) != false || raise("Passed value for field obj.tracking_categories is not the expected type, validation failed.")
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
obj.account.nil? || Merge::Accounting::VendorCreditLineAccount.validate_raw(obj: obj.account)
obj.company&.is_a?(String) != false || raise("Passed value for field obj.company is not the expected type, validation failed.")
Expand Down
2 changes: 2 additions & 0 deletions lib/merge_ruby_client/ats/applications/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def list(candidate_id: nil, created_after: nil, created_before: nil, credited_to
# * :offers (Array<Merge::Ats::ApplicationRequestOffersItem>)
# * :source (String)
# * :credited_to (Hash)
# * :screening_question_answers (Array<Merge::Ats::ApplicationRequestScreeningQuestionAnswersItem>)
# * :current_stage (Hash)
# * :reject_reason (Hash)
# * :remote_template_id (String)
Expand Down Expand Up @@ -351,6 +352,7 @@ def list(candidate_id: nil, created_after: nil, created_before: nil, credited_to
# * :offers (Array<Merge::Ats::ApplicationRequestOffersItem>)
# * :source (String)
# * :credited_to (Hash)
# * :screening_question_answers (Array<Merge::Ats::ApplicationRequestScreeningQuestionAnswersItem>)
# * :current_stage (Hash)
# * :reject_reason (Hash)
# * :remote_template_id (String)
Expand Down
Loading

0 comments on commit bcb482b

Please sign in to comment.