Skip to content

Commit

Permalink
update billing address street name
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobkagon committed Aug 9, 2024
1 parent 47e3f4c commit 661cd0b
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 38 deletions.
34 changes: 17 additions & 17 deletions lib/aca_entities/crm/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@ class Account < Dry::Struct
# @note :billing_address_street is optional
attribute :billing_address_street, Types::String.optional.meta(omittable: true)

# @!attribute [r] billing_address_street2
# @!attribute [r] billing_address_street_2
# @return [String, nil] optional second street address for billing
# @note :billing_address_street2 is optional
attribute :billing_address_street2, Types::String.optional.meta(omittable: true)
# @note :billing_address_street_2 is optional
attribute :billing_address_street_2, Types::String.optional.meta(omittable: true)

# @!attribute [r] billing_address_street3
# @!attribute [r] billing_address_street_3
# @return [String, nil] optional third street address for billing
# @note :billing_address_street3 is optional
attribute :billing_address_street3, Types::String.optional.meta(omittable: true)
# @note :billing_address_street_3 is optional
attribute :billing_address_street_3, Types::String.optional.meta(omittable: true)

# @!attribute [r] billing_address_street4
# @!attribute [r] billing_address_street_4
# @return [String, nil] optional fourth street address for billing
# @note :billing_address_street4 is optional
attribute :billing_address_street4, Types::String.optional.meta(omittable: true)
# @note :billing_address_street_4 is optional
attribute :billing_address_street_4, Types::String.optional.meta(omittable: true)

# @!attribute [r] billing_address_city
# @return [String] city for billing address
Expand Down Expand Up @@ -96,8 +96,8 @@ def account_same_as?(other_account)
end

# Compares the current account with another account based on a set of attributes.
# The comparison is made in the order of hbxid_c, name, email1, billing_address_street, billing_address_street2,
# billing_address_street3, billing_address_street4, billing_address_city, billing_address_postalcode,
# The comparison is made in the order of hbxid_c, name, email1, billing_address_street, billing_address_street_2,
# billing_address_street_3, billing_address_street4, billing_address_city, billing_address_postalcode,
# billing_address_state, phone_office, rawssn_c, raw_ssn_c, dob_c, and enroll_account_link_c.
#
# @param other [Account] The other account to compare with.
Expand All @@ -107,9 +107,9 @@ def <=>(other)
[
hbxid_c, name, email1,
billing_address_street,
billing_address_street2,
billing_address_street3,
billing_address_street4,
billing_address_street_2,
billing_address_street_3,
billing_address_street_4,
billing_address_city,
billing_address_postalcode,
billing_address_state,
Expand All @@ -119,9 +119,9 @@ def <=>(other)
] <=> [
other.hbxid_c, other.name, other.email1,
other.billing_address_street,
other.billing_address_street2,
other.billing_address_street3,
other.billing_address_street4,
other.billing_address_street_2,
other.billing_address_street_3,
other.billing_address_street_4,
other.billing_address_city,
other.billing_address_postalcode,
other.billing_address_state,
Expand Down
12 changes: 6 additions & 6 deletions lib/aca_entities/crm/contracts/account_contract.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ module Contracts
# @option opts [String] :email1 optional
# @option opts [String] :phone_office optional
# @option opts [String] :billing_address_street optional
# @option opts [String] :billing_address_street2 optional
# @option opts [String] :billing_address_street3 optional
# @option opts [String] :billing_address_street4 optional
# @option opts [String] :billing_address_street_2 optional
# @option opts [String] :billing_address_street_3 optional
# @option opts [String] :billing_address_street_4 optional
# @option opts [String] :billing_address_city optional
# @option opts [String] :billing_address_postalcode optional
# @option opts [String] :billing_address_state optional
Expand All @@ -39,9 +39,9 @@ class AccountContract < Dry::Validation::Contract
optional(:phone_office).maybe(AcaEntities::Crm::Types::Phone)

optional(:billing_address_street).maybe(Types::Coercible::String)
optional(:billing_address_street2).maybe(Types::Coercible::String)
optional(:billing_address_street3).maybe(Types::Coercible::String)
optional(:billing_address_street4).maybe(Types::Coercible::String)
optional(:billing_address_street_2).maybe(Types::Coercible::String)
optional(:billing_address_street_3).maybe(Types::Coercible::String)
optional(:billing_address_street_4).maybe(Types::Coercible::String)
optional(:billing_address_city).maybe(Types::Coercible::String)
optional(:billing_address_postalcode).maybe(Types::Coercible::String)
optional(:billing_address_state).maybe(Types::Coercible::String)
Expand Down
6 changes: 3 additions & 3 deletions lib/aca_entities/crm/transformers/sugar_account_to/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def transform(params)
name: params[:name],
email1: params[:email1],
billing_address_street: params[:billing_address_street],
billing_address_street2: params[:billing_address_street2],
billing_address_street3: params[:billing_address_street3],
billing_address_street4: params[:billing_address_street4],
billing_address_street_2: params[:billing_address_street_2],
billing_address_street_3: params[:billing_address_street_3],
billing_address_street_4: params[:billing_address_street_4],
billing_address_city: params[:billing_address_city],
billing_address_postalcode: params[:billing_address_postalcode],
billing_address_state: params[:billing_address_state],
Expand Down
6 changes: 3 additions & 3 deletions spec/aca_entities/crm/account_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
billing_address_city: 'Anytown',
billing_address_postalcode: '12345',
billing_address_state: 'ST',
billing_address_street2: 'Apt 1',
billing_address_street3: 'Floor 2',
billing_address_street4: 'Suite 3',
billing_address_street_2: 'Apt 1',
billing_address_street_3: 'Floor 2',
billing_address_street_4: 'Suite 3',
enroll_account_link_c: 'http://example.com/account'
}
end
Expand Down
6 changes: 3 additions & 3 deletions spec/aca_entities/crm/contracts/account_contract_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
raw_ssn_c: ssn,
email1: email,
phone_office: phone,
billing_address_street2: 'Apt 1',
billing_address_street3: 'Floor 2',
billing_address_street4: 'Suite 3',
billing_address_street_2: 'Apt 1',
billing_address_street_3: 'Floor 2',
billing_address_street_4: 'Suite 3',
billing_address_street: '123 Main St',
billing_address_city: 'Anytown',
billing_address_postalcode: '12345',
Expand Down
6 changes: 3 additions & 3 deletions spec/aca_entities/crm/operations/create_account_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
billing_address_city: 'Anytown',
billing_address_postalcode: '12345',
billing_address_state: 'ST',
billing_address_street2: 'Apt 1',
billing_address_street3: 'Floor 2',
billing_address_street4: 'Suite 3',
billing_address_street_2: 'Apt 1',
billing_address_street_3: 'Floor 2',
billing_address_street_4: 'Suite 3',
enroll_account_link_c: 'http://example.com/account'
}
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
:name => "Jane Test Doe",
:email1 => "[email protected]",
:billing_address_street => "1 Test St",
billing_address_street2: nil,
billing_address_street3: nil,
billing_address_street4: nil,
:billing_address_street_2: nil,
:billing_address_street_3: nil,
:billing_address_street4: nil,
:billing_address_city => "Testing City",
:billing_address_postalcode => "04055",
:billing_address_state => "ME",
Expand Down

0 comments on commit 661cd0b

Please sign in to comment.