%%%-----------------------------------------------------------------------------
%%% @copyright (C) 2010-2019, 2600Hz
%%% @doc Accessors for `port_requests' document.
%%% @end
%%%-----------------------------------------------------------------------------
-module(kzd_port_requests).

-export([new/0]).
-export([bill/1, bill/2, set_bill/2]).
-export([bill_account_number/1, bill_account_number/2, set_bill_account_number/2]).
-export([bill_btn/1, bill_btn/2, set_bill_btn/2]).
-export([bill_carrier/1, bill_carrier/2, set_bill_carrier/2]).
-export([bill_locality/1, bill_locality/2, set_bill_locality/2]).
-export([bill_name/1, bill_name/2, set_bill_name/2]).
-export([bill_pin/1, bill_pin/2, set_bill_pin/2]).
-export([bill_postal_code/1, bill_postal_code/2, set_bill_postal_code/2]).
-export([bill_region/1, bill_region/2, set_bill_region/2]).
-export([bill_street_address/1, bill_street_address/2, set_bill_street_address/2]).
-export([bill_street_number/1, bill_street_number/2, set_bill_street_number/2]).
-export([bill_street_post_dir/1, bill_street_post_dir/2, set_bill_street_post_dir/2]).
-export([bill_street_pre_dir/1, bill_street_pre_dir/2, set_bill_street_pre_dir/2]).
-export([bill_street_type/1, bill_street_type/2, set_bill_street_type/2]).
-export([comments/1, comments/2, set_comments/2]).
-export([name/1, name/2, set_name/2]).
-export([notifications/1, notifications/2, set_notifications/2]).
-export([notifications_email/1, notifications_email/2, set_notifications_email/2]).
-export([notifications_email_send_to/1, notifications_email_send_to/2, set_notifications_email_send_to/2]).
-export([numbers/1, numbers/2, set_numbers/2]).
-export([number/2, number/3, set_number/3]).
-export([reference_number/1, reference_number/2, set_reference_number/2]).
-export([signee_name/1, signee_name/2, set_signee_name/2]).
-export([signing_date/1, signing_date/2, set_signing_date/2]).
-export([transfer_date/1, transfer_date/2, set_transfer_date/2]).
-export([winning_carrier/1, winning_carrier/2, set_winning_carrier/2]).


-include("kz_documents.hrl").

-type doc() :: kz_json:object().
-export_type([doc/0]).

-define(SCHEMA, <<"port_requests">>).

-spec new() -> doc().
new() ->
    kz_json_schema:default_object(?SCHEMA).

-spec bill(doc()) -> kz_term:api_object().
bill(Doc) ->
    bill(Doc, 'undefined').

-spec bill(doc(), Default) -> kz_json:object() | Default.
bill(Doc, Default) ->
    kz_json:get_json_value([<<"bill">>], Doc, Default).

-spec set_bill(doc(), kz_json:object()) -> doc().
set_bill(Doc, Bill) ->
    kz_json:set_value([<<"bill">>], Bill, Doc).

-spec bill_account_number(doc()) -> kz_term:api_binary().
bill_account_number(Doc) ->
    bill_account_number(Doc, 'undefined').

-spec bill_account_number(doc(), Default) -> binary() | Default.
bill_account_number(Doc, Default) ->
    kz_json:get_binary_value([<<"bill">>, <<"account_number">>], Doc, Default).

-spec set_bill_account_number(doc(), binary()) -> doc().
set_bill_account_number(Doc, BillAccountNumber) ->
    kz_json:set_value([<<"bill">>, <<"account_number">>], BillAccountNumber, Doc).

-spec bill_btn(doc()) -> kz_term:api_binary().
bill_btn(Doc) ->
    bill_btn(Doc, 'undefined').

-spec bill_btn(doc(), Default) -> binary() | Default.
bill_btn(Doc, Default) ->
    kz_json:get_binary_value([<<"bill">>, <<"btn">>], Doc, Default).

-spec set_bill_btn(doc(), binary()) -> doc().
set_bill_btn(Doc, BillBtn) ->
    kz_json:set_value([<<"bill">>, <<"btn">>], BillBtn, Doc).

-spec bill_carrier(doc()) -> kz_term:api_binary().
bill_carrier(Doc) ->
    bill_carrier(Doc, 'undefined').

-spec bill_carrier(doc(), Default) -> binary() | Default.
bill_carrier(Doc, Default) ->
    kz_json:get_binary_value([<<"bill">>, <<"carrier">>], Doc, Default).

-spec set_bill_carrier(doc(), binary()) -> doc().
set_bill_carrier(Doc, BillCarrier) ->
    kz_json:set_value([<<"bill">>, <<"carrier">>], BillCarrier, Doc).

-spec bill_locality(doc()) -> kz_term:api_binary().
bill_locality(Doc) ->
    bill_locality(Doc, 'undefined').

-spec bill_locality(doc(), Default) -> binary() | Default.
bill_locality(Doc, Default) ->
    kz_json:get_binary_value([<<"bill">>, <<"locality">>], Doc, Default).

-spec set_bill_locality(doc(), binary()) -> doc().
set_bill_locality(Doc, BillLocality) ->
    kz_json:set_value([<<"bill">>, <<"locality">>], BillLocality, Doc).

-spec bill_name(doc()) -> kz_term:api_binary().
bill_name(Doc) ->
    bill_name(Doc, 'undefined').

-spec bill_name(doc(), Default) -> binary() | Default.
bill_name(Doc, Default) ->
    kz_json:get_binary_value([<<"bill">>, <<"name">>], Doc, Default).

-spec set_bill_name(doc(), binary()) -> doc().
set_bill_name(Doc, BillName) ->
    kz_json:set_value([<<"bill">>, <<"name">>], BillName, Doc).

-spec bill_pin(doc()) -> kz_term:api_binary().
bill_pin(Doc) ->
    bill_pin(Doc, 'undefined').

-spec bill_pin(doc(), Default) -> binary() | Default.
bill_pin(Doc, Default) ->
    kz_json:get_binary_value([<<"bill">>, <<"pin">>], Doc, Default).

-spec set_bill_pin(doc(), binary()) -> doc().
set_bill_pin(Doc, BillPin) ->
    kz_json:set_value([<<"bill">>, <<"pin">>], BillPin, Doc).

-spec bill_postal_code(doc()) -> kz_term:api_binary().
bill_postal_code(Doc) ->
    bill_postal_code(Doc, 'undefined').

-spec bill_postal_code(doc(), Default) -> binary() | Default.
bill_postal_code(Doc, Default) ->
    kz_json:get_binary_value([<<"bill">>, <<"postal_code">>], Doc, Default).

-spec set_bill_postal_code(doc(), binary()) -> doc().
set_bill_postal_code(Doc, BillPostalCode) ->
    kz_json:set_value([<<"bill">>, <<"postal_code">>], BillPostalCode, Doc).

-spec bill_region(doc()) -> kz_term:api_binary().
bill_region(Doc) ->
    bill_region(Doc, 'undefined').

-spec bill_region(doc(), Default) -> binary() | Default.
bill_region(Doc, Default) ->
    kz_json:get_binary_value([<<"bill">>, <<"region">>], Doc, Default).

-spec set_bill_region(doc(), binary()) -> doc().
set_bill_region(Doc, BillRegion) ->
    kz_json:set_value([<<"bill">>, <<"region">>], BillRegion, Doc).

-spec bill_street_address(doc()) -> kz_term:api_binary().
bill_street_address(Doc) ->
    bill_street_address(Doc, 'undefined').

-spec bill_street_address(doc(), Default) -> binary() | Default.
bill_street_address(Doc, Default) ->
    kz_json:get_binary_value([<<"bill">>, <<"street_address">>], Doc, Default).

-spec set_bill_street_address(doc(), binary()) -> doc().
set_bill_street_address(Doc, BillStreetAddress) ->
    kz_json:set_value([<<"bill">>, <<"street_address">>], BillStreetAddress, Doc).

-spec bill_street_number(doc()) -> kz_term:api_binary().
bill_street_number(Doc) ->
    bill_street_number(Doc, 'undefined').

-spec bill_street_number(doc(), Default) -> binary() | Default.
bill_street_number(Doc, Default) ->
    kz_json:get_binary_value([<<"bill">>, <<"street_number">>], Doc, Default).

-spec set_bill_street_number(doc(), binary()) -> doc().
set_bill_street_number(Doc, BillStreetNumber) ->
    kz_json:set_value([<<"bill">>, <<"street_number">>], BillStreetNumber, Doc).

-spec bill_street_post_dir(doc()) -> kz_term:api_binary().
bill_street_post_dir(Doc) ->
    bill_street_post_dir(Doc, 'undefined').

-spec bill_street_post_dir(doc(), Default) -> binary() | Default.
bill_street_post_dir(Doc, Default) ->
    kz_json:get_binary_value([<<"bill">>, <<"street_post_dir">>], Doc, Default).

-spec set_bill_street_post_dir(doc(), binary()) -> doc().
set_bill_street_post_dir(Doc, BillStreetPostDir) ->
    kz_json:set_value([<<"bill">>, <<"street_post_dir">>], BillStreetPostDir, Doc).

-spec bill_street_pre_dir(doc()) -> kz_term:api_binary().
bill_street_pre_dir(Doc) ->
    bill_street_pre_dir(Doc, 'undefined').

-spec bill_street_pre_dir(doc(), Default) -> binary() | Default.
bill_street_pre_dir(Doc, Default) ->
    kz_json:get_binary_value([<<"bill">>, <<"street_pre_dir">>], Doc, Default).

-spec set_bill_street_pre_dir(doc(), binary()) -> doc().
set_bill_street_pre_dir(Doc, BillStreetPreDir) ->
    kz_json:set_value([<<"bill">>, <<"street_pre_dir">>], BillStreetPreDir, Doc).

-spec bill_street_type(doc()) -> kz_term:api_binary().
bill_street_type(Doc) ->
    bill_street_type(Doc, 'undefined').

-spec bill_street_type(doc(), Default) -> binary() | Default.
bill_street_type(Doc, Default) ->
    kz_json:get_binary_value([<<"bill">>, <<"street_type">>], Doc, Default).

-spec set_bill_street_type(doc(), binary()) -> doc().
set_bill_street_type(Doc, BillStreetType) ->
    kz_json:set_value([<<"bill">>, <<"street_type">>], BillStreetType, Doc).

-spec comments(doc()) -> kz_term:api_objects().
comments(Doc) ->
    comments(Doc, 'undefined').

-spec comments(doc(), Default) -> kz_json:objects() | Default.
comments(Doc, Default) ->
    kz_json:get_list_value([<<"comments">>], Doc, Default).

-spec set_comments(doc(), kz_json:objects()) -> doc().
set_comments(Doc, Comments) ->
    kz_json:set_value([<<"comments">>], Comments, Doc).

-spec name(doc()) -> kz_term:api_ne_binary().
name(Doc) ->
    name(Doc, 'undefined').

-spec name(doc(), Default) -> kz_term:ne_binary() | Default.
name(Doc, Default) ->
    kz_json:get_ne_binary_value([<<"name">>], Doc, Default).

-spec set_name(doc(), kz_term:ne_binary()) -> doc().
set_name(Doc, Name) ->
    kz_json:set_value([<<"name">>], Name, Doc).

-spec notifications(doc()) -> kz_term:api_object().
notifications(Doc) ->
    notifications(Doc, 'undefined').

-spec notifications(doc(), Default) -> kz_json:object() | Default.
notifications(Doc, Default) ->
    kz_json:get_json_value([<<"notifications">>], Doc, Default).

-spec set_notifications(doc(), kz_json:object()) -> doc().
set_notifications(Doc, Notifications) ->
    kz_json:set_value([<<"notifications">>], Notifications, Doc).

-spec notifications_email(doc()) -> kz_term:api_object().
notifications_email(Doc) ->
    notifications_email(Doc, 'undefined').

-spec notifications_email(doc(), Default) -> kz_json:object() | Default.
notifications_email(Doc, Default) ->
    kz_json:get_json_value([<<"notifications">>, <<"email">>], Doc, Default).

-spec set_notifications_email(doc(), kz_json:object()) -> doc().
set_notifications_email(Doc, NotificationsEmail) ->
    kz_json:set_value([<<"notifications">>, <<"email">>], NotificationsEmail, Doc).

-spec notifications_email_send_to(doc()) -> any().
notifications_email_send_to(Doc) ->
    notifications_email_send_to(Doc, 'undefined').

-spec notifications_email_send_to(doc(), Default) -> any() | Default.
notifications_email_send_to(Doc, Default) ->
    kz_json:get_value([<<"notifications">>, <<"email">>, <<"send_to">>], Doc, Default).

-spec set_notifications_email_send_to(doc(), any()) -> doc().
set_notifications_email_send_to(Doc, NotificationsEmailSendTo) ->
    kz_json:set_value([<<"notifications">>, <<"email">>, <<"send_to">>], NotificationsEmailSendTo, Doc).

-spec numbers(doc()) -> kz_term:api_object().
numbers(Doc) ->
    numbers(Doc, 'undefined').

-spec numbers(doc(), Default) -> kz_json:object() | Default.
numbers(Doc, Default) ->
    kz_json:get_json_value([<<"numbers">>], Doc, Default).

-spec set_numbers(doc(), kz_json:object()) -> doc().
set_numbers(Doc, Numbers) ->
    kz_json:set_value([<<"numbers">>], Numbers, Doc).

-spec number(doc(), kz_json:key()) -> kz_term:api_object().
number(Doc, Number) ->
    number(Doc, Number, 'undefined').

-spec number(doc(), kz_json:key(), Default) -> kz_json:object() | Default.
number(Doc, Number, Default) ->
    kz_json:get_json_value([<<"numbers">>, Number], Doc, Default).

-spec set_number(doc(), kz_json:key(), kz_json:object()) -> doc().
set_number(Doc, Number, Value) ->
    kz_json:set_value([<<"numbers">>, Number], Value, Doc).

-spec reference_number(doc()) -> kz_term:api_binary().
reference_number(Doc) ->
    reference_number(Doc, 'undefined').

-spec reference_number(doc(), Default) -> binary() | Default.
reference_number(Doc, Default) ->
    kz_json:get_binary_value([<<"reference_number">>], Doc, Default).

-spec set_reference_number(doc(), binary()) -> doc().
set_reference_number(Doc, ReferenceNumber) ->
    kz_json:set_value([<<"reference_number">>], ReferenceNumber, Doc).

-spec signee_name(doc()) -> kz_term:api_binary().
signee_name(Doc) ->
    signee_name(Doc, 'undefined').

-spec signee_name(doc(), Default) -> binary() | Default.
signee_name(Doc, Default) ->
    kz_json:get_binary_value([<<"signee_name">>], Doc, Default).

-spec set_signee_name(doc(), binary()) -> doc().
set_signee_name(Doc, SigneeName) ->
    kz_json:set_value([<<"signee_name">>], SigneeName, Doc).

-spec signing_date(doc()) -> kz_term:api_integer().
signing_date(Doc) ->
    signing_date(Doc, 'undefined').

-spec signing_date(doc(), Default) -> integer() | Default.
signing_date(Doc, Default) ->
    kz_json:get_integer_value([<<"signing_date">>], Doc, Default).

-spec set_signing_date(doc(), integer()) -> doc().
set_signing_date(Doc, SigningDate) ->
    kz_json:set_value([<<"signing_date">>], SigningDate, Doc).

-spec transfer_date(doc()) -> kz_term:api_integer().
transfer_date(Doc) ->
    transfer_date(Doc, 'undefined').

-spec transfer_date(doc(), Default) -> integer() | Default.
transfer_date(Doc, Default) ->
    kz_json:get_integer_value([<<"transfer_date">>], Doc, Default).

-spec set_transfer_date(doc(), integer()) -> doc().
set_transfer_date(Doc, TransferDate) ->
    kz_json:set_value([<<"transfer_date">>], TransferDate, Doc).

-spec winning_carrier(doc()) -> kz_term:api_binary().
winning_carrier(Doc) ->
    winning_carrier(Doc, 'undefined').

-spec winning_carrier(doc(), Default) -> binary() | Default.
winning_carrier(Doc, Default) ->
    kz_json:get_binary_value([<<"winning_carrier">>], Doc, Default).

-spec set_winning_carrier(doc(), binary()) -> doc().
set_winning_carrier(Doc, WinningCarrier) ->
    kz_json:set_value([<<"winning_carrier">>], WinningCarrier, Doc).
