Class: Merge::Accounting::AddressRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/merge_ruby_client/accounting/types/address_request.rb

Overview

# The Address Object

### Description
The `Address` object is used to represent a contact's or company's address.
### Usage Example
Fetch from the `GET CompanyInfo` endpoint and view the company's addresses.

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type: OMIT, street_1: OMIT, street_2: OMIT, city: OMIT, country_subdivision: OMIT, country: OMIT, zip_code: OMIT, integration_params: OMIT, linked_account_params: OMIT, additional_properties: nil) ⇒ Merge::Accounting::AddressRequest

Parameters:

  • type (Merge::Accounting::AddressTypeEnum) (defaults to: OMIT)

    The address type.

    • ‘BILLING` - BILLING

    • ‘SHIPPING` - SHIPPING

  • street_1 (String) (defaults to: OMIT)

    Line 1 of the address’s street.

  • street_2 (String) (defaults to: OMIT)

    Line 2 of the address’s street.

  • city (String) (defaults to: OMIT)

    The address’s city.

  • country_subdivision (String) (defaults to: OMIT)

    The address’s state or region.

  • country (Merge::Accounting::CountryEnum) (defaults to: OMIT)

    The address’s country.

    • ‘AF` - Afghanistan

    • ‘AX` - Åland Islands

    • ‘AL` - Albania

    • ‘DZ` - Algeria

    • ‘AS` - American Samoa

    • ‘AD` - Andorra

    • ‘AO` - Angola

    • ‘AI` - Anguilla

    • ‘AQ` - Antarctica

    • ‘AG` - Antigua and Barbuda

    • ‘AR` - Argentina

    • ‘AM` - Armenia

    • ‘AW` - Aruba

    • ‘AU` - Australia

    • ‘AT` - Austria

    • ‘AZ` - Azerbaijan

    • ‘BS` - Bahamas

    • ‘BH` - Bahrain

    • ‘BD` - Bangladesh

    • ‘BB` - Barbados

    • ‘BY` - Belarus

    • ‘BE` - Belgium

    • ‘BZ` - Belize

    • ‘BJ` - Benin

    • ‘BM` - Bermuda

    • ‘BT` - Bhutan

    • ‘BO` - Bolivia

    • ‘BQ` - Bonaire, Sint Eustatius and Saba

    • ‘BA` - Bosnia and Herzegovina

    • ‘BW` - Botswana

    • ‘BV` - Bouvet Island

    • ‘BR` - Brazil

    • ‘IO` - British Indian Ocean Territory

    • ‘BN` - Brunei

    • ‘BG` - Bulgaria

    • ‘BF` - Burkina Faso

    • ‘BI` - Burundi

    • ‘CV` - Cabo Verde

    • ‘KH` - Cambodia

    • ‘CM` - Cameroon

    • ‘CA` - Canada

    • ‘KY` - Cayman Islands

    • ‘CF` - Central African Republic

    • ‘TD` - Chad

    • ‘CL` - Chile

    • ‘CN` - China

    • ‘CX` - Christmas Island

    • ‘CC` - Cocos (Keeling) Islands

    • ‘CO` - Colombia

    • ‘KM` - Comoros

    • ‘CG` - Congo

    • ‘CD` - Congo (the Democratic Republic of the)

    • ‘CK` - Cook Islands

    • ‘CR` - Costa Rica

    • ‘CI` - Côte d’Ivoire

    • ‘HR` - Croatia

    • ‘CU` - Cuba

    • ‘CW` - Curaçao

    • ‘CY` - Cyprus

    • ‘CZ` - Czechia

    • ‘DK` - Denmark

    • ‘DJ` - Djibouti

    • ‘DM` - Dominica

    • ‘DO` - Dominican Republic

    • ‘EC` - Ecuador

    • ‘EG` - Egypt

    • ‘SV` - El Salvador

    • ‘GQ` - Equatorial Guinea

    • ‘ER` - Eritrea

    • ‘EE` - Estonia

    • ‘SZ` - Eswatini

    • ‘ET` - Ethiopia

    • ‘FK` - Falkland Islands (Malvinas)

    • ‘FO` - Faroe Islands

    • ‘FJ` - Fiji

    • ‘FI` - Finland

    • ‘FR` - France

    • ‘GF` - French Guiana

    • ‘PF` - French Polynesia

    • ‘TF` - French Southern Territories

    • ‘GA` - Gabon

    • ‘GM` - Gambia

    • ‘GE` - Georgia

    • ‘DE` - Germany

    • ‘GH` - Ghana

    • ‘GI` - Gibraltar

    • ‘GR` - Greece

    • ‘GL` - Greenland

    • ‘GD` - Grenada

    • ‘GP` - Guadeloupe

    • ‘GU` - Guam

    • ‘GT` - Guatemala

    • ‘GG` - Guernsey

    • ‘GN` - Guinea

    • ‘GW` - Guinea-Bissau

    • ‘GY` - Guyana

    • ‘HT` - Haiti

    • ‘HM` - Heard Island and McDonald Islands

    • ‘VA` - Holy See

    • ‘HN` - Honduras

    • ‘HK` - Hong Kong

    • ‘HU` - Hungary

    • ‘IS` - Iceland

    • ‘IN` - India

    • ‘ID` - Indonesia

    • ‘IR` - Iran

    • ‘IQ` - Iraq

    • ‘IE` - Ireland

    • ‘IM` - Isle of Man

    • ‘IL` - Israel

    • ‘IT` - Italy

    • ‘JM` - Jamaica

    • ‘JP` - Japan

    • ‘JE` - Jersey

    • ‘JO` - Jordan

    • ‘KZ` - Kazakhstan

    • ‘KE` - Kenya

    • ‘KI` - Kiribati

    • ‘KW` - Kuwait

    • ‘KG` - Kyrgyzstan

    • ‘LA` - Laos

    • ‘LV` - Latvia

    • ‘LB` - Lebanon

    • ‘LS` - Lesotho

    • ‘LR` - Liberia

    • ‘LY` - Libya

    • ‘LI` - Liechtenstein

    • ‘LT` - Lithuania

    • ‘LU` - Luxembourg

    • ‘MO` - Macao

    • ‘MG` - Madagascar

    • ‘MW` - Malawi

    • ‘MY` - Malaysia

    • ‘MV` - Maldives

    • ‘ML` - Mali

    • ‘MT` - Malta

    • ‘MH` - Marshall Islands

    • ‘MQ` - Martinique

    • ‘MR` - Mauritania

    • ‘MU` - Mauritius

    • ‘YT` - Mayotte

    • ‘MX` - Mexico

    • ‘FM` - Micronesia (Federated States of)

    • ‘MD` - Moldova

    • ‘MC` - Monaco

    • ‘MN` - Mongolia

    • ‘ME` - Montenegro

    • ‘MS` - Montserrat

    • ‘MA` - Morocco

    • ‘MZ` - Mozambique

    • ‘MM` - Myanmar

    • ‘NA` - Namibia

    • ‘NR` - Nauru

    • ‘NP` - Nepal

    • ‘NL` - Netherlands

    • ‘NC` - New Caledonia

    • ‘NZ` - New Zealand

    • ‘NI` - Nicaragua

    • ‘NE` - Niger

    • ‘NG` - Nigeria

    • ‘NU` - Niue

    • ‘NF` - Norfolk Island

    • ‘KP` - North Korea

    • ‘MK` - North Macedonia

    • ‘MP` - Northern Mariana Islands

    • ‘NO` - Norway

    • ‘OM` - Oman

    • ‘PK` - Pakistan

    • ‘PW` - Palau

    • ‘PS` - Palestine, State of

    • ‘PA` - Panama

    • ‘PG` - Papua New Guinea

    • ‘PY` - Paraguay

    • ‘PE` - Peru

    • ‘PH` - Philippines

    • ‘PN` - Pitcairn

    • ‘PL` - Poland

    • ‘PT` - Portugal

    • ‘PR` - Puerto Rico

    • ‘QA` - Qatar

    • ‘RE` - Réunion

    • ‘RO` - Romania

    • ‘RU` - Russia

    • ‘RW` - Rwanda

    • ‘BL` - Saint Barthélemy

    • ‘SH` - Saint Helena, Ascension and Tristan da Cunha

    • ‘KN` - Saint Kitts and Nevis

    • ‘LC` - Saint Lucia

    • ‘MF` - Saint Martin (French part)

    • ‘PM` - Saint Pierre and Miquelon

    • ‘VC` - Saint Vincent and the Grenadines

    • ‘WS` - Samoa

    • ‘SM` - San Marino

    • ‘ST` - Sao Tome and Principe

    • ‘SA` - Saudi Arabia

    • ‘SN` - Senegal

    • ‘RS` - Serbia

    • ‘SC` - Seychelles

    • ‘SL` - Sierra Leone

    • ‘SG` - Singapore

    • ‘SX` - Sint Maarten (Dutch part)

    • ‘SK` - Slovakia

    • ‘SI` - Slovenia

    • ‘SB` - Solomon Islands

    • ‘SO` - Somalia

    • ‘ZA` - South Africa

    • ‘GS` - South Georgia and the South Sandwich Islands

    • ‘KR` - South Korea

    • ‘SS` - South Sudan

    • ‘ES` - Spain

    • ‘LK` - Sri Lanka

    • ‘SD` - Sudan

    • ‘SR` - Suriname

    • ‘SJ` - Svalbard and Jan Mayen

    • ‘SE` - Sweden

    • ‘CH` - Switzerland

    • ‘SY` - Syria

    • ‘TW` - Taiwan

    • ‘TJ` - Tajikistan

    • ‘TZ` - Tanzania

    • ‘TH` - Thailand

    • ‘TL` - Timor-Leste

    • ‘TG` - Togo

    • ‘TK` - Tokelau

    • ‘TO` - Tonga

    • ‘TT` - Trinidad and Tobago

    • ‘TN` - Tunisia

    • ‘TR` - Turkey

    • ‘TM` - Turkmenistan

    • ‘TC` - Turks and Caicos Islands

    • ‘TV` - Tuvalu

    • ‘UG` - Uganda

    • ‘UA` - Ukraine

    • ‘AE` - United Arab Emirates

    • ‘GB` - United Kingdom

    • ‘UM` - United States Minor Outlying Islands

    • ‘US` - United States of America

    • ‘UY` - Uruguay

    • ‘UZ` - Uzbekistan

    • ‘VU` - Vanuatu

    • ‘VE` - Venezuela

    • ‘VN` - Vietnam

    • ‘VG` - Virgin Islands (British)

    • ‘VI` - Virgin Islands (U.S.)

    • ‘WF` - Wallis and Futuna

    • ‘EH` - Western Sahara

    • ‘YE` - Yemen

    • ‘ZM` - Zambia

    • ‘ZW` - Zimbabwe

  • zip_code (String) (defaults to: OMIT)

    The address’s zip code.

  • integration_params (Hash{String => Object}) (defaults to: OMIT)
  • linked_account_params (Hash{String => Object}) (defaults to: OMIT)
  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
# File 'lib/merge_ruby_client/accounting/types/address_request.rb', line 555

def initialize(type: OMIT, street_1: OMIT, street_2: OMIT, city: OMIT, country_subdivision: OMIT, country: OMIT,
               zip_code: OMIT, integration_params: OMIT, linked_account_params: OMIT, additional_properties: nil)
  @type = type if type != OMIT
  @street_1 = street_1 if street_1 != OMIT
  @street_2 = street_2 if street_2 != OMIT
  @city = city if city != OMIT
  @country_subdivision = country_subdivision if country_subdivision != OMIT
  @country = country if country != OMIT
  @zip_code = zip_code if zip_code != OMIT
  @integration_params = integration_params if integration_params != OMIT
  @linked_account_params =  if  != OMIT
  @additional_properties = additional_properties
  @_field_set = {
    "type": type,
    "street_1": street_1,
    "street_2": street_2,
    "city": city,
    "country_subdivision": country_subdivision,
    "country": country,
    "zip_code": zip_code,
    "integration_params": integration_params,
    "linked_account_params": 
  }.reject do |_k, v|
    v == OMIT
  end
end

Instance Attribute Details

#additional_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



286
287
288
# File 'lib/merge_ruby_client/accounting/types/address_request.rb', line 286

def additional_properties
  @additional_properties
end

#cityString (readonly)

Returns The address’s city.

Returns:

  • (String)

    The address’s city.



25
26
27
# File 'lib/merge_ruby_client/accounting/types/address_request.rb', line 25

def city
  @city
end

#countryMerge::Accounting::CountryEnum (readonly)

Returns The address’s country.

  • ‘AF` - Afghanistan

  • ‘AX` - Åland Islands

  • ‘AL` - Albania

  • ‘DZ` - Algeria

  • ‘AS` - American Samoa

  • ‘AD` - Andorra

  • ‘AO` - Angola

  • ‘AI` - Anguilla

  • ‘AQ` - Antarctica

  • ‘AG` - Antigua and Barbuda

  • ‘AR` - Argentina

  • ‘AM` - Armenia

  • ‘AW` - Aruba

  • ‘AU` - Australia

  • ‘AT` - Austria

  • ‘AZ` - Azerbaijan

  • ‘BS` - Bahamas

  • ‘BH` - Bahrain

  • ‘BD` - Bangladesh

  • ‘BB` - Barbados

  • ‘BY` - Belarus

  • ‘BE` - Belgium

  • ‘BZ` - Belize

  • ‘BJ` - Benin

  • ‘BM` - Bermuda

  • ‘BT` - Bhutan

  • ‘BO` - Bolivia

  • ‘BQ` - Bonaire, Sint Eustatius and Saba

  • ‘BA` - Bosnia and Herzegovina

  • ‘BW` - Botswana

  • ‘BV` - Bouvet Island

  • ‘BR` - Brazil

  • ‘IO` - British Indian Ocean Territory

  • ‘BN` - Brunei

  • ‘BG` - Bulgaria

  • ‘BF` - Burkina Faso

  • ‘BI` - Burundi

  • ‘CV` - Cabo Verde

  • ‘KH` - Cambodia

  • ‘CM` - Cameroon

  • ‘CA` - Canada

  • ‘KY` - Cayman Islands

  • ‘CF` - Central African Republic

  • ‘TD` - Chad

  • ‘CL` - Chile

  • ‘CN` - China

  • ‘CX` - Christmas Island

  • ‘CC` - Cocos (Keeling) Islands

  • ‘CO` - Colombia

  • ‘KM` - Comoros

  • ‘CG` - Congo

  • ‘CD` - Congo (the Democratic Republic of the)

  • ‘CK` - Cook Islands

  • ‘CR` - Costa Rica

  • ‘CI` - Côte d’Ivoire

  • ‘HR` - Croatia

  • ‘CU` - Cuba

  • ‘CW` - Curaçao

  • ‘CY` - Cyprus

  • ‘CZ` - Czechia

  • ‘DK` - Denmark

  • ‘DJ` - Djibouti

  • ‘DM` - Dominica

  • ‘DO` - Dominican Republic

  • ‘EC` - Ecuador

  • ‘EG` - Egypt

  • ‘SV` - El Salvador

  • ‘GQ` - Equatorial Guinea

  • ‘ER` - Eritrea

  • ‘EE` - Estonia

  • ‘SZ` - Eswatini

  • ‘ET` - Ethiopia

  • ‘FK` - Falkland Islands (Malvinas)

  • ‘FO` - Faroe Islands

  • ‘FJ` - Fiji

  • ‘FI` - Finland

  • ‘FR` - France

  • ‘GF` - French Guiana

  • ‘PF` - French Polynesia

  • ‘TF` - French Southern Territories

  • ‘GA` - Gabon

  • ‘GM` - Gambia

  • ‘GE` - Georgia

  • ‘DE` - Germany

  • ‘GH` - Ghana

  • ‘GI` - Gibraltar

  • ‘GR` - Greece

  • ‘GL` - Greenland

  • ‘GD` - Grenada

  • ‘GP` - Guadeloupe

  • ‘GU` - Guam

  • ‘GT` - Guatemala

  • ‘GG` - Guernsey

  • ‘GN` - Guinea

  • ‘GW` - Guinea-Bissau

  • ‘GY` - Guyana

  • ‘HT` - Haiti

  • ‘HM` - Heard Island and McDonald Islands

  • ‘VA` - Holy See

  • ‘HN` - Honduras

  • ‘HK` - Hong Kong

  • ‘HU` - Hungary

  • ‘IS` - Iceland

  • ‘IN` - India

  • ‘ID` - Indonesia

  • ‘IR` - Iran

  • ‘IQ` - Iraq

  • ‘IE` - Ireland

  • ‘IM` - Isle of Man

  • ‘IL` - Israel

  • ‘IT` - Italy

  • ‘JM` - Jamaica

  • ‘JP` - Japan

  • ‘JE` - Jersey

  • ‘JO` - Jordan

  • ‘KZ` - Kazakhstan

  • ‘KE` - Kenya

  • ‘KI` - Kiribati

  • ‘KW` - Kuwait

  • ‘KG` - Kyrgyzstan

  • ‘LA` - Laos

  • ‘LV` - Latvia

  • ‘LB` - Lebanon

  • ‘LS` - Lesotho

  • ‘LR` - Liberia

  • ‘LY` - Libya

  • ‘LI` - Liechtenstein

  • ‘LT` - Lithuania

  • ‘LU` - Luxembourg

  • ‘MO` - Macao

  • ‘MG` - Madagascar

  • ‘MW` - Malawi

  • ‘MY` - Malaysia

  • ‘MV` - Maldives

  • ‘ML` - Mali

  • ‘MT` - Malta

  • ‘MH` - Marshall Islands

  • ‘MQ` - Martinique

  • ‘MR` - Mauritania

  • ‘MU` - Mauritius

  • ‘YT` - Mayotte

  • ‘MX` - Mexico

  • ‘FM` - Micronesia (Federated States of)

  • ‘MD` - Moldova

  • ‘MC` - Monaco

  • ‘MN` - Mongolia

  • ‘ME` - Montenegro

  • ‘MS` - Montserrat

  • ‘MA` - Morocco

  • ‘MZ` - Mozambique

  • ‘MM` - Myanmar

  • ‘NA` - Namibia

  • ‘NR` - Nauru

  • ‘NP` - Nepal

  • ‘NL` - Netherlands

  • ‘NC` - New Caledonia

  • ‘NZ` - New Zealand

  • ‘NI` - Nicaragua

  • ‘NE` - Niger

  • ‘NG` - Nigeria

  • ‘NU` - Niue

  • ‘NF` - Norfolk Island

  • ‘KP` - North Korea

  • ‘MK` - North Macedonia

  • ‘MP` - Northern Mariana Islands

  • ‘NO` - Norway

  • ‘OM` - Oman

  • ‘PK` - Pakistan

  • ‘PW` - Palau

  • ‘PS` - Palestine, State of

  • ‘PA` - Panama

  • ‘PG` - Papua New Guinea

  • ‘PY` - Paraguay

  • ‘PE` - Peru

  • ‘PH` - Philippines

  • ‘PN` - Pitcairn

  • ‘PL` - Poland

  • ‘PT` - Portugal

  • ‘PR` - Puerto Rico

  • ‘QA` - Qatar

  • ‘RE` - Réunion

  • ‘RO` - Romania

  • ‘RU` - Russia

  • ‘RW` - Rwanda

  • ‘BL` - Saint Barthélemy

  • ‘SH` - Saint Helena, Ascension and Tristan da Cunha

  • ‘KN` - Saint Kitts and Nevis

  • ‘LC` - Saint Lucia

  • ‘MF` - Saint Martin (French part)

  • ‘PM` - Saint Pierre and Miquelon

  • ‘VC` - Saint Vincent and the Grenadines

  • ‘WS` - Samoa

  • ‘SM` - San Marino

  • ‘ST` - Sao Tome and Principe

  • ‘SA` - Saudi Arabia

  • ‘SN` - Senegal

  • ‘RS` - Serbia

  • ‘SC` - Seychelles

  • ‘SL` - Sierra Leone

  • ‘SG` - Singapore

  • ‘SX` - Sint Maarten (Dutch part)

  • ‘SK` - Slovakia

  • ‘SI` - Slovenia

  • ‘SB` - Solomon Islands

  • ‘SO` - Somalia

  • ‘ZA` - South Africa

  • ‘GS` - South Georgia and the South Sandwich Islands

  • ‘KR` - South Korea

  • ‘SS` - South Sudan

  • ‘ES` - Spain

  • ‘LK` - Sri Lanka

  • ‘SD` - Sudan

  • ‘SR` - Suriname

  • ‘SJ` - Svalbard and Jan Mayen

  • ‘SE` - Sweden

  • ‘CH` - Switzerland

  • ‘SY` - Syria

  • ‘TW` - Taiwan

  • ‘TJ` - Tajikistan

  • ‘TZ` - Tanzania

  • ‘TH` - Thailand

  • ‘TL` - Timor-Leste

  • ‘TG` - Togo

  • ‘TK` - Tokelau

  • ‘TO` - Tonga

  • ‘TT` - Trinidad and Tobago

  • ‘TN` - Tunisia

  • ‘TR` - Turkey

  • ‘TM` - Turkmenistan

  • ‘TC` - Turks and Caicos Islands

  • ‘TV` - Tuvalu

  • ‘UG` - Uganda

  • ‘UA` - Ukraine

  • ‘AE` - United Arab Emirates

  • ‘GB` - United Kingdom

  • ‘UM` - United States Minor Outlying Islands

  • ‘US` - United States of America

  • ‘UY` - Uruguay

  • ‘UZ` - Uzbekistan

  • ‘VU` - Vanuatu

  • ‘VE` - Venezuela

  • ‘VN` - Vietnam

  • ‘VG` - Virgin Islands (British)

  • ‘VI` - Virgin Islands (U.S.)

  • ‘WF` - Wallis and Futuna

  • ‘EH` - Western Sahara

  • ‘YE` - Yemen

  • ‘ZM` - Zambia

  • ‘ZW` - Zimbabwe.

