From 985e9a455ffb830010dc395d13e6303f26b97741 Mon Sep 17 00:00:00 2001 From: Ricardo Murad Date: Tue, 3 Jan 2023 16:34:35 -0300 Subject: [PATCH 1/5] - Update `can_approve` and `is_paid_manually` to required to match Tipalti specification - Fix broken documentation url --- lib/tipalti/api/payer.ex | 10 +++++----- test/requests/create_or_update_invoices_custom_req.xml | 2 ++ test/requests/create_or_update_invoices_req.xml | 2 ++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/tipalti/api/payer.ex b/lib/tipalti/api/payer.ex index 8129432..79d2bcf 100644 --- a/lib/tipalti/api/payer.ex +++ b/lib/tipalti/api/payer.ex @@ -84,8 +84,8 @@ defmodule Tipalti.API.Payer do required(:date) => String.t(), required(:idap) => Tipalti.idap(), required(:subject) => String.t(), - optional(:can_approve) => boolean(), - optional(:is_paid_manually) => boolean(), + required(:can_approve) => boolean(), + required(:is_paid_manually) => boolean(), optional(:ap_account_number) => String.t(), optional(:approvers) => [invoice_approver()], optional(:currency) => String.t(), @@ -107,7 +107,7 @@ defmodule Tipalti.API.Payer do Returns a list of invoice responses for each invoice, indicating if it succeeded and what the errors were if it didn't. - See for details. + See for details. ## Parameters @@ -155,7 +155,7 @@ defmodule Tipalti.API.Payer do ## Examples - iex> create_or_update_invoices([%{idap: "somepayee", ref_code: "testinvoice1", due_date: "2018-05-01", date: "2018-06-01", subject: "test invoice 1", currency: "USD", line_items: [%{amount: "100.00", description: "test line item"}]}, %{idap: "somepayee", ref_code: "testinvoice2", due_date: "2018-06-01", date: "2018-05-01", subject: "test invoice 2", currency: "USD", line_items: [%{amount: "100.00", description: "test line item"}]}]) + iex> create_or_update_invoices([%{idap: "somepayee", can_approve: false, is_paid_manually: false, ref_code: "testinvoice1", due_date: "2018-05-01", date: "2018-06-01", subject: "test invoice 1", currency: "USD", line_items: [%{amount: "100.00", description: "test line item"}]}, %{idap: "somepayee", ref_code: "testinvoice2", due_date: "2018-06-01", date: "2018-05-01", subject: "test invoice 2", currency: "USD", line_items: [%{amount: "100.00", description: "test line item"}]}]) {:ok, [ %{ @@ -173,7 +173,7 @@ defmodule Tipalti.API.Payer do iex> custom_fields = [%{key: "foo", value: "bar"}] ...> line_items = [%{amount: "100.00", description: "test line item", custom_fields: custom_fields}] ...> approvers = [%{name: "Mr. Approver", email: "approver@example.com", order: 1}] - ...> invoice = %{idap: "somepayee", ref_code: "testinvoice", due_date: "2018-06-01", date: "2018-05-01", subject: "test invoice", currency: "USD", line_items: line_items, custom_fields: custom_fields, approvers: approvers} + ...> invoice = %{idap: "somepayee", can_approve: false, is_paid_manually: false, ref_code: "testinvoice", due_date: "2018-06-01", date: "2018-05-01", subject: "test invoice", currency: "USD", line_items: line_items, custom_fields: custom_fields, approvers: approvers} ...> create_or_update_invoices([invoice]) {:ok, [%{error_message: nil, ref_code: "testinvoice", succeeded: true}]} """ diff --git a/test/requests/create_or_update_invoices_custom_req.xml b/test/requests/create_or_update_invoices_custom_req.xml index 8d3ae95..696b620 100644 --- a/test/requests/create_or_update_invoices_custom_req.xml +++ b/test/requests/create_or_update_invoices_custom_req.xml @@ -23,12 +23,14 @@ + false foo bar + false USD diff --git a/test/requests/create_or_update_invoices_req.xml b/test/requests/create_or_update_invoices_req.xml index 41ea3f7..d42b47c 100644 --- a/test/requests/create_or_update_invoices_req.xml +++ b/test/requests/create_or_update_invoices_req.xml @@ -17,6 +17,8 @@ test line item + false + false USD test invoice 1 From a8a1e19faadd4e7818edd65e27e411271a992862 Mon Sep 17 00:00:00 2001 From: Ricardo Murad Date: Mon, 16 Jan 2023 13:17:09 -0300 Subject: [PATCH 2/5] Update Changelog.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa7a61f..3f858a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased][] +### Fixed + +- Make `can_approve` and `is_paid_manually` fields from Payer API required to match Tipalti specification + +### Updated +- Updates on Tipalti documentation urls ## [0.9.0][] - 2021-05-20 ### Updated From 47eba3cce53a57fa75d8e5674e04adc92b8a2c37 Mon Sep 17 00:00:00 2001 From: Jesse Van Volkinburg <42327429+vanvoljg@users.noreply.github.com> Date: Wed, 25 Jan 2023 10:36:06 -0800 Subject: [PATCH 3/5] Update CHANGELOG.md --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f858a3..579a235 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased][] + +- No changes + +## [0.10.0][] + ### Fixed - Make `can_approve` and `is_paid_manually` fields from Payer API required to match Tipalti specification @@ -127,7 +132,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Initial release -[Unreleased]: https://github.com/peek-travel/tipalti-elixir/compare/0.9.0...HEAD +[Unreleased]: https://github.com/peek-travel/tipalti-elixir/compare/0.10.0...HEAD + +[0.10.0]: https://github.com/peek-travel/tipalti-elixir/compare/0.9.0...0.10.0 [0.9.0]: https://github.com/peek-travel/tipalti-elixir/compare/0.8.6...0.9.0 From 8525a1024776f697470572fe4fe58abcc1f2d434 Mon Sep 17 00:00:00 2001 From: Jesse Van Volkinburg <42327429+vanvoljg@users.noreply.github.com> Date: Wed, 25 Jan 2023 10:37:11 -0800 Subject: [PATCH 4/5] v0.10.0 --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index c4e54b2..7aca93b 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Tipalti.MixProject do use Mix.Project - @version "0.9.0" + @version "0.10.0" def project do [ From 129d8a4e661e55fbc75f9569a6c1fb59005219af Mon Sep 17 00:00:00 2001 From: Jesse Van Volkinburg <42327429+vanvoljg@users.noreply.github.com> Date: Wed, 25 Jan 2023 10:40:41 -0800 Subject: [PATCH 5/5] Remove sourcelevel badge --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 9a892d3..fcac6ee 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ [![CI Status](https://github.com/peek-travel/tipalti-elixir/workflows/CI/badge.svg)](https://github.com/peek-travel/tipalti-elixir/actions) [![codecov](https://codecov.io/gh/peek-travel/tipalti-elixir/branch/master/graph/badge.svg)](https://codecov.io/gh/peek-travel/tipalti-elixir) -[![SourceLevel](https://app.sourcelevel.io/github/peek-travel/tipalti-elixir.svg)](https://app.sourcelevel.io/github/peek-travel/tipalti-elixir) [![Hex.pm Version](https://img.shields.io/hexpm/v/tipalti.svg?style=flat)](https://hex.pm/packages/tipalti) [![Inline docs](http://inch-ci.org/github/peek-travel/tipalti-elixir.svg)](http://inch-ci.org/github/peek-travel/tipalti-elixir) [![License](https://img.shields.io/hexpm/l/tipalti.svg)](LICENSE.md)