mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 05:26:17 +02:00
23 lines
639 B
Ruby
23 lines
639 B
Ruby
module EisBilling
|
|
class SendDataToDirecto < EisBilling::Base
|
|
def self.send_request(object_data:, monthly: false, dry: false)
|
|
send_info(object_data: object_data, monthly: monthly, dry: dry)
|
|
end
|
|
|
|
def self.send_info(object_data:, monthly:, dry:)
|
|
prepared_data = {
|
|
invoice_data: object_data,
|
|
monthly: monthly,
|
|
dry: dry,
|
|
initiator: INITIATOR,
|
|
}
|
|
|
|
http = EisBilling::Base.base_request(url: directo_url)
|
|
http.post(directo_url, prepared_data.to_json, EisBilling::Base.headers)
|
|
end
|
|
|
|
def self.directo_url
|
|
"#{BASE_URL}/api/v1/directo/directo"
|
|
end
|
|
end
|
|
end
|