Returns:

  • (Merge::Accounting::CountryEnum)

    The address’s country.

    • ‘AF` - Afghanistan

    • ‘AX` - Åland Islands

    • ‘AL` - Albania

    • ‘DZ` - Algeria

    • ‘AS` - American Samoa

    • ‘AD` - Andorra

    • ‘AO` - Angola

    • ‘AI` - Anguilla

    • ‘AQ` - Antarctica

    • ‘AG` - Antigua and Barbuda

    • ‘AR` - Argentina

    • ‘AM` - Armenia

    • ‘AW` - Aruba

    • ‘AU` - Australia

    • ‘AT` - Austria

    • ‘AZ` - Azerbaijan

    • ‘BS` - Bahamas

    • ‘BH` - Bahrain

    • ‘BD` - Bangladesh

    • ‘BB` - Barbados

    • ‘BY` - Belarus

    • ‘BE` - Belgium

    • ‘BZ` - Belize

    • ‘BJ` - Benin

    • ‘BM` - Bermuda

    • ‘BT` - Bhutan

    • ‘BO` - Bolivia

    • ‘BQ` - Bonaire, Sint Eustatius and Saba

    • ‘BA` - Bosnia and Herzegovina

    • ‘BW` - Botswana

    • ‘BV` - Bouvet Island

    • ‘BR` - Brazil

    • ‘IO` - British Indian Ocean Territory

    • ‘BN` - Brunei

    • ‘BG` - Bulgaria

    • ‘BF` - Burkina Faso

    • ‘BI` - Burundi

    • ‘CV` - Cabo Verde

    • ‘KH` - Cambodia

    • ‘CM` - Cameroon

    • ‘CA` - Canada

    • ‘KY` - Cayman Islands

    • ‘CF` - Central African Republic

    • ‘TD` - Chad

    • ‘CL` - Chile

    • ‘CN` - China

    • ‘CX` - Christmas Island

    • ‘CC` - Cocos (Keeling) Islands

    • ‘CO` - Colombia

    • ‘KM` - Comoros

    • ‘CG` - Congo

    • ‘CD` - Congo (the Democratic Republic of the)

    • ‘CK` - Cook Islands

    • ‘CR` - Costa Rica

    • ‘CI` - Côte d’Ivoire

    • ‘HR` - Croatia

    • ‘CU` - Cuba

    • ‘CW` - Curaçao

    • ‘CY` - Cyprus

    • ‘CZ` - Czechia

    • ‘DK` - Denmark

    • ‘DJ` - Djibouti

    • ‘DM` - Dominica

    • ‘DO` - Dominican Republic

    • ‘EC` - Ecuador

    • ‘EG` - Egypt

    • ‘SV` - El Salvador

    • ‘GQ` - Equatorial Guinea

    • ‘ER` - Eritrea

    • ‘EE` - Estonia

    • ‘SZ` - Eswatini

    • ‘ET` - Ethiopia

    • ‘FK` - Falkland Islands (Malvinas)

    • ‘FO` - Faroe Islands

    • ‘FJ` - Fiji

    • ‘FI` - Finland

    • ‘FR` - France

    • ‘GF` - French Guiana

    • ‘PF` - French Polynesia

    • ‘TF` - French Southern Territories

    • ‘GA` - Gabon

    • ‘GM` - Gambia

    • ‘GE` - Georgia

    • ‘DE` - Germany

    • ‘GH` - Ghana

    • ‘GI` - Gibraltar

    • ‘GR` - Greece

    • ‘GL` - Greenland

    • ‘GD` - Grenada

    • ‘GP` - Guadeloupe

    • ‘GU` - Guam

    • ‘GT` - Guatemala

    • ‘GG` - Guernsey

    • ‘GN` - Guinea

    • ‘GW` - Guinea-Bissau

    • ‘GY` - Guyana

    • ‘HT` - Haiti

    • ‘HM` - Heard Island and McDonald Islands

    • ‘VA` - Holy See

    • ‘HN` - Honduras

    • ‘HK` - Hong Kong

    • ‘HU` - Hungary

    • ‘IS` - Iceland

    • ‘IN` - India

    • ‘ID` - Indonesia

    • ‘IR` - Iran

    • ‘IQ` - Iraq

    • ‘IE` - Ireland

    • ‘IM` - Isle of Man

    • ‘IL` - Israel

    • ‘IT` - Italy

    • ‘JM` - Jamaica

    • ‘JP` - Japan

    • ‘JE` - Jersey

    • ‘JO` - Jordan

    • ‘KZ` - Kazakhstan

    • ‘KE` - Kenya

    • ‘KI` - Kiribati

    • ‘KW` - Kuwait

    • ‘KG` - Kyrgyzstan

    • ‘LA` - Laos

    • ‘LV` - Latvia

    • ‘LB` - Lebanon

    • ‘LS` - Lesotho

    • ‘LR` - Liberia

    • ‘LY` - Libya

    • ‘LI` - Liechtenstein

    • ‘LT` - Lithuania

    • ‘LU` - Luxembourg

    • ‘MO` - Macao

    • ‘MG` - Madagascar

    • ‘MW` - Malawi

    • ‘MY` - Malaysia

    • ‘MV` - Maldives

    • ‘ML` - Mali

    • ‘MT` - Malta

    • ‘MH` - Marshall Islands

    • ‘MQ` - Martinique

    • ‘MR` - Mauritania

    • ‘MU` - Mauritius

    • ‘YT` - Mayotte

    • ‘MX` - Mexico

    • ‘FM` - Micronesia (Federated States of)

    • ‘MD` - Moldova

    • ‘MC` - Monaco

    • ‘MN` - Mongolia

    • ‘ME` - Montenegro

    • ‘MS` - Montserrat

    • ‘MA` - Morocco

    • ‘MZ` - Mozambique

    • ‘MM` - Myanmar

    • ‘NA` - Namibia

    • ‘NR` - Nauru

    • ‘NP` - Nepal

    • ‘NL` - Netherlands

    • ‘NC` - New Caledonia

    • ‘NZ` - New Zealand

    • ‘NI` - Nicaragua

    • ‘NE` - Niger

    • ‘NG` - Nigeria

    • ‘NU` - Niue

    • ‘NF` - Norfolk Island

    • ‘KP` - North Korea

    • ‘MK` - North Macedonia

    • ‘MP` - Northern Mariana Islands

    • ‘NO` - Norway

    • ‘OM` - Oman

    • ‘PK` - Pakistan

    • ‘PW` - Palau

    • ‘PS` - Palestine, State of

    • ‘PA` - Panama

    • ‘PG` - Papua New Guinea

    • ‘PY` - Paraguay

    • ‘PE` - Peru

    • ‘PH` - Philippines

    • ‘PN` - Pitcairn

    • ‘PL` - Poland

    • ‘PT` - Portugal

    • ‘PR` - Puerto Rico

    • ‘QA` - Qatar

    • ‘RE` - Réunion

    • ‘RO` - Romania

    • ‘RU` - Russia

    • ‘RW` - Rwanda

    • ‘BL` - Saint Barthélemy

    • ‘SH` - Saint Helena, Ascension and Tristan da Cunha

    • ‘KN` - Saint Kitts and Nevis

    • ‘LC` - Saint Lucia

    • ‘MF` - Saint Martin (French part)

    • ‘PM` - Saint Pierre and Miquelon

    • ‘VC` - Saint Vincent and the Grenadines

    • ‘WS` - Samoa

    • ‘SM` - San Marino

    • ‘ST` - Sao Tome and Principe

    • ‘SA` - Saudi Arabia

    • ‘SN` - Senegal

    • ‘RS` - Serbia

    • ‘SC` - Seychelles

    • ‘SL` - Sierra Leone

    • ‘SG` - Singapore

    • ‘SX` - Sint Maarten (Dutch part)

    • ‘SK` - Slovakia

    • ‘SI` - Slovenia

    • ‘SB` - Solomon Islands

    • ‘SO` - Somalia

    • ‘ZA` - South Africa

    • ‘GS` - South Georgia and the South Sandwich Islands

    • ‘KR` - South Korea

    • ‘SS` - South Sudan

    • ‘ES` - Spain

    • ‘LK` - Sri Lanka

    • ‘SD` - Sudan

    • ‘SR` - Suriname

    • ‘SJ` - Svalbard and Jan Mayen

    • ‘SE` - Sweden

    • ‘CH` - Switzerland

    • ‘SY` - Syria

    • ‘TW` - Taiwan

    • ‘TJ` - Tajikistan

    • ‘TZ` - Tanzania

    • ‘TH` - Thailand

    • ‘TL` - Timor-Leste

    • ‘TG` - Togo

    • ‘TK` - Tokelau

    • ‘TO` - Tonga

    • ‘TT` - Trinidad and Tobago

    • ‘TN` - Tunisia

    • ‘TR` - Turkey

    • ‘TM` - Turkmenistan

    • ‘TC` - Turks and Caicos Islands

    • ‘TV` - Tuvalu

    • ‘UG` - Uganda

    • ‘UA` - Ukraine

    • ‘AE` - United Arab Emirates

    • ‘GB` - United Kingdom

    • ‘UM` - United States Minor Outlying Islands

    • ‘US` - United States of America

    • ‘UY` - Uruguay

    • ‘UZ` - Uzbekistan

    • ‘VU` - Vanuatu

    • ‘VE` - Venezuela

    • ‘VN` - Vietnam

    • ‘VG` - Virgin Islands (British)

    • ‘VI` - Virgin Islands (U.S.)

    • ‘WF` - Wallis and Futuna

    • ‘EH` - Western Sahara

    • ‘YE` - Yemen

    • ‘ZM` - Zambia

    • ‘ZW` - Zimbabwe



278
279
280
# File 'lib/merge_ruby_client/accounting/types/address_request.rb', line 278

def country
  @country
end

#country_subdivisionString (readonly)

Returns The address’s state or region.

Returns:

  • (String)

    The address’s state or region.



27
28
29
# File 'lib/merge_ruby_client/accounting/types/address_request.rb', line 27

def country_subdivision
  @country_subdivision
end

#integration_paramsHash{String => Object} (readonly)

Returns:

  • (Hash{String => Object})


282
283
284
# File 'lib/merge_ruby_client/accounting/types/address_request.rb', line 282

def integration_params
  @integration_params
end

#linked_account_paramsHash{String => Object} (readonly)

Returns:

  • (Hash{String => Object})


284
285
286
# File 'lib/merge_ruby_client/accounting/types/address_request.rb', line 284

def 
  @linked_account_params
end

#street_1String (readonly)

Returns Line 1 of the address’s street.

Returns:

  • (String)

    Line 1 of the address’s street.



21
22
23
# File 'lib/merge_ruby_client/accounting/types/address_request.rb', line 21

def street_1
  @street_1
end

#street_2String (readonly)

Returns Line 2 of the address’s street.

Returns:

  • (String)

    Line 2 of the address’s street.



23
24
25
# File 'lib/merge_ruby_client/accounting/types/address_request.rb', line 23

def street_2
  @street_2
end

#typeMerge::Accounting::AddressTypeEnum (readonly)

Returns The address type.

  • ‘BILLING` - BILLING

  • ‘SHIPPING` - SHIPPING.

Returns:



19
20
21
# File 'lib/merge_ruby_client/accounting/types/address_request.rb', line 19

def type
  @type
end

#zip_codeString (readonly)

Returns The address’s zip code.

Returns:

  • (String)

    The address’s zip code.



280
281
282
# File 'lib/merge_ruby_client/accounting/types/address_request.rb', line 280

def zip_code
  @zip_code
end

Class Method Details

.from_json(json_object:) ⇒ Merge::Accounting::AddressRequest

Deserialize a JSON object to an instance of AddressRequest

Parameters:

  • json_object (String)

Returns:



586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
# File 'lib/merge_ruby_client/accounting/types/address_request.rb', line 586

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  type = parsed_json["type"]
  street_1 = parsed_json["street_1"]
  street_2 = parsed_json["street_2"]
  city = parsed_json["city"]
  country_subdivision = parsed_json["country_subdivision"]
  country = parsed_json["country"]
  zip_code = parsed_json["zip_code"]
  integration_params = parsed_json["integration_params"]
   = parsed_json["linked_account_params"]
  new(
    type: type,
    street_1: street_1,
    street_2: street_2,
    city: city,
    country_subdivision: country_subdivision,
    country: country,
    zip_code: zip_code,
    integration_params: integration_params,
    linked_account_params: ,
    additional_properties: struct
  )
end

.validate_raw(obj:) ⇒ Void

Leveraged for Union-type generation, validate_raw attempts to parse the given

hash and check each fields type against the current object's property
definitions.

Parameters:

  • obj (Object)

Returns:

  • (Void)


625
626
627
628
629
630
631
632
633
634
635
# File 'lib/merge_ruby_client/accounting/types/address_request.rb', line 625

def self.validate_raw(obj:)
  obj.type&.is_a?(Merge::Accounting::AddressTypeEnum) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
  obj.street_1&.is_a?(String) != false || raise("Passed value for field obj.street_1 is not the expected type, validation failed.")
  obj.street_2&.is_a?(String) != false || raise("Passed value for field obj.street_2 is not the expected type, validation failed.")
  obj.city&.is_a?(String) != false || raise("Passed value for field obj.city is not the expected type, validation failed.")
  obj.country_subdivision&.is_a?(String) != false || raise("Passed value for field obj.country_subdivision is not the expected type, validation failed.")
  obj.country&.is_a?(Merge::Accounting::CountryEnum) != false || raise("Passed value for field obj.country is not the expected type, validation failed.")
  obj.zip_code&.is_a?(String) != false || raise("Passed value for field obj.zip_code is not the expected type, validation failed.")
  obj.integration_params&.is_a?(Hash) != false || raise("Passed value for field obj.integration_params is not the expected type, validation failed.")
  obj.&.is_a?(Hash) != false || raise("Passed value for field obj.linked_account_params is not the expected type, validation failed.")
end

Instance Method Details

#to_json(*_args) ⇒ String

Serialize an instance of AddressRequest to a JSON object

Returns:

  • (String)


615
616
617
# File 'lib/merge_ruby_client/accounting/types/address_request.rb', line 615

def to_json(*_args)
  @_field_set&.to_json
end