Class: GenesisRuby::Api::Requests::NonFinancial::Payee::Create

Inherits:
Base::Versioned show all
Defined in:
lib/genesis_ruby/api/requests/non_financial/payee/create.rb

Overview

Create a Payee record.

Constant Summary collapse

PAYEE_TYPE_PERSON =
'person'
PAYEE_TYPE_COMPANY =
'company'

Constants inherited from GenesisRuby::Api::Request

GenesisRuby::Api::Request::AUTH_TYPE_BASIC, GenesisRuby::Api::Request::AUTH_TYPE_TOKEN, GenesisRuby::Api::Request::METHOD_DELETE, GenesisRuby::Api::Request::METHOD_GET, GenesisRuby::Api::Request::METHOD_PATCH, GenesisRuby::Api::Request::METHOD_POST, GenesisRuby::Api::Request::METHOD_PUT, GenesisRuby::Api::Request::PORT_HTTPS, GenesisRuby::Api::Request::PROTOCOL_HTTPS

Instance Attribute Summary collapse

Attributes inherited from Base::Versioned

#allowed_versions, #version

Attributes inherited from GenesisRuby::Api::Request

#api_config

Instance Method Summary collapse

Methods inherited from GenesisRuby::Api::Request

#build_document

Constructor Details

#initialize(configuration, _builder_interface = nil) ⇒ Create

Create Payee initialization



29
30
31
32
33
# File 'lib/genesis_ruby/api/requests/non_financial/payee/create.rb', line 29

def initialize(configuration, _builder_interface = nil)
  super configuration

  self.request_path = 'payee'
end

Instance Attribute Details

#payee_address_cityObject

Returns the value of attribute payee_address_city.



14
15
16
# File 'lib/genesis_ruby/api/requests/non_financial/payee/create.rb', line 14

def payee_address_city
  @payee_address_city
end

#payee_address_countryObject

Returns the value of attribute payee_address_country.



14
15
16
# File 'lib/genesis_ruby/api/requests/non_financial/payee/create.rb', line 14

def payee_address_country
  @payee_address_country
end

#payee_address_stateObject

Returns the value of attribute payee_address_state.



14
15
16
# File 'lib/genesis_ruby/api/requests/non_financial/payee/create.rb', line 14

def payee_address_state
  @payee_address_state
end

#payee_address_streetObject

Returns the value of attribute payee_address_street.



14
15
16
# File 'lib/genesis_ruby/api/requests/non_financial/payee/create.rb', line 14

def payee_address_street
  @payee_address_street
end

#payee_address_zip_codeObject

Returns the value of attribute payee_address_zip_code.



14
15
16
# File 'lib/genesis_ruby/api/requests/non_financial/payee/create.rb', line 14

def payee_address_zip_code
  @payee_address_zip_code
end

#payee_countryObject

Returns the value of attribute payee_country.



14
15
16
# File 'lib/genesis_ruby/api/requests/non_financial/payee/create.rb', line 14

def payee_country
  @payee_country
end

#payee_nameObject

Returns the value of attribute payee_name.



14
15
16
# File 'lib/genesis_ruby/api/requests/non_financial/payee/create.rb', line 14

def payee_name
  @payee_name
end

#payee_notification_urlObject

Returns the value of attribute payee_notification_url.



14
15
16
# File 'lib/genesis_ruby/api/requests/non_financial/payee/create.rb', line 14

def payee_notification_url
  @payee_notification_url
end

#payee_registration_numberObject

Returns the value of attribute payee_registration_number.



14
15
16
# File 'lib/genesis_ruby/api/requests/non_financial/payee/create.rb', line 14

def payee_registration_number
  @payee_registration_number
end

#payee_typeObject

Returns the value of attribute payee_type.



14
15
16
# File 'lib/genesis_ruby/api/requests/non_financial/payee/create.rb', line 14

def payee_type
  @payee_type
end

Instance Method Details

#payee_dateObject

Payee date getter formatted as YYYY-MM-DD



19
20
21
# File 'lib/genesis_ruby/api/requests/non_financial/payee/create.rb', line 19

def payee_date
  @payee_date&.strftime GenesisRuby::Api::Constants::DateTimeFormats::YYYY_MM_DD_ISO_8601
end

#payee_date=(value) ⇒ Object

Payee date setter with date validation



24
25
26
# File 'lib/genesis_ruby/api/requests/non_financial/payee/create.rb', line 24

def payee_date=(value)
  parse_date attribute: __method__, value: value, allow_empty: true
